textract
extract text from any document. no muss. no fuss.
Decision gist · record as of 2026-08-14
Yes, if you need to extract text from multiple document formats and want to avoid learning separate APIs for each. The low install friction, active maintenance, MIT license, and unified interface make it a practical choice for document processing workflows. No known vulnerabilities as of 2026-08-14.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires system libraries for some formats (e.g., pdfminer-six for PDF, python-pptx for PowerPoint); pillow for image text extraction.
- Low friction install with 11 runtime dependencies.
- Active maintenance: last commit 2026-08-05, release 109 days ago.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; you must include a copy of the license and copyright notice.
last release 2026-04-27 (109 days) · last repo commit 2026-08-05 · 4,690 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 454,872 downloads/mo, #6,565 on PyPI
Alternatives
Verify before relying
pip install textract
import textract
text = textract.process('document.pdf')
print(text)- Whether OCR capabilities are included for scanned images or if text extraction is limited to searchable documents.
- Performance characteristics with large documents or batch processing of many files.
- Specific format support and any known limitations or edge cases per document type.
What it is and what it does
textract is a document text extraction library that abstracts away the complexity of handling multiple file formats. Instead of learning separate APIs for PDF, Word, PowerPoint, Excel, and image files, you call a single function and get text back. It wraps specialized libraries (pdfminer-six for PDFs, python-pptx for presentations, xlrd for spreadsheets, docx2txt for Word, pillow for images, and others) into one consistent interface.
The package is designed for straightforward use: point it at a file, get text out. It handles format detection and delegates to the appropriate underlying tool. With 4690 GitHub stars and active maintenance, it serves as a practical utility for workflows that need to ingest text from mixed document sources without writing format-specific extraction code.
Use it for
- Batch processing a folder of mixed document types (PDFs, Word docs, spreadsheets) to extract and index text.
- Building a document search or archival system that needs to read text from files in multiple formats.
- Automating data extraction from email attachments and embedded documents.
- Preparing documents for NLP pipelines by converting various formats to plain text.
- Creating a document ingestion layer for a content management or knowledge base system.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to extract text from multiple document formats and want to avoid learning separate APIs for each.
The low install friction, active maintenance, MIT license, and unified interface make it a practical choice for document processing workflows. No known vulnerabilities as of 2026-08-14.
Install
textract on PyPI
Before you install
Low friction install with 11 runtime dependencies. Active maintenance: last commit 2026-08-05, release 109 days ago. Supports current Python versions (requires >=3.9).
Requires system libraries for some formats (e.g., pdfminer-six for PDF, python-pptx for PowerPoint); pillow for image text extraction.
License in practice
MIT license permits commercial and private use with minimal restrictions; you must include a copy of the license and copyright notice.
Quickstart
pip install textract
import textract
text = textract.process('document.pdf')
print(text)
Verify before relying
- Whether OCR capabilities are included for scanned images or if text extraction is limited to searchable documents.
- Performance characteristics with large documents or batch processing of many files.
- Specific format support and any known limitations or edge cases per document type.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 11 packagespillowspeechrecognitionargcompletebeautifulsoup4lxmlchardetdocx2txtextract-msgpdfminer-sixpython-pptxxlrd |
| Maintenance | Actively maintained 109 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 454,872 / month, #6,565 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: textract-2.0.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “document text extraction”
- textractExtracts text from documents in multiple formats (PDF, Word,…
- antiwordWraps LibreOffice's text conversion to convert documents to plain…
- kreuzbergExtracts text, tables, images, and metadata from 91+ file formats…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.
Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.
tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.
Install it if your project requires CSS tokenization or syntax manipulation.
See also amazon-textract-textractor · pdftotext · amazon-textract-response-parser · amazon-textract-caller · docling-parse · pdfminer · docx2txt · inscriptis · kreuzberg · flashtext