Skip to main content

firecrawl-anydoc

PyPI License: MIT

Convert Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and PDF files into clean GitHub-Flavored Markdown. Python bindings for the anydoc Rust crate, built by Firecrawl. Also available as a hosted API through Firecrawl Parse, which adds our OCR models for the scanned pages anydoc can't read on its own.

Every format parses into one shared document model and renders through a single Markdown serializer, so headings, tables, lists, and footnotes come out the same no matter which format goes in. Conversion releases the GIL, so other threads keep running. Type stubs ship with the package.

pip install firecrawl-anydoc

The package installs as firecrawl-anydoc and imports as anydoc.

Supported formats

Format Extensions
Word .doc, .docx, .docm
PowerPoint .ppt, .pps, .pot, .pptx, .pptm, .ppsx, .ppsm
Excel .xls, .xlsx, .xlsm, .xlsb
OpenDocument .odt, .ods, .odp
Rich Text Format .rtf
EPUB .epub
CSV .csv
PDF .pdf

Usage

import anydoc

# From a file path:
markdown = anydoc.to_markdown("report.docx")

# From bytes, with the format detected from the content:
markdown = anydoc.to_markdown_bytes(data)

# Or name it, which signature-less formats (CSV) need:
markdown = anydoc.to_markdown_bytes(data, "csv")

# Or stop at the document model, which also carries embedded assets:
document = anydoc.to_document(data)

Scanned pages

anydoc converts locally and does not do OCR, so a PDF with scanned or image-only pages raises NeedsOcrError. Opt in with ocr="hosted" to send that document to Firecrawl Parse. No signup needed. Set api_key or FIRECRAWL_API_KEY for higher limits.

markdown = anydoc.to_markdown("scan.pdf", ocr="hosted")

parse_mode picks the Parse PDF mode: "auto" (the default) extracts text and falls back to OCR, "fast" extracts text only, "ocr" OCRs every page. Any other value raises HostedError before anything is sent.

markdown = anydoc.to_markdown("scan.pdf", ocr="hosted", parse_mode="ocr")

Errors

A conversion raises only when no complete Markdown could come out of the file. The exception type names what went wrong:

try:
    return anydoc.to_markdown(path)
except (anydoc.EncryptedError, anydoc.UnsupportedError) as error:
    # No document comes out of these, so record the file and take the next one.
    unconverted.append((path, type(error).__name__))
    return None
Exception Raised when
UnsupportedError Unknown format, or one that cannot be converted
NeedsOcrError Scanned or image-only pages of a PDF, listed in pages
MalformedError Structurally unusable: no meaningful content could be extracted
EncryptedError Encrypted or password-protected
ResourceLimitError Crossed a fixed safety limit (decompression, nesting, node count)
MissingPartError A part required for any meaningful output is absent
HostedError ocr="hosted" could not get the document through Firecrawl Parse
OSError The file could not be read, from to_markdown only

Every conversion failure subclasses anydoc.ConvertError, so catching that handles all of them at once. MalformedError.part and MissingPartError.part name the package part at fault, ResourceLimitError.limit names the limit crossed, and str(error) carries the whole message. A format argument naming no supported format raises ValueError.

Format detection

The format is read from the file content, using the marker its specification designates: the PDF header, the RTF open group, OLE stream names, the ZIP package mimetype and content types. CSV has no such marker, so detection returns None for it and the extension, or an explicit format, names it instead.

anydoc.format_from_bytes(data)  # 'docx', or None when nothing matches
anydoc.format_from_extension(".pptm")  # 'pptx'
anydoc.format_from_path("report.odt")  # 'odt'

Images and embedded objects

Markdown cannot embed bytes, so an embedded image renders as its alt text while the bytes stay on document.assets, tagged with a media type and the part they came from. Images that carry an external URL render as ordinary Markdown images.

Full behavior notes and benchmarks live in the repository README.

License

MIT

Metadata

