{
  "openapi": "3.1.0",
  "info": {
    "title": "PoisGoal Data API",
    "version": "1.0.0",
    "summary": "Statistical football match analysis from the PoisGoal model.",
    "description": "Read-only JSON API with PoisGoal model outputs (match outcome probabilities, expected goals, scoreline and total-goal distributions) and settled-match hit rates. Outputs are statistical analysis, not betting advice. Third-party bookmaker prices, prediction-market data and team logos are not included.\n\nRate limits (Pro tier): 60 requests per rolling minute and 10,000 requests per UTC day, per key. Every authenticated response carries `X-RateLimit-Limit` (per minute), `X-RateLimit-Limit-Day` and `X-RateLimit-Remaining-Day`; 429 responses carry `Retry-After` in seconds.",
    "contact": {
      "url": "https://poisgoal.com"
    }
  },
  "servers": [
    {
      "url": "https://poisgoal.com/api/v1"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    },
    {
      "apiKeyHeader": []
    }
  ],
  "tags": [
    {
      "name": "Fixtures"
    },
    {
      "name": "Results"
    },
    {
      "name": "Meta"
    }
  ],
  "paths": {
    "/meta": {
      "get": {
        "tags": [
          "Meta"
        ],
        "operationId": "getMeta",
        "summary": "Model version, update time, counts and covered competitions",
        "parameters": [
          {
            "$ref": "#/components/parameters/lang"
          }
        ],
        "responses": {
          "200": {
            "description": "Metadata",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/X-RateLimit-Limit-Day"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Day"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "api_version": {
                          "type": "string"
                        },
                        "model": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "updated_at": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "counts": {
                          "type": "object",
                          "properties": {
                            "upcoming_fixtures": {
                              "type": "integer"
                            },
                            "predicted": {
                              "type": "integer"
                            },
                            "listed": {
                              "type": "integer"
                            },
                            "competitions": {
                              "type": "integer"
                            },
                            "settled_in_window": {
                              "type": "integer"
                            }
                          }
                        },
                        "competitions": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Competition"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/matches": {
      "get": {
        "tags": [
          "Fixtures"
        ],
        "operationId": "listMatches",
        "summary": "All upcoming fixtures",
        "description": "Every upcoming fixture currently published, ordered by kickoff then fixture_id (ascending). Unknown, duplicated or malformed parameters return 422.",
        "parameters": [
          {
            "$ref": "#/components/parameters/date"
          },
          {
            "$ref": "#/components/parameters/from"
          },
          {
            "$ref": "#/components/parameters/to"
          },
          {
            "$ref": "#/components/parameters/league"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/lang"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of fixtures",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/X-RateLimit-Limit-Day"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Day"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FixtureSummary"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/matches/{fixture_id}": {
      "get": {
        "tags": [
          "Fixtures"
        ],
        "operationId": "getMatch",
        "summary": "One fixture with the full derived detail",
        "parameters": [
          {
            "name": "fixture_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "$ref": "#/components/parameters/lang"
          }
        ],
        "responses": {
          "200": {
            "description": "Fixture detail",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/X-RateLimit-Limit-Day"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Day"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/FixtureDetail"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/results": {
      "get": {
        "tags": [
          "Results"
        ],
        "operationId": "listResults",
        "summary": "Settled matches: our prediction vs the outcome",
        "description": "Settled matches in the rolling results window, newest kickoff first. Same basis as the website results page (`source.basis` = `results_page`): matches where at least one call was a hit. History depth equals the site window (currently 3 days).",
        "parameters": [
          {
            "$ref": "#/components/parameters/date"
          },
          {
            "$ref": "#/components/parameters/from"
          },
          {
            "$ref": "#/components/parameters/to"
          },
          {
            "$ref": "#/components/parameters/league"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/lang"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/X-RateLimit-Limit-Day"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Day"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Result"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    },
                    "source": {
                      "type": "object",
                      "properties": {
                        "basis": {
                          "type": "string",
                          "enum": [
                            "all_settled",
                            "results_page"
                          ]
                        },
                        "window_days": {
                          "oneOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "generated_at": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/accuracy": {
      "get": {
        "tags": [
          "Results"
        ],
        "operationId": "getAccuracy",
        "summary": "Hit rates overall and per competition",
        "parameters": [
          {
            "$ref": "#/components/parameters/lang"
          }
        ],
        "responses": {
          "200": {
            "description": "Accuracy",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/X-RateLimit-Limit-Day"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Day"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "recent": {
                          "type": "object",
                          "properties": {
                            "basis": {
                              "type": "string"
                            },
                            "window_days": {
                              "oneOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "generated_at": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "overall": {
                              "$ref": "#/components/schemas/HitRates"
                            },
                            "by_league": {
                              "type": "array",
                              "items": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "league": {
                                        "$ref": "#/components/schemas/League"
                                      }
                                    }
                                  },
                                  {
                                    "$ref": "#/components/schemas/HitRates"
                                  }
                                ]
                              }
                            }
                          }
                        },
                        "backtest": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "generated_at": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "train_season": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "test_season": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "overall": {
                                  "type": "object",
                                  "properties": {
                                    "matches": {
                                      "type": "integer"
                                    },
                                    "result_hits": {
                                      "type": "integer"
                                    },
                                    "result_rate": {
                                      "oneOf": [
                                        {
                                          "type": "number",
                                          "minimum": 0,
                                          "maximum": 1
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "score_rate": {
                                      "oneOf": [
                                        {
                                          "type": "number",
                                          "minimum": 0,
                                          "maximum": 1
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "goals_rate": {
                                      "oneOf": [
                                        {
                                          "type": "number",
                                          "minimum": 0,
                                          "maximum": 1
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "log_loss": {
                                      "oneOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "brier_score": {
                                      "oneOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  }
                                },
                                "by_league": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/components/schemas/BacktestLeague"
                                  }
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "`Authorization: Bearer pg_live_...`. Create keys in your account (Pro)."
      },
      "apiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Alternative to the Authorization header."
      }
    },
    "headers": {
      "X-RateLimit-Limit": {
        "description": "Requests allowed per rolling minute for this key.",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Limit-Day": {
        "description": "Requests allowed per UTC day for this key.",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Remaining-Day": {
        "description": "Requests left today after this one (approximate under concurrency).",
        "schema": {
          "type": "integer"
        }
      },
      "Cache-Control": {
        "description": "`private, max-age=60` on success.",
        "schema": {
          "type": "string"
        }
      },
      "Retry-After": {
        "description": "Seconds to wait before retrying.",
        "schema": {
          "type": "integer"
        }
      }
    },
    "parameters": {
      "lang": {
        "name": "lang",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "en",
            "es",
            "zh-CN",
            "pt-BR"
          ],
          "default": "en"
        },
        "description": "Language of `display_name` fields."
      },
      "date": {
        "name": "date",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date"
        },
        "description": "Single match date (YYYY-MM-DD, site timezone). Cannot be combined with from/to."
      },
      "from": {
        "name": "from",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date"
        },
        "description": "Inclusive start date."
      },
      "to": {
        "name": "to",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date"
        },
        "description": "Inclusive end date."
      },
      "league": {
        "name": "league",
        "in": "query",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[1-9][0-9]*(,[1-9][0-9]*)*$"
          },
          "maxItems": 50
        },
        "description": "Competition id. Repeat the parameter or pass a comma list (max 50 ids)."
      },
      "limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 500,
          "default": 100
        }
      },
      "cursor": {
        "name": "cursor",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Opaque. Pass `pagination.next_cursor` from the previous page, with the same filters."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "not_found",
              "fixture_not_found",
              "missing_api_key",
              "invalid_api_key",
              "key_revoked",
              "plan_inactive",
              "invalid_parameter",
              "rate_limited",
              "daily_quota_exceeded",
              "data_unavailable",
              "internal_error"
            ]
          },
          "message": {
            "type": "string",
            "description": "Human readable explanation."
          }
        }
      },
      "League": {
        "type": "object",
        "required": [
          "id",
          "name",
          "display_name"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "description": "Competition id (stable)."
          },
          "key": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string",
            "description": "Canonical English name."
          },
          "display_name": {
            "type": "string",
            "description": "Name in the requested `lang`."
          },
          "country": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "league",
                  "cup"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "season": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "Competition": {
        "allOf": [
          {
            "$ref": "#/components/schemas/League"
          },
          {
            "type": "object",
            "properties": {
              "upcoming": {
                "type": "integer",
                "description": "Upcoming fixtures currently listed."
              }
            }
          }
        ]
      },
      "Team": {
        "type": "object",
        "required": [
          "name",
          "display_name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          }
        }
      },
      "Probabilities1X2": {
        "type": "object",
        "required": [
          "home",
          "draw",
          "away"
        ],
        "properties": {
          "home": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "draw": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "away": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        }
      },
      "ExpectedGoals": {
        "type": "object",
        "properties": {
          "home": {
            "type": "number"
          },
          "away": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        }
      },
      "FixtureSummary": {
        "type": "object",
        "required": [
          "fixture_id",
          "status",
          "date",
          "kickoff_at",
          "league",
          "home",
          "away",
          "probabilities",
          "market_anchored"
        ],
        "properties": {
          "fixture_id": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "listed",
              "predicted",
              "started"
            ],
            "description": "`listed`: schedule only, no model output yet (probabilities and derived blocks are null). `predicted`: model output available, kickoff in the future. `started`: kickoff has passed, result not yet settled (detail endpoint only)."
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "Match date in the site timezone (America/Mexico_City)."
          },
          "kickoff_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "league": {
            "$ref": "#/components/schemas/League"
          },
          "home": {
            "$ref": "#/components/schemas/Team"
          },
          "away": {
            "$ref": "#/components/schemas/Team"
          },
          "probabilities": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Probabilities1X2"
              },
              {
                "type": "null"
              }
            ]
          },
          "market_anchored": {
            "type": "boolean",
            "description": "True when the model probabilities were blended with a market consensus line before publication. The line itself is not provided."
          },
          "expected_goals": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExpectedGoals"
              },
              {
                "type": "null"
              }
            ]
          },
          "confidence": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "pick": {
                    "type": "string",
                    "enum": [
                      "home",
                      "draw",
                      "away"
                    ]
                  },
                  "probability": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "tier": {
                    "type": "string",
                    "enum": [
                      "standard",
                      "hot",
                      "blazing"
                    ]
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "recommendation": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "is_recommended": {
                    "type": "boolean"
                  },
                  "channels": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "result",
                        "score",
                        "goals"
                      ]
                    }
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "FixtureDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/FixtureSummary"
          },
          {
            "type": "object",
            "properties": {
              "top_scores": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "home": {
                          "type": "integer"
                        },
                        "away": {
                          "type": "integer"
                        },
                        "probability": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        }
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "total_goals": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "distribution": {
                        "oneOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "goals": {
                                  "type": "string",
                                  "description": "\"0\"..\"5\" or \"6+\""
                                },
                                "probability": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 1
                                }
                              }
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "top3_combined": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      "over": {
                        "type": "object",
                        "description": "P(total goals > line).",
                        "properties": {
                          "1.5": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          },
                          "2.5": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          },
                          "3.5": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          }
                        }
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "both_teams_score": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "yes": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      "no": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "half_time": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Probabilities1X2"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "form": {
                "type": "object",
                "properties": {
                  "home": {
                    "oneOf": [
                      {
                        "type": "string",
                        "description": "Recent results, oldest to newest, e.g. WWDLW"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "away": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              },
              "elo": {
                "type": "object",
                "properties": {
                  "home": {
                    "oneOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "away": {
                    "oneOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        ]
      },
      "Result": {
        "type": "object",
        "properties": {
          "fixture_id": {
            "type": "integer"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "kickoff_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "league": {
            "$ref": "#/components/schemas/League"
          },
          "home": {
            "$ref": "#/components/schemas/Team"
          },
          "away": {
            "$ref": "#/components/schemas/Team"
          },
          "score": {
            "type": "object",
            "properties": {
              "home": {
                "type": "integer"
              },
              "away": {
                "type": "integer"
              }
            }
          },
          "outcome": {
            "type": "string",
            "enum": [
              "home",
              "draw",
              "away"
            ]
          },
          "prediction": {
            "type": "object",
            "properties": {
              "pick": {
                "type": "string",
                "enum": [
                  "home",
                  "draw",
                  "away"
                ]
              },
              "probabilities": {
                "$ref": "#/components/schemas/Probabilities1X2"
              },
              "expected_goals": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "home": {
                        "type": "number"
                      },
                      "away": {
                        "type": "number"
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "top_scores": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "\"H-A\""
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "top_goal_totals": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "hits": {
            "type": "object",
            "properties": {
              "result": {
                "type": "boolean"
              },
              "score": {
                "oneOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "goals": {
                "oneOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        }
      },
      "Pagination": {
        "type": "object",
        "required": [
          "limit",
          "total",
          "returned",
          "has_more",
          "next_cursor"
        ],
        "properties": {
          "limit": {
            "type": "integer"
          },
          "total": {
            "type": "integer",
            "description": "Rows matching the filters across all pages."
          },
          "returned": {
            "type": "integer"
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "HitRates": {
        "type": "object",
        "properties": {
          "matches": {
            "type": "integer"
          },
          "result_hits": {
            "type": "integer"
          },
          "result_rate": {
            "oneOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "score_hits": {
            "type": "integer"
          },
          "score_rate": {
            "oneOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "goals_hits": {
            "type": "integer"
          },
          "goals_rate": {
            "oneOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "BacktestLeague": {
        "type": "object",
        "properties": {
          "league_id": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "league_name": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "matches": {
            "type": "integer"
          },
          "result_hits": {
            "type": "integer"
          },
          "result_rate": {
            "oneOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "score_rate": {
            "oneOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "goals_rate": {
            "oneOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              {
                "type": "null"
              }
            ]
          }
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing or invalid API key.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "invalid_api_key",
              "message": "API key is not valid."
            }
          }
        }
      },
      "Forbidden": {
        "description": "Key revoked (`key_revoked`) or the owner's Pro membership has lapsed (`plan_inactive`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "plan_inactive",
              "message": "API access requires an active Pro membership."
            }
          }
        }
      },
      "NotFound": {
        "description": "Unknown endpoint or fixture.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "fixture_not_found",
              "message": "No upcoming fixture with that id."
            }
          }
        }
      },
      "Unprocessable": {
        "description": "Invalid query or path parameter.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "invalid_parameter",
              "message": "`limit` must be an integer between 1 and 500."
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Per-minute limit (`rate_limited`) or daily quota (`daily_quota_exceeded`) exceeded.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/Retry-After"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "rate_limited",
              "message": "Rate limit of 60 requests per minute exceeded."
            }
          }
        }
      },
      "Unavailable": {
        "description": "Data temporarily unavailable.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "data_unavailable",
              "message": "Prediction data is temporarily unavailable. Retry shortly."
            }
          }
        }
      }
    }
  }
}