{
  "openapi": "3.0.1",
  "info": {
    "title": "Polymarket Scraper - Odds, Volume & Order Books",
    "description": "Scrape Polymarket prediction markets for odds, 24h volume, liquidity, order books, trades, and wallets. Unofficial Polymarket API alternative - no login. Export JSON for Python, Node.js, and MCP.",
    "version": "0.1",
    "x-build-id": "M5y5a58opv7tzsQgB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawloop~polymarket-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawloop-polymarket-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/crawloop~polymarket-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawloop-polymarket-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/crawloop~polymarket-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawloop-polymarket-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",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "auto",
              "markets",
              "events",
              "search",
              "orderbook",
              "trades",
              "tags",
              "sports",
              "prices_history",
              "holders",
              "wallet",
              "leaderboard"
            ],
            "type": "string",
            "description": "What to collect. auto picks from URLs / queries / wallet. Default markets = top active prediction markets by 24h volume.",
            "default": "markets"
          },
          "startUrls": {
            "title": "Polymarket URLs",
            "type": "array",
            "description": "Event or market page URLs, slugs, or 0x wallet / condition IDs. Example: https://polymarket.com/event/fed-decision-in-october",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "queries": {
            "title": "Queries / slugs",
            "type": "array",
            "description": "Market/event slugs or keywords (e.g. trump, btc-updown-5m). Empty in markets mode = bulk top markets.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Shortcut for a Polymarket tag: politics, sports, crypto, elections, nba, nfl, soccer, finance, weather, ai, …",
            "default": ""
          },
          "tagId": {
            "title": "Tag ID",
            "minimum": 0,
            "type": "integer",
            "description": "Raw Gamma tag ID if you need a tag outside the category shortcuts. Use tags mode to discover IDs.",
            "default": 0
          },
          "status": {
            "title": "Market status",
            "enum": [
              "active",
              "closed",
              "all"
            ],
            "type": "string",
            "description": "Active (open) is the default. Closed returns resolved markets.",
            "default": "active"
          },
          "itemType": {
            "title": "Row grain (events vs markets)",
            "enum": [
              "markets",
              "events"
            ],
            "type": "string",
            "description": "markets = one row per tradable question. events = one row per event group (e.g. election winner basket).",
            "default": "markets"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "volume24hr",
              "volume",
              "liquidity",
              "startDate",
              "endDate",
              "competitive"
            ],
            "type": "string",
            "description": "Gamma sort field for bulk market/event lists.",
            "default": "volume24hr"
          },
          "ascending": {
            "title": "Sort ascending",
            "type": "boolean",
            "description": "Default false = highest volume / newest first.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on dataset rows. 0 = generous internal cap (not unlimited).",
            "default": 100
          },
          "minVolume24h": {
            "title": "Min 24h volume (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Drop thin markets below this 24h traded volume.",
            "default": 0
          },
          "minLiquidity": {
            "title": "Min liquidity (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Drop markets with resting CLOB liquidity below this.",
            "default": 0
          },
          "minTotalVolume": {
            "title": "Min lifetime volume (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Drop markets with lifetime volume below this.",
            "default": 0
          },
          "minTradeSize": {
            "title": "Min trade notional (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Trades mode: keep fills with size × price at least this (whale filter).",
            "default": 0
          },
          "explodeOutcomes": {
            "title": "One row per outcome",
            "type": "boolean",
            "description": "Split Yes/No (or team) outcomes into separate rows.",
            "default": false
          },
          "includeOrderBook": {
            "title": "Attach order books to markets",
            "type": "boolean",
            "description": "Fetch CLOB bids/asks for each market (slower). Use orderbook mode for book-only rows.",
            "default": false
          },
          "orderBookDepth": {
            "title": "Order book depth",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "How many bid/ask levels to keep. 0 = full book.",
            "default": 10
          },
          "onlyLive": {
            "title": "Live sports only",
            "type": "boolean",
            "description": "Keep events/markets where live=true (in-play).",
            "default": false
          },
          "sportsCatalog": {
            "title": "Sports catalog (leagues)",
            "type": "boolean",
            "description": "In sports mode with empty queries, output the league catalog instead of sports events.",
            "default": false
          },
          "walletAddress": {
            "title": "Wallet address",
            "type": "string",
            "description": "Polymarket proxy wallet (0x…) for wallet mode — positions and optional trades.",
            "default": ""
          },
          "includeTrades": {
            "title": "Include wallet trades",
            "type": "boolean",
            "description": "Wallet mode: also pull recent fills for that address.",
            "default": false
          },
          "priceInterval": {
            "title": "Price history interval",
            "enum": [
              "1m",
              "1h",
              "6h",
              "1d",
              "1w",
              "max"
            ],
            "type": "string",
            "description": "CLOB prices-history interval.",
            "default": "1d"
          },
          "priceFidelity": {
            "title": "Price history fidelity",
            "minimum": 1,
            "type": "integer",
            "description": "CLOB history fidelity (minutes). Higher = coarser.",
            "default": 60
          },
          "leaderboardPeriod": {
            "title": "Leaderboard period",
            "enum": [
              "DAY",
              "WEEK",
              "MONTH",
              "ALL"
            ],
            "type": "string",
            "description": "Time window for trader rankings: today, this week, this month, or all time.",
            "default": "MONTH"
          },
          "leaderboardOrderBy": {
            "title": "Leaderboard rank by",
            "enum": [
              "PNL",
              "VOL"
            ],
            "type": "string",
            "description": "Rank traders by profit/loss or by traded volume.",
            "default": "PNL"
          },
          "leaderboardCategory": {
            "title": "Leaderboard category",
            "enum": [
              "OVERALL",
              "POLITICS",
              "SPORTS",
              "CRYPTO",
              "FINANCE",
              "CULTURE",
              "WEATHER",
              "ECONOMICS",
              "TECH",
              "ESPORTS"
            ],
            "type": "string",
            "description": "Market category for the trader leaderboard (OVERALL or a vertical such as POLITICS / SPORTS).",
            "default": "OVERALL"
          },
          "requestDelaySecs": {
            "title": "Request delay (seconds)",
            "minimum": 0,
            "type": "number",
            "description": "Throttle between public API calls.",
            "default": 0.05
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Polymarket Gamma, CLOB, and Data APIs are public — proxy is rarely needed.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}