{
  "openapi": "3.0.1",
  "info": {
    "title": "Polymarket Order Book Scraper API - CLOB Bids & Asks",
    "description": "The full live Polymarket order book per market: every bid and ask level with size, best bid, best ask, spread, and the total USD depth standing on each side, plus tick size and minimum order size. Books are fetched in batches. Failures are free, no run-start fee.",
    "version": "1.0",
    "x-build-id": "XIbySWeWEy09InsJA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vonsensey~polymarket-orderbook-clob-prices-scraper-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vonsensey-polymarket-orderbook-clob-prices-scraper-api",
        "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/vonsensey~polymarket-orderbook-clob-prices-scraper-api/runs": {
      "post": {
        "operationId": "runs-sync-vonsensey-polymarket-orderbook-clob-prices-scraper-api",
        "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/vonsensey~polymarket-orderbook-clob-prices-scraper-api/run-sync": {
      "post": {
        "operationId": "run-sync-vonsensey-polymarket-orderbook-clob-prices-scraper-api",
        "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": {
          "platforms": {
            "title": "Venues",
            "type": "array",
            "description": "This Actor reads Polymarket only.",
            "items": {
              "type": "string",
              "enum": [
                "polymarket"
              ],
              "enumTitles": [
                "Polymarket"
              ]
            },
            "default": [
              "polymarket"
            ]
          },
          "search": {
            "title": "Search",
            "type": "string",
            "description": "Optional. Polymarket's own search: returns the markets of events whose title matches this text, e.g. `election`, `bitcoin`, `fed`. Ignored when event slugs are set."
          },
          "eventSlugs": {
            "title": "Polymarket event slugs",
            "type": "array",
            "description": "Optional. Return only the markets of these Polymarket events, e.g. `democratic-presidential-nominee-2028`. Take the slug from the event URL (polymarket.com/event/<slug>). Takes precedence over search.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Market status",
            "enum": [
              "open",
              "closed",
              "settled"
            ],
            "type": "string",
            "description": "Open returns markets currently trading. Closed returns markets whose trading has ended, resolved ones included. Settled returns resolved markets only, with the winning outcome in `result` (empty when a market resolved 50-50).",
            "default": "open"
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Hard ceiling on billable rows. The default of 100 keeps a first run well under a cent.",
            "default": 50
          },
          "includeOrderBook": {
            "title": "Include the live order book",
            "type": "boolean",
            "description": "Adds every bid and ask level with size, best bid, best ask, spread and total USD depth per side. Billed as its own event, and never billed when the book could not be fetched.",
            "default": true
          },
          "includeHistory": {
            "title": "Include price history",
            "type": "boolean",
            "description": "Adds open, high, low and close price candles over the whole history window, for the market's first outcome (Yes on a yes/no market). On Polymarket they are built from the venue's own price history, which carries prices but no traded volume, so volume is empty. Billed as its own event, and never billed when no history could be fetched (you get a free error row instead).",
            "default": false
          },
          "historyDays": {
            "title": "History window (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "How far back price history goes, up to a year. 1-minute candles cover at most the last 7 days.",
            "default": 7
          },
          "historyIntervalMinutes": {
            "title": "Candle size",
            "enum": [
              "1",
              "60",
              "1440"
            ],
            "type": "string",
            "description": "Minutes per candle.",
            "default": "60"
          },
          "monitorChangesOnly": {
            "title": "Only bill markets that moved",
            "type": "boolean",
            "description": "For schedules. The run remembers what it saw last time and bills only markets whose watched fields have changed since; unchanged markets come back as free rows. This is what makes a 5-minute cron affordable.",
            "default": false
          },
          "watchFields": {
            "title": "Fields that count as a change",
            "type": "array",
            "description": "Which fields make a market billable again on a re-run. Price and status by default. Adding volume makes any trade at all count as a change.",
            "items": {
              "type": "string",
              "enum": [
                "price",
                "status",
                "volume",
                "liquidity",
                "openInterest"
              ],
              "enumTitles": [
                "Price",
                "Status",
                "Volume",
                "Liquidity",
                "Open interest"
              ]
            },
            "default": [
              "price",
              "status"
            ]
          },
          "maxCostUsd": {
            "title": "Stop after spending (USD)",
            "minimum": 0.01,
            "type": "number",
            "description": "A hard ceiling on what one run may spend, in USD. The run stops cleanly at the limit and says so in the free summary row. Accepts cents (0.25 is valid). Leave empty for no ceiling."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}