Navigation
POST document

pdf_page_count

1 credit

Get page count and basic metadata from a PDF

Endpoint

POST /api/v1/tools/document/pdf_page_count

Body Parameters

pdf_base64 string required

Example

input Request
{
    "pdf_base64": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlIC9DYXRhbG9nIC9QYWdlcyAyIDAgUj4+CmVuZG9iagoyIDAgb2JqCjw8L1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDE+PgplbmRvYmoKMyAwIG9iago8PC9UeXBlIC9QYWdlIC9QYXJlbnQgMiAwIFIgL01lZGlhQm94IFswIDAgNjEyIDc5Ml0+PgplbmRvYmoKeHJlZgowIDQKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDA5IDAwMDAwIG4gCjAwMDAwMDAwNTggMDAwMDAgbiAKMDAwMDAwMDExNSAwMDAwMCBuIAp0cmFpbGVyCjw8L1NpemUgNCAvUm9vdCAxIDAgUj4+CnN0YXJ0eHJlZgoyMDEKJSVFT0YK"
}
output Response
{
    "title": null,
    "author": null,
    "creator": null,
    "subject": null,
    "producer": null,
    "encrypted": false,
    "page_count": 1
}

Response Format

HTTP/1.1 200 OK SUCCESS
{
  "success": true,
  "data": {
    "title": null,
    "author": null,
    "creator": null,
    "subject": null,
    "producer": null,
    "encrypted": false,
    "page_count": 1
},
  "meta": {
    "tool": "pdf_page_count",
    "credits_consumed": 1
  }
}
HTTP/1.1 422 Unprocessable Entity ERROR
{
  "success": false,
  "data": null,
  "error": {
    "code": "validation_error",
    "message": "The given data was invalid."
  }
}

Sign in to try this tool directly from the docs.

Code Examples
Request Example
lightbulb Developer Tip

Credits are deducted before execution. If the upstream tool fails, credits are automatically refunded to your account.