{
  "openapi": "3.0.1",
  "info": {
    "title": "Polymarket Odds Tracker | Price History & Alerts",
    "description": "Extract Polymarket odds: every market outcome with its price as implied probability, best bid/ask, volume, liquidity, end date and resolved result, plus price history and odds movement alerts. $0.40 per 1,000 outcomes on the free plan.",
    "version": "0.1",
    "x-build-id": "mebY4fzl8KI6wkfAn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/aurelix~polymarket-odds-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-aurelix-polymarket-odds-tracker",
        "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/aurelix~polymarket-odds-tracker/runs": {
      "post": {
        "operationId": "runs-sync-aurelix-polymarket-odds-tracker",
        "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/aurelix~polymarket-odds-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-aurelix-polymarket-odds-tracker",
        "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": {
          "searchTerms": {
            "title": "Search keywords",
            "type": "array",
            "description": "Find events and their markets by keyword, like the search box on Polymarket. Example: ['election', 'bitcoin', 'fed rates']. Leave empty with no tags or links to get the top open markets by 24-hour volume.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "title": "Tags / categories",
            "type": "array",
            "description": "Polymarket tags as names or slugs. Example: ['politics', 'crypto', 'sports', 'nba']. Markets are listed by 24-hour volume (open) or total volume (closed / all).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "Event or market links / slugs",
            "type": "array",
            "description": "Polymarket event or market pages, or their slugs. Example: ['https://polymarket.com/event/fed-decision-in-december', 'presidential-election-winner-2028']. An event link returns every market in it.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Market status",
            "enum": [
              "open",
              "closed",
              "all"
            ],
            "type": "string",
            "description": "'open' = markets taking orders now; 'closed' = finished markets with the resolved result; 'all' = both. Example: open.",
            "default": "open"
          },
          "minVolume": {
            "title": "Minimum total volume (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip markets that traded less than this in total. Example: 10000. 0 = no minimum.",
            "default": 0
          },
          "minLiquidity": {
            "title": "Minimum liquidity (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip markets with less resting order-book liquidity than this. Example: 1000. 0 = no minimum.",
            "default": 0
          },
          "maxResults": {
            "title": "Max outcome rows",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many outcome rows (a yes/no market is 2 rows). Example: 100. Price-history points do not count toward this cap.",
            "default": 200
          },
          "priceHistory": {
            "title": "Add price history",
            "type": "boolean",
            "description": "Also return the price history of every outcome returned, one row per point (row_type 'price_history'), charged per point. Example: false.",
            "default": false
          },
          "historyInterval": {
            "title": "History range",
            "enum": [
              "1h",
              "6h",
              "1d",
              "1w",
              "1m",
              "max"
            ],
            "type": "string",
            "description": "How far back the price history goes, counted from now. Example: 1w.",
            "default": "1w"
          },
          "historyFidelity": {
            "title": "History step (minutes)",
            "minimum": 1,
            "maximum": 1440,
            "type": "integer",
            "description": "Minutes between history points. Example: 60 = hourly (about 168 points for a week); 1440 = daily.",
            "default": 60
          },
          "incremental": {
            "title": "Only new or moved since last run",
            "type": "boolean",
            "description": "Return only outcomes not returned before, and outcomes whose price moved by at least the threshold since the price last returned. Unchanged outcomes are skipped and not charged. Schedule it hourly or daily for price-move alerts.",
            "default": false
          },
          "changeThreshold": {
            "title": "Move threshold (percentage points)",
            "minimum": 0.1,
            "maximum": 100,
            "type": "number",
            "description": "With 'Only new or moved': the probability move that counts, in percentage points. Example: 5 = a move from 40% to 45% or more.",
            "default": 5
          },
          "stateKey": {
            "title": "Memory name (optional)",
            "type": "string",
            "description": "Name for the 'only new or moved' memory, e.g. 'election-moves'. Leave empty to derive it from the search, tags, links, status and minimums."
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL (optional)",
            "type": "string",
            "description": "Post a short digest (count + top 10) to this Slack incoming webhook after each run that found something. Example: https://hooks.slack.com/services/T000/B000/XXXX"
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "POST the same digest as JSON to this URL (Zapier, Make, n8n). Example: https://hooks.zapier.com/hooks/catch/123/abc"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}