{
  "openapi": "3.0.1",
  "info": {
    "title": "Smarkets Betting Exchange Scraper - Odds, Volume & Results",
    "description": "Back and lay odds with available stake, last traded prices and matched volume from the Smarkets betting exchange for football, tennis, US sports, horse racing, politics and more, plus settled results and traded-price history (candles, pre-play closing odds).",
    "version": "0.1",
    "x-build-id": "GgzUlTUorceIIa3zl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/artsiom_k~smarkets-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-artsiom_k-smarkets-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/artsiom_k~smarkets-scraper/runs": {
      "post": {
        "operationId": "runs-sync-artsiom_k-smarkets-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/artsiom_k~smarkets-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-artsiom_k-smarkets-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": {
          "entityType": {
            "title": "What to scrape",
            "enum": [
              "markets",
              "results",
              "priceHistory"
            ],
            "type": "string",
            "description": "\"markets\": upcoming and live events with the current order book. \"results\": finished events (Smarkets keeps them about 10 days) with the score and each selection's outcome. \"priceHistory\": traded prices over time per selection, for live and recently finished events (or any event in eventIds).",
            "default": "markets"
          },
          "sports": {
            "title": "Sports",
            "type": "array",
            "description": "Sports and categories to include. Leave empty for everything Smarkets lists.",
            "items": {
              "type": "string",
              "enum": [
                "football",
                "tennis",
                "basketball",
                "american_football",
                "baseball",
                "ice_hockey",
                "horse_racing",
                "greyhound_racing",
                "golf",
                "cricket",
                "rugby_union",
                "rugby_league",
                "australian_rules",
                "boxing",
                "mma",
                "darts",
                "snooker",
                "table_tennis",
                "volleyball",
                "handball",
                "cycling",
                "motorsports",
                "esports",
                "politics",
                "current_affairs",
                "tv_and_entertainment"
              ],
              "enumTitles": [
                "Football (soccer)",
                "Tennis",
                "Basketball",
                "American football",
                "Baseball",
                "Ice hockey",
                "Horse racing",
                "Greyhound racing",
                "Golf",
                "Cricket",
                "Rugby union",
                "Rugby league",
                "Australian rules",
                "Boxing",
                "MMA",
                "Darts",
                "Snooker",
                "Table tennis",
                "Volleyball",
                "Handball",
                "Cycling",
                "Motorsports",
                "Esports",
                "Politics",
                "Current affairs",
                "TV & entertainment"
              ]
            }
          },
          "eventScope": {
            "title": "Event kind",
            "enum": [
              "matches",
              "outrights",
              "all"
            ],
            "type": "string",
            "description": "Single matches/races, outright markets such as a tournament winner, or both.",
            "default": "matches"
          },
          "eventIds": {
            "title": "Event IDs or URLs",
            "type": "array",
            "description": "Specific events, as Smarkets event ids or event page URLs (https://smarkets.com/event/45317409/...). Overrides sports, dates and eventStates.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Start from",
            "type": "string",
            "description": "Only events starting on or after this date or UTC time (2026-10-31 or 2026-10-31T18:00:00Z)."
          },
          "dateTo": {
            "title": "Start to",
            "type": "string",
            "description": "Only events starting on or before this date (the whole day) or UTC time."
          },
          "eventStates": {
            "title": "Event states",
            "type": "array",
            "description": "Override which events are listed. Defaults: upcoming + live for markets, ended for results, live + ended for priceHistory.",
            "items": {
              "type": "string",
              "enum": [
                "upcoming",
                "live",
                "ended"
              ],
              "enumTitles": [
                "Upcoming",
                "Live (in-play)",
                "Ended (last ~10 days)"
              ]
            }
          },
          "markets": {
            "title": "Markets",
            "enum": [
              "main",
              "all"
            ],
            "type": "string",
            "description": "\"main\": match odds / winner, over/under, handicap, Asian handicap, both teams to score, draw no bet, place, plus each event's headline market. \"all\": every market (a football match has about 80, an NFL game 100+ with player props).",
            "default": "main"
          },
          "marketTypes": {
            "title": "Market types",
            "type": "array",
            "description": "Exact Smarkets market types to keep instead, e.g. WINNER_3_WAY, OVER_UNDER, CORRECT_SCORE, PLAYER_PASSING_YARDS. Overrides markets.",
            "items": {
              "type": "string"
            }
          },
          "includeOrderBook": {
            "title": "Order book",
            "type": "boolean",
            "description": "markets only: fetch back/lay odds and available stake. Off = only last traded prices and volume (one request fewer per 100 markets).",
            "default": true
          },
          "orderBookDepth": {
            "title": "Order book depth",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "markets only: price levels in back_depth / lay_depth.",
            "default": 3
          },
          "historyHoursBefore": {
            "title": "Price history: hours before start",
            "minimum": 1,
            "maximum": 2160,
            "type": "integer",
            "description": "priceHistory only: the window starts this many hours before the scheduled start (or when the market opened) and runs to the end. Candle size follows the window (48 h + match = about 6-minute candles).",
            "default": 48
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows. Defaults to 50 for a quick preview; clear it (null) for everything that matches.",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Smarkets allows 60 requests per minute per IP; with Apify Proxy each proxy session gets its own budget, which speeds up large runs.",
            "default": {
              "useApifyProxy": false
            }
          },
          "proxyLanes": {
            "title": "Proxy sessions",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "With a proxy: how many proxy sessions (IPs) to spread requests over.",
            "default": 4
          },
          "impersonate": {
            "title": "TLS impersonation target",
            "type": "string",
            "description": "curl_cffi browser fingerprint. Defaults to \"chrome\"; change only if requests start failing."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}