Extract PDF Content

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Extracts selected content from a PDF — text, images, attachments, metadata, and more — into a downloadable ZIP archive.

Endpoint

OAuth Scope

ZohoWriter.pdfEditor.ALLCopied!

Request Example

cURL
cURL
Java
Python
Deluge
Copied!
curl --request POST \
  --url https://www.zohoapis.com/pdfeditor/api/v1/pdf/content/extract \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'content-type: multipart/form-data' \
  -F 'file=@file_path' \
  -F 'input_options={
  "extract_text": true,
  "extract_images": true,
  "extract_attachments": false,
  "extract_metadata": false,
  "extract_annotations": false,
  "extract_bookmarks": false,
  "extract_rich_media": false,
  "extract_stamps": false,
  "extract_xmp_metadata": false,
  "extract_vector_graphics": false
}' \
  -F 'password=OpenSesame123'

Request Body

multipart/form-data
filebinary(Required)

The source PDF to extract content from, uploaded directly or imported from a publicly accessible URL. The file must be no larger than 50 MB, contain no more than 400 pages, and have no page larger than 2,400 square inches. Its filename must not exceed 255 characters. Supported formats: pdf.

Example
quarterly-review.pdf
input_optionsJSON Object(Required)

Configures which content types are extracted from the PDF. At least one setting must be provided.

Example
{
  "extract_text": true,
  "extract_images": true,
  "extract_attachments": false,
  "extract_metadata": false,
  "extract_annotations": false,
  "extract_bookmarks": false,
  "extract_rich_media": false,
  "extract_stamps": false,
  "extract_xmp_metadata": false,
  "extract_vector_graphics": false
}
Show Sub-Attributes
extract_textboolean(Optional)

Extracts the PDF's text content to extracted_text.txt in the output ZIP.

Example
true
Default Value :truetrueCopied!
extract_imagesboolean(Optional)

Extracts each embedded image as its own file in the output ZIP.

Example
true
Default Value :falsefalseCopied!
extract_attachmentsboolean(Optional)

Extracts embedded file attachments, both document-level and page-annotation-level, into an attachments/ folder in the output ZIP.

Example
false
Default Value :falsefalseCopied!
extract_metadataboolean(Optional)

Extracts the document's standard metadata (title, author, subject, keywords, creator, producer, creation and modification dates, page count, and encryption status) to metadata.json.

Example
false
Default Value :falsefalseCopied!
extract_annotationsboolean(Optional)

Extracts link URLs and comment text from the PDF's annotations into the extraction report.

Example
false
Default Value :falsefalseCopied!
extract_bookmarksboolean(Optional)

Extracts the PDF's bookmark/outline tree to bookmarks.json.

Example
false
Default Value :falsefalseCopied!
extract_rich_mediaboolean(Optional)

Extracts rich media (video/3D) annotation details into the extraction report.

Example
false
Default Value :falsefalseCopied!
extract_stampsboolean(Optional)

Extracts rubber-stamp annotations, including their custom appearance images, into the output ZIP and the extraction report.

Example
false
Default Value :falsefalseCopied!
extract_xmp_metadataboolean(Optional)

Extracts the document's raw XMP metadata to xmp_metadata.xml.

Example
false
Default Value :falsefalseCopied!
extract_vector_graphicsboolean(Optional)

Renders each page as a PNG image using a vector-only renderer, useful for capturing vector graphics that aren't otherwise extracted.

Example
false
Default Value :falsefalseCopied!
passwordstring(Optional)

The password to unlock the source PDF, if it is password-protected.

Example
OpenSesame123
Maximum Length :255255Copied!

Body Parameters

Copied!
// Note: payload contains multiple type attributes

// type: file
file = quarterly-review.pdf

// type: object
input_options = {
  "extract_text": true,
  "extract_images": true,
  "extract_attachments": false,
  "extract_metadata": false,
  "extract_annotations": false,
  "extract_bookmarks": false,
  "extract_rich_media": false,
  "extract_stamps": false,
  "extract_xmp_metadata": false,
  "extract_vector_graphics": false
}

// type: string
password = OpenSesame123
▼ Show full

Response Example

200
Copied!
  {
    "status": "inprogress",
    "status_check_url": "https://www.zohoapis.com/pdfeditor/api/v1/pdf/content/extract/job/3f65c7592a741d98e46bf310cbe678f574a1d51fce306a8d9b6430217e538acd"
  }
                
▼ Show full

Rate Limits

Duration1 minute
Threshold50
Lock Period5 minutes 30 seconds
Duration1 hour
Threshold200
Lock Period15 minutes
Duration1 day
Threshold2000
Lock Period2 hours

Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.