Release files for firecrawl-anydoc 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for firecrawl-anydoc 0.2.5
File Size Uploaded Provenance Actions
firecrawl_anydoc-0.2.5.tar.gz 272.5 kB With provenance Details for firecrawl_anydoc-0.2.5.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for firecrawl-anydoc 0.2.5
File Actions
firecrawl_anydoc-0.2.5-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for firecrawl_anydoc-0.2.5-cp310-abi3-win_amd64.whl
firecrawl_anydoc-0.2.5-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details for firecrawl_anydoc-0.2.5-cp310-abi3-musllinux_1_2_x86_64.whl
firecrawl_anydoc-0.2.5-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details for firecrawl_anydoc-0.2.5-cp310-abi3-musllinux_1_2_aarch64.whl
firecrawl_anydoc-0.2.5-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for firecrawl_anydoc-0.2.5-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
firecrawl_anydoc-0.2.5-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for firecrawl_anydoc-0.2.5-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
firecrawl_anydoc-0.2.5-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for firecrawl_anydoc-0.2.5-cp310-abi3-macosx_11_0_arm64.whl
firecrawl_anydoc-0.2.5-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for firecrawl_anydoc-0.2.5-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 24.6 MB

Release files / firecrawl_anydoc-0.2.5.tar.gz

Download URL firecrawl_anydoc-0.2.5.tar.gz
Size 272.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7d8ea818c8c781b08fb47695ca5a7956fc666b28b1b0352d2e3d669991afde5a
BLAKE2b-256 checksum
How to use checksums
1af350b6c33b1b90a8e838848e45939d157456f08695554c58fd25b01ed27a68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / firecrawl_anydoc-0.2.5-cp310-abi3-win_amd64.whl

Download URL firecrawl_anydoc-0.2.5-cp310-abi3-win_amd64.whl
Size 3.5 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
1b4db5b51ffc7e9d115841c421107ba51039379b12e69c1b66572cb6213aced1
BLAKE2b-256 checksum
How to use checksums
b40a076843657e46c8f4039ea397ea7b8907a04af41f3d0668bb437f9056c119
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / firecrawl_anydoc-0.2.5-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL firecrawl_anydoc-0.2.5-cp310-abi3-musllinux_1_2_x86_64.whl
Size 3.8 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
97550c91815530f481b5867465b1a86387711ae0c85fc822d77e9f5879f2421f
BLAKE2b-256 checksum
How to use checksums
c2e0fd52c3d4edcfd04f2b59ab28d297793fc56c00d4aa61f722c9c00fd17356
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / firecrawl_anydoc-0.2.5-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL firecrawl_anydoc-0.2.5-cp310-abi3-musllinux_1_2_aarch64.whl
Size 3.5 MB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
2abf1ed7fcf0e6172a02c48b9d10c95e9c305a866b06dae722748763b071d70e
BLAKE2b-256 checksum
How to use checksums
0403befca830120e8e976e8b5372898625c51ee42dab0891382e1edc6f31cc6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / firecrawl_anydoc-0.2.5-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL firecrawl_anydoc-0.2.5-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 3.5 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
30e1c466f81851e0807c6e87b1e0e17d5e53ec8f4c4c6f166ef2e619f601bfe7
BLAKE2b-256 checksum
How to use checksums
dd329f375976759b61f4d7a3682e3fa65f2da87c94e605c86e1aae3648a01cd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / firecrawl_anydoc-0.2.5-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL firecrawl_anydoc-0.2.5-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 3.3 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
2c08f107d45887f6c0fb011261219c6084f874cd8abbb51b4994e5e0f275a4f2
BLAKE2b-256 checksum
How to use checksums
40606e57a1d5109acfacca0144de7fe33fdf01c32f0e9fb5df3d299ad34711e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / firecrawl_anydoc-0.2.5-cp310-abi3-macosx_11_0_arm64.whl

Download URL firecrawl_anydoc-0.2.5-cp310-abi3-macosx_11_0_arm64.whl
Size 3.3 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ae64ddc76da8a715949fd0bac229a5b72b5ffcf4ff171f1ee2e79b6dfeb98b55
BLAKE2b-256 checksum
How to use checksums
905d9abb122a360f1cda580605ffdeb9ccf13cd321a1a418ead3e20c82fdc726
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / firecrawl_anydoc-0.2.5-cp310-abi3-macosx_10_12_x86_64.whl

Download URL firecrawl_anydoc-0.2.5-cp310-abi3-macosx_10_12_x86_64.whl
Size 3.5 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
736d0191e3a9aee4994876781e10993976364ea45776a4c66188423e34ac3e59
BLAKE2b-256 checksum
How to use checksums
29d7ecb1c5f9188341f8bbc92a29e5b7f12da3ac150e7300aacb0b93fc5b41bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for firecrawl-anydoc 0.2.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for firecrawl_anydoc-0.2.5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page