{
  "openapi": "3.0.1",
  "info": {
    "title": "HTTP API Scraper - Any JSON API to Dataset with Pagination",
    "description": "Call any JSON API with your own keys, follow page, offset, cursor or next-link pagination, and save every record as a row. JSONPath picks the records; keys stay secret.",
    "version": "0.1",
    "x-build-id": "Q5LEskEgIf5Y9I4o2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/goldstandardweb~http-api-to-dataset/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-goldstandardweb-http-api-to-dataset",
        "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/goldstandardweb~http-api-to-dataset/runs": {
      "post": {
        "operationId": "runs-sync-goldstandardweb-http-api-to-dataset",
        "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/goldstandardweb~http-api-to-dataset/run-sync": {
      "post": {
        "operationId": "run-sync-goldstandardweb-http-api-to-dataset",
        "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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "API URLs",
            "type": "array",
            "description": "One or more JSON API addresses (endpoints), one per line, including any query parameters, for example https://api.example.com/v1/items?status=open. Each address is paged on its own. Public addresses only: private networks and internal hosts are refused.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "method": {
            "title": "Method",
            "enum": [
              "GET",
              "POST"
            ],
            "type": "string",
            "description": "GET for most APIs. POST sends the JSON body below (search endpoints, GraphQL).",
            "default": "GET"
          },
          "body": {
            "title": "JSON body",
            "type": "object",
            "description": "Sent with POST only, for example {\"query\": \"{ countries { code name } }\"} for a GraphQL API. Stored as plain text: never put keys here, use \"Secret headers\" instead.",
            "default": {}
          },
          "recordsPath": {
            "title": "Records path",
            "type": "string",
            "description": "Where the list of records sits in the response, as a JSONPath or dotted path: data, data.items, $.results[*], message['items']. Each record becomes one dataset row. Leave empty to find the largest list automatically (the log tells you which one it picked).",
            "default": ""
          },
          "pagination": {
            "title": "Pagination",
            "enum": [
              "none",
              "page",
              "offset",
              "cursor",
              "nextUrl",
              "linkHeader"
            ],
            "type": "string",
            "description": "How the API splits results into pages. Page number: ?page=1, 2, 3. Offset: ?offset=0, 100, 200. Cursor: the response gives a token for the next page. Next-page URL: the response gives the next address. Link header: the next address is in the HTTP Link header (GitHub style).",
            "default": "none"
          },
          "pageParam": {
            "title": "Page parameter",
            "type": "string",
            "description": "Name of the page-number parameter (Page number pagination), for example page or page[number].",
            "default": "page"
          },
          "firstPage": {
            "title": "First page number",
            "minimum": 0,
            "type": "integer",
            "description": "The number of the first page. Most APIs start at 1, some at 0.",
            "default": 1
          },
          "offsetParam": {
            "title": "Offset parameter",
            "type": "string",
            "description": "Name of the offset parameter (Offset pagination), for example offset, skip or start.",
            "default": "offset"
          },
          "firstOffset": {
            "title": "First offset",
            "minimum": 0,
            "type": "integer",
            "description": "The offset of the first page, usually 0.",
            "default": 0
          },
          "pageSizeParam": {
            "title": "Page size parameter",
            "type": "string",
            "description": "Optional. Name of the parameter that sets records per page, for example limit, per_page or page[size]. Leave empty to use the API's default page size.",
            "default": ""
          },
          "pageSize": {
            "title": "Page size",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Records per page, sent with \"Page size parameter\". A shorter page counts as the last one, unless \"Total count path\" says more records are coming. 0 = not sent.",
            "default": 0
          },
          "cursorParam": {
            "title": "Cursor parameter",
            "type": "string",
            "description": "Name of the parameter that takes the next cursor (Cursor pagination), for example cursor, after or page_token.",
            "default": "cursor"
          },
          "firstCursor": {
            "title": "First cursor",
            "type": "string",
            "description": "Optional, for Cursor pagination: a value to send on the first request. Some APIs need one to start cursor paging, for example * for Crossref. Leave empty for most APIs.",
            "default": ""
          },
          "cursorPath": {
            "title": "Next cursor path",
            "type": "string",
            "description": "Where the response gives the next cursor (Cursor pagination), for example meta.next_cursor or pageInfo.endCursor. Paging stops when it is empty.",
            "default": ""
          },
          "nextUrlPath": {
            "title": "Next page URL path",
            "type": "string",
            "description": "Where the response gives the next page address (Next-page URL pagination), for example next, links.next or paging.next. Only addresses on the same site are followed, so your headers never go elsewhere.",
            "default": ""
          },
          "totalPath": {
            "title": "Total count path",
            "type": "string",
            "description": "Optional, for Page number and Offset pagination: where the response gives the total number of records, for example meta.total. Paging stops once that many records were read.",
            "default": ""
          },
          "paginationIn": {
            "title": "Put paging values in",
            "enum": [
              "query",
              "body"
            ],
            "type": "string",
            "description": "Where the page number, offset, cursor and page size go. JSON body needs POST; write the parameter names as body paths, for example variables.after.",
            "default": "query"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Stops after this many dataset rows (one row per record). Each row is one charged result. Capped at 1,000,000.",
            "default": 1000
          },
          "maxPagesPerUrl": {
            "title": "Max pages per URL",
            "minimum": 1,
            "type": "integer",
            "description": "Stops paging an address after this many requests. Capped at 10,000 (and 20,000 pages per run in total).",
            "default": 10
          },
          "secretHeaders": {
            "title": "Secret headers",
            "type": "string",
            "description": "Your own keys or tokens as HTTP headers, one per line, like X-API-Key: YOUR_KEY or Authorization: Basic .... Stored encrypted, never written to the log or the results, and sent only to the site of each API URL (never to a redirect on another site)."
          },
          "bearerToken": {
            "title": "Bearer token",
            "type": "string",
            "description": "Shortcut for Authorization: Bearer YOUR_TOKEN. Stored encrypted and never shown in the log or the results."
          },
          "secretQueryParams": {
            "title": "Secret query parameters",
            "type": "string",
            "description": "Keys that go in the address, one per line, like api_key=YOUR_KEY. Stored encrypted, added to every request, and left out of the log and the _sourceUrl field."
          },
          "headers": {
            "title": "Headers",
            "type": "object",
            "description": "Other HTTP headers that are not secret, for example {\"Accept-Language\": \"en-US\"}. Stored as plain text: put keys in \"Secret headers\".",
            "default": {}
          },
          "fields": {
            "title": "Fields to keep",
            "type": "array",
            "description": "Optional. Keep only these fields of each record, as paths: id, name, stats.users, tags[0]. Empty = keep the whole record.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "flatten": {
            "title": "Flatten nested fields",
            "type": "boolean",
            "description": "Turn nested objects and lists into flat columns (owner.name, tags.0), which reads well in Excel and Google Sheets.",
            "default": false
          },
          "includeMetadata": {
            "title": "Add source columns",
            "type": "boolean",
            "description": "Add _sourceUrl, _page, _position and _fetchedAt to each row. A record's own field with the same name is kept as is.",
            "default": true
          },
          "protectFormulas": {
            "title": "Protect spreadsheet formulas",
            "type": "boolean",
            "description": "Put a ' in front of text that starts with = + - or @ (numbers such as -4.5 are left alone), so Excel and Google Sheets show it as text instead of running it as a formula. Turn off to keep every value exactly as the API sent it.",
            "default": true
          },
          "onlyNew": {
            "title": "Only new records",
            "type": "boolean",
            "description": "Return only records not returned by an earlier run with the same settings (or the same \"History name\"). Useful on a schedule. Records seen before are not charged.",
            "default": false
          },
          "idPath": {
            "title": "Record ID path",
            "type": "string",
            "description": "For \"Only new records\": the field that identifies a record, for example id or data.uuid. Empty = compare whole records (any change counts as new).",
            "default": ""
          },
          "historyName": {
            "title": "History name",
            "type": "string",
            "description": "Optional name for the \"Only new records\" history (letters, digits and dashes). Runs with the same name share one history; empty = one history per set of URLs and paths.",
            "default": ""
          },
          "delayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Wait between two requests to the same host. Raise it if the API answers 429 (too many requests). A longer Crawl-delay in the site's robots.txt wins.",
            "default": 500
          },
          "timeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "How long one request may take before it is retried.",
            "default": 30
          },
          "maxResponseMB": {
            "title": "Max response size (MB)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Largest single response read (after unzipping). Bigger pages are reported, not half-read. Capped at 50.",
            "default": 10
          },
          "maxTotalMB": {
            "title": "Max download per run (MB)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stops the run after downloading this much in total. Capped at 5,000.",
            "default": 500
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Check each site's robots.txt and its Crawl-delay before calling it. Some API hosts block all automated access there even though their API terms allow it with a key; turn this off only when the provider allows your use.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}