{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF Extractor API: Text, Markdown, Tables, No Login",
    "description": "Extract text from public PDF URLs: plain text, Markdown, tables, links, outline, page count and metadata per PDF or per page, with scanned pages flagged. $2 per 1,000 PDFs ($1.60 on Starter). Failed files are free. No login.",
    "version": "0.0",
    "x-build-id": "kw6gXQggrUUi6Vdgt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/conserving_celerytop~pdf-text-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-conserving_celerytop-pdf-text-extractor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/conserving_celerytop~pdf-text-extractor/runs": {
      "post": {
        "operationId": "runs-sync-conserving_celerytop-pdf-text-extractor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/conserving_celerytop~pdf-text-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-conserving_celerytop-pdf-text-extractor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "pdfUrls": {
            "title": "PDF URLs",
            "type": "array",
            "description": "Add the public web addresses of PDF files, one per line. Each PDF becomes one dataset row (or one row per page, see Row per).",
            "items": {
              "type": "string"
            }
          },
          "listDatasetId": {
            "title": "Dataset with the list",
            "type": "string",
            "description": "Pick an Apify Dataset that holds your PDF addresses, one entry per item. They are added to the entries typed above."
          },
          "listDatasetField": {
            "title": "Field in the dataset",
            "type": "string",
            "description": "Name of the dataset field that holds the entry. Leave empty to use the first text field it finds."
          },
          "listFileUrl": {
            "title": "List file URL",
            "type": "string",
            "description": "Web address of a .txt, .csv or .json file with your PDF addresses, one entry per line. A header row is skipped. Up to 10 MB."
          },
          "rowPer": {
            "title": "Row per",
            "enum": [
              "document",
              "page"
            ],
            "type": "string",
            "description": "Choose one row per PDF (full text, tables, links and metadata together) or one row per page (text and tables of each page, for page citations and chunking).",
            "default": "document"
          },
          "includeText": {
            "title": "Plain text",
            "type": "boolean",
            "description": "Return the plain text in reading order, with line breaks as in the PDF and a form feed between pages.",
            "default": true
          },
          "includeMarkdown": {
            "title": "Markdown",
            "type": "boolean",
            "description": "Return Markdown with headings, lists and tables, with running headers, footers and page numbers removed. Ready for LLMs and RAG pipelines.",
            "default": true
          },
          "extractTables": {
            "title": "Tables",
            "type": "boolean",
            "description": "Detect tables and return each one as rows of cells, in addition to the Markdown table.",
            "default": true
          },
          "saveFiles": {
            "title": "Save .txt and .md files",
            "type": "boolean",
            "description": "Also save each PDF's text and Markdown as files in the key-value store, linked in textFileUrl and markdownFileUrl (with Row per: Document). Very long documents are always saved this way.",
            "default": false
          },
          "maxPdfs": {
            "title": "Maximum PDFs",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Read at most this many PDFs from the list.",
            "default": 1000
          },
          "maxPagesPerPdf": {
            "title": "Maximum pages per PDF",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Read at most this many pages of each PDF, starting from page 1. The row says truncated: true when a PDF has more.",
            "default": 500
          },
          "maxFileSizeMegabytes": {
            "title": "Maximum file size",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Download PDFs up to this size. Larger files return status too_large and are free. For files over 50 MB, give the run 2 GB of memory or more.",
            "default": 50
          },
          "maxConcurrency": {
            "title": "Parallel PDFs",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Read up to this many PDFs at the same time (at most 2 per website). Lowered automatically when large files would not fit in the run's memory.",
            "default": 3
          },
          "downloadTimeoutSecs": {
            "title": "Download timeout",
            "minimum": 5,
            "maximum": 600,
            "type": "integer",
            "description": "Wait this long for one PDF download before retrying (3 attempts).",
            "default": 90
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}