{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF Text Extractor: Bulk PDF to Text, Metadata and Links",
    "description": "Extract text from PDF files at any public URL, or from every PDF linked on a web page. Full text and text per page, title, author, dates, page count, word count, links and bookmarks, with a flag for scanned PDFs. Bulk, fast, no browser, no login.",
    "version": "1.0",
    "x-build-id": "2fCZDRJoejpqfZXRU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/joesimo~pdf-text-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-joesimo-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/joesimo~pdf-text-extractor/runs": {
      "post": {
        "operationId": "runs-sync-joesimo-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/joesimo~pdf-text-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-joesimo-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": "Direct links to PDF files, one per line. Redirects are followed. Files stored in an Apify key-value store or any public bucket work too.",
            "items": {
              "type": "string"
            }
          },
          "pageUrls": {
            "title": "Web pages with PDF links",
            "type": "array",
            "description": "Pages that link to PDF files (report libraries, investor relations pages, document lists). Every link to a .pdf file in the page HTML is extracted. Links built by JavaScript are not seen.",
            "items": {
              "type": "string"
            }
          },
          "maxPdfsPerPage": {
            "title": "Max PDFs per web page",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper limit of PDF links taken from each web page.",
            "default": 20
          },
          "sameSiteOnly": {
            "title": "Only PDFs on the same site",
            "type": "boolean",
            "description": "Skip PDF links that point to another domain than the web page.",
            "default": false
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "document",
              "pages"
            ],
            "type": "string",
            "description": "One row per PDF is best for search and AI pipelines. One row per page is best for citations and chunking.",
            "default": "document"
          },
          "includePageText": {
            "title": "Include text per page",
            "type": "boolean",
            "description": "In one-row-per-PDF mode, also add a pages array with the text and word count of every page.",
            "default": true
          },
          "includeMetadata": {
            "title": "Include document metadata",
            "type": "boolean",
            "description": "Author, subject, keywords, creator, producer, creation and modification dates, language, PDF version and form or signature flags.",
            "default": true
          },
          "includeLinks": {
            "title": "Include links",
            "type": "boolean",
            "description": "Web links found in the PDF (clickable link annotations), with the page they are on. Email links are left out. Off by default because reading annotations about doubles the processing time of long documents.",
            "default": false
          },
          "includeOutline": {
            "title": "Include bookmarks",
            "type": "boolean",
            "description": "The PDF outline (table of contents bookmarks) with level and page number.",
            "default": true
          },
          "maxPagesPerPdf": {
            "title": "Max pages per PDF",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Read only the first N pages of each PDF. 0 reads every page.",
            "default": 0
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Larger files are skipped (free row with type too_large). Raise run memory for files above 100 MB.",
            "default": 50
          },
          "maxTextChars": {
            "title": "Max text characters per row",
            "minimum": 1000,
            "maximum": 5000000,
            "type": "integer",
            "description": "Longer documents keep the first part in the row and the full text in the run's key-value store (fullTextUrl).",
            "default": 1000000
          },
          "password": {
            "title": "PDF password",
            "type": "string",
            "description": "Optional. Password for protected PDFs that you own or are allowed to open. Used for every file in the run."
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip files and pages that robots.txt disallows for all user agents. Turn off only for your own site.",
            "default": true
          },
          "concurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Files downloaded at the same time, with a short gap per host.",
            "default": 2
          },
          "timeoutSecs": {
            "title": "Download timeout (seconds)",
            "minimum": 10,
            "maximum": 600,
            "type": "integer",
            "description": "Per request. Large files on slow servers may need more.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}