{
  "openapi": "3.0.1",
  "info": {
    "title": "Polymarket Scraper — Odds, Volume, Events & Price History",
    "description": "Open Polymarket prediction markets as a table: question, current odds, 24h and total volume, liquidity, resolution date and link, one row per market. Or one row per event with its leading option, or daily price history per outcome. Filter by keyword, tag, volume or links. Public API, no login.",
    "version": "1.0",
    "x-build-id": "AGQGLZk0YJfNKq1LL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tidyfeed~polymarket-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tidyfeed-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/tidyfeed~polymarket-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tidyfeed-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/tidyfeed~polymarket-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tidyfeed-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to return",
            "enum": [
              "markets",
              "events",
              "history"
            ],
            "type": "string",
            "description": "\"Markets\" gives one row per market with its current odds, volume and liquidity. \"Events\" gives one row per event (a question page that can hold several markets) with its leading option. \"History\" gives one row per day per outcome — the daily closing price of each market in scope.",
            "default": "markets"
          },
          "status": {
            "title": "Market status",
            "enum": [
              "open",
              "closed",
              "all"
            ],
            "type": "string",
            "description": "\"Open\" is what is trading now. \"Closed\" is what has finished, with the resolved outcome where Polymarket has settled it. \"All\" is both.",
            "default": "open"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "volume24h",
              "volume",
              "liquidity",
              "endingSoon",
              "newest"
            ],
            "type": "string",
            "description": "Which markets come first when the cap cuts the list. \"24h volume\" is what is hot today; \"Total volume\" is the big markets; \"Liquidity\" is where orders are deep; \"Ending soon\" is what resolves next; \"Newest\" is what was just listed.",
            "default": "volume24h"
          },
          "searchQuery": {
            "title": "Search keyword (optional)",
            "type": "string",
            "description": "Only markets whose event matches this keyword, through the same search the Polymarket site uses — e.g. \"bitcoin\", \"fed rate\", \"election\". Search returns at most 100 events. Leave empty to list everything."
          },
          "tag": {
            "title": "Tag (optional)",
            "type": "string",
            "description": "A Polymarket tag slug as it appears in the site's URLs: politics, crypto, sports, business, science, culture, tech, world … Leave empty for all tags."
          },
          "urls": {
            "title": "Specific Polymarket links (optional)",
            "type": "array",
            "description": "Event or market pages to read exactly: https://polymarket.com/event/<event> or https://polymarket.com/event/<event>/<market>. A bare event slug works too. When given, keyword, tag and sort are ignored and only these pages are read.",
            "items": {
              "type": "string"
            }
          },
          "minVolume": {
            "title": "Minimum total volume (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip markets whose all-time volume is below this. 0 for no floor. 10000 removes most of the long tail.",
            "default": 0
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on rows returned, and on what you are charged. In history mode one market gives one row per day per outcome, so an event with many options reaches this cap quickly — raise it for a longer or wider history. Polymarket lists thousands of open markets; the default 100 covers the ones that matter today.",
            "default": 100
          },
          "includeDescription": {
            "title": "Include the full resolution rules",
            "type": "boolean",
            "description": "Adds a description column with the market's or event's resolution text. Off by default to keep spreadsheets readable.",
            "default": false
          },
          "historyRange": {
            "title": "History range (history mode)",
            "enum": [
              "1w",
              "1m",
              "max"
            ],
            "type": "string",
            "description": "How far back the daily prices go: last week, last month, or the market's whole life.",
            "default": "1m"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}