# DocRaptor

The best and easiest HTML-to-PDF API

- **Category:** developer tools
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 10
- **Triggers:** 0
- **Slug:** `DOCRAPTOR`
- **Version:** 20260316_00

## Tools

### Create Async Document

**Slug:** `DOCRAPTOR_CREATE_ASYNC_DOC`

Tool to create documents asynchronously from HTML content. Use when generating PDF, XLS, or XLSX documents and you need to poll for completion status or use a callback URL for notification. Returns a response containing an `id` field — store this value and pass it to DOCRAPTOR_GET_ASYNC_DOC_STATUS to poll for completion, then to DOCRAPTOR_GET_ASYNC_DOC to download the finished document.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tag` | string | No | Custom metadata for storage and tracking. |
| `help` | boolean | No | Request support assistance with this document. |
| `name` | string | Yes | Identifier for the document. |
| `test` | boolean | No | Enable test mode which adds a watermark to the document. |
| `strict` | string ("html" | "none") | No | Validation mode - must be one of: html, none. |
| `pipeline` | string | No | Specific DocRaptor Pipeline version to use. |
| `referrer` | string | No | HTTP referrer header value to use when fetching assets. |
| `javascript` | boolean | No | Enable DocRaptor JavaScript parsing. |
| `callback_url` | string | No | POST endpoint URL for completion notification. |
| `document_url` | string | No | URL to fetch HTML content from. Alternative to document_content. |
| `document_type` | string ("pdf" | "xls" | "xlsx") | Yes | Document format - must be one of: pdf, xls, xlsx. |
| `prince_options` | object | No | Advanced rendering configuration options for PrinceXML. |
| `document_content` | string | No | HTML content to transform. Required unless document_url is provided. Mutually exclusive with `document_url` — supplying both causes a validation failure. |
| `hosted_expires_at` | string | No | ISO 8601 datetime when hosted document expires. |
| `hosted_download_limit` | integer | No | Maximum number of downloads allowed for hosted document. |
| `ignore_resource_errors` | boolean | No | Continue processing if asset loading fails. |
| `ignore_console_messages` | boolean | No | Prevent console.log from interrupting rendering. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Document

**Slug:** `DOCRAPTOR_CREATE_DOC`

Tool to create a PDF or Excel document synchronously from HTML content or URL. Use when you need to generate a document file from HTML data. The document is returned immediately as a downloadable file. Either document_content or document_url must be provided, but not both.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tag` | string | No | A field for storing a small amount of metadata with this document. |
| `help` | boolean | No | Request support help with this request if it succeeds (default: false). |
| `name` | string | Yes | A name for identifying your document. |
| `test` | boolean | No | Enable test mode for this document (adds watermark). Set to false for production documents. |
| `strict` | string ("html" | "none") | No | HTML validation mode - none or html. |
| `pipeline` | string | No | Specify a specific version of the DocRaptor Pipeline. |
| `referrer` | string | No | Set HTTP referrer when generating this document. |
| `javascript` | boolean | No | Enable DocRaptor JavaScript parsing (default: false). |
| `callback_url` | string | No | POST URL for async completion notifications. |
| `document_url` | string | No | The URL to fetch the HTML data to be transformed. Required if document_content is not provided. Mutually exclusive with document_content. |
| `document_type` | string ("pdf" | "xls" | "xlsx") | Yes | Output format - pdf for PDF documents, xls for Excel 97-2003, or xlsx for modern Excel. |
| `prince_options` | object | No | Advanced rendering configuration options for PrinceXML engine. |
| `document_content` | string | No | The HTML data to be transformed into a document. Required if document_url is not provided. Mutually exclusive with document_url. |
| `hosted_expires_at` | string | No | ISO 8601 datetime when hosted document becomes unavailable. |
| `hosted_download_limit` | integer | No | Number of times a hosted document can be downloaded. |
| `ignore_resource_errors` | boolean | No | Failed loading of images/javascripts/stylesheets/etc will not cause rendering to stop (default: true). |
| `ignore_console_messages` | boolean | No | Prevent console.log from stopping document rendering (default: false). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Document from Referrer

**Slug:** `DOCRAPTOR_CREATE_DOCUMENT_FROM_REFERRER`

