Extract Resources
Extract → Extract Resources
The Extract Resources API extracts text and/or embedded images from a PDF. You send the PDF as Base64 (docContent), docName, extractText (true/false), extractImages (true/false), and optionally async. The API returns JSON with extracted text and images (Base64). Use the tester below to try it; more details are in the sections that follow.
Try the Extract Resources API
:::note Quick reference
Endpoint: POST /api/v2/ExtractResources · Required: api-key, docContent, docName, extractText, extractImages
:::
:::info Try it live Use the form below to send your API key, PDF (Base64), and choose whether to extract text, images, or both. The response is JSON with text and/or images in Base64. No code required—fill the fields and click Send request. :::
Overview, parameters, and use cases
- Overview
- Parameters
- Use cases
What is Extract Resources?
This endpoint extracts text content and/or embedded images from a PDF. You choose what to extract via extractText and extractImages (both booleans). The API returns JSON with extracted text and images (images in Base64). Use it when you need both text and images in one call, or only one of them.
Key features
- Text and/or images – extractText and extractImages let you request text only, images only, or both.
- JSON response – Text and embedded images (Base64) in a structured format.
- Async – Use async for PDFs with many pages or many images.
:::tip Best for Use when you need both text and images from a PDF in one request. For text only with regex patterns use Extract Text by Expression; for tables use Extract Table from PDF. :::
API parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api-key | string | Yes | Your PDF4me API key, Base64 encoded. Get it from the dashboard. |
| docContent | base64 | Yes | PDF file content (Base64). |
| docName | string | Yes | PDF file name with .pdf extension. |
| extractText | boolean | Yes | Extract text content from the PDF. |
| extractImages | boolean | Yes | Extract embedded images from the PDF. |
| async | boolean | No | Enable asynchronous processing. |
When to use Extract Resources
- Content extraction – Get both text and images from a PDF in one call for analysis or repurposing.
- Image harvesting – Extract embedded images (logos, charts) for reuse or indexing.
- Text + assets – Pull text and images together for search, archival, or migration.
:::info Need the full API? For request/response schemas and code samples, see Extract Resources in the PDF4me API docs. :::
Prerequisites
Before using this endpoint, make sure you have:
- A valid PDF4me API key (Get your API Key)
- A PDF document in Base64 format or a public URL to a PDF file
Response Format
The API returns a JSON response with extracted text content and embedded images in Base64 format.