tika
Apache Tika Python library
What it is and what it does
Tika-python is a Python wrapper around Apache Tika that makes document parsing and metadata extraction available through a REST server interface. It handles text extraction, MIME type detection, language identification, and translation for a wide variety of document formats. The library manages a Tika REST server running in the background, so you interact with it as a Python library rather than managing a separate service.
The package provides multiple interfaces: a parser for extracting text and metadata, a detector for MIME type classification, a language detector, a translator, and a config interface to inspect available parsers and detectors. It supports both file paths and in-memory buffers, optional gzip compression, and can output content as plain text or XHTML. For disconnected environments, you can point to a local Tika server JAR file via environment variables.
Use it for:
- Extract text and metadata from PDFs, Word documents, and other formats for indexing or archival systems.
- Automatically detect MIME types of uploaded files to validate content before processing.
- Identify the language of document content to route to appropriate downstream processing pipelines.
- Translate extracted text from one language to another as part of a document processing workflow.
- Inspect Tika server configuration to understand which parsers and detectors are available in your deployment.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Tika-python provides Python access to Apache Tika's document parsing, metadata extraction, MIME type detection, and language identification through a REST server interface.
Yes, if you need to extract text and metadata from diverse document formats in Python and can meet the Java 11+ requirement. The library is actively maintained, has low install friction, carries a permissive license, and no known vulnerabilities. It is well-suited for document processing pipelines, search indexing, and content analysis. Not suitable if you cannot run Java or need to work entirely offline without pre-staging a Tika server JAR.
Install
tika on PyPI
pip
pip install tikauv
uv add tikapoetry
poetry add tikaInstalling tika
Before you install
Low install friction with just two runtime dependencies (beautifulsoup4, requests). Active maintenance with a recent release and steady commit history. Requires Java 11+ on the system to run the Tika REST server in the background.
License in practice
Apache-2.0 is permissive; you can use this freely in commercial and open-source projects with minimal restrictions, provided you include a copy of the license.
Quickstart
pip install tika
from tika import parser
parsed = parser.from_file('/path/to/file')
print(parsed["metadata"])
print(parsed["content"])
Java 11+ must be installed on your system; tika-python starts the Tika REST server as a background process. In airgap environments, you must manually download tika-server.jar and set TIKA_SERVER_JAR environment variable.
Verify before relying
- Whether the package handles all document formats that Apache Tika supports (fact sheet does not enumerate supported file types).
- Performance characteristics when processing large files or high-volume document batches.
- Stability and resource usage of the background Tika server process across different operating systems.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — beautifulsoup4, requests |
| Maintenance | actively maintained — 13 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 532,562/month — #6,147 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: tika-3.3.2-py3-none-any.whl
Keywords: tika, digital, babel fish, apache
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
pdftotextExtracts text from PDF files, including…
permissive · top 15,000 on PyPI
python-magicIdentifies file types by reading file headers…
permissive · top 1,000 on PyPI
file-magicfile-magic provides a Python interface to…
permissive · top 15,000 on PyPI
kreuzbergExtracts text, tables, images, and metadata…
permissive · top 15,000 on PyPI
textractExtracts text from documents in multiple…
permissive · top 15,000 on PyPI
magikaMagika identifies file types using deep…
permissive · top 5,000 on PyPI
python-magic-binIdentifies file types by examining file headers…
permissive · top 15,000 on PyPI
wikitextparserParses and manipulates MediaWiki wikitext…
copyleft · top 15,000 on PyPI
comment-parserExtracts comments from source code files across…
permissive · top 15,000 on PyPI
libmagicProvides Python bindings to the libmagic…
copyleft · top 15,000 on PyPI