{
  "openapi": "3.0.1",
  "info": {
    "title": "Polymarket Markets Scraper",
    "description": "Polymarket Markets Scraper extracts Polymarket prediction markets: question, outcomes and prices (probabilities), volume, 24 h volume, liquidity, spread, best bid and ask, order book, price history, recent trades, category, end date and result.",
    "version": "1.0",
    "x-build-id": "pRVeJWWZbzvtyjbbN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neuro-scraper~polymarket-markets-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neuro-scraper-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/neuro-scraper~polymarket-markets-scraper/runs": {
      "post": {
        "operationId": "runs-sync-neuro-scraper-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/neuro-scraper~polymarket-markets-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-neuro-scraper-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": {
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Polymarket categories (tags), one per line: politics, sports, crypto, economy, tech, culture ... Empty = all markets.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search words",
            "type": "array",
            "description": "Keep markets whose question contains all these words, one search per line (e.g. bitcoin price, election).",
            "items": {
              "type": "string"
            }
          },
          "query": {
            "title": "Search words (single, alternative field)",
            "type": "string",
            "description": "One search, the same as one line of Search words."
          },
          "category": {
            "title": "Category (single, alternative field)",
            "type": "string",
            "description": "One category, the same as one line of Categories."
          },
          "tagIds": {
            "title": "Tag slugs (alternative field)",
            "type": "array",
            "description": "Polymarket tag slugs, the same as Categories.",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Market status",
            "enum": [
              "open",
              "closed",
              "resolved",
              "all"
            ],
            "type": "string",
            "description": "open = trading now; closed = trading ended; resolved = closed with a result; all.",
            "default": "open"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "volume24hr",
              "volume",
              "liquidity",
              "newest",
              "endDate"
            ],
            "type": "string",
            "description": "Order in which markets are read.",
            "default": "volume24hr"
          },
          "minVolume24h": {
            "title": "Minimum 24 h volume (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep markets with at least this 24-hour volume.",
            "default": 0
          },
          "minTotalVolume": {
            "title": "Minimum total volume (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep markets with at least this total volume.",
            "default": 0
          },
          "minVolume": {
            "title": "Minimum volume (alternative field)",
            "minimum": 0,
            "type": "integer",
            "description": "Same as minimum total volume.",
            "default": 0
          },
          "minLiquidity": {
            "title": "Minimum liquidity (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep markets with at least this liquidity.",
            "default": 0
          },
          "orderbookDepth": {
            "title": "Order book depth",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Price levels of the order book to add on each side (0 = off). Also refreshes best bid and ask.",
            "default": 5
          },
          "recentTrades": {
            "title": "Recent trades per market",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "How many of the newest trades to add (0 = off).",
            "default": 5
          },
          "priceHistoryInterval": {
            "title": "Price history",
            "enum": [
              "",
              "1d",
              "1w",
              "1m",
              "max"
            ],
            "type": "string",
            "description": "Add the price history of the first outcome for this period (empty = off).",
            "default": "1d"
          },
          "maxItemsPerSource": {
            "title": "Max markets per category / search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Limit for each category and each search (per input: 50 x 2 categories = up to 100 rows).",
            "default": 50
          },
          "dedupe": {
            "title": "Remove duplicates",
            "type": "boolean",
            "description": "A market found by two categories or searches is written once.",
            "default": true
          },
          "mode": {
            "title": "Row type",
            "enum": [
              "markets",
              "events"
            ],
            "type": "string",
            "description": "Markets returns one row per tradable market; Events returns one row per event (e.g. an election) with all its markets and prices inside.",
            "default": "markets"
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many requests run at the same time.",
            "default": 8
          },
          "marketIds": {
            "title": "Market ids",
            "type": "array",
            "description": "Optional: read these markets directly by their numeric market id (e.g. 6834800).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "marketSlugs": {
            "title": "Market slugs or links",
            "type": "array",
            "description": "Optional: read these markets directly by slug or market link (the last part of the address).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "conditionIds": {
            "title": "Condition ids",
            "type": "array",
            "description": "Optional: read these markets directly by condition id (0x...).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minPriceChangePct": {
            "title": "Minimum 24-hour price move (points)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep markets whose price moved at least this many percentage points in the last 24 hours (up or down). 0 = no filter.",
            "default": 0
          },
          "minutesUntilEnd": {
            "title": "Ending within (minutes)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only markets (or events) that end within this many minutes from now. 0 = no filter.",
            "default": 0
          },
          "historyDays": {
            "title": "Price history days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Add the price history of the last N days (overrides the price history period). 0 = use the period setting.",
            "default": 0
          },
          "minTradeSizeUsd": {
            "title": "Minimum trade size (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Recent trades: keep only trades worth at least this many dollars (whale trades). 0 = all trades.",
            "default": 0
          },
          "tradeSide": {
            "title": "Trade side",
            "enum": [
              "ANY",
              "BUY",
              "SELL"
            ],
            "type": "string",
            "description": "Recent trades: all trades, only buys or only sells.",
            "default": "ANY"
          },
          "maxItems": {
            "title": "Max markets (alternative field)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Same as Max markets in total.",
            "default": 0
          },
          "maxItemsTotal": {
            "title": "Max markets in total",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Optional cap for the whole run. 0 = no cap.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxies are recommended.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}