← data exports  /  apify actor

Extract Text from PDF: Markdown & Metadata

how to get the data with our Apify actor pdf-text-extractor

Extract the text of PDF files page by page, as plain text or as Markdown with headings, bold, lists and paragraphs, ready for LLM and search pipelines. Each PDF also gives its page count, title, author, dates and other metadata. Links or uploads. Batch mode: process up to 1000 items per run.

on apify
v0iddo/pdf-text-extractor
category
automation, developer tools
build
0.1.8, built 2026-10-26
billing
Apify bills it per result; the price for your plan is on the actor's page.

What you get

Each processed item adds one row to the dataset with the result fields ({page_count, pages: [{n, text}] (Markdown: [{n, markdown}]), chars, metadata: {title, author, subject, keywords, creator, producer, created, modified}}; meta.note when the PDF has no text layer.), plus credits and ms. A failed item adds a row with error and status instead; the run fails only when every item failed.

The main fields of each row:

  • # (index)
  • Pages (page_count)
  • Characters (chars)
  • Text by page (pages)
  • metadata

Run it on Apify

  1. Open pdf-text-extractor on Apify and sign in, or make an Apify account.
  2. On the Input tab, fill in the fields listed below. The form opens with example values filled in.
  3. Click Start. Rows appear on the Output tab while the run works.
  4. Export the rows as JSON, CSV, Excel, XML or HTML, or read them through the Apify API.
  5. To run it again on a schedule, save the input as a task and add a schedule in the Apify Console.

What you can set

  • File URL (file_url): Public http(s) URL of the file. The PDF: base64 string (or data: URI) or {"url": "https://..."}. Up to 10 MB.
  • File URLs (bulk) (file_urls): Many files in one run: one public http(s) URL per line, up to 1000. Each file is processed on its own with the options below and gives its own row.
  • File (text) (file_text): The file content pasted as text. Use this or file_url.
  • File (base64) (file_base64): The file content as base64 (or a data: URI). Use this or file_url.
  • Pages (pages): Pages to extract, e.g. '1-3,7' or '5-' (default: all pages).
  • Layout (layout): Preserve the visual layout (columns, spacing) instead of reading order. Default: false.
  • Output format (format): text: the plain text of each page. markdown: headings, bold and italic, lists and paragraphs as Markdown, page headers and footers that repeat on most pages left out (layout does not apply). Options: Text, Markdown. Default: text.
  • Batch items (items): Optional. A list of input objects with the same fields as above; every object is processed in its own right and the top-level fields act as shared defaults. Leave empty to process the single input above (up to 1000 items per run).

Example input

This is the input the actor is tested with every day.

example inputjson
{
  "file_urls": [
    "https://www.irs.gov/pub/irs-pdf/fw9.pdf"
  ],
  "format": "markdown"
}

Run it from Python

The official apify-client package starts the run, waits for it and reads the rows. It needs your own Apify API token.

needs your own Apify tokenpython
# pip install apify-client
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")  # your own API token, from the Apify Console
run_input = {
    "file_urls": ["https://www.irs.gov/pub/irs-pdf/fw9.pdf"],
    "format": "markdown",
}
run = client.actor("v0iddo/pdf-text-extractor").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

Limits

  • Up to 30 seconds per item.
  • Input size up to 10,000,000 bytes per item.
  • URLs must be public http(s) addresses; private and local addresses are refused, robots.txt is respected where pages are fetched.
  • No logins, no captcha solving, no personal-data lookups.
  • Each run sends one short usage record to the developer: the Actor and run IDs, the number of results, whether the run succeeded (and if not, the kind of error, such as "blocked" or "input problem"), whether the account is on a paid Apify plan, how the run was started (for example from the Console, the API or a schedule) and a one-way fingerprint of the account (a hash, not the account ID), so that repeat runs of one account count once. It contains nothing from your input or results.

Questions

Do I need an account or an API key?

No key of your own. You only need an Apify account to start the actor.

How many items can one run process?

One item from the fields above, or up to 1,000 in items (batch mode) or one per URL in file_urls. Each item becomes one row in the dataset.

Where are the results?

In the run's dataset: export it as JSON, CSV, Excel or HTML from the Output tab, or read it through the API.

Can I run it on a schedule or from another tool?

Yes. Save the input as a task and schedule it in the Apify Console, or start it from Make, Zapier, n8n, a webhook or the API calls above.

More

every fact here is read from the actor's public data on Apify, every day; it last changed on