{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scrapewright-app/json-schema/scrapewright-app-crawl-request-schema.json",
  "title": "CrawlRequest",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scrapewright-app-openapi.yml#/components/schemas/CrawlRequest",
  "properties": {
    "url": {
      "type": "string",
      "title": "Url"
    },
    "fields": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Fields",
      "description": "Custom schema, e.g. ['title', 'salary:number', 'tags:list']. Omit for the built-in product schema."
    },
    "js": {
      "type": "boolean",
      "title": "Js",
      "description": "Render in a headless browser.",
      "default": false
    },
    "retry": {
      "type": "boolean",
      "title": "Retry",
      "description": "Try compiling a site that failed before. A site nobody could read is remembered for a week and answered without calling the model, so a daily refresh of a dead link costs nothing; this asks anyway.",
      "default": false
    },
    "max_items": {
      "type": "integer",
      "title": "Max Items",
      "default": 25
    },
    "mode": {
      "type": "string",
      "title": "Mode",
      "description": "How to find the items. 'links': follow links from a listing into item pages. 'rows': the listing's own cards are the rows, walking its pagination. 'like': the URL is one item page; find every other page shaped like it.",
      "default": "links"
    },
    "listing_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Listing Url",
      "description": "For mode='like': the stock, catalogue or results page these items are listed on, e.g. https://dealer.nl/occasions. Guessing it is the part that fails, so say it when you know it; the walk starts there and follows its pagination."
    },
    "rows": {
      "type": "boolean",
      "title": "Rows",
      "description": "Shipped before `mode` existed; true means mode='rows'.",
      "default": false,
      "deprecated": true
    },
    "scroll": {
      "type": "integer",
      "maximum": 50.0,
      "minimum": 0.0,
      "title": "Scroll",
      "description": "For listings that load more as you scroll: how many times to scroll before reading. Needs js=true. Scrolling stops early when the page stops growing, so a generous number costs nothing on a page that does not need it.",
      "default": 0
    }
  },
  "type": "object",
  "required": [
    "url"
  ]
}