{
  "openapi": "3.0.1",
  "info": {
    "title": "Polymarket API Scraper - Odds, Order Book, Trades, Wallets",
    "description": "29,600 Polymarket markets in one sweep, where offset paging stops at offset 2,000. Up to 92 fields per market. Polymarket scraper for election odds and event odds: implied probability, volume, liquidity, top holders, trades and wallet positions, plus a Polymarket odds monitor.",
    "version": "0.1",
    "x-build-id": "otx1xnLcu5i3X1Un7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/snow_leo_data~polymarket-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-snow_leo_data-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/snow_leo_data~polymarket-scraper/runs": {
      "post": {
        "operationId": "runs-sync-snow_leo_data-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/snow_leo_data~polymarket-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-snow_leo_data-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": {
          "query": {
            "title": "Keyword",
            "type": "string",
            "description": "Case-insensitive substring matched against the question, the slug, the description and the event title, e.g. fed, election, bitcoin. Leave empty to take the busiest markets first - with a keyword the Actor has to walk the catalogue until it finds enough matches, which takes longer on a rare word."
          },
          "resultType": {
            "title": "What to return",
            "enum": [
              "markets",
              "events",
              "trades",
              "wallets"
            ],
            "type": "string",
            "description": "markets - one row per tradable market (default). events - one row per event with its markets nested and the set priced as a whole. trades - the exchange-wide trade tape. wallets - open positions and P&L for the wallet addresses you list.",
            "default": "markets"
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many rows. 0 means no limit: a full sweep of open markets is 29,600 rows (measured 2026-09-12). A run with no limit AND no filters stops at 100 rows, so an accidental full sweep cannot surprise you; with any filter set, 0 really means everything that matches.",
            "default": 100
          },
          "tagSlug": {
            "title": "Tag",
            "type": "string",
            "description": "Server-side filter by Polymarket tag, e.g. politics, crypto, sports, economy, elections. One tag per run."
          },
          "targets": {
            "title": "Market or event URLs",
            "type": "array",
            "description": "Paste polymarket.com links straight from the browser. A link with two path segments is a market, a link with one is an event and its markets are expanded. Slugs work too.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "wallets": {
            "title": "Wallet addresses",
            "type": "array",
            "description": "Used by wallet mode: 0x... proxy wallet addresses. Each returns its open positions with entry price, current value and P&L, plus the portfolio value.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeClosed": {
            "title": "Include closed markets",
            "type": "boolean",
            "description": "Off by default: closed markets no longer trade. Turn on for resolved history and backtesting.",
            "default": false
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "volume24hr",
              "volume",
              "liquidity",
              "endDate",
              "startDate",
              "competitive",
              "id"
            ],
            "type": "string",
            "description": "Server-side ordering. Volume 24h first is what you want for a sample of what is actually trading right now.",
            "default": "volume24hr"
          },
          "ascending": {
            "title": "Ascending order",
            "type": "boolean",
            "description": "Off means biggest first.",
            "default": false
          },
          "minVolume": {
            "title": "Min lifetime volume, USD",
            "minimum": 0,
            "type": "integer",
            "description": "Applied by the API itself where it supports it, and re-checked here, so the number you set is the number you get."
          },
          "minVolume24h": {
            "title": "Min 24h volume, USD",
            "minimum": 0,
            "type": "integer",
            "description": "Dollars traded in the last 24 hours."
          },
          "minLiquidity": {
            "title": "Min liquidity, USD",
            "minimum": 0,
            "type": "integer",
            "description": "Dollars resting in the order book."
          },
          "minPrice": {
            "title": "Min price of first outcome",
            "type": "string",
            "description": "Lower bound, 0 to 1. Use 0.9 for near-certain outcomes."
          },
          "maxPrice": {
            "title": "Max price of first outcome",
            "type": "string",
            "description": "Upper bound, 0 to 1. Use 0.1 to list longshots only."
          },
          "endingWithinHours": {
            "title": "Ending within hours",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only markets that resolve inside this many hours from now."
          },
          "includeOrderBook": {
            "title": "Include order book",
            "type": "boolean",
            "description": "Full resting book for every outcome, plus computed bid and ask depth in dollars and the imbalance between them. Costs one extra API request per outcome, so two per binary market.",
            "default": false
          },
          "includePriceHistory": {
            "title": "Include price history",
            "type": "boolean",
            "description": "Time and price pairs for the first outcome over the chosen window, plus the window high, low and net change.",
            "default": false
          },
          "priceHistoryInterval": {
            "title": "Price history window",
            "enum": [
              "1h",
              "6h",
              "1d",
              "1w",
              "1m",
              "max"
            ],
            "type": "string",
            "description": "How far back the history reaches.",
            "default": "1d"
          },
          "includeTopHolders": {
            "title": "Include top holders",
            "type": "boolean",
            "description": "Largest position holders per outcome, by size, with the public wallet address and display name.",
            "default": false
          },
          "topHoldersLimit": {
            "title": "Holders per market",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many holders to keep per market.",
            "default": 10
          },
          "includeRecentTrades": {
            "title": "Include recent trades",
            "type": "boolean",
            "description": "Last trades on the market, plus time since the last trade, recent VWAP and the buy-side share.",
            "default": false
          },
          "recentTradesLimit": {
            "title": "Trades per market",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many recent trades to fetch per market.",
            "default": 20
          },
          "descriptionMaxLength": {
            "title": "Description max length",
            "minimum": 0,
            "type": "integer",
            "description": "Trim the resolution description to this many characters. 0 keeps it whole. Polymarket descriptions run long, and this is the cheapest way to cut payload for LLM pipelines.",
            "default": 0
          },
          "onlyChanged": {
            "title": "Monitor mode",
            "type": "boolean",
            "description": "Remember what was delivered and emit only markets that are new or that actually moved. State lives in a named key-value store, so it survives between runs.",
            "default": false
          },
          "minProbabilityMove": {
            "title": "Min probability move",
            "type": "string",
            "description": "In monitor mode, ignore moves smaller than this. 0.05 means a market is re-emitted only after its price moves 5 points.",
            "default": "0"
          },
          "emitUnchanged": {
            "title": "Emit unchanged rows",
            "type": "boolean",
            "description": "Off by default: you should not pay twice for a market that did not move.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Separate memories for separate schedules. Two schedules with different keys do not interfere.",
            "default": "default"
          },
          "compactOutput": {
            "title": "Compact output",
            "type": "boolean",
            "description": "17 core fields instead of the full row - for LLM context windows and agent pipelines.",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "Drop empty fields",
            "type": "boolean",
            "description": "Remove null, empty-string and empty-array fields from each row before it is written.",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "A run summary with up to 20 rows is POSTed here when the run ends. Slack and Discord incoming webhooks are formatted for them automatically; any other URL gets plain JSON."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}