PDF Metadata & Content Extractor — Extract text & metadata
Pricing
from $0.015 / actor start
PDF Metadata & Content Extractor — Extract text & metadata
Download and extract metadata, text content, and page count from PDF documents. Supports batch processing with concurrent downloads.
Pricing
from $0.015 / actor start
Rating
0.0
(0)
Developer
Perry AY
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
PDF Metadata & Content Extractor — Extract Text, Metadata, and Tables from PDF Documents
Download PDF documents from URLs and extract metadata, text content, and embedded tables. Whether you're archiving document properties, indexing PDF text for search, or extracting tabular data from reports, this actor handles the heavy lifting in a single API call.
What does it do?
This actor downloads PDF documents from one or more URLs and extracts their metadata (title, author, subject, creator, producer), full text content, embedded tables, and structural information (page count, file size). It uses PyMuPDF for reliable PDF parsing and httpx for concurrent downloads with configurable concurrency.
Who is it for?
| Persona | What they use it for |
|---|---|
| Data Engineer | Extracting text and metadata from PDFs at scale for document processing pipelines |
| Content Manager | Batch-indexing PDF documents for search, archiving metadata such as author and subject |
| Legal/Compliance Analyst | Extracting text from contracts, agreements, and regulatory filings for review and audit |
| Researcher | Harvesting metadata and content from academic papers, PDF reports, and whitepapers |
| Document Automation Developer | Building workflows that transform PDF content into structured data for downstream systems |
| Backend Developer | Integrating PDF extraction into CI/CD, ETL, or document management systems without installing native PDF libraries |
Why use this?
- Batch processing with concurrent downloads — Process up to dozens of PDF URLs in a single run. The actor downloads up to 3 documents concurrently.
- Rich metadata extraction — Pull title, author, subject, creator, producer, and other standard PDF metadata fields.
- Full text extraction — Extract all readable text from every page. Text is returned as a single string (truncated to 10,000 characters).
- Table detection — Automatically locate and extract tabular structures embedded in PDF pages.
- Graceful error handling — Network timeouts, invalid PDFs, and download failures are caught per-URL so one bad link never takes down the whole batch.
- No local dependencies needed — Call it from cURL, Python, or any HTTP client.
Input Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
urls | array of strings | yes | — | Array of PDF URLs to download and process |
extractText | boolean | no | true | Extract full text content from every page |
extractMetadata | boolean | no | true | Extract document metadata (title, author, subject, etc.) |
Example Input
{"urls": ["https://example.com/document1.pdf","https://example.com/report-2024.pdf"],"extractText": true,"extractMetadata": true}
Output Format
Each PDF URL produces one result object in the dataset:
| Field | Type | Description |
|---|---|---|
url | string | The original PDF URL |
filename | string | Derived filename from the URL |
pageCount | integer | Total number of pages in the PDF |
fileSize | integer | Size of the downloaded PDF in bytes |
metadata | object | Document metadata. Empty if extractMetadata is false. |
text | string or null | Extracted text (truncated to 10,000 chars). null if extractText is false. |
tables | array | Detected tables as arrays of rows. Empty if none found. |
error | string or null | Error message if processing failed. null on success. |
Example Output
{"url": "https://example.com/document1.pdf","filename": "document1.pdf","pageCount": 12,"fileSize": 284756,"metadata": {"title": "Annual Report 2024","author": "Jane Doe","subject": "Financial Results","creator": "Microsoft Word","producer": "Adobe PDF Library 17.0"},"text": "Annual Report 2024\n\nIntroduction\nThis report summarizes...","tables": [[["Quarter", "Revenue", "Expenses"], ["Q1", "$1.2M", "$800K"]]],"error": null}
API Usage
cURL
curl -X POST "https://api.apify.com/v2/acts/perryay~pdf-metadata-extractor/runs?token=YOUR_API_TOKEN" \-H "Content-Type: application/json" \-d '{"urls": ["https://example.com/document.pdf"],"extractText": true,"extractMetadata": true}'
Python (ApifyClient)
from apify_client import ApifyClientclient = ApifyClient("YOUR_API_TOKEN")run = client.actor("perryay~pdf-metadata-extractor").call(run_input={"urls": ["https://example.com/document.pdf"],"extractText": True,"extractMetadata": True,})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(f"URL: {item['url']}, Pages: {item['pageCount']}")
Use Cases
-
Document Archiving and Metadata Harvesting — Automate extraction of PDF metadata across thousands of documents for library cataloging, digital asset management, or compliance archiving.
-
Search Indexing of PDF Content — Extract full text from PDF documents and feed it into a search engine (Elasticsearch, Algolia, Meilisearch) for full-text search across your document repository.
-
Contract and Agreement Analysis — Process batches of legal contracts, NDAs, and service agreements to extract text for clause analysis, key-term identification, or regulatory review.
-
Financial Report Data Extraction — Pull tables from quarterly reports, balance sheets, and income statements for quantitative analysis.
-
Academic Paper Metadata Collection — Harvest metadata and abstracts from collections of academic PDFs for research bibliographies and citation management.
-
Document Quality Assurance — Validate that generated PDFs have the correct page count, file size, and metadata fields before distribution.
-
ETL Pipeline Integration — Use the actor as a transform step in an ETL pipeline: ingest PDF URLs, extract metadata and text, and output structured records to a data warehouse.
FAQ
Q: Can I process more than one PDF URL in a single run?
A: Yes. Pass an array of PDF URLs in the urls field. Each URL's result is independent — a failure on one does not affect the others.
Q: What happens if a PDF URL returns an HTTP error?
A: The actor catches the HTTP error and returns a result with the error field set. The rest of the batch continues uninterrupted.
Q: How much text content is returned per PDF? A: Text is truncated to 10,000 characters by default. This covers the full content of most documents and keeps the output manageable.
Q: Does the table extraction work on scanned PDFs?
A: No. PyMuPDF's find_tables() works on PDFs with real text and vector graphics. Scanned PDFs that are purely image-based do not contain extractable tables.
Q: What PDF metadata fields are extracted? A: All standard PDF metadata fields: title, author, subject, creator, producer, keywords, and format. Empty fields are omitted.
Q: Is there a maximum PDF file size? A: The actor downloads PDFs up to several hundred megabytes. Timeout per download is 60 seconds with up to 3 retries.
Q: Can I skip text extraction and only get metadata?
A: Yes. Set extractText to false in the input for faster processing.
Q: Can I skip metadata extraction?
A: Yes. Set extractMetadata to false.
Q: Does the actor follow redirects? A: Yes. The HTTP client follows up to 5 redirects to resolve the final PDF URL.
Q: What if the URL points to an HTML page rather than a PDF? A: The actor expects direct PDF URLs. If the URL points to an HTML page containing an embedded PDF viewer, resolve the actual PDF URL first.
Q: Does the actor charge for failed PDF downloads? A: No. Only PDFs that are successfully downloaded, parsed, and processed incur a charge event. Network errors and invalid PDFs are not charged.
Usage & Billing
This actor uses Apify's PAY_PER_EVENT pricing model. You are charged per event:
| Event Name | Price (USD) | Trigger |
|---|---|---|
apify-actor-start | $0.015 | Charged on every actor start |
pdf-extract | $0.010 | Charged per PDF processed |
text-extraction | $0.005 | Charged when full text is extracted |
table-extraction | $0.005 | Charged when tables are found and extracted |
Platform infrastructure costs (Apify's compute and storage) are passed through at cost.
MCP Integration
This actor can be used through the Apify MCP server. Once connected, your MCP client (Claude Desktop, Cursor, etc.) can discover and run this actor from the Apify Store.
Quick Start
-
Install the Apify connector in your MCP client:
- Claude Desktop: Search for "Apify" in the connector directory, or use the remote server at
https://mcp.apify.com - Other clients: See the Apify MCP server docs for setup instructions
- Claude Desktop: Search for "Apify" in the connector directory, or use the remote server at
-
Ask your AI assistant to use the actor.
Claude Desktop Configuration
{"mcpServers": {"apify": {"url": "https://mcp.apify.com"}}}
On first connection, your browser opens to sign in to Apify and authorize access.
Bearer Token Alternative
For MCP clients that do not support browser-based OAuth (e.g., Cursor, VS Code, Windsurf), use a Bearer token directly:
{"mcpServers": {"apify": {"url": "https://mcp.apify.com","headers": {"Authorization": "Bearer <APIFY_TOKEN>"}}}}
Related Tools
- Meta Mate — Extract Open Graph, Twitter Cards, and JSON-LD metadata from URLs
- QR Craft — Generate high-quality QR codes in PNG or SVG format
- UUID Lab — Generate UUIDs, nanoids, short IDs, and ULIDs
- Domain Intel — WHOIS lookups, DNS enumeration, and SSL certificate validation