{
  "openapi": "3.0.1",
  "info": {
    "title": "Polymarket API - Markets, Odds, Order Book & Trades",
    "description": "Live and historical Polymarket prediction market data as clean JSON: prices, implied probability, volume, liquidity, order book, trades and price history. No login or API key needed.",
    "version": "1.0",
    "x-build-id": "WpL9H3tNtn6YwcaNk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/feedsmith~polymarket-markets-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-feedsmith-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/feedsmith~polymarket-markets-scraper/runs": {
      "post": {
        "operationId": "runs-sync-feedsmith-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/feedsmith~polymarket-markets-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-feedsmith-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": {
          "marketSlugs": {
            "title": "Market slugs",
            "type": "array",
            "description": "Specific markets by slug, e.g. lol-we-jdg-2026-09-18-game3. You can also paste a polymarket.com event/market URL - the last path segment is used.",
            "items": {
              "type": "string"
            }
          },
          "marketIds": {
            "title": "Market IDs",
            "type": "array",
            "description": "Specific markets by numeric Gamma market ID, e.g. 4331478.",
            "items": {
              "type": "string"
            }
          },
          "conditionIds": {
            "title": "Condition IDs",
            "type": "array",
            "description": "Specific markets by on-chain condition ID (0x...), as used by the CLOB and Data API.",
            "items": {
              "type": "string"
            }
          },
          "eventSlugs": {
            "title": "Event slugs",
            "type": "array",
            "description": "Specific events, e.g. xi-jinping-out-before-2027. Returns every outcome market of the event. You can also paste a polymarket.com event URL.",
            "items": {
              "type": "string"
            }
          },
          "tagSlug": {
            "title": "Tag / category",
            "type": "string",
            "description": "Fetch every live market under one Polymarket tag, e.g. politics, crypto, sports, nfl, bitcoin, fed. Used only when no market/event selector above is given. Polymarket's tag list is large and free-form (no fixed category list); see polymarket.com for tag names. Leave all selectors empty to scan the whole exchange."
          },
          "status": {
            "title": "Market status",
            "enum": [
              "open",
              "closed",
              "all"
            ],
            "type": "string",
            "description": "open = tradeable now. closed = trading ended (includes markets awaiting settlement and already-resolved ones). all = everything.",
            "default": "open"
          },
          "search": {
            "title": "Text filter",
            "type": "string",
            "description": "Keep only markets whose question, event title, slug, description or tags contain ALL of these words (case-insensitive). Example: bitcoin 150000"
          },
          "closesWithinDays": {
            "title": "Closes within (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only markets closing within the next N days. Useful with status = open."
          },
          "closedWithinDays": {
            "title": "Closed within last (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only markets that closed in the last N days. Use with status = closed or all to build a backtesting history."
          },
          "minVolume": {
            "title": "Minimum volume (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip illiquid markets with lifetime volume below this many dollars.",
            "default": 0
          },
          "minLiquidity": {
            "title": "Minimum liquidity (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip markets with current order book liquidity below this many dollars.",
            "default": 0
          },
          "maxItems": {
            "title": "Max markets",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many markets. You are only charged for markets actually saved. Default 100 keeps a first test run around $0.15; raise it for full exports.",
            "default": 100
          },
          "includeOrderbook": {
            "title": "Include order book",
            "type": "boolean",
            "description": "Attach the current order book (bids, asks, best bid/ask, depth) for every outcome. Charged as one enrichment per market.",
            "default": false
          },
          "orderbookDepth": {
            "title": "Order book depth (levels per side)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Number of price levels to return per side of the book.",
            "default": 10
          },
          "includeTrades": {
            "title": "Include recent trades",
            "type": "boolean",
            "description": "Attach the most recent trade fills for each market. Only the public on-chain wallet address is kept per trade - no names, bios or profile images.",
            "default": false
          },
          "maxTradesPerMarket": {
            "title": "Max trades per market",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Upper limit of trade fills attached to each market, newest first.",
            "default": 100
          },
          "tradesLookbackHours": {
            "title": "Trades lookback (hours)",
            "minimum": 1,
            "type": "integer",
            "description": "Only trades from the last N hours. Leave empty for the most recent trades regardless of age."
          },
          "includePriceHistory": {
            "title": "Include price history",
            "type": "boolean",
            "description": "Attach OHLC-free price-over-time history for every outcome.",
            "default": false
          },
          "historyInterval": {
            "title": "Price history interval",
            "enum": [
              "1h",
              "6h",
              "1d",
              "1w",
              "1m",
              "max"
            ],
            "type": "string",
            "description": "Length of the history window.",
            "default": "1h"
          },
          "historyFidelityMinutes": {
            "title": "Price history fidelity (minutes)",
            "minimum": 1,
            "maximum": 43200,
            "type": "integer",
            "description": "Minutes between price points.",
            "default": 60
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}