{
  "openapi": "3.0.1",
  "info": {
    "title": "Instant Data Scraper: Extract Any List or Table to CSV",
    "description": "Instant data scraper for any website, no code: paste a URL and it finds the main list or table (products, search results, listings, directories), extracts every item into clean columns, follows next pages, Load more and infinite scroll, and exports CSV, Excel or JSON.",
    "version": "0.1",
    "x-build-id": "e2gUQ0uN2LVnn6BQg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zaiq~instant-data-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zaiq-instant-data-scraper",
        "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/zaiq~instant-data-scraper/runs": {
      "post": {
        "operationId": "runs-sync-zaiq-instant-data-scraper",
        "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/zaiq~instant-data-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-zaiq-instant-data-scraper",
        "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": "Web pages",
            "type": "array",
            "description": "The pages that show the list or table you want: a category or search results page, a directory, a ranking, a page with a table. One row is returned per item. Add several pages to extract several lists in one run.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxPages": {
            "title": "Pages to follow per URL",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many pages of each list to read: the first page plus next pages (Next links, page numbers, 'Load more' clicks, or scrolls of an infinite list). 1 reads only the page you gave.",
            "default": 5
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "The run stops after this many rows in total (all URLs together). Only rows are charged, so this also caps the cost.",
            "default": 1000
          },
          "previewOnly": {
            "title": "Preview: show the lists found (free)",
            "type": "boolean",
            "description": "Read only the first page of each URL (up to 10) and return one row per list or table found on it, best first, with its item count, columns and three sample rows. Nothing is charged. Use it to pick 'Which list' when the best guess is not the one you want.",
            "default": false
          },
          "listIndex": {
            "title": "Which list",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "1 takes the best match (usually the page's main list). If a page has several lists or tables, set 2, 3 ... to take another one; the run's LISTS record and preview mode show them all, numbered.",
            "default": 1
          },
          "renderMode": {
            "title": "JavaScript rendering",
            "enum": [
              "auto",
              "never",
              "always"
            ],
            "type": "string",
            "description": "Automatic reads each page's HTML first and loads it in a real browser only when the list is missing (built by JavaScript) or a 'Load more' button needs clicking. A page loaded in a browser costs a small extra fee, only when it gives new rows.",
            "default": "auto"
          },
          "clickLoadMore": {
            "title": "Click 'Load more' buttons",
            "type": "boolean",
            "description": "When a list has a 'Load more' / 'Show more' button instead of next pages, click it (in a browser) up to the page limit. Each click counts as a page.",
            "default": true
          },
          "infiniteScroll": {
            "title": "Scroll infinite lists",
            "type": "boolean",
            "description": "For lists that load more items as you scroll down: scroll in a browser up to the page limit (each scroll counts as a page) and stop when no new items appear.",
            "default": false
          },
          "waitForSelector": {
            "title": "Wait for this element (browser)",
            "type": "string",
            "description": "Optional CSS selector. In the browser, wait until it appears before reading the page, for example .product-card for a slow list."
          },
          "includeTables": {
            "title": "Include HTML tables",
            "type": "boolean",
            "description": "Treat <table> elements as lists, with columns named from the table's header row. Switch off to consider only lists and grids of cards.",
            "default": true
          },
          "dedupeItems": {
            "title": "Skip duplicate rows",
            "type": "boolean",
            "description": "A row identical to one already extracted in this run (the same item on two pages, a repeated 'featured' item) is not written again and not charged.",
            "default": true
          },
          "itemSelector": {
            "title": "Item selector (CSS, optional)",
            "type": "string",
            "description": "For power users: the CSS selector of one item, for example article.product_pod or li.result. Its matches become the rows and the columns are still found automatically. Leave empty for automatic detection."
          },
          "fields": {
            "title": "Fields (CSS, optional)",
            "type": "object",
            "description": "For power users: your own columns as {\"column name\": \"selector@attribute\"}, read inside each item, for example {\"title\": \"h3 a@title\", \"price\": \".price_color\", \"url\": \"h3 a@href\", \"image\": \"img@src\"}. Without @ the element's text is taken; @href and @src give full addresses; @html gives the HTML. When set, only these columns are returned."
          },
          "aiColumnNames": {
            "title": "AI column names",
            "type": "boolean",
            "description": "Ask an AI model for clearer column names (one short call per list, well under $0.001, billed through Apify's OpenRouter integration to the account that runs the Actor). Off: names come from the page's own markup.",
            "default": false
          },
          "country": {
            "title": "Country (optional)",
            "type": "string",
            "description": "Fetch every page through home (residential) connections in this country, confirmed by two IP-location services, to get that country's prices, language and listings. Leave empty for no particular country."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Used when no country is set. Residential proxies (the default) get through to most sites; the datacenter (automatic) group is enough for many simple sites. With a country set, residential connections in that country are always used.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxConcurrency": {
            "title": "URLs at once",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many of your URLs are read at the same time. The pages of one URL are always read in order.",
            "default": 5
          },
          "maxTriesPerPage": {
            "title": "Tries per page",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "A page that is blocked or fails to load is tried again through a new connection, up to this many times. Failed tries are free.",
            "default": 3
          },
          "acceptLanguage": {
            "title": "Accept-Language header",
            "type": "string",
            "description": "Optional, for example de-DE. Leave empty to send the country's usual browser language (English when no country is set)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}