{
  "openapi": "3.0.1",
  "info": {
    "title": "Polymarket Scraper: Live Odds, Results & Price History",
    "description": "Live odds for every Polymarket prediction market from the official public API: prices, implied probability, volume, liquidity, 24h price moves, order books, resolved results and price history. No login, no proxies.",
    "version": "1.0",
    "x-build-id": "gumldEoYPyAQXh5kT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/peccarvalho~polymarket-markets/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-peccarvalho-polymarket-markets",
        "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/peccarvalho~polymarket-markets/runs": {
      "post": {
        "operationId": "runs-sync-peccarvalho-polymarket-markets",
        "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/peccarvalho~polymarket-markets/run-sync": {
      "post": {
        "operationId": "run-sync-peccarvalho-polymarket-markets",
        "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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search Polymarket like the search box on the site, e.g. 'bitcoin', 'fed', 'trump', 'NBA'. Leave empty to list everything (sorted by the field below).",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "title": "Tags",
            "type": "array",
            "description": "Only events with these Polymarket tags, e.g. 'politics', 'crypto', 'sports', 'economy', 'tech', 'geopolitics', 'pop-culture'.",
            "items": {
              "type": "string"
            }
          },
          "eventSlugs": {
            "title": "Event URLs or slugs",
            "type": "array",
            "description": "Every outcome of these events, e.g. https://polymarket.com/event/brazil-presidential-election or just 'brazil-presidential-election'.",
            "items": {
              "type": "string"
            }
          },
          "marketSlugs": {
            "title": "Market URLs or slugs",
            "type": "array",
            "description": "Exact markets to track, e.g. for a scheduled watchlist.",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Market status",
            "enum": [
              "open",
              "closed",
              "resolved",
              "any"
            ],
            "type": "string",
            "description": "Resolved markets include the winning outcome in 'result', which is useful for backtests.",
            "default": "open"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "volume24h",
              "volume",
              "liquidity",
              "newest",
              "endingSoon"
            ],
            "type": "string",
            "description": "Order when listing without keywords.",
            "default": "volume24h"
          },
          "minVolume": {
            "title": "Min total volume ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip markets that have traded less than this in total."
          },
          "minVolume24h": {
            "title": "Min 24h volume ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip markets that traded less than this in the last 24 hours."
          },
          "minLiquidity": {
            "title": "Min liquidity ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip thin markets."
          },
          "minProbability": {
            "title": "Min probability",
            "type": "string",
            "description": "0 to 1, e.g. 0.05. Skip markets priced below this."
          },
          "maxProbability": {
            "title": "Max probability",
            "type": "string",
            "description": "0 to 1, e.g. 0.95. Skip markets priced above this."
          },
          "closesWithinHours": {
            "title": "Ends within (hours)",
            "minimum": 0,
            "type": "integer",
            "description": "Only markets whose end date is within this many hours from now."
          },
          "includePriceHistory": {
            "title": "Include price history",
            "type": "boolean",
            "description": "Adds 'priceHistory': the Yes price over time.",
            "default": false
          },
          "historyInterval": {
            "title": "History range",
            "enum": [
              "1h",
              "6h",
              "1d",
              "1w",
              "1m",
              "max"
            ],
            "type": "string",
            "description": "How far back the price history goes.",
            "default": "1w"
          },
          "includeOrderbook": {
            "title": "Include order book",
            "type": "boolean",
            "description": "Adds 'orderbook' with the best bids and asks for the Yes side (open markets only).",
            "default": false
          },
          "orderbookDepth": {
            "title": "Order book depth",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Price levels per side.",
            "default": 10
          },
          "includeDescription": {
            "title": "Include resolution rules",
            "type": "boolean",
            "description": "Adds the market's description and resolution source.",
            "default": false
          },
          "maxItems": {
            "title": "Max markets",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many markets. You're charged per market, so this caps the run's cost.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}