{
  "openapi": "3.0.1",
  "info": {
    "title": "Website & PDF to RAG Chunks",
    "description": "Crawl any website (JavaScript too) or PDF (scanned too) and get clean, heading-aware chunks ready for embeddings and vector databases (Pinecone, Qdrant, Weaviate, pgvector, LangChain, LlamaIndex).",
    "version": "0.9",
    "x-build-id": "AlatGWEfE9MPy95oy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neighborly_ulexite~website-pdf-to-rag-chunks/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neighborly_ulexite-website-pdf-to-rag-chunks",
        "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/neighborly_ulexite~website-pdf-to-rag-chunks/runs": {
      "post": {
        "operationId": "runs-sync-neighborly_ulexite-website-pdf-to-rag-chunks",
        "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/neighborly_ulexite~website-pdf-to-rag-chunks/run-sync": {
      "post": {
        "operationId": "run-sync-neighborly_ulexite-website-pdf-to-rag-chunks",
        "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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Websites to crawl and/or direct links to PDF files. Each website is crawled within its own domain.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of web pages / PDF files to process in total.",
            "default": 100
          },
          "maxCrawlDepth": {
            "title": "Max crawl depth",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many links away from the start URLs to follow. 0 = only the start URLs.",
            "default": 3
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "chunks",
              "documents"
            ],
            "type": "string",
            "description": "'chunks' gives ready-to-embed pieces (best for vector databases). 'documents' gives one clean Markdown record per page.",
            "default": "chunks"
          },
          "chunkSizeTokens": {
            "title": "Chunk size (tokens)",
            "minimum": 50,
            "maximum": 8000,
            "type": "integer",
            "description": "Target size of each chunk, in approximate tokens (1 token ≈ 4 characters). 300-800 works well for most embedding models.",
            "default": 500
          },
          "chunkOverlapTokens": {
            "title": "Chunk overlap (tokens)",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "How much text consecutive chunks in the same section share, so answers that span a boundary are not lost.",
            "default": 50
          },
          "addContextHeader": {
            "title": "Add page title and section to each chunk",
            "type": "boolean",
            "description": "Fills 'textForEmbedding' with 'Page title > Section' before the chunk text. This usually improves retrieval quality.",
            "default": true
          },
          "minPageWords": {
            "title": "Skip pages with fewer words than",
            "minimum": 0,
            "type": "integer",
            "description": "Pages with less text than this (login pages, empty listings) are skipped and not charged.",
            "default": 30
          },
          "renderJavaScript": {
            "title": "JavaScript rendering",
            "enum": [
              "auto",
              "browser",
              "http"
            ],
            "type": "string",
            "description": "'Auto' (recommended) uses a real browser only for pages that come back empty or blocked without it, so simple sites stay fast and cheap. 'Always' renders every page in a browser. 'Never' is fastest.",
            "default": "auto"
          },
          "renderIfFewerWordsThan": {
            "title": "In Auto mode, use the browser if a page has fewer words than",
            "minimum": 0,
            "type": "integer",
            "description": "Only used in Auto mode. If a page has fewer words than this over plain HTTP, it is re-opened in a real browser.",
            "default": 60
          },
          "browserWaitSecs": {
            "title": "Extra wait after page load (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Time for late-loading content to appear.",
            "default": 1
          },
          "maxBrowserPages": {
            "title": "Parallel browser pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many pages the browser renders at the same time. More is faster but uses more memory.",
            "default": 2
          },
          "ocrMode": {
            "title": "OCR for scanned PDFs",
            "enum": [
              "auto",
              "always",
              "off"
            ],
            "type": "string",
            "description": "'Auto' (recommended) reads only pages that have no text layer (scans, photos of documents). 'Always' OCRs every page. 'Off' skips OCR.",
            "default": "auto"
          },
          "ocrLanguages": {
            "title": "OCR languages",
            "type": "array",
            "description": "Languages in the scanned documents. Pick all that apply.",
            "items": {
              "type": "string",
              "enum": [
                "eng",
                "spa",
                "fra",
                "deu",
                "ita",
                "por",
                "nld",
                "pol",
                "tur",
                "rus",
                "ukr",
                "ara",
                "hin",
                "chi_sim",
                "jpn",
                "kor"
              ],
              "enumTitles": [
                "English",
                "Spanish",
                "French",
                "German",
                "Italian",
                "Portuguese",
                "Dutch",
                "Polish",
                "Turkish",
                "Russian",
                "Ukrainian",
                "Arabic",
                "Hindi",
                "Chinese (Simplified)",
                "Japanese",
                "Korean"
              ]
            },
            "default": [
              "eng"
            ]
          },
          "maxOcrPages": {
            "title": "Max OCR pages per run",
            "minimum": 0,
            "type": "integer",
            "description": "Safety cap on scanned pages read per run.",
            "default": 500
          },
          "saveTableImages": {
            "title": "Save a screenshot of every PDF table",
            "type": "boolean",
            "description": "Each table found in a PDF is also saved as a PNG image. Chunks that contain the table link to it in 'tableImages', so people and multimodal AI models can see the original layout.",
            "default": true
          },
          "includeUrlGlobs": {
            "title": "Only crawl URLs matching",
            "type": "array",
            "description": "Optional glob patterns, e.g. https://example.com/docs/**. Start URLs are always processed.",
            "items": {
              "type": "string"
            }
          },
          "excludeUrlGlobs": {
            "title": "Never crawl URLs matching",
            "type": "array",
            "description": "Glob patterns to skip, e.g. **/tag/** or **?page=*",
            "items": {
              "type": "string"
            }
          },
          "sameDomainOnly": {
            "title": "Stay on the same domain",
            "type": "boolean",
            "description": "Only follow links that stay on the same website as the start URL.",
            "default": true
          },
          "stayUnderStartPath": {
            "title": "Stay inside the start URL's section",
            "type": "boolean",
            "description": "Start at https://site.com/docs/guide and only that page and pages under /docs/guide/ are crawled. If the start URL is a file like /docs/intro.html, its folder /docs/ is used.",
            "default": false
          },
          "useSitemap": {
            "title": "Use sitemap.xml",
            "type": "boolean",
            "description": "Discover pages from the site's sitemap as well as from links. Faster and more complete on most sites.",
            "default": true
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip pages the website asks crawlers not to visit in its robots.txt file.",
            "default": true
          },
          "keepLinks": {
            "title": "Keep link URLs in the text",
            "type": "boolean",
            "description": "Off by default: link URLs add noise for embeddings. Turn on to keep Markdown links.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many pages are downloaded at the same time.",
            "default": 5
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "How long to wait for a page to load before giving up.",
            "default": 30
          },
          "maxPdfSizeMb": {
            "title": "Max PDF size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "PDF files larger than this are skipped.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}