{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF Text Extractor - Text, Tables & Metadata from PDFs",
    "description": "Extract text, tables, links and metadata from PDF links or uploaded files. One row per PDF, flags scans with no text layer, clear errors for broken or locked files. Pay only for PDFs with text.",
    "version": "0.1",
    "x-build-id": "ArUu0iuNh2L2GLb56"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/goldstandardweb~pdf-text-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-goldstandardweb-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/goldstandardweb~pdf-text-extractor/runs": {
      "post": {
        "operationId": "runs-sync-goldstandardweb-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/goldstandardweb~pdf-text-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-goldstandardweb-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 links",
            "type": "array",
            "description": "Direct links to PDF files, one per line (for example https://www.irs.gov/pub/irs-pdf/fw9.pdf). Dropbox share links work too. Each PDF gives one row. Google Drive links can't be read (Google's robots.txt forbids automated downloads of Drive files); upload those files instead.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "uploadedFiles": {
            "title": "Upload PDF files",
            "type": "array",
            "description": "Upload PDFs from your computer (or paste more links). If your Apify storage is private, the default for new accounts, upload into a permanent or existing store and also pick that store under \"Key-value store with PDFs\" so the Actor may read it.",
            "default": []
          },
          "keyValueStoreId": {
            "title": "Key-value store with PDFs",
            "type": "string",
            "description": "Read PDFs that are already stored in one of your key-value stores (for example files saved by another Actor). Leave empty if you only use links."
          },
          "keyValueStoreKeys": {
            "title": "Record keys to read",
            "type": "array",
            "description": "Only read these records of the key-value store above. Leave empty to read every record (records that are not PDFs come back as free error rows).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "extractTables": {
            "title": "Detect tables",
            "type": "boolean",
            "description": "Find tables by the position of the text and return them as rows and cells. Best effort: works well on clean report tables, not on scans or merged-cell layouts.",
            "default": true
          },
          "extractLinks": {
            "title": "Extract links",
            "type": "boolean",
            "description": "List the clickable web and email links in each PDF, with their page numbers.",
            "default": true
          },
          "includePages": {
            "title": "Include text per page",
            "type": "boolean",
            "description": "Add a \"pages\" list with the text and word count of every page, in addition to the full text.",
            "default": false
          },
          "textLayout": {
            "title": "Text order",
            "enum": [
              "natural",
              "layout"
            ],
            "type": "string",
            "description": "\"Natural\" keeps the order the PDF stores its text (best for multi-column articles). \"Layout\" rebuilds each line from top to bottom and left to right, with table cells separated by a tab (best for forms and reports).",
            "default": "natural"
          },
          "maxPagesPerDocument": {
            "title": "Max pages per PDF",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Read at most this many pages of each PDF (up to 5,000). Longer files are marked with \"pagesTruncated\".",
            "default": 500
          },
          "maxFileSizeMb": {
            "title": "Max file size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Skip files larger than this (up to 100 MB). Skipped files are free and say so in the \"error\" column.",
            "default": 50
          },
          "perFileTimeoutSeconds": {
            "title": "Time limit per PDF",
            "minimum": 10,
            "maximum": 600,
            "type": "integer",
            "description": "Stop reading a single PDF after this many seconds (10 to 600). A stopped file is free and says so in the \"error\" column.",
            "default": 120
          },
          "maxResults": {
            "title": "Max charged results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many PDFs with text (each one is a charged result). Errors and scans without text don't count and are free.",
            "default": 1000
          },
          "maxRunMinutes": {
            "title": "Run time limit",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Stop starting new PDFs after this many minutes. PDFs not read are listed in the run's key-value store as \"UNPROCESSED\" and are not charged.",
            "default": 60
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}