{
  "openapi": "3.0.1",
  "info": {
    "title": "Polymarket Markets & Odds Scraper",
    "description": "Polymarket markets scraper for prediction-market research. Export market questions, outcomes, prices, volume and liquidity as JSON, with optional order books, price history and recent trades.",
    "version": "1.0",
    "x-build-id": "ZFjHQOxbSfZNcDE70"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/grit-77~polymarket-markets-odds-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-grit-77-polymarket-markets-odds-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/grit-77~polymarket-markets-odds-scraper/runs": {
      "post": {
        "operationId": "runs-sync-grit-77-polymarket-markets-odds-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/grit-77~polymarket-markets-odds-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-grit-77-polymarket-markets-odds-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": {
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Find markets by keyword, for example `bitcoin`, `fed rate`, `world cup`. Each keyword is a separate search; results are in Polymarket's relevance order.",
            "items": {
              "type": "string"
            }
          },
          "markets": {
            "title": "Specific markets or events",
            "type": "array",
            "description": "Polymarket URLs (`https://polymarket.com/event/<event>/<market>` or an event URL for all its markets), market slugs, market ids, or condition ids (`0x` + 64 hex characters). Filters below are not applied to markets you name here.",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "title": "Categories (tag slugs)",
            "type": "array",
            "description": "Browse markets by Polymarket category slug, for example `politics`, `crypto`, `sports`, `economy`, `geopolitics`. Sorted by the sort option below.",
            "items": {
              "type": "string"
            }
          },
          "browseAll": {
            "title": "Browse top markets",
            "type": "boolean",
            "description": "List markets across all categories, sorted by the sort option below (no keyword needed).",
            "default": false
          },
          "status": {
            "title": "Market status",
            "enum": [
              "active",
              "closed",
              "all"
            ],
            "type": "string",
            "description": "Open (tradable) markets, resolved/closed markets, or both.",
            "default": "active"
          },
          "minVolume": {
            "title": "Minimum total volume (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Keep markets with at least this much lifetime trading volume. 0 = no minimum.",
            "default": 0
          },
          "minVolume24h": {
            "title": "Minimum 24h volume (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Keep markets with at least this much volume in the last 24 hours. 0 = no minimum.",
            "default": 0
          },
          "minLiquidity": {
            "title": "Minimum liquidity (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Keep markets with at least this much order-book liquidity. 0 = no minimum.",
            "default": 0
          },
          "endDateFrom": {
            "title": "Ends on or after",
            "type": "string",
            "description": "Only markets whose end date is on or after this date, format YYYY-MM-DD."
          },
          "endDateTo": {
            "title": "Ends on or before",
            "type": "string",
            "description": "Only markets whose end date is on or before this date (end of day, UTC), format YYYY-MM-DD."
          },
          "sortBy": {
            "title": "Sort (category / browse mode)",
            "enum": [
              "volume24hr",
              "volume",
              "liquidity",
              "endDate",
              "startDate"
            ],
            "type": "string",
            "description": "Order for category and browse results. Keyword searches always keep Polymarket's relevance order.",
            "default": "volume24hr"
          },
          "sortAscending": {
            "title": "Ascending order",
            "type": "boolean",
            "description": "Sort lowest first (for example soonest end date first).",
            "default": false
          },
          "includeOrderBook": {
            "title": "Include order book",
            "type": "boolean",
            "description": "Add live bids and asks for every outcome to each market row (one extra request per outcome). No extra charge.",
            "default": false
          },
          "orderBookDepth": {
            "title": "Order book depth",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Price levels kept per side when the order book is included.",
            "default": 5
          },
          "includePriceHistory": {
            "title": "Include price history",
            "type": "boolean",
            "description": "Also return the price history of every outcome as separate `history-point` rows (billed per 100 points).",
            "default": false
          },
          "historyInterval": {
            "title": "History window",
            "enum": [
              "1h",
              "6h",
              "1d",
              "1w",
              "1m",
              "max"
            ],
            "type": "string",
            "description": "How far back the price history goes: last hour, 6 hours, day, week, month, or the whole life of the market.",
            "default": "1w"
          },
          "historyFidelity": {
            "title": "History resolution (minutes)",
            "minimum": 1,
            "maximum": 10080,
            "type": "integer",
            "description": "Minutes between price points: 60 = hourly, 1440 = daily. Very small values over long windows can be rejected or come back thin; use 1440 with `max`.",
            "default": 60
          },
          "includeTrades": {
            "title": "Include recent trades",
            "type": "boolean",
            "description": "Also return the most recent trades of every market as separate `trade` rows (billed per trade).",
            "default": false
          },
          "maxTradesPerMarket": {
            "title": "Max trades per market",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Most recent trades returned for each market.",
            "default": 50
          },
          "includeTraderIds": {
            "title": "Include trader wallet and pseudonym",
            "type": "boolean",
            "description": "Trades are anonymous by default. Tick to add the public wallet address and pseudonym Polymarket shows for each trade.",
            "default": false
          },
          "maxItems": {
            "title": "Max markets",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after this many market rows in total (you are billed per market). History points and trades are capped separately by the options above.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many API requests run at the same time. Keep low; Polymarket rate-limits heavy callers.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}