{
  "openapi": "3.0.1",
  "info": {
    "title": "Tennis Matches + Odds, Form & Head-to-Head [$0.02/match]",
    "description": "ATP and WTA matches for any day, live or finished, with 15+ bookmakers' opening and current odds, rankings, last-10 form, surface record, and head-to-head in one JSON row per match. Filter by tour, tournament, player. Built for betting models and AI agents. $0.02 per enriched match.",
    "version": "0.1",
    "x-build-id": "UeyTgc1xVBOiUUVbJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/perchpermits~tennis-matches-odds-form/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-perchpermits-tennis-matches-odds-form",
        "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/perchpermits~tennis-matches-odds-form/runs": {
      "post": {
        "operationId": "runs-sync-perchpermits-tennis-matches-odds-form",
        "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/perchpermits~tennis-matches-odds-form/run-sync": {
      "post": {
        "operationId": "run-sync-perchpermits-tennis-matches-odds-form",
        "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": "Mode",
            "enum": [
              "schedule",
              "results",
              "live"
            ],
            "type": "string",
            "description": "`schedule` lists the day's upcoming, live, and completed matches. `results` lists only finished matches for the day. `live` lists only matches in progress right now, with the current set scores (a snapshot; run again for an update). `live` ignores `date` and `days`.",
            "default": "schedule"
          },
          "date": {
            "title": "Date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "ISO date (YYYY-MM-DD). Defaults to today (UTC). Dates are the site's Central European calendar day."
          },
          "days": {
            "title": "Days",
            "minimum": 1,
            "maximum": 14,
            "type": "integer",
            "description": "How many consecutive days to list, starting at `date`. 1 to 14.",
            "default": 1
          },
          "tour": {
            "title": "Tour",
            "enum": [
              "all",
              "atp",
              "wta"
            ],
            "type": "string",
            "description": "ATP (men), WTA (women), or both. Includes Challenger, ITF, and UTR events listed under each tour.",
            "default": "all"
          },
          "doubles": {
            "title": "Doubles instead of singles",
            "type": "boolean",
            "description": "Return doubles matches instead of singles.",
            "default": false
          },
          "tournament": {
            "title": "Tournament contains",
            "type": "string",
            "description": "Case-insensitive substring of the tournament name, e.g. `US Open`, `Challenger`, `Wimbledon`."
          },
          "player": {
            "title": "Player contains",
            "type": "string",
            "description": "Case-insensitive substring of either player's listed name, e.g. `Alcaraz`."
          },
          "status": {
            "title": "Status",
            "enum": [
              "",
              "scheduled",
              "in_progress",
              "finished"
            ],
            "type": "string",
            "description": "Keep only matches in this state. Leave empty for all.",
            "default": ""
          },
          "maxMatches": {
            "title": "Max matches",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Stop after this many matches. Each enriched match is one extra request (about one second).",
            "default": 50
          },
          "enrich": {
            "title": "Enrich each match",
            "type": "boolean",
            "description": "Fetch every match's detail page: round, surface, rankings, this year's W/L by surface, head-to-head history, 15+ bookmakers' current and opening odds, both players' latest matches and form. Charged as `enriched-match` instead of `match`.",
            "default": true
          },
          "latestMatches": {
            "title": "Latest matches per player",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many recent matches to include for each player when enriching (1 to 30).",
            "default": 10
          },
          "oddsHistory": {
            "title": "Include odds movement history",
            "type": "boolean",
            "description": "Add every recorded odds change per bookmaker (timestamped, site time). Larger rows.",
            "default": false
          },
          "preview": {
            "title": "Write a match preview",
            "type": "boolean",
            "description": "Add a `preview` field to each enriched row: 90 to 140 words by Claude on what the row's own numbers say (market, movement, form, surface, head-to-head). No pick, no invented facts. Charged as `match-preview` on top of `enriched-match`, only for rows that got one. Needs `enrich`.",
            "default": false
          },
          "requestDelaySeconds": {
            "title": "Delay between requests (seconds)",
            "minimum": 0.1,
            "maximum": 5,
            "type": "number",
            "description": "Politeness delay toward the source site. Lower is faster but risks throttling.",
            "default": 0.4
          },
          "archiveDatasetName": {
            "title": "Also append to a named dataset",
            "type": "string",
            "description": "Optional. Name of a dataset in your account to append every returned row to, so scheduled runs build a history that outlives run-data retention. Not charged again."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}