{
  "openapi": "3.0.1",
  "info": {
    "title": "Polymarket Scraper — Markets, Odds & Prices API",
    "description": "Search Polymarket markets by keyword or tag, get top markets by volume, live outcome prices, 1h/24h/7d price changes, liquidity and end dates. Clean JSON per market. No API key required.",
    "version": "0.1",
    "x-build-id": "ZphHeyIwIo6cxoEFg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yadroo~polymarket-markets/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yadroo-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/yadroo~polymarket-markets/runs": {
      "post": {
        "operationId": "runs-sync-yadroo-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/yadroo~polymarket-markets/run-sync": {
      "post": {
        "operationId": "run-sync-yadroo-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": {
          "mode": {
            "title": "Output mode",
            "enum": [
              "markets",
              "events"
            ],
            "type": "string",
            "description": "`markets`: one row per tradable Yes/No market (e.g. 'Will the Fed cut 25 bps in September?'). `events`: one row per event that groups several markets (e.g. 'Fed decision in September?' with 5 outcome markets) — best for dashboards and odds tables.",
            "default": "markets"
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Keywords matched against market questions and event titles (all words must match, case-insensitive), e.g. 'Fed', 'Bitcoin 100k', 'Ukraine ceasefire'. For active markets this uses Polymarket's own search; for closed markets it scans up to 5,000 sorted markets locally."
          },
          "queries": {
            "title": "Search queries (any of)",
            "type": "array",
            "description": "Several keyword phrases; a market is kept when ANY phrase matches (words inside one phrase are AND-ed). Combined with `query`. Max 20. Example: ['Fed', 'CPI', 'recession'].",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category (curated tag shortcut)",
            "enum": [
              "politics",
              "sports",
              "crypto",
              "finance",
              "geopolitics",
              "economy",
              "elections",
              "pop-culture",
              "world",
              "tech",
              "science",
              "business",
              "ai",
              "weather",
              "earnings",
              "games",
              "esports",
              "middle-east",
              "trump",
              "bitcoin",
              "ethereum",
              "nfl",
              "nba",
              "mlb",
              "soccer",
              "tennis",
              "ufc"
            ],
            "type": "string",
            "description": "Most-used Polymarket tags as a dropdown. Overrides `tag`/`tagId`. For any other tag (there are ~10,000) use `tag` with the slug from the polymarket.com URL."
          },
          "categories": {
            "title": "Categories (multiple)",
            "type": "array",
            "description": "Fan out over several curated categories in one run (results merged, deduped). Combined with `category`/`tag`/`tagIds`. Max 20 scopes.",
            "items": {
              "type": "string",
              "enum": [
                "politics",
                "sports",
                "crypto",
                "finance",
                "geopolitics",
                "economy",
                "elections",
                "pop-culture",
                "world",
                "tech",
                "science",
                "business",
                "ai",
                "weather",
                "earnings",
                "games",
                "esports",
                "middle-east",
                "trump",
                "bitcoin",
                "ethereum",
                "nfl",
                "nba",
                "mlb",
                "soccer",
                "tennis",
                "ufc"
              ],
              "enumTitles": [
                "Politics",
                "Sports",
                "Crypto",
                "Finance",
                "Geopolitics",
                "Economy",
                "Elections",
                "Culture",
                "World",
                "Tech",
                "Science",
                "Business",
                "AI",
                "Weather",
                "Earnings",
                "Games",
                "Esports",
                "Middle East",
                "Trump",
                "Bitcoin",
                "Ethereum",
                "NFL",
                "NBA",
                "MLB",
                "Soccer",
                "Tennis",
                "UFC"
              ]
            }
          },
          "tag": {
            "title": "Tag slug",
            "type": "string",
            "description": "Any Polymarket tag slug, e.g. 'fed-rates', 'jerome-powell', 'cpi-release', 'us-presidential-election', 'champions-league'. Take it from polymarket.com URLs or the Gamma API `/tags` endpoint."
          },
          "tagId": {
            "title": "Tag ID",
            "type": "string",
            "description": "Numeric Gamma tag id (e.g. '100196' = Fed Rates). Alternative to `tag` when you already have ids."
          },
          "tagIds": {
            "title": "Tag IDs (multiple)",
            "type": "array",
            "description": "Several numeric Gamma tag ids to fan out over (merged, deduped), e.g. ['100196', '120'].",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Status",
            "enum": [
              "active",
              "closed",
              "all"
            ],
            "type": "string",
            "description": "Which markets to return. Closed markets include the resolved outcome when detectable.",
            "default": "active"
          },
          "includeClosed": {
            "title": "Include closed (legacy)",
            "type": "boolean",
            "description": "Deprecated alias for status=all. Ignored when `status` is set.",
            "default": false
          },
          "slugs": {
            "title": "Specific market slugs",
            "type": "array",
            "description": "Fetch exactly these markets by slug (the last part of a polymarket.com/market/... URL). Overrides search and filters except min*/price filters.",
            "items": {
              "type": "string"
            }
          },
          "ids": {
            "title": "Specific market IDs",
            "type": "array",
            "description": "Gamma market ids, e.g. ['2252244'].",
            "items": {
              "type": "string"
            }
          },
          "conditionIds": {
            "title": "Condition IDs",
            "type": "array",
            "description": "On-chain condition ids (0x…) — handy when you come from CLOB/Polygon data.",
            "items": {
              "type": "string"
            }
          },
          "eventSlugs": {
            "title": "Event slugs",
            "type": "array",
            "description": "Event slugs (polymarket.com/event/...). In markets mode returns all markets of each event; in events mode returns the events.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "volume24hr",
              "volume",
              "volume7d",
              "liquidity",
              "endDate",
              "startDate",
              "newest",
              "change24h",
              "competitive"
            ],
            "type": "string",
            "description": "Ordering of results.",
            "default": "volume24hr"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of rows to return (markets or events). Billing is per item.",
            "default": 25
          },
          "limit": {
            "title": "Max items (legacy alias)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Deprecated — same as maxItems; maxItems wins when both are set."
          },
          "minVolume24h": {
            "title": "Min 24h volume (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop markets with less than this 24h trading volume."
          },
          "minLiquidity": {
            "title": "Min liquidity (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop markets with less order-book liquidity than this."
          },
          "minTotalVolume": {
            "title": "Min total volume (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop markets with less lifetime volume than this."
          },
          "minAbsChange24h": {
            "title": "Min absolute 24h price change",
            "type": "string",
            "description": "Only markets whose Yes price moved at least this much in 24h, in probability points 0–1 (e.g. 0.05 = 5 points). Use with sortBy=change24h to find movers."
          },
          "minAbsChange7d": {
            "title": "Min absolute 7-day price change",
            "type": "string",
            "description": "Only markets whose Yes price moved at least this much over 7 days, in probability points 0-1 (e.g. 0.1 = 10 points). Markets mode only."
          },
          "minAbsChange30d": {
            "title": "Min absolute 30-day price change",
            "type": "string",
            "description": "Same as above over 30 days. Markets mode only."
          },
          "yesPriceMin": {
            "title": "Yes price min (0–1)",
            "type": "string",
            "description": "Exclude near-certain markets: e.g. 0.05 drops anything priced below 5%."
          },
          "yesPriceMax": {
            "title": "Yes price max (0–1)",
            "type": "string",
            "description": "E.g. 0.95 drops anything priced above 95%."
          },
          "endDateFrom": {
            "title": "Ends after",
            "type": "string",
            "description": "Only markets ending on/after this date (ISO, e.g. 2026-10-01)."
          },
          "endDateTo": {
            "title": "Ends before",
            "type": "string",
            "description": "Only markets ending on/before this date."
          },
          "endingWithinHours": {
            "title": "Ending within N hours",
            "minimum": 1,
            "type": "integer",
            "description": "Shortcut for endDateTo = now + N hours (e.g. 48 = resolving in the next two days)."
          },
          "excludeEndingWithinMinutes": {
            "title": "Exclude markets ending within N minutes",
            "minimum": 1,
            "type": "integer",
            "description": "Drop markets that close in the next N minutes (too late to act on), e.g. 60. Sets endDateFrom = now + N minutes when that is later."
          },
          "excludeNegRisk": {
            "title": "Exclude neg-risk (multi-outcome) markets",
            "type": "boolean",
            "description": "Skip markets that belong to negative-risk multi-outcome events (candidate lists, brackets).",
            "default": false
          },
          "includeOrderBook": {
            "title": "Include order book (CLOB)",
            "type": "boolean",
            "description": "Adds `orderBook` for the Yes token: best bid/ask, mid, spread, top N levels and USD depth per side. One extra request per market.",
            "default": false
          },
          "orderBookDepth": {
            "title": "Order book depth",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Levels per side to include in `orderBook`.",
            "default": 5
          },
          "includePriceHistory": {
            "title": "Include price history",
            "type": "boolean",
            "description": "Adds `priceHistory` for the Yes token: time series plus first/last/min/max/change. One extra request per market.",
            "default": false
          },
          "historyInterval": {
            "title": "History interval",
            "enum": [
              "1h",
              "6h",
              "1d",
              "1w",
              "1m",
              "max"
            ],
            "type": "string",
            "description": "Lookback window for `priceHistory`.",
            "default": "1w"
          },
          "historyFidelityMinutes": {
            "title": "History resolution (minutes)",
            "minimum": 1,
            "maximum": 1440,
            "type": "integer",
            "description": "Spacing of history points in minutes (e.g. 5 for 5-minute candles over 1h, 1440 for daily over max).",
            "default": 60
          },
          "includeDescription": {
            "title": "Include description / rules text",
            "type": "boolean",
            "description": "Set false to drop the long resolution-rules text and keep rows compact.",
            "default": true
          },
          "fields": {
            "title": "Only these fields",
            "type": "array",
            "description": "Keep only the listed top-level output fields (id and fetchedAt are always kept), e.g. ['question','yesPrice','volume24h','url'].",
            "items": {
              "type": "string"
            }
          },
          "onlyNew": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Monitoring mode: remembers pushed ids in a named key-value store ('yadroo-polymarket-seen') and returns only markets/events not seen in previous runs of this actor under your account.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}