{
  "openapi": "3.0.1",
  "info": {
    "title": "Polymarket Scraper — Resolved Markets & Price Before Close",
    "description": "Polymarket scraper for resolved markets: the outcome plus the Yes price 1h/6h/24h/72h/7d before close, final price, min/max, volume and tags. Filter by tag, date range, event or market slug; optional full price series. Public APIs, no proxy, no login. For backtests and calibration studies.",
    "version": "0.1",
    "x-build-id": "iziKHSLOZP83cvFYa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datahamster~polymarket-history-resolutions/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datahamster-polymarket-history-resolutions",
        "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/datahamster~polymarket-history-resolutions/runs": {
      "post": {
        "operationId": "runs-sync-datahamster-polymarket-history-resolutions",
        "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/datahamster~polymarket-history-resolutions/run-sync": {
      "post": {
        "operationId": "run-sync-datahamster-polymarket-history-resolutions",
        "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": {
          "tagId": {
            "title": "Tag id",
            "minimum": 1,
            "type": "integer",
            "description": "Polymarket Gamma tag id, e.g. 84 = weather, 1 = sports, 2 = politics, 21 = crypto. Takes precedence over tagSlug.",
            "default": 84
          },
          "tagSlug": {
            "title": "Tag slug",
            "type": "string",
            "description": "Tag by name instead of id, e.g. \"weather\", \"nba\" or \"fed-rates\". Resolved to a tag id via Gamma and used only when tagId is empty.",
            "default": "weather"
          },
          "closedAfter": {
            "title": "Closed after",
            "type": "string",
            "description": "Keep only markets whose end date is on or after this ISO date, e.g. \"2026-08-20\".",
            "default": "2026-08-20"
          },
          "closedBefore": {
            "title": "Closed before",
            "type": "string",
            "description": "Keep only markets whose end date is on or before this ISO date, e.g. \"2026-09-01\". Leave empty for no upper bound."
          },
          "marketSlugs": {
            "title": "Market slugs",
            "type": "array",
            "description": "Specific market slugs as in polymarket.com/market/<slug>, e.g. [\"will-any-month-of-2026-be-the-hottest-on-record\"]. Bypasses the tag and date filters.",
            "items": {
              "type": "string"
            }
          },
          "eventSlugs": {
            "title": "Event slugs",
            "type": "array",
            "description": "Event slugs as in polymarket.com/event/<slug>, e.g. [\"what-caused-the-blue-origin-new-glenn-explosion\"]. Every market of the event is returned, one row each.",
            "items": {
              "type": "string"
            }
          },
          "onlyResolved": {
            "title": "Only resolved",
            "type": "boolean",
            "description": "If true, skip markets that are closed but not yet resolved as well as open markets, so every row has a winner. Example: true.",
            "default": true
          },
          "hoursBefore": {
            "title": "Hours before close",
            "type": "array",
            "description": "Hour offsets before the close time at which to snapshot the Yes price, e.g. [1, 6, 24, 72, 168]. They become the keys of pricesBefore (\"1h\", \"6h\", ...).",
            "default": [
              1,
              6,
              24,
              72,
              168
            ]
          },
          "fidelityMinutes": {
            "title": "Price fidelity (minutes)",
            "minimum": 1,
            "maximum": 1440,
            "type": "integer",
            "description": "Resolution of the CLOB price history in minutes, e.g. 60 for hourly points. Smaller values give more precise snapshots and heavier responses.",
            "default": 60
          },
          "includeSeries": {
            "title": "Include full series",
            "type": "boolean",
            "description": "If true, attach the complete [[timestamp, price], ...] Yes-price series to each row. Rows get large; leave false unless you need the raw curve. Example: false.",
            "default": false
          },
          "minVolume": {
            "title": "Min volume (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip markets whose traded volume in USD is below this number, e.g. 1000. Leave empty to keep thin markets."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many pushed rows, e.g. 20. You are charged only for rows actually pushed.",
            "default": 20
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "scrape",
              "monitor"
            ],
            "type": "string",
            "description": "\"scrape\" returns every market matching the filters; \"monitor\" returns only markets that resolved since the previous run of the same saved Task. Example: \"scrape\".",
            "default": "scrape"
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "State key for monitor mode when the actor is not run as a saved Task, e.g. \"weather-resolutions\". Runs sharing a key share the comparison state."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "URL that receives a POST with the monitor-mode change summary (JSON), e.g. \"https://hooks.zapier.com/hooks/catch/123/abc\". Leave empty to skip."
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Optional Telegram bot token used to send monitor-mode change summaries, e.g. \"123456789:AAF...\". Leave empty to skip Telegram."
          },
          "telegramChatId": {
            "title": "Telegram chat id",
            "type": "string",
            "description": "Optional Telegram chat id that receives monitor-mode summaries, e.g. \"-1001234567890\". Required only when telegramBotToken is set."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}