Tool to convert webpages into documents using referrer-based authentication without an API key. Use when you need to generate PDFs or Excel files from registered domains without explicit API credentials.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | Document filename to use for the generated file. |
| `type` | string ("pdf" | "xls") | No | Output format for the document. Choose 'pdf' for PDF documents or 'xls' for Excel spreadsheets. |
| `javascript` | boolean | No | Enable JavaScript processing on the page before conversion. Set to true to execute JavaScript on the page. |
| `prince_option_media` | string | No | CSS media type to use for rendering, such as 'screen' or 'print'. This affects which stylesheets are applied. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Hosted Async Document

**Slug:** `DOCRAPTOR_CREATE_HOSTED_ASYNC_DOC`

Tool to create a hosted document asynchronously. Use when you need to generate a PDF, XLS, or XLSX document and track its completion status via callback_url or the status API.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tag` | string | No | Small metadata storage field. |
| `help` | boolean | No | Requests support assistance; defaults to false. |
| `name` | string | Yes | Identifier for the document. |
| `test` | boolean | No | Enables test mode with watermark; defaults to true. |
| `strict` | string ("html" | "none") | No | HTML validation - 'none' or 'html'. |
| `pipeline` | string | No | Specifies DocRaptor pipeline version. |
| `referrer` | string | No | Sets HTTP referrer header. |
| `javascript` | boolean | No | Enables DocRaptor JavaScript parsing; defaults to false. |
| `callback_url` | string | No | POST endpoint for async completion notifications. |
| `document_url` | string | No | URL to fetch HTML content. Alternative to document_content. |
| `document_type` | string ("pdf" | "xls" | "xlsx") | Yes | Type of output document - pdf, xls, or xlsx. |
| `prince_options` | object | No | Advanced rendering configuration options for PrinceXML. |
| `document_content` | string | No | HTML data for transformation. Required if document_url is not provided. |
| `hosted_expires_at` | string | No | ISO 8601 datetime for document expiration. |
| `hosted_download_limit` | integer | No | Maximum download count for hosted docs. |
| `ignore_resource_errors` | boolean | No | Continues rendering if assets fail; defaults to true. |
| `ignore_console_messages` | boolean | No | Prevents console.log interruptions; defaults to false. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Download Async Document

**Slug:** `DOCRAPTOR_GET_ASYNC_DOC`

Tool to download a completed asynchronous document using the download URL from status response. Use when you have a download_id and need to retrieve the generated document file.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The download_id returned from an async status request or callback. Same id value returned by DOCRAPTOR_CREATE_ASYNC_DOC; use DOCRAPTOR_GET_ASYNC_DOC_STATUS to poll until complete before calling this tool. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Async Document Status

**Slug:** `DOCRAPTOR_GET_ASYNC_DOC_STATUS`

Tool to check the status of an asynchronously created document. Use when monitoring progress of async documents by polling for completion status.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The status_id returned when creating an asynchronous document. Returned by DOCRAPTOR_CREATE_ASYNC_DOC; store immediately as the same id is also required by DOCRAPTOR_GET_ASYNC_DOC to download the completed document. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Documents (JSON)

**Slug:** `DOCRAPTOR_LIST_DOCUMENTS_JSON`

Tool to retrieve a paginated list of previously created documents with metadata in JSON format. Use when you need to see document creation history or query past documents.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Specifies which page of results to return for pagination. Default is 1. |
| `per_page` | integer | No | Number of documents per page to return. Default is 100. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Documents (XML)

**Slug:** `DOCRAPTOR_LIST_DOCUMENTS_XML`

Tool to retrieve a paginated list of previously created documents with metadata in XML format. Use when you need to see document creation history or query past documents in XML format.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Specifies which page of results to return for pagination. Default is 1. |
| `per_page` | integer | No | Number of documents per page to return. Default is 100. Maximum is 100. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List IPs (JSON)

**Slug:** `DOCRAPTOR_LIST_IPS_JSON`

Tool to get list of IP addresses that DocRaptor uses to download assets. Use when you need to know which IPs DocRaptor uses for asset downloading. Note: Using IPs for securing assets is not recommended as they can change without notice.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List IPs (Text)

**Slug:** `DOCRAPTOR_LIST_IPS_TEXT`

Tool to retrieve a list of IP addresses that DocRaptor uses to download assets in plain text format. Use when you need to identify DocRaptor's IP addresses for network configuration or security purposes.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
