{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF Text Extractor & Parser API - Text, Metadata, E-mails",
    "description": "PDF to text API: PDF links in (bulk), full text, page count, metadata, links, e-mails, phones and keyword hits with page numbers out. Per-PDF or per-page rows for RAG, scanned-page flag, Google Drive / Dropbox links. $0.90 per 1,000 PDFs, no start fee.",
    "version": "1.0",
    "x-build-id": "71vvSPHvw55se2Ce5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rel8ble~pdf-text-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rel8ble-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/rel8ble~pdf-text-extractor/runs": {
      "post": {
        "operationId": "runs-sync-rel8ble-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/rel8ble~pdf-text-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-rel8ble-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 (up to 10,000). Google Drive \"file/d/...\" share links and Dropbox links are converted to the PDF download automatically. A link that returns a web page instead of a PDF comes back as status not_pdf and is not charged.",
            "items": {
              "type": "string"
            }
          },
          "outputMode": {
            "title": "Output: one row per",
            "enum": [
              "document",
              "page"
            ],
            "type": "string",
            "description": "document = one row per PDF with all text joined (cheapest). page = one row per page with that page's text, links, e-mails and keyword hits; every page row is one charged result.",
            "default": "document"
          },
          "includeText": {
            "title": "Include the text",
            "type": "boolean",
            "description": "Turn off to get only metadata, page counts, links, e-mails, phones and keyword hits (smaller rows, same price).",
            "default": true
          },
          "pageRange": {
            "title": "Page range",
            "type": "string",
            "description": "Read only these pages, for example \"1-3\" (first three), \"1,5,9-12\" or \"10-\" (page 10 to the end). Empty = all pages."
          },
          "maxPagesPerPdf": {
            "title": "Max pages per PDF",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many pages of each PDF (applied after pageRange). 0 = no limit.",
            "default": 0
          },
          "maxCharsPerDocument": {
            "title": "Max text characters per PDF",
            "minimum": 0,
            "maximum": 4000000,
            "type": "integer",
            "description": "Cut the text field after this many characters (textTruncated is then true; textLength keeps the full length). 0 = up to 4,000,000 characters.",
            "default": 0
          },
          "includePageTexts": {
            "title": "Also return text page by page (document mode)",
            "type": "boolean",
            "description": "Adds a pageTexts array [{page, text, wordCount}] to each document row, so you keep page numbers without paying per page.",
            "default": false
          },
          "extractContacts": {
            "title": "Extract e-mails and phone numbers",
            "type": "boolean",
            "description": "Finds e-mail addresses and valid phone numbers in the text (useful for supplier catalogs, exhibitor lists, price lists and directories). Links are always collected.",
            "default": true
          },
          "phoneCountry": {
            "title": "Default phone country",
            "type": "string",
            "description": "Two-letter country used for phone numbers written without a + country code, for example US, GB, DE, IN. Leave empty to keep only numbers written in international (+) form.",
            "default": "US"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Words or phrases to find in each PDF (up to 100). Each row gets termHits [{term, count, pages, snippet}] and matchedTerms. Matching is case-insensitive unless caseSensitive is on.",
            "items": {
              "type": "string"
            }
          },
          "caseSensitive": {
            "title": "Case-sensitive search",
            "type": "boolean",
            "description": "Match search terms with exact upper / lower case.",
            "default": false
          },
          "onlyMatching": {
            "title": "Only keep PDFs (or pages) that contain a search term",
            "type": "boolean",
            "description": "Drops documents (or pages in page mode) with no search-term hit. Dropped rows are not saved and not charged.",
            "default": false
          },
          "includeFailedRows": {
            "title": "Save rows for links that failed",
            "type": "boolean",
            "description": "Keeps one free row per link that could not be read (404, web page instead of PDF, password-protected, too large) with status and error, so you can see what went wrong. These rows are never charged.",
            "default": true
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Larger files are skipped with status too_large (not charged). Raise memory too for files above ~100 MB.",
            "default": 50
          },
          "maxResults": {
            "title": "Max charged rows",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many saved (charged) rows. 0 = no limit.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "How many PDFs are downloaded and parsed at the same time.",
            "default": 5
          },
          "maxRequestRetries": {
            "title": "Retries per download",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries on timeouts, 429 and 5xx answers.",
            "default": 3
          },
          "requestTimeoutSecs": {
            "title": "Download timeout (seconds)",
            "minimum": 10,
            "maximum": 600,
            "type": "integer",
            "description": "Per download attempt.",
            "default": 60
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not needed for most public PDFs. Turn on the Apify proxy only if a site refuses downloads from the cloud (HTTP 403 / 429).",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}