{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Content Fetcher | $0.25/1K Pages",
    "description": "Fetch any public web page as clean Markdown, text or HTML with title and metadata. Optional selectors and link or image summaries. One page per request. $0.25 per 1k requests, run usage included.",
    "version": "0.1",
    "x-build-id": "7Vhoz43ELIXjMKOOj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/litescrape~web-fetch/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-litescrape-web-fetch",
        "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/litescrape~web-fetch/runs": {
      "post": {
        "operationId": "runs-sync-litescrape-web-fetch",
        "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/litescrape~web-fetch/run-sync": {
      "post": {
        "operationId": "run-sync-litescrape-web-fetch",
        "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": {
          "url": {
            "title": "Url",
            "minLength": 1,
            "maxLength": 8192,
            "type": "string",
            "description": "Public HTTP(S) URL to capture, 1-8,192 characters. Include http:// or https://; bare domains are rejected. The host must be public, on port 80 or 443, without embedded credentials."
          },
          "respond_with": {
            "title": "Respond with",
            "minLength": 3,
            "maxLength": 64,
            "type": "string",
            "description": "Output format: content (default; main content as Markdown, or the whole page when extraction keeps too little), markdown (whole page as Markdown), html, text, frontmatter (content plus front matter), or a '+' combination such as markdown+frontmatter. For screenshots use /api/web/screenshot."
          },
          "assert_status_code": {
            "title": "Assert status code",
            "minimum": 100,
            "maximum": 599,
            "type": "integer",
            "description": "Expected origin HTTP status, 100-599. A different status is rejected; otherwise a rendered error page is a successful capture."
          },
          "base": {
            "title": "Base",
            "enum": [
              "initial",
              "final"
            ],
            "type": "string",
            "description": "Resolve relative links against the requested URL (initial, default) or the final URL after redirects (final)."
          },
          "detach_invisibles": {
            "title": "Detach invisibles",
            "type": "boolean",
            "description": "Drop display:none elements from the page."
          },
          "engine": {
            "title": "Engine",
            "enum": [
              "auto",
              "browser",
              "curl"
            ],
            "type": "string",
            "description": "auto (default; lightweight HTTP first, a browser when needed), browser, or curl (no JavaScript)."
          },
          "inject_frame_script": {
            "title": "Inject frame script",
            "minItems": 1,
            "maxItems": 8,
            "type": "array",
            "description": "1-8 scripts (source, or a URL to a script), up to 8,192 characters each, run in every frame.",
            "items": {
              "type": "string"
            }
          },
          "inject_page_script": {
            "title": "Inject page script",
            "minItems": 1,
            "maxItems": 8,
            "type": "array",
            "description": "1-8 scripts (source, or a URL to a script), up to 8,192 characters each, run in the main frame.",
            "items": {
              "type": "string"
            }
          },
          "keep_img_data_url": {
            "title": "Keep img data url",
            "type": "boolean",
            "description": "Keep inline data: images in Markdown."
          },
          "locale": {
            "title": "Locale",
            "pattern": "^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*$",
            "minLength": 2,
            "maxLength": 64,
            "type": "string",
            "description": "Browser locale as a language tag, 2-64 characters. Defaults to the browser's own."
          },
          "markdown": {
            "title": "Markdown",
            "type": "object",
            "description": "Markdown formatting options."
          },
          "markdown_chunking": {
            "title": "Markdown chunking",
            "enum": [
              "true",
              "h1",
              "h2",
              "h3",
              "h4",
              "h5",
              "structured",
              "s1",
              "s2",
              "s3",
              "s4",
              "s5"
            ],
            "type": "string",
            "description": "true, h1-h5, structured or s1-s5: split the Markdown and return chunks."
          },
          "max_tokens": {
            "title": "Max tokens",
            "minimum": 500,
            "maximum": 10000000,
            "type": "integer",
            "description": "Integer 500-10,000,000. Trim content to this many tokens."
          },
          "no_gfm": {
            "title": "No gfm",
            "type": "boolean",
            "description": "true, false or table: disable GitHub-flavored Markdown, or only its tables."
          },
          "page_timeout": {
            "title": "Page timeout",
            "minimum": 1,
            "maximum": 180,
            "type": "integer",
            "description": "Seconds from 1 through 180 for page loading and browser operations. Cannot extend the total request budget set by timeout."
          },
          "preset": {
            "title": "Preset",
            "enum": [
              "reader",
              "index",
              "research",
              "agent",
              "spider"
            ],
            "type": "string",
            "description": "Option preset. Fills only the options the request leaves unset."
          },
          "referer": {
            "title": "Referer",
            "minLength": 1,
            "maxLength": 8192,
            "type": "string",
            "description": "HTTP(S) URL sent as the Referer."
          },
          "remove_overlay": {
            "title": "Remove overlay",
            "type": "boolean",
            "description": "Remove modal and cookie-banner overlays from the page."
          },
          "remove_selector": {
            "title": "Remove selector",
            "minLength": 1,
            "maxLength": 2048,
            "type": "string",
            "description": "CSS selector removed before extraction, 1-2,048 characters; POST also accepts a list of 1-16 selectors."
          },
          "respond_timing": {
            "title": "Respond timing",
            "enum": [
              "html",
              "visible-content",
              "mutation-idle",
              "resource-idle",
              "media-idle",
              "network-idle"
            ],
            "type": "string",
            "description": "Page readiness condition to reach before responding."
          },
          "retain_images": {
            "title": "Retain images",
            "enum": [
              "none",
              "all",
              "alt"
            ],
            "type": "string",
            "description": "Images to keep: all (default), alt (alt text only) or none."
          },
          "retain_links": {
            "title": "Retain links",
            "enum": [
              "none",
              "all",
              "text",
              "gpt-oss"
            ],
            "type": "string",
            "description": "Links to keep: all (default), text (link text only), none, or gpt-oss (citation format with a links summary)."
          },
          "retain_media": {
            "title": "Retain media",
            "enum": [
              "none",
              "text",
              "link",
              "image",
              "html"
            ],
            "type": "string",
            "description": "How video, audio and embedded video appear: none, text, link (default), image or html."
          },
          "robots_txt": {
            "title": "Robots txt",
            "minLength": 1,
            "maxLength": 256,
            "type": "string",
            "description": "User agent, 1-256 characters, to check against the site's robots.txt; disallowed URLs are rejected."
          },
          "set_cookies": {
            "title": "Set cookies",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "1-100 cookies in Set-Cookie syntax (name=value; Path=/; Domain=...), one line each, up to 4,096 characters.",
            "items": {
              "type": "string"
            }
          },
          "target_selector": {
            "title": "Target selector",
            "minLength": 1,
            "maxLength": 2048,
            "type": "string",
            "description": "CSS selector to extract, 1-2,048 characters; POST also accepts a list of 1-16 selectors. Implies waiting for the selector. Match-all selectors are rejected."
          },
          "timeout": {
            "title": "Timeout",
            "maximum": 90,
            "type": "number",
            "description": "Total request execution budget in seconds, greater than 0 and at most 90. Supply in the query string for GET or POST. page_timeout cannot extend this budget."
          },
          "token_budget": {
            "title": "Token budget",
            "minimum": 1,
            "maximum": 10000000,
            "type": "integer",
            "description": "Integer 1-10,000,000. Reject the page when its token count exceeds the budget."
          },
          "user_agent": {
            "title": "User agent",
            "minLength": 1,
            "maxLength": 1024,
            "type": "string",
            "description": "User-Agent for the page request, 1-1,024 characters without control characters. Defaults to the browser's own."
          },
          "viewport": {
            "title": "Viewport",
            "type": "object",
            "description": "Browser viewport; width and height are required. Default: 1280 x 1280."
          },
          "wait_for_selector": {
            "title": "Wait for selector",
            "minLength": 1,
            "maxLength": 2048,
            "type": "string",
            "description": "CSS selector to wait for after navigation, 1-2,048 characters. POST also accepts a list of 1-16 selectors."
          },
          "with_iframe": {
            "title": "With iframe",
            "type": "boolean",
            "description": "true, false or quoted: include iframe content before extraction."
          },
          "with_images_summary": {
            "title": "With images summary",
            "type": "boolean",
            "description": "Add an images list to the response."
          },
          "with_links_summary": {
            "title": "With links summary",
            "type": "boolean",
            "description": "true, false or all: add a links list to the response."
          },
          "with_shadow_dom": {
            "title": "With shadow dom",
            "type": "boolean",
            "description": "Include open shadow DOM content before extraction."
          },
          "requests": {
            "title": "Batch requests",
            "minItems": 1,
            "maxItems": 1000,
            "type": "array",
            "description": "Optional list of parameter objects. Top-level API fields are shared defaults; each object overrides them. Maximum 1,000 inputs.",
            "items": {
              "type": "object"
            }
          },
          "maxRequests": {
            "title": "Maximum paid requests",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Run-wide cap on successful API requests, including continuation pages. 1,000 requests cost $0.25.",
            "default": 100
          },
          "maxResults": {
            "title": "Maximum dataset rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap exported rows. An in-flight response can still be saved and billed in full. Complete JSON responses remain in storage.",
            "default": 1000
          },
          "maxPagesPerInput": {
            "title": "Maximum pages per input",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "1 returns the first page only. Additional pages follow source continuation links when available; every successful page is a paid request.",
            "default": 1
          },
          "maxConcurrency": {
            "title": "Concurrent requests",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Upper concurrency bound. The service may apply a lower limit for capacity or trial quotas.",
            "default": 2
          },
          "includeArtifacts": {
            "title": "Include source artifacts",
            "type": "boolean",
            "description": "Copy available raw source artifacts to this run. Availability varies by endpoint; unavailable artifacts do not invalidate a saved JSON response.",
            "default": false
          },
          "datasetOutput": {
            "title": "Export dataset",
            "type": "boolean",
            "description": "Enable dataset rows and recoverable per-request storage. Leave off for the cheapest JSON output. Pagination and artifacts also enable this workflow.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}