Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

apache/tika

Data

Detects and extracts metadata and text from over a thousand file types for Java applications and AI/RAG pipelines.

4,133
1,037
Java
Apache-2.0
17 years old

What Apache Tika Does

Apache Tika is an Apache Software Foundation toolkit that detects file types and extracts metadata and text from over a thousand formats, including PPT, XLS, and PDF. Its core value is giving Java applications one consistent parsing interface instead of integrating a separate library for every format.

Tika 4.x adds features aimed at agent and retrieval pipelines: Markdown output by default, structured recursive extraction with -J / /rmeta covering embedded documents, and crash-isolated forked parsing so a malformed document does not bring down the host service. Optional vision-language-model parsers for Claude, Gemini, and OpenAI handle documents that OCR cannot read.

The repository also ships ready-to-use agent skill definitions, including file-to-markdown (via tika-app or tika-server) and file-to-markdown-docker (containerized Tika with guaranteed OCR). They are standalone and can be copied into an agent's skill directory.

Quick Start

The fastest path is the command-line application. Download the tika-app-<version>.zip from the download page, unzip it into a directory (the archive has no top-level folder), and run the jar from inside that directory so it can load parsers from the adjacent lib/. Running the jar alone fails with NoClassDefFoundError.

java -jar tika-app-<version>.jar document.pdf        # Markdown (4.x default)
java -jar tika-app-<version>.jar --text document.pdf # plain text
java -jar tika-app-<version>.jar -J document.pdf     # structured JSON

To embed Tika in Java, add the parser package through Maven. The pom type dependency pulls in the standard parser set:

<dependency>
  <groupId>org.apache.tika</groupId>
  <artifactId>tika-parsers-standard-package</artifactId>
  <version>4.x.y</version>
  <type>pom</type>
</dependency>

Then call it directly:

import org.apache.tika.Tika;

Tika tika = new Tika();
String text = tika.parseToString(new File("document.pdf"));
System.out.println(text);

For multi-module projects, import the tika-bom in dependency management so Tika module versions stay aligned; Gradle users do the same with platform("org.apache.tika:tika-bom:4.x.y").

Build from Source

Building requires Java 17 and uses the included Maven wrapper:

./mvnw clean install

On Windows use mvnw.cmd. Integration tests that need Docker are skipped when Docker is not installed. The build produces a runnable tika-app/target/tika-app-*.jar you can test with --help. For single-module builds, add -am -pl :<module>. The -Pfast profile skips tests, checkstyle, and spotless, and -T1C enables parallel builds.

Constraints and Compatibility

Tika is based on Java 17. Tika 2.x and Java 8 support reached end of life in April 2025; the Tika Roadmap tracks support for each release line. Upgrading from 3.x to 4.x requires code and configuration changes — Java 17, TikaInputStream in the Parser/Detector SPI, JSON configuration replacing tika-config.xml, namespaced metadata keys, and Markdown as the default output. Separate migration guides cover the core library and Tika Server.

The distribution includes cryptographic software (Bouncy Castle, used for encrypted PDFs), which may carry import, possession, or re-export restrictions depending on your country. Apache Tika is licensed under Apache-2.0; subcomponents carry their own notices listed in LICENSE.txt.

HotRepo's take

Apache Tika appeared in the Java daily list on 2026-11-05 at position 11, gaining 2 stars that day, against a history of 4,128 stars and 1,037 forks since 2009. That is a mature project with slow but steady attention rather than a fast riser. The 4.x shift toward Markdown output, process isolation, and agent skills is notable because it reframes a long-standing format-parsing library as infrastructure for RAG and agent pipelines — a direction worth watching for teams already using Tika.

Written by AI from the project's README, updated . The project's own docs are the source of truth.