{
  "openapi": "3.0.1",
  "info": {
    "title": "Polymarket Markets Scraper",
    "description": "Scrape Polymarket prediction markets by tag, search, event or market slug. One row per market with probability, bid, ask, USD volume, liquidity, status, close time and optional price history. Closed and resolved markets too. Export to JSON, CSV or Excel. No API key.",
    "version": "0.1",
    "x-build-id": "X9QqIsK3mRg2MLQ5g"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mrbridge~polymarket-markets-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mrbridge-polymarket-markets-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/mrbridge~polymarket-markets-scraper/runs": {
      "post": {
        "operationId": "runs-sync-mrbridge-polymarket-markets-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/mrbridge~polymarket-markets-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-mrbridge-polymarket-markets-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": {
          "tags": {
            "title": "Tags",
            "maxItems": 100,
            "type": "array",
            "description": "Polymarket tags, as a slug (crypto) or a numeric id (21). Up to 100. One walk over the events of each tag.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "searchTerms": {
            "title": "Search terms",
            "maxItems": 10,
            "type": "array",
            "description": "Event title searches, any case. Up to 10. One walk over the matching events of each term.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "eventSlugs": {
            "title": "Event slugs",
            "maxItems": 100,
            "type": "array",
            "description": "Events to collect, for example which-party-will-win-the-house-in-2026. Up to 100. Every market of a named event is returned whatever its status.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._~-]*$"
            },
            "default": []
          },
          "marketSlugs": {
            "title": "Market slugs",
            "maxItems": 100,
            "type": "array",
            "description": "Markets to collect, for example will-the-democratic-party-control-the-house-after-the-2026-midterm-elections. Up to 100. A named market is returned whatever its status.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._~-]*$"
            },
            "default": []
          },
          "status": {
            "title": "Status",
            "enum": [
              "active",
              "closed",
              "all"
            ],
            "type": "string",
            "description": "Status filter of the event walks (no selector, tags, search terms). It also applies to every market of a listed event: active keeps the open markets that can be traded, closed keeps the closed and resolved ones. A slug you name is returned whatever its status.",
            "default": "active"
          },
          "orderBy": {
            "title": "Order",
            "enum": [
              "volume24h",
              "liquidity",
              "endDate"
            ],
            "type": "string",
            "description": "Order of the events in a walk: 24-hour volume (largest first), liquidity (largest first) or end date. With the end date, active and all markets start with the nearest end still to come (events already past their end date are left out), closed markets start with the most recent end. It orders the events, not the markets inside an event.",
            "default": "volume24h"
          },
          "maxItems": {
            "title": "Maximum markets",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on the market rows returned and billed, from 1 to 10000. The run stops once that many rows are delivered.",
            "default": 100
          },
          "includeHistory": {
            "title": "Include price history ($)",
            "type": "boolean",
            "description": "Fill the history column with the price of the market over time, one request per market. A row whose history is not empty is billed one extra market-history event. A row with no price points (history is an empty list) is not billed. Without this option, or when the history of a market cannot be read, history is null.",
            "default": false
          },
          "historyInterval": {
            "title": "History interval",
            "enum": [
              "1h",
              "1d"
            ],
            "type": "string",
            "description": "Size of one price point, one hour or one day. Used only when price history is on. It does not change the number of requests: there is one per market.",
            "default": "1d"
          },
          "historyDays": {
            "title": "History days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "How many days back the history goes, from 1 to 365. Used only when price history is on. For a closed market the window ends at its resolution or close time.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}