pdfco

PDF.co API for PDF processing. Use when user mentions "PDF.co", "extract PDF", "parse PDF", or PDF automation.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "pdfco" with this command: npx skills add vm0-ai/vm0-skills/vm0-ai-vm0-skills-pdfco

PDF.co

All-in-one PDF processing API. Convert, extract, merge, split, compress PDFs and more. Supports OCR for scanned documents.

Official docs: https://docs.pdf.co/


When to Use

Use this skill when you need to:

  • Extract text from PDF files (with OCR support)
  • Convert PDF to CSV, JSON, or other formats
  • Merge multiple PDFs into one
  • Split PDF into multiple files
  • Compress PDF to reduce file size
  • Convert HTML/URL to PDF
  • Parse invoices and documents with AI

Prerequisites

  1. Create an account at https://pdf.co/
  2. Get your API key from https://app.pdf.co/

Set environment variable:

export PDFCO_API_KEY="your-email@example.com_your-api-key"

How to Use

1. PDF to Text

Extract text from PDF with OCR support:

Write to /tmp/request.json:

{
  "url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-to-text/sample.pdf",
  "inline": true
}
curl --location --request POST "https://api.pdf.co/v1/pdf/convert/to/text" --header "x-api-key: $(printenv PDFCO_API_KEY)" --header "Content-Type: application/json" -d @/tmp/request.json

With specific pages (1-indexed):

Write to /tmp/request.json:

{
  "url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-to-text/sample.pdf",
  "pages": "1-3",
  "inline": true
}
curl --location --request POST "https://api.pdf.co/v1/pdf/convert/to/text" --header "x-api-key: $(printenv PDFCO_API_KEY)" --header "Content-Type: application/json" -d @/tmp/request.json

2. PDF to CSV

Convert PDF tables to CSV:

Write to /tmp/request.json:

{
  "url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-to-csv/sample.pdf",
  "inline": true
}
curl --location --request POST "https://api.pdf.co/v1/pdf/convert/to/csv" --header "x-api-key: $(printenv PDFCO_API_KEY)" --header "Content-Type: application/json" -d @/tmp/request.json

3. Merge PDFs

Combine multiple PDFs into one:

Write to /tmp/request.json:

{
  "url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-merge/sample1.pdf,https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-merge/sample2.pdf",
  "name": "merged.pdf"
}
curl --location --request POST "https://api.pdf.co/v1/pdf/merge" --header "x-api-key: $(printenv PDFCO_API_KEY)" --header "Content-Type: application/json" -d @/tmp/request.json

4. Split PDF

Split PDF by page ranges:

Write to /tmp/request.json:

{
  "url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-split/sample.pdf",
  "pages": "1-2,3-"
}
curl --location --request POST "https://api.pdf.co/v1/pdf/split" --header "x-api-key: $(printenv PDFCO_API_KEY)" --header "Content-Type: application/json" -d @/tmp/request.json

5. Compress PDF

Reduce PDF file size:

Write to /tmp/request.json:

{
  "url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-optimize/sample.pdf",
  "name": "compressed.pdf"
}
curl --location --request POST "https://api.pdf.co/v1/pdf/optimize" --header "x-api-key: $(printenv PDFCO_API_KEY)" --header "Content-Type: application/json" -d @/tmp/request.json

6. HTML to PDF

Convert HTML or URL to PDF:

Write to /tmp/request.json:

{
  "html": "<h1>Hello World</h1><p>This is a test.</p>",
  "name": "output.pdf"
}
curl --location --request POST "https://api.pdf.co/v1/pdf/convert/from/html" --header "x-api-key: $(printenv PDFCO_API_KEY)" --header "Content-Type: application/json" -d @/tmp/request.json

From URL:

Write to /tmp/request.json:

{
  "url": "https://example.com",
  "name": "webpage.pdf"
}
curl --location --request POST "https://api.pdf.co/v1/pdf/convert/from/url" --header "x-api-key: $(printenv PDFCO_API_KEY)" --header "Content-Type: application/json" -d @/tmp/request.json

7. AI Invoice Parser

Extract structured data from invoices:

Write to /tmp/request.json:

{
  "url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/ai-invoice-parser/sample-invoice.pdf",
  "inline": true
}
curl --location --request POST "https://api.pdf.co/v1/ai-invoice-parser" --header "x-api-key: $(printenv PDFCO_API_KEY)" --header "Content-Type: application/json" -d @/tmp/request.json

8. Upload Local File

Upload a local file first, then use the returned URL:

Step 1: Get presigned upload URL

curl -s "https://api.pdf.co/v1/file/upload/get-presigned-url?name=myfile.pdf&contenttype=application/pdf" --header "x-api-key: $(printenv PDFCO_API_KEY)" | jq -r '.presignedUrl, .url'

Copy the presigned URL and file URL from the response.

Step 2: Upload file

Replace <presigned-url> with the URL from Step 1:

curl -X PUT "<presigned-url>" --header "Content-Type: application/pdf" --data-binary @/path/to/your/file.pdf

Step 3: Use file URL in subsequent API calls

Replace <file-url> with the file URL from Step 1:

Write to /tmp/request.json:

{
  "url": "<file-url>",
  "inline": true
}
curl --location --request POST "https://api.pdf.co/v1/pdf/convert/to/text" --header "x-api-key: $(printenv PDFCO_API_KEY)" --header "Content-Type: application/json" -d @/tmp/request.json

9. Async Mode (Large Files)

For large files, use async mode to avoid timeouts:

Step 1: Start async job

Write to /tmp/request.json:

{
  "url": "https://example.com/large-file.pdf",
  "async": true
}
curl -s --location --request POST "https://api.pdf.co/v1/pdf/convert/to/text" --header "x-api-key: $(printenv PDFCO_API_KEY)" --header "Content-Type: application/json" -d @/tmp/request.json | jq -r '.jobId'

Copy the job ID from the response.

Step 2: Check job status

Replace <job-id> with the job ID from Step 1:

Write to /tmp/request.json:

{
  "jobid": "<job-id>"
}
curl --location --request POST "https://api.pdf.co/v1/job/check" --header "x-api-key: $(printenv PDFCO_API_KEY)" --header "Content-Type: application/json" -d @/tmp/request.json

Common Parameters

ParameterTypeDescription
urlstringURL to source file (required)
inlinebooleanReturn result in response body
asyncbooleanRun as background job
pagesstringPage range, 1-indexed (e.g., "1-3", "1,3,5", "2-")
namestringOutput filename
passwordstringPDF password if protected
expirationintegerOutput link expiration in minutes (default: 60)

Response Format

{
  "url": "https://pdf-temp-files.s3.amazonaws.com/.../result.pdf",
  "pageCount": 5,
  "error": false,
  "status": 200,
  "name": "result.pdf",
  "credits": 10,
  "remainingCredits": 9990
}

With inline: true, the response includes body field with extracted content.


API Endpoints

EndpointDescription
/pdf/convert/to/textPDF to text (OCR supported)
/pdf/convert/to/csvPDF to CSV
/pdf/convert/to/jsonPDF to JSON
/pdf/mergeMerge multiple PDFs
/pdf/splitSplit PDF by pages
/pdf/optimizeCompress PDF
/pdf/convert/from/htmlHTML to PDF
/pdf/convert/from/urlURL to PDF
/ai-invoice-parserAI-powered invoice parsing
/document-parserTemplate-based document parsing
/file/upload/get-presigned-urlGet upload URL
/job/checkCheck async job status

Guidelines

  1. File Sources: Use direct URLs or upload files first via presigned URL
  2. Large Files: Use async: true for files over 40 pages or 10MB
  3. OCR: Automatically enabled for scanned PDFs (set lang for non-English)
  4. Rate Limits: Check your plan at https://pdf.co/pricing
  5. Output Expiration: Download results within expiration time (default 60 min)
  6. Credits: Each operation costs credits; check remainingCredits in response

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

vm0-agent

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

agentmail

No summary provided by upstream source.

Repository SourceNeeds Review
General

google-sheets

No summary provided by upstream source.

Repository SourceNeeds Review
246-vm0-ai
General

apify

No summary provided by upstream source.

Repository SourceNeeds Review
214-vm0-ai