From 9df1ba5a94a491995dfd611067336298364f9715 Mon Sep 17 00:00:00 2001 From: Tony Wang Date: Mon, 12 Oct 2026 11:01:00 +0800 Subject: [PATCH] docs: list supported endpoints and add search keywords (0.3.5) Regenerate the six clients from the current generator. The repository and package READMEs now list every supported endpoint, and the npm, PyPI and Composer manifests carry platform-specific search keywords and a fuller description. --- CHANGELOG.md | 5 + README.md | 120 +++++++++- client.go | 33 ++- composer.json | 19 +- docs/usage.md | 6 +- java/README.md | 122 +++++++++- java/pom.xml | 4 +- .../java/net/crawlora/sofascore/Client.java | 22 +- .../net/crawlora/sofascore/Operation.java | 7 +- javascript/README.md | 119 +++++++++- javascript/package-lock.json | 4 +- javascript/package.json | 6 +- javascript/src/index.js | 4 +- javascript/test/client.test.js | 2 +- operations.go | 3 + php/CHANGELOG.md | 2 +- php/README.md | 120 +++++++++- php/composer.json | 19 +- php/src/Crawlora/Sofascore/Client.php | 47 +++- php/src/Crawlora/Sofascore/operations.json | 218 ++++++++++++++++++ platform.json | 12 +- python/README.md | 121 +++++++++- python/crawlora_sofascore/__init__.py | 2 +- python/crawlora_sofascore/platform.py | 4 +- python/pyproject.toml | 5 +- python/tests/test_package.py | 2 +- ruby/CHANGELOG.md | 2 +- ruby/README.md | 120 +++++++++- ruby/crawlora-sofascore.gemspec | 4 +- ruby/lib/crawlora/sofascore/client.rb | 30 ++- ruby/lib/crawlora/sofascore/operations.json | 218 ++++++++++++++++++ ruby/lib/crawlora/sofascore/version.rb | 2 +- scripts/_platformsdk/documentation.py | 124 ++++++++++ scripts/_platformsdk/golang.py | 42 +++- scripts/_platformsdk/java.py | 38 ++- scripts/_platformsdk/javascript.py | 5 + scripts/_platformsdk/php.py | 5 + scripts/_platformsdk/python.py | 6 + scripts/_platformsdk/release_sync.py | 90 ++++++++ scripts/_platformsdk/ruby.py | 24 +- scripts/_platformsdk/spec.py | 66 +++++- .../templates/documentation/README.md.tmpl | 8 +- .../documentation/javascript-README.md.tmpl | 9 +- .../documentation/python-README.md.tmpl | 11 +- .../templates/documentation/usage.md.tmpl | 4 +- .../templates/golang/client.go.tmpl | 29 ++- .../templates/golang/operations.go.tmpl | 3 + .../templates/java/Client.java.tmpl | 22 +- .../templates/java/Operation.java.tmpl | 7 +- .../templates/java/README.md.tmpl | 10 +- .../templates/javascript/package.json | 4 +- .../_platformsdk/templates/php/Client.php.tpl | 41 +++- .../_platformsdk/templates/php/README.md.tpl | 10 +- .../templates/php/composer.json.tpl | 3 +- .../templates/python/pyproject.toml.tpl | 3 +- .../_platformsdk/templates/ruby/README.md.tpl | 10 +- .../_platformsdk/templates/ruby/client.rb.tpl | 26 ++- .../templates/ruby/gem.gemspec.tpl | 4 +- scripts/_platformsdk/test_sync.py | 27 ++- 59 files changed, 1909 insertions(+), 126 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9c747c..f5b5664 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.3.5 — 2026-10-12 + +- List every supported endpoint in the repository and package READMEs. +- Add platform-specific search keywords to the npm, PyPI, and Composer package metadata. + ## 0.3.4 — 2026-10-09 - Keep the platform README as a language-package index without cross-language installation commands or code examples; pkg.go.dev now shows only its Go example. diff --git a/README.md b/README.md index d74ba50..140524f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # SofaScore clients for Crawlora -Official Crawlora client packages for the hosted SofaScore API. These clients call Crawlora's hosted API; they do not scrape SofaScore locally. Requests use your Crawlora account and `CRAWLORA_API_KEY`; service usage follows your account billing plan. Crawlora is independent from and not affiliated with or endorsed by SofaScore or its owners. +Official Crawlora client packages for the hosted SofaScore API. Access 109 API endpoints covering live events, match details, lineups, statistics, tournaments, and player/team data from JavaScript/TypeScript, Python, Go, Ruby, Java, and PHP. These clients call Crawlora's hosted API; they do not scrape SofaScore locally. Requests use your Crawlora account and `CRAWLORA_API_KEY`; service usage follows your account billing plan. Crawlora is independent from and not affiliated with or endorsed by SofaScore or its owners. ## Language packages @@ -8,16 +8,128 @@ Official Crawlora client packages for the hosted SofaScore API. These clients ca - Python: [`crawlora-sofascore`](python/README.md) - Go: [`github.com/Crawlora-org/crawlora-sofascore`](go.mod) - Ruby: [`crawlora-sofascore`](ruby/README.md) -- Java: [`net.crawlora:crawlora-sofascore:0.3.4`](java/README.md) +- Java: [`net.crawlora:crawlora-sofascore:0.3.5`](java/README.md) - PHP: [`crawlora/sofascore`](php/README.md) For installation and runnable examples, use the README for your language. See the [API endpoint and parameter reference](docs/usage.md) for shared operation details. Create an account at [crawlora.net](https://crawlora.net/signup?utm_source=github&utm_medium=referral&utm_campaign=platform-clients&utm_content=sofascore-repository-signup), open the [Crawlora console](https://crawlora.net/app?utm_source=github&utm_medium=referral&utm_campaign=platform-clients&utm_content=sofascore-repository-console) to get an API key, or read the [API documentation](https://crawlora.net/docs?utm_source=github&utm_medium=referral&utm_campaign=platform-clients&utm_content=sofascore-repository-api-docs). Keep `CRAWLORA_API_KEY` out of source control. -## API coverage +## API coverage and supported endpoints -The six clients provide access to 109 public API operations. See the [API reference](docs/usage.md) for supported operations, parameters, and response details. +The six language clients provide access to all 109 selected public SofaScore API operations. Search or browse by endpoint path and operation ID below; the [complete API reference](docs/usage.md) adds parameters, enums, and response details. + +| Method | Endpoint | API operation | Description | +| --- | --- | --- | --- | +| `GET` | `/sofascore/categories` | `sofascore-categories` | SofaScore categories for a sport | +| `GET` | `/sofascore/category-tournaments` | `sofascore-category-tournaments` | SofaScore competitions in a category | +| `GET` | `/sofascore/draft` | `sofascore-draft` | SofaScore league draft | +| `GET` | `/sofascore/draft-picks` | `sofascore-draft-picks` | SofaScore league draft picks | +| `GET` | `/sofascore/esports-game` | `sofascore-esports-game` | SofaScore esports game detail | +| `GET` | `/sofascore/event` | `sofascore-event` | SofaScore event detail | +| `GET` | `/sofascore/event-at-bat-pitches` | `sofascore-event-at-bat-pitches` | SofaScore event at-bat pitches | +| `GET` | `/sofascore/event-at-bats` | `sofascore-event-at-bats` | SofaScore event at-bats | +| `GET` | `/sofascore/event-average-positions` | `sofascore-event-average-positions` | SofaScore event average positions | +| `GET` | `/sofascore/event-baseball-top-performers` | `sofascore-event-baseball-top-performers` | SofaScore event baseball top performers | +| `GET` | `/sofascore/event-best-players` | `sofascore-event-best-players` | SofaScore event best players | +| `GET` | `/sofascore/event-comments` | `sofascore-event-comments` | SofaScore event commentary | +| `GET` | `/sofascore/event-esports-games` | `sofascore-event-esports-games` | SofaScore event esports games | +| `GET` | `/sofascore/event-graph` | `sofascore-event-graph` | SofaScore event momentum graph | +| `GET` | `/sofascore/event-h2h` | `sofascore-event-h2h` | SofaScore event head-to-head | +| `GET` | `/sofascore/event-highlights` | `sofascore-event-highlights` | SofaScore event highlights | +| `GET` | `/sofascore/event-incidents` | `sofascore-event-incidents` | SofaScore event incidents | +| `GET` | `/sofascore/event-innings` | `sofascore-event-innings` | SofaScore event innings | +| `GET` | `/sofascore/event-lineups` | `sofascore-event-lineups` | SofaScore event lineups | +| `GET` | `/sofascore/event-managers` | `sofascore-event-managers` | SofaScore event managers | +| `GET` | `/sofascore/event-odds` | `sofascore-event-odds` | SofaScore event odds | +| `GET` | `/sofascore/event-player-heatmap` | `sofascore-event-player-heatmap` | SofaScore event player heatmap | +| `GET` | `/sofascore/event-player-statistics` | `sofascore-event-player-statistics` | SofaScore event player statistics | +| `GET` | `/sofascore/event-point-by-point` | `sofascore-event-point-by-point` | SofaScore event point-by-point | +| `GET` | `/sofascore/event-pregame-form` | `sofascore-event-pregame-form` | SofaScore event pre-game form | +| `GET` | `/sofascore/event-shotmap` | `sofascore-event-shotmap` | SofaScore event shot map | +| `GET` | `/sofascore/event-statistics` | `sofascore-event-statistics` | SofaScore event statistics | +| `GET` | `/sofascore/event-team-heatmap` | `sofascore-event-team-heatmap` | SofaScore event team heatmap | +| `GET` | `/sofascore/event-team-streaks` | `sofascore-event-team-streaks` | SofaScore event team streaks | +| `GET` | `/sofascore/event-tennis-power` | `sofascore-event-tennis-power` | SofaScore event tennis power | +| `GET` | `/sofascore/event-tv-channels` | `sofascore-event-tv-channels` | SofaScore event TV channels | +| `GET` | `/sofascore/event-votes` | `sofascore-event-votes` | SofaScore event votes | +| `GET` | `/sofascore/live-events` | `sofascore-live-events` | SofaScore live events | +| `GET` | `/sofascore/manager` | `sofascore-manager` | SofaScore manager detail | +| `GET` | `/sofascore/manager-events` | `sofascore-manager-events` | SofaScore manager recent matches | +| `GET` | `/sofascore/mma-card` | `sofascore-mma-card` | SofaScore MMA card | +| `GET` | `/sofascore/mma-schedule` | `sofascore-mma-schedule` | SofaScore MMA schedule | +| `GET` | `/sofascore/odds-dropping` | `sofascore-odds-dropping` | SofaScore dropping odds | +| `GET` | `/sofascore/odds-winning` | `sofascore-odds-winning` | SofaScore winning odds | +| `GET` | `/sofascore/player` | `sofascore-player` | SofaScore player detail | +| `GET` | `/sofascore/player-attributes` | `sofascore-player-attributes` | SofaScore player attributes and characteristics | +| `GET` | `/sofascore/player-events` | `sofascore-player-events` | SofaScore player matches with per-match numbers | +| `GET` | `/sofascore/player-last-year-summary` | `sofascore-player-last-year-summary` | SofaScore player form over the last year | +| `GET` | `/sofascore/player-national-team-statistics` | `sofascore-player-national-team-statistics` | SofaScore player national team record | +| `GET` | `/sofascore/player-penalty-history` | `sofascore-player-penalty-history` | SofaScore player penalty history | +| `GET` | `/sofascore/player-ratings` | `sofascore-player-ratings` | SofaScore player match ratings for a season | +| `GET` | `/sofascore/player-season-heatmap` | `sofascore-player-season-heatmap` | SofaScore player season heatmap | +| `GET` | `/sofascore/player-season-statistics` | `sofascore-player-season-statistics` | SofaScore player season statistics | +| `GET` | `/sofascore/player-statistical-rankings` | `sofascore-player-statistical-rankings` | SofaScore player ranking among all players in a season | +| `GET` | `/sofascore/player-statistics-seasons` | `sofascore-player-statistics-seasons` | SofaScore player statistics seasons | +| `GET` | `/sofascore/player-tournaments` | `sofascore-player-tournaments` | SofaScore player competitions | +| `GET` | `/sofascore/player-transfers` | `sofascore-player-transfers` | SofaScore player transfer history | +| `GET` | `/sofascore/ranking-types` | `sofascore-ranking-types` | SofaScore ranking catalogue | +| `GET` | `/sofascore/rankings` | `sofascore-rankings` | SofaScore rankings | +| `GET` | `/sofascore/referee` | `sofascore-referee` | SofaScore referee profile | +| `GET` | `/sofascore/referee-events` | `sofascore-referee-events` | SofaScore referee officiated matches | +| `GET` | `/sofascore/referee-statistics` | `sofascore-referee-statistics` | SofaScore referee card statistics | +| `GET` | `/sofascore/round-events` | `sofascore-round-events` | SofaScore round fixtures | +| `GET` | `/sofascore/scheduled-events` | `sofascore-scheduled-events` | SofaScore events scheduled in a category on a date | +| `GET` | `/sofascore/scheduled-tournaments` | `sofascore-scheduled-tournaments` | SofaScore tournaments scheduled on a date | +| `GET` | `/sofascore/search` | `sofascore-search` | SofaScore universal search | +| `GET` | `/sofascore/search-typed` | `sofascore-search-typed` | SofaScore search by entity type | +| `GET` | `/sofascore/season-events` | `sofascore-season-events` | SofaScore season fixtures and results | +| `GET` | `/sofascore/sports` | `sofascore-sports` | SofaScore supported sports | +| `GET` | `/sofascore/stage` | `sofascore-stage` | SofaScore motorsport and cycling stage | +| `GET` | `/sofascore/stage-categories` | `sofascore-stage-categories` | SofaScore motorsport and cycling categories and competitions | +| `GET` | `/sofascore/stage-driver-performance` | `sofascore-stage-driver-performance` | SofaScore motorsport race progress per driver | +| `GET` | `/sofascore/stage-featured` | `sofascore-stage-featured` | SofaScore featured motorsport and cycling events | +| `GET` | `/sofascore/stage-schedule` | `sofascore-stage-schedule` | SofaScore motorsport and cycling events around a date | +| `GET` | `/sofascore/stage-seasons` | `sofascore-stage-seasons` | SofaScore seasons of a motorsport or cycling competition | +| `GET` | `/sofascore/stage-standings` | `sofascore-stage-standings` | SofaScore motorsport and cycling stage standings | +| `GET` | `/sofascore/stage-substages` | `sofascore-stage-substages` | SofaScore children of a motorsport or cycling stage | +| `GET` | `/sofascore/standings` | `sofascore-standings` | SofaScore standings | +| `GET` | `/sofascore/team` | `sofascore-team` | SofaScore team detail | +| `GET` | `/sofascore/team-achievements` | `sofascore-team-achievements` | SofaScore team trophies | +| `GET` | `/sofascore/team-events` | `sofascore-team-events` | SofaScore team fixtures | +| `GET` | `/sofascore/team-goal-distributions` | `sofascore-team-goal-distributions` | SofaScore team goals by match minute | +| `GET` | `/sofascore/team-near-events` | `sofascore-team-near-events` | SofaScore team previous and next match | +| `GET` | `/sofascore/team-of-the-week` | `sofascore-team-of-the-week` | SofaScore team of the week | +| `GET` | `/sofascore/team-of-the-week-periods` | `sofascore-team-of-the-week-periods` | SofaScore team of the week periods | +| `GET` | `/sofascore/team-performance` | `sofascore-team-performance` | SofaScore team recent performance | +| `GET` | `/sofascore/team-player-statistics` | `sofascore-team-player-statistics` | SofaScore team player statistics | +| `GET` | `/sofascore/team-player-statistics-seasons` | `sofascore-team-player-statistics-seasons` | SofaScore team player statistics seasons | +| `GET` | `/sofascore/team-players` | `sofascore-team-players` | SofaScore team players | +| `GET` | `/sofascore/team-rankings` | `sofascore-team-rankings` | SofaScore team rankings | +| `GET` | `/sofascore/team-season-statistics` | `sofascore-team-season-statistics` | SofaScore team season statistics | +| `GET` | `/sofascore/team-statistics-seasons` | `sofascore-team-statistics-seasons` | SofaScore team statistics seasons | +| `GET` | `/sofascore/team-top-players` | `sofascore-team-top-players` | SofaScore team top players | +| `GET` | `/sofascore/team-tournaments` | `sofascore-team-tournaments` | SofaScore team competitions | +| `GET` | `/sofascore/team-transfers` | `sofascore-team-transfers` | SofaScore team transfers | +| `GET` | `/sofascore/tennis-player-grand-slam-results` | `sofascore-tennis-player-grand-slam-results` | SofaScore tennis player grand slam results | +| `GET` | `/sofascore/tournament-cuptree` | `sofascore-tournament-cuptree` | SofaScore competition knockout tree | +| `GET` | `/sofascore/tournament-info` | `sofascore-tournament-info` | SofaScore competition info | +| `GET` | `/sofascore/tournament-player-of-the-season` | `sofascore-tournament-player-of-the-season` | SofaScore player of the season | +| `GET` | `/sofascore/tournament-player-statistics` | `sofascore-tournament-player-statistics` | SofaScore season player statistics table | +| `GET` | `/sofascore/tournament-rounds` | `sofascore-tournament-rounds` | SofaScore competition season rounds | +| `GET` | `/sofascore/tournament-seasons` | `sofascore-tournament-seasons` | SofaScore competition seasons | +| `GET` | `/sofascore/tournament-statistics-info` | `sofascore-tournament-statistics-info` | SofaScore player statistics table filters | +| `GET` | `/sofascore/tournament-team-of-the-season` | `sofascore-tournament-team-of-the-season` | SofaScore team of the season | +| `GET` | `/sofascore/tournament-teams` | `sofascore-tournament-teams` | SofaScore teams of a competition season | +| `GET` | `/sofascore/tournament-top-players` | `sofascore-tournament-top-players` | SofaScore season top players | +| `GET` | `/sofascore/tournament-top-teams` | `sofascore-tournament-top-teams` | SofaScore season top teams | +| `GET` | `/sofascore/tournament-venues` | `sofascore-tournament-venues` | SofaScore venues of a competition season | +| `GET` | `/sofascore/tournament-winners` | `sofascore-tournament-winners` | SofaScore past winners of a competition | +| `GET` | `/sofascore/tournaments-with-feature` | `sofascore-tournaments-with-feature` | SofaScore competitions that carry a feature | +| `GET` | `/sofascore/trending-events` | `sofascore-trending-events` | SofaScore trending events | +| `GET` | `/sofascore/trending-players` | `sofascore-trending-players` | SofaScore trending players | +| `GET` | `/sofascore/venue` | `sofascore-venue` | SofaScore venue | +| `GET` | `/sofascore/venue-events` | `sofascore-venue-events` | SofaScore matches at a venue | ## License diff --git a/client.go b/client.go index 8af83aa..bc27162 100644 --- a/client.go +++ b/client.go @@ -1,8 +1,9 @@ -// Package sofascore is a focused Go client for Crawlora's SofaScore endpoints. +// Package sofascore is Crawlora's SofaScore API client for 109 endpoints, covering live events, match details, lineups, statistics, tournaments, and player/team data. // API documentation: https://crawlora.net/docs?utm_source=pkg.go.dev&utm_medium=referral&utm_campaign=platform-clients&utm_content=sofascore-go-api-docs package sofascore import ( + "bytes" "context" "encoding/json" "fmt" @@ -17,7 +18,7 @@ import ( const ( DefaultBaseURL = "https://api.crawlora.net/api/v1" - Version = "0.3.4" + Version = "0.3.5" ) // Params maps the exact OpenAPI parameter names expected by this platform client. @@ -62,12 +63,31 @@ func (c *Client) Call(ctx context.Context, operationID string, params Params) (a if !ok { return nil, fmt.Errorf("unknown SofaScore operation: %s", operationID) } - if operation.Method != http.MethodGet { + if operation.Method != http.MethodGet && operation.Method != http.MethodPost { return nil, fmt.Errorf("unsupported HTTP method %s for %s", operation.Method, operationID) } if params == nil { params = Params{} } + var payload io.Reader + if operation.BodyParam != "" { + // The JSON body is passed under the operation's body parameter name or "body". + value, ok := params[operation.BodyParam] + if !ok || value == nil { + value, ok = params["body"] + } + if !ok || value == nil { + if operation.BodyRequired { + return nil, fmt.Errorf("missing required request body: %s", operation.BodyParam) + } + } else { + encoded, err := json.Marshal(value) + if err != nil { + return nil, fmt.Errorf("encode request body: %w", err) + } + payload = bytes.NewReader(encoded) + } + } requestURL, err := buildURL(c.BaseURL, operation, params) if err != nil { return nil, err @@ -77,11 +97,14 @@ func (c *Client) Call(ctx context.Context, operationID string, params Params) (a ctx, cancel = context.WithTimeout(ctx, c.Timeout) defer cancel() } - request, err := http.NewRequestWithContext(ctx, http.MethodGet, requestURL, nil) + request, err := http.NewRequestWithContext(ctx, operation.Method, requestURL, payload) if err != nil { return nil, err } - request.Header.Set("User-Agent", "crawlora-sofascore-go/0.3.4") + if payload != nil { + request.Header.Set("Content-Type", "application/json") + } + request.Header.Set("User-Agent", "crawlora-sofascore-go/0.3.5") for _, security := range operation.Security { if security == "ApiKeyAuth" && c.APIKey != "" { request.Header.Set("x-api-key", c.APIKey) diff --git a/composer.json b/composer.json index d27ce29..a3d8e8f 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,23 @@ { "name": "crawlora/sofascore", - "description": "SofaScore client for the Crawlora hosted API", + "description": "Crawlora SofaScore API client with 109 endpoints for live events, match details, lineups, statistics, tournaments, and player/team data", + "keywords": [ + "crawlora", + "api-client", + "sdk", + "web-scraping", + "scraping-api", + "sofascore", + "sofascore-api", + "sofascore-scraper", + "sofascore-data", + "sofascore-live-events", + "sofascore-match-details", + "sofascore-lineups", + "sofascore-statistics", + "sofascore-tournaments", + "sofascore-player-team-data" + ], "type": "library", "license": "MIT", "require": { diff --git a/docs/usage.md b/docs/usage.md index 20f98b7..9d97879 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -1,8 +1,8 @@ -# SofaScore client usage +# SofaScore API endpoint reference and client usage -The `@crawlora-org/sofascore` and `crawlora-sofascore` packages call Crawlora's hosted API. Set `CRAWLORA_API_KEY` to a key for your Crawlora account before making requests. Service usage is billed under that account. These clients do not run a browser or scrape SofaScore locally; Crawlora is independent from and not endorsed by SofaScore or its owners. +This reference lists all 109 public SofaScore API endpoints exposed by the `@crawlora-org/sofascore` and `crawlora-sofascore` packages, covering live events, match details, lineups, statistics, tournaments, and player/team data. The clients call Crawlora's hosted API. Set `CRAWLORA_API_KEY` to a key for your Crawlora account before making requests. Service usage is billed under that account. These clients do not run a browser or scrape SofaScore locally; Crawlora is independent from and not endorsed by SofaScore or its owners. -The package tracks the public API contract revision `sha256:645115670262bb86bf9c49f16ddbfdd94bbec67befb2aa8497f10f86ee2d5e46` bundled with release `0.3.4`. Maintainers can preview daily contract updates with the repository's `Sync live API contract` workflow; unchanged contracts do not produce package releases. +The package tracks the public API contract revision `sha256:645115670262bb86bf9c49f16ddbfdd94bbec67befb2aa8497f10f86ee2d5e46` bundled with release `0.3.5`. Maintainers can preview daily contract updates with the repository's `Sync live API contract` workflow; unchanged contracts do not produce package releases. Both packages expose all 109 operations in the bundled API contract. JavaScript uses camelCase methods and Python uses snake_case methods. Methods also remain available through the `sofascore` group and the generated `Client` alias. diff --git a/java/README.md b/java/README.md index 6ee674d..cdad24e 100644 --- a/java/README.md +++ b/java/README.md @@ -1,6 +1,6 @@ -# Crawlora SofaScore Java Client +# Crawlora SofaScore API client for Java -The official Java client for Crawlora's hosted SofaScore API. It calls Crawlora's hosted API with your `x-api-key`; it does not connect to the upstream site directly. +The official Java client for Crawlora's hosted SofaScore API. It exposes 109 endpoints covering live events, match details, lineups, statistics, tournaments, and player/team data. Requests use your `x-api-key`; the client does not connect to the upstream site directly. ## Install @@ -8,7 +8,7 @@ The official Java client for Crawlora's hosted SofaScore API. It calls Crawlora' net.crawlora crawlora-sofascore - 0.3.4 + 0.3.5 ``` @@ -31,6 +31,122 @@ Each operation has a direct method that accepts the parameters documented for th For custom hosted API routing and timeouts, use `new Client(apiKey, baseUrl, Duration.ofSeconds(20))`. Text responses are returned as `String`; JSON responses are parsed into Java maps, lists, and scalar values. +## Supported SofaScore API endpoints + +Browse every route included in this Java package. The [endpoint reference](https://github.com/Crawlora-org/crawlora-sofascore/blob/main/docs/usage.md) also lists parameters and response details. + +| Method | Endpoint | API operation | Description | +| --- | --- | --- | --- | +| `GET` | `/sofascore/categories` | `sofascore-categories` | SofaScore categories for a sport | +| `GET` | `/sofascore/category-tournaments` | `sofascore-category-tournaments` | SofaScore competitions in a category | +| `GET` | `/sofascore/draft` | `sofascore-draft` | SofaScore league draft | +| `GET` | `/sofascore/draft-picks` | `sofascore-draft-picks` | SofaScore league draft picks | +| `GET` | `/sofascore/esports-game` | `sofascore-esports-game` | SofaScore esports game detail | +| `GET` | `/sofascore/event` | `sofascore-event` | SofaScore event detail | +| `GET` | `/sofascore/event-at-bat-pitches` | `sofascore-event-at-bat-pitches` | SofaScore event at-bat pitches | +| `GET` | `/sofascore/event-at-bats` | `sofascore-event-at-bats` | SofaScore event at-bats | +| `GET` | `/sofascore/event-average-positions` | `sofascore-event-average-positions` | SofaScore event average positions | +| `GET` | `/sofascore/event-baseball-top-performers` | `sofascore-event-baseball-top-performers` | SofaScore event baseball top performers | +| `GET` | `/sofascore/event-best-players` | `sofascore-event-best-players` | SofaScore event best players | +| `GET` | `/sofascore/event-comments` | `sofascore-event-comments` | SofaScore event commentary | +| `GET` | `/sofascore/event-esports-games` | `sofascore-event-esports-games` | SofaScore event esports games | +| `GET` | `/sofascore/event-graph` | `sofascore-event-graph` | SofaScore event momentum graph | +| `GET` | `/sofascore/event-h2h` | `sofascore-event-h2h` | SofaScore event head-to-head | +| `GET` | `/sofascore/event-highlights` | `sofascore-event-highlights` | SofaScore event highlights | +| `GET` | `/sofascore/event-incidents` | `sofascore-event-incidents` | SofaScore event incidents | +| `GET` | `/sofascore/event-innings` | `sofascore-event-innings` | SofaScore event innings | +| `GET` | `/sofascore/event-lineups` | `sofascore-event-lineups` | SofaScore event lineups | +| `GET` | `/sofascore/event-managers` | `sofascore-event-managers` | SofaScore event managers | +| `GET` | `/sofascore/event-odds` | `sofascore-event-odds` | SofaScore event odds | +| `GET` | `/sofascore/event-player-heatmap` | `sofascore-event-player-heatmap` | SofaScore event player heatmap | +| `GET` | `/sofascore/event-player-statistics` | `sofascore-event-player-statistics` | SofaScore event player statistics | +| `GET` | `/sofascore/event-point-by-point` | `sofascore-event-point-by-point` | SofaScore event point-by-point | +| `GET` | `/sofascore/event-pregame-form` | `sofascore-event-pregame-form` | SofaScore event pre-game form | +| `GET` | `/sofascore/event-shotmap` | `sofascore-event-shotmap` | SofaScore event shot map | +| `GET` | `/sofascore/event-statistics` | `sofascore-event-statistics` | SofaScore event statistics | +| `GET` | `/sofascore/event-team-heatmap` | `sofascore-event-team-heatmap` | SofaScore event team heatmap | +| `GET` | `/sofascore/event-team-streaks` | `sofascore-event-team-streaks` | SofaScore event team streaks | +| `GET` | `/sofascore/event-tennis-power` | `sofascore-event-tennis-power` | SofaScore event tennis power | +| `GET` | `/sofascore/event-tv-channels` | `sofascore-event-tv-channels` | SofaScore event TV channels | +| `GET` | `/sofascore/event-votes` | `sofascore-event-votes` | SofaScore event votes | +| `GET` | `/sofascore/live-events` | `sofascore-live-events` | SofaScore live events | +| `GET` | `/sofascore/manager` | `sofascore-manager` | SofaScore manager detail | +| `GET` | `/sofascore/manager-events` | `sofascore-manager-events` | SofaScore manager recent matches | +| `GET` | `/sofascore/mma-card` | `sofascore-mma-card` | SofaScore MMA card | +| `GET` | `/sofascore/mma-schedule` | `sofascore-mma-schedule` | SofaScore MMA schedule | +| `GET` | `/sofascore/odds-dropping` | `sofascore-odds-dropping` | SofaScore dropping odds | +| `GET` | `/sofascore/odds-winning` | `sofascore-odds-winning` | SofaScore winning odds | +| `GET` | `/sofascore/player` | `sofascore-player` | SofaScore player detail | +| `GET` | `/sofascore/player-attributes` | `sofascore-player-attributes` | SofaScore player attributes and characteristics | +| `GET` | `/sofascore/player-events` | `sofascore-player-events` | SofaScore player matches with per-match numbers | +| `GET` | `/sofascore/player-last-year-summary` | `sofascore-player-last-year-summary` | SofaScore player form over the last year | +| `GET` | `/sofascore/player-national-team-statistics` | `sofascore-player-national-team-statistics` | SofaScore player national team record | +| `GET` | `/sofascore/player-penalty-history` | `sofascore-player-penalty-history` | SofaScore player penalty history | +| `GET` | `/sofascore/player-ratings` | `sofascore-player-ratings` | SofaScore player match ratings for a season | +| `GET` | `/sofascore/player-season-heatmap` | `sofascore-player-season-heatmap` | SofaScore player season heatmap | +| `GET` | `/sofascore/player-season-statistics` | `sofascore-player-season-statistics` | SofaScore player season statistics | +| `GET` | `/sofascore/player-statistical-rankings` | `sofascore-player-statistical-rankings` | SofaScore player ranking among all players in a season | +| `GET` | `/sofascore/player-statistics-seasons` | `sofascore-player-statistics-seasons` | SofaScore player statistics seasons | +| `GET` | `/sofascore/player-tournaments` | `sofascore-player-tournaments` | SofaScore player competitions | +| `GET` | `/sofascore/player-transfers` | `sofascore-player-transfers` | SofaScore player transfer history | +| `GET` | `/sofascore/ranking-types` | `sofascore-ranking-types` | SofaScore ranking catalogue | +| `GET` | `/sofascore/rankings` | `sofascore-rankings` | SofaScore rankings | +| `GET` | `/sofascore/referee` | `sofascore-referee` | SofaScore referee profile | +| `GET` | `/sofascore/referee-events` | `sofascore-referee-events` | SofaScore referee officiated matches | +| `GET` | `/sofascore/referee-statistics` | `sofascore-referee-statistics` | SofaScore referee card statistics | +| `GET` | `/sofascore/round-events` | `sofascore-round-events` | SofaScore round fixtures | +| `GET` | `/sofascore/scheduled-events` | `sofascore-scheduled-events` | SofaScore events scheduled in a category on a date | +| `GET` | `/sofascore/scheduled-tournaments` | `sofascore-scheduled-tournaments` | SofaScore tournaments scheduled on a date | +| `GET` | `/sofascore/search` | `sofascore-search` | SofaScore universal search | +| `GET` | `/sofascore/search-typed` | `sofascore-search-typed` | SofaScore search by entity type | +| `GET` | `/sofascore/season-events` | `sofascore-season-events` | SofaScore season fixtures and results | +| `GET` | `/sofascore/sports` | `sofascore-sports` | SofaScore supported sports | +| `GET` | `/sofascore/stage` | `sofascore-stage` | SofaScore motorsport and cycling stage | +| `GET` | `/sofascore/stage-categories` | `sofascore-stage-categories` | SofaScore motorsport and cycling categories and competitions | +| `GET` | `/sofascore/stage-driver-performance` | `sofascore-stage-driver-performance` | SofaScore motorsport race progress per driver | +| `GET` | `/sofascore/stage-featured` | `sofascore-stage-featured` | SofaScore featured motorsport and cycling events | +| `GET` | `/sofascore/stage-schedule` | `sofascore-stage-schedule` | SofaScore motorsport and cycling events around a date | +| `GET` | `/sofascore/stage-seasons` | `sofascore-stage-seasons` | SofaScore seasons of a motorsport or cycling competition | +| `GET` | `/sofascore/stage-standings` | `sofascore-stage-standings` | SofaScore motorsport and cycling stage standings | +| `GET` | `/sofascore/stage-substages` | `sofascore-stage-substages` | SofaScore children of a motorsport or cycling stage | +| `GET` | `/sofascore/standings` | `sofascore-standings` | SofaScore standings | +| `GET` | `/sofascore/team` | `sofascore-team` | SofaScore team detail | +| `GET` | `/sofascore/team-achievements` | `sofascore-team-achievements` | SofaScore team trophies | +| `GET` | `/sofascore/team-events` | `sofascore-team-events` | SofaScore team fixtures | +| `GET` | `/sofascore/team-goal-distributions` | `sofascore-team-goal-distributions` | SofaScore team goals by match minute | +| `GET` | `/sofascore/team-near-events` | `sofascore-team-near-events` | SofaScore team previous and next match | +| `GET` | `/sofascore/team-of-the-week` | `sofascore-team-of-the-week` | SofaScore team of the week | +| `GET` | `/sofascore/team-of-the-week-periods` | `sofascore-team-of-the-week-periods` | SofaScore team of the week periods | +| `GET` | `/sofascore/team-performance` | `sofascore-team-performance` | SofaScore team recent performance | +| `GET` | `/sofascore/team-player-statistics` | `sofascore-team-player-statistics` | SofaScore team player statistics | +| `GET` | `/sofascore/team-player-statistics-seasons` | `sofascore-team-player-statistics-seasons` | SofaScore team player statistics seasons | +| `GET` | `/sofascore/team-players` | `sofascore-team-players` | SofaScore team players | +| `GET` | `/sofascore/team-rankings` | `sofascore-team-rankings` | SofaScore team rankings | +| `GET` | `/sofascore/team-season-statistics` | `sofascore-team-season-statistics` | SofaScore team season statistics | +| `GET` | `/sofascore/team-statistics-seasons` | `sofascore-team-statistics-seasons` | SofaScore team statistics seasons | +| `GET` | `/sofascore/team-top-players` | `sofascore-team-top-players` | SofaScore team top players | +| `GET` | `/sofascore/team-tournaments` | `sofascore-team-tournaments` | SofaScore team competitions | +| `GET` | `/sofascore/team-transfers` | `sofascore-team-transfers` | SofaScore team transfers | +| `GET` | `/sofascore/tennis-player-grand-slam-results` | `sofascore-tennis-player-grand-slam-results` | SofaScore tennis player grand slam results | +| `GET` | `/sofascore/tournament-cuptree` | `sofascore-tournament-cuptree` | SofaScore competition knockout tree | +| `GET` | `/sofascore/tournament-info` | `sofascore-tournament-info` | SofaScore competition info | +| `GET` | `/sofascore/tournament-player-of-the-season` | `sofascore-tournament-player-of-the-season` | SofaScore player of the season | +| `GET` | `/sofascore/tournament-player-statistics` | `sofascore-tournament-player-statistics` | SofaScore season player statistics table | +| `GET` | `/sofascore/tournament-rounds` | `sofascore-tournament-rounds` | SofaScore competition season rounds | +| `GET` | `/sofascore/tournament-seasons` | `sofascore-tournament-seasons` | SofaScore competition seasons | +| `GET` | `/sofascore/tournament-statistics-info` | `sofascore-tournament-statistics-info` | SofaScore player statistics table filters | +| `GET` | `/sofascore/tournament-team-of-the-season` | `sofascore-tournament-team-of-the-season` | SofaScore team of the season | +| `GET` | `/sofascore/tournament-teams` | `sofascore-tournament-teams` | SofaScore teams of a competition season | +| `GET` | `/sofascore/tournament-top-players` | `sofascore-tournament-top-players` | SofaScore season top players | +| `GET` | `/sofascore/tournament-top-teams` | `sofascore-tournament-top-teams` | SofaScore season top teams | +| `GET` | `/sofascore/tournament-venues` | `sofascore-tournament-venues` | SofaScore venues of a competition season | +| `GET` | `/sofascore/tournament-winners` | `sofascore-tournament-winners` | SofaScore past winners of a competition | +| `GET` | `/sofascore/tournaments-with-feature` | `sofascore-tournaments-with-feature` | SofaScore competitions that carry a feature | +| `GET` | `/sofascore/trending-events` | `sofascore-trending-events` | SofaScore trending events | +| `GET` | `/sofascore/trending-players` | `sofascore-trending-players` | SofaScore trending players | +| `GET` | `/sofascore/venue` | `sofascore-venue` | SofaScore venue | +| `GET` | `/sofascore/venue-events` | `sofascore-venue-events` | SofaScore matches at a venue | + ## Links - [Crawlora](https://crawlora.net/?utm_source=maven-central&utm_medium=referral&utm_campaign=platform-clients&utm_content=sofascore-java-homepage) diff --git a/java/pom.xml b/java/pom.xml index 45bca1b..4fe5220 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -5,7 +5,7 @@ 4.0.0 net.crawlora crawlora-sofascore - 0.3.4 + 0.3.5 jar Crawlora SofaScore Java Client Java client for Crawlora's hosted SofaScore API, with direct methods for live events, match details, lineups, statistics, tournaments, and player/team data. Requires a Crawlora API key. @@ -35,6 +35,6 @@ org.apache.maven.pluginsmaven-source-plugin3.3.1attach-sourcesjar-no-fork org.apache.maven.pluginsmaven-javadoc-plugin3.6.3attach-javadocsjar org.apache.maven.pluginsmaven-gpg-plugin3.2.4MAVEN_GPG_PASSPHRASE--pinentry-modeloopbacksign-artifactsverifysign - org.sonatype.centralcentral-publishing-maven-plugin0.11.0truecentraltrueCrawlora SofaScore 0.3.4published + org.sonatype.centralcentral-publishing-maven-plugin0.11.0truecentraltrueCrawlora SofaScore 0.3.5published diff --git a/java/src/main/java/net/crawlora/sofascore/Client.java b/java/src/main/java/net/crawlora/sofascore/Client.java index 6f4379b..9b1fc6a 100644 --- a/java/src/main/java/net/crawlora/sofascore/Client.java +++ b/java/src/main/java/net/crawlora/sofascore/Client.java @@ -284,8 +284,14 @@ public Object request(String operationId, Map params) { Operation operation = OPERATIONS.get(operationId); if (operation == null) throw new IllegalArgumentException("unknown SofaScore operation: " + operationId); Map values = params == null ? Map.of() : params; + boolean post = operation.method().equals("POST"); Set unknown = new TreeSet<>(values.keySet()); unknown.removeAll(operation.params().keySet()); + // POST operations take their JSON body under the body parameter name or "body". + if (post) { + unknown.remove("body"); + unknown.remove(operation.bodyParam()); + } if (!unknown.isEmpty()) throw new IllegalArgumentException("unknown parameters for " + operationId + ": " + unknown); String path = operation.path(); @@ -309,11 +315,21 @@ public Object request(String operationId, Map params) { url.append(i == 0 ? '?' : '&').append(queryEncode(query.get(i).getKey())) .append('=').append(queryEncode(query.get(i).getValue())); } - HttpRequest request = HttpRequest.newBuilder(URI.create(url.toString())) + HttpRequest.Builder builder = HttpRequest.newBuilder(URI.create(url.toString())) .timeout(timeout) .header("x-api-key", apiKey) - .header("Accept", acceptHeader(operation)) - .GET().build(); + .header("Accept", acceptHeader(operation)); + if (post) { + Object body = values.get(operation.bodyParam()); + if (body == null) body = values.get("body"); + if (body == null) throw new IllegalArgumentException("missing request body for " + operationId); + String payload = body instanceof String text ? text : Json.write(body); + builder.header("Content-Type", "application/json") + .POST(HttpRequest.BodyPublishers.ofString(payload, StandardCharsets.UTF_8)); + } else { + builder.GET(); + } + HttpRequest request = builder.build(); try { HttpResponse response = http.send(request, HttpResponse.BodyHandlers.ofString(StandardCharsets.UTF_8)); String body = response.body(); diff --git a/java/src/main/java/net/crawlora/sofascore/Operation.java b/java/src/main/java/net/crawlora/sofascore/Operation.java index f9db918..906f0c4 100644 --- a/java/src/main/java/net/crawlora/sofascore/Operation.java +++ b/java/src/main/java/net/crawlora/sofascore/Operation.java @@ -4,4 +4,9 @@ import java.util.Map; /** Immutable metadata for one operation in this platform client. */ -public record Operation(String id, String method, String path, Map params, List produces) {} +public record Operation(String id, String method, String path, Map params, List produces, String bodyParam) { + /** Operation without a request body. */ + public Operation(String id, String method, String path, Map params, List produces) { + this(id, method, path, params, produces, ""); + } +} diff --git a/javascript/README.md b/javascript/README.md index 019fbeb..5371852 100644 --- a/javascript/README.md +++ b/javascript/README.md @@ -1,7 +1,7 @@ -# @crawlora-org/sofascore +# @crawlora-org/sofascore — SofaScore API client for JavaScript and TypeScript JavaScript and TypeScript client for Crawlora's hosted SofaScore API. -It calls [Crawlora](https://crawlora.net/?utm_source=npm&utm_medium=referral&utm_campaign=platform-clients&utm_content=sofascore-javascript-homepage); it does not run a browser or scrape SofaScore locally. A Crawlora account and `CRAWLORA_API_KEY` are required, and API use is billed under your Crawlora account. Crawlora is independent from and not endorsed by SofaScore or its owners. +It exposes 109 API endpoints for live events, match details, lineups, statistics, tournaments, and player/team data through [Crawlora](https://crawlora.net/?utm_source=npm&utm_medium=referral&utm_campaign=platform-clients&utm_content=sofascore-javascript-homepage). It does not run a browser or scrape SofaScore locally. A Crawlora account and `CRAWLORA_API_KEY` are required, and API use is billed under your Crawlora account. Crawlora is independent from and not endorsed by SofaScore or its owners. ## Install @@ -40,6 +40,121 @@ group. See the full method and parameter list in the [online reference](https:// Methods return promises and can be awaited. See the [runnable example](https://github.com/Crawlora-org/crawlora-sofascore/blob/main/examples/javascript.mjs) for a complete usage example. +## Supported SofaScore API endpoints + +This package exposes each route below as a direct method and through the `sofascore` group. See the [endpoint and parameter reference](https://github.com/Crawlora-org/crawlora-sofascore/blob/main/docs/usage.md) for complete input details. + +| Method | Endpoint | API operation | Description | +| --- | --- | --- | --- | +| `GET` | `/sofascore/categories` | `sofascore-categories` | SofaScore categories for a sport | +| `GET` | `/sofascore/category-tournaments` | `sofascore-category-tournaments` | SofaScore competitions in a category | +| `GET` | `/sofascore/draft` | `sofascore-draft` | SofaScore league draft | +| `GET` | `/sofascore/draft-picks` | `sofascore-draft-picks` | SofaScore league draft picks | +| `GET` | `/sofascore/esports-game` | `sofascore-esports-game` | SofaScore esports game detail | +| `GET` | `/sofascore/event` | `sofascore-event` | SofaScore event detail | +| `GET` | `/sofascore/event-at-bat-pitches` | `sofascore-event-at-bat-pitches` | SofaScore event at-bat pitches | +| `GET` | `/sofascore/event-at-bats` | `sofascore-event-at-bats` | SofaScore event at-bats | +| `GET` | `/sofascore/event-average-positions` | `sofascore-event-average-positions` | SofaScore event average positions | +| `GET` | `/sofascore/event-baseball-top-performers` | `sofascore-event-baseball-top-performers` | SofaScore event baseball top performers | +| `GET` | `/sofascore/event-best-players` | `sofascore-event-best-players` | SofaScore event best players | +| `GET` | `/sofascore/event-comments` | `sofascore-event-comments` | SofaScore event commentary | +| `GET` | `/sofascore/event-esports-games` | `sofascore-event-esports-games` | SofaScore event esports games | +| `GET` | `/sofascore/event-graph` | `sofascore-event-graph` | SofaScore event momentum graph | +| `GET` | `/sofascore/event-h2h` | `sofascore-event-h2h` | SofaScore event head-to-head | +| `GET` | `/sofascore/event-highlights` | `sofascore-event-highlights` | SofaScore event highlights | +| `GET` | `/sofascore/event-incidents` | `sofascore-event-incidents` | SofaScore event incidents | +| `GET` | `/sofascore/event-innings` | `sofascore-event-innings` | SofaScore event innings | +| `GET` | `/sofascore/event-lineups` | `sofascore-event-lineups` | SofaScore event lineups | +| `GET` | `/sofascore/event-managers` | `sofascore-event-managers` | SofaScore event managers | +| `GET` | `/sofascore/event-odds` | `sofascore-event-odds` | SofaScore event odds | +| `GET` | `/sofascore/event-player-heatmap` | `sofascore-event-player-heatmap` | SofaScore event player heatmap | +| `GET` | `/sofascore/event-player-statistics` | `sofascore-event-player-statistics` | SofaScore event player statistics | +| `GET` | `/sofascore/event-point-by-point` | `sofascore-event-point-by-point` | SofaScore event point-by-point | +| `GET` | `/sofascore/event-pregame-form` | `sofascore-event-pregame-form` | SofaScore event pre-game form | +| `GET` | `/sofascore/event-shotmap` | `sofascore-event-shotmap` | SofaScore event shot map | +| `GET` | `/sofascore/event-statistics` | `sofascore-event-statistics` | SofaScore event statistics | +| `GET` | `/sofascore/event-team-heatmap` | `sofascore-event-team-heatmap` | SofaScore event team heatmap | +| `GET` | `/sofascore/event-team-streaks` | `sofascore-event-team-streaks` | SofaScore event team streaks | +| `GET` | `/sofascore/event-tennis-power` | `sofascore-event-tennis-power` | SofaScore event tennis power | +| `GET` | `/sofascore/event-tv-channels` | `sofascore-event-tv-channels` | SofaScore event TV channels | +| `GET` | `/sofascore/event-votes` | `sofascore-event-votes` | SofaScore event votes | +| `GET` | `/sofascore/live-events` | `sofascore-live-events` | SofaScore live events | +| `GET` | `/sofascore/manager` | `sofascore-manager` | SofaScore manager detail | +| `GET` | `/sofascore/manager-events` | `sofascore-manager-events` | SofaScore manager recent matches | +| `GET` | `/sofascore/mma-card` | `sofascore-mma-card` | SofaScore MMA card | +| `GET` | `/sofascore/mma-schedule` | `sofascore-mma-schedule` | SofaScore MMA schedule | +| `GET` | `/sofascore/odds-dropping` | `sofascore-odds-dropping` | SofaScore dropping odds | +| `GET` | `/sofascore/odds-winning` | `sofascore-odds-winning` | SofaScore winning odds | +| `GET` | `/sofascore/player` | `sofascore-player` | SofaScore player detail | +| `GET` | `/sofascore/player-attributes` | `sofascore-player-attributes` | SofaScore player attributes and characteristics | +| `GET` | `/sofascore/player-events` | `sofascore-player-events` | SofaScore player matches with per-match numbers | +| `GET` | `/sofascore/player-last-year-summary` | `sofascore-player-last-year-summary` | SofaScore player form over the last year | +| `GET` | `/sofascore/player-national-team-statistics` | `sofascore-player-national-team-statistics` | SofaScore player national team record | +| `GET` | `/sofascore/player-penalty-history` | `sofascore-player-penalty-history` | SofaScore player penalty history | +| `GET` | `/sofascore/player-ratings` | `sofascore-player-ratings` | SofaScore player match ratings for a season | +| `GET` | `/sofascore/player-season-heatmap` | `sofascore-player-season-heatmap` | SofaScore player season heatmap | +| `GET` | `/sofascore/player-season-statistics` | `sofascore-player-season-statistics` | SofaScore player season statistics | +| `GET` | `/sofascore/player-statistical-rankings` | `sofascore-player-statistical-rankings` | SofaScore player ranking among all players in a season | +| `GET` | `/sofascore/player-statistics-seasons` | `sofascore-player-statistics-seasons` | SofaScore player statistics seasons | +| `GET` | `/sofascore/player-tournaments` | `sofascore-player-tournaments` | SofaScore player competitions | +| `GET` | `/sofascore/player-transfers` | `sofascore-player-transfers` | SofaScore player transfer history | +| `GET` | `/sofascore/ranking-types` | `sofascore-ranking-types` | SofaScore ranking catalogue | +| `GET` | `/sofascore/rankings` | `sofascore-rankings` | SofaScore rankings | +| `GET` | `/sofascore/referee` | `sofascore-referee` | SofaScore referee profile | +| `GET` | `/sofascore/referee-events` | `sofascore-referee-events` | SofaScore referee officiated matches | +| `GET` | `/sofascore/referee-statistics` | `sofascore-referee-statistics` | SofaScore referee card statistics | +| `GET` | `/sofascore/round-events` | `sofascore-round-events` | SofaScore round fixtures | +| `GET` | `/sofascore/scheduled-events` | `sofascore-scheduled-events` | SofaScore events scheduled in a category on a date | +| `GET` | `/sofascore/scheduled-tournaments` | `sofascore-scheduled-tournaments` | SofaScore tournaments scheduled on a date | +| `GET` | `/sofascore/search` | `sofascore-search` | SofaScore universal search | +| `GET` | `/sofascore/search-typed` | `sofascore-search-typed` | SofaScore search by entity type | +| `GET` | `/sofascore/season-events` | `sofascore-season-events` | SofaScore season fixtures and results | +| `GET` | `/sofascore/sports` | `sofascore-sports` | SofaScore supported sports | +| `GET` | `/sofascore/stage` | `sofascore-stage` | SofaScore motorsport and cycling stage | +| `GET` | `/sofascore/stage-categories` | `sofascore-stage-categories` | SofaScore motorsport and cycling categories and competitions | +| `GET` | `/sofascore/stage-driver-performance` | `sofascore-stage-driver-performance` | SofaScore motorsport race progress per driver | +| `GET` | `/sofascore/stage-featured` | `sofascore-stage-featured` | SofaScore featured motorsport and cycling events | +| `GET` | `/sofascore/stage-schedule` | `sofascore-stage-schedule` | SofaScore motorsport and cycling events around a date | +| `GET` | `/sofascore/stage-seasons` | `sofascore-stage-seasons` | SofaScore seasons of a motorsport or cycling competition | +| `GET` | `/sofascore/stage-standings` | `sofascore-stage-standings` | SofaScore motorsport and cycling stage standings | +| `GET` | `/sofascore/stage-substages` | `sofascore-stage-substages` | SofaScore children of a motorsport or cycling stage | +| `GET` | `/sofascore/standings` | `sofascore-standings` | SofaScore standings | +| `GET` | `/sofascore/team` | `sofascore-team` | SofaScore team detail | +| `GET` | `/sofascore/team-achievements` | `sofascore-team-achievements` | SofaScore team trophies | +| `GET` | `/sofascore/team-events` | `sofascore-team-events` | SofaScore team fixtures | +| `GET` | `/sofascore/team-goal-distributions` | `sofascore-team-goal-distributions` | SofaScore team goals by match minute | +| `GET` | `/sofascore/team-near-events` | `sofascore-team-near-events` | SofaScore team previous and next match | +| `GET` | `/sofascore/team-of-the-week` | `sofascore-team-of-the-week` | SofaScore team of the week | +| `GET` | `/sofascore/team-of-the-week-periods` | `sofascore-team-of-the-week-periods` | SofaScore team of the week periods | +| `GET` | `/sofascore/team-performance` | `sofascore-team-performance` | SofaScore team recent performance | +| `GET` | `/sofascore/team-player-statistics` | `sofascore-team-player-statistics` | SofaScore team player statistics | +| `GET` | `/sofascore/team-player-statistics-seasons` | `sofascore-team-player-statistics-seasons` | SofaScore team player statistics seasons | +| `GET` | `/sofascore/team-players` | `sofascore-team-players` | SofaScore team players | +| `GET` | `/sofascore/team-rankings` | `sofascore-team-rankings` | SofaScore team rankings | +| `GET` | `/sofascore/team-season-statistics` | `sofascore-team-season-statistics` | SofaScore team season statistics | +| `GET` | `/sofascore/team-statistics-seasons` | `sofascore-team-statistics-seasons` | SofaScore team statistics seasons | +| `GET` | `/sofascore/team-top-players` | `sofascore-team-top-players` | SofaScore team top players | +| `GET` | `/sofascore/team-tournaments` | `sofascore-team-tournaments` | SofaScore team competitions | +| `GET` | `/sofascore/team-transfers` | `sofascore-team-transfers` | SofaScore team transfers | +| `GET` | `/sofascore/tennis-player-grand-slam-results` | `sofascore-tennis-player-grand-slam-results` | SofaScore tennis player grand slam results | +| `GET` | `/sofascore/tournament-cuptree` | `sofascore-tournament-cuptree` | SofaScore competition knockout tree | +| `GET` | `/sofascore/tournament-info` | `sofascore-tournament-info` | SofaScore competition info | +| `GET` | `/sofascore/tournament-player-of-the-season` | `sofascore-tournament-player-of-the-season` | SofaScore player of the season | +| `GET` | `/sofascore/tournament-player-statistics` | `sofascore-tournament-player-statistics` | SofaScore season player statistics table | +| `GET` | `/sofascore/tournament-rounds` | `sofascore-tournament-rounds` | SofaScore competition season rounds | +| `GET` | `/sofascore/tournament-seasons` | `sofascore-tournament-seasons` | SofaScore competition seasons | +| `GET` | `/sofascore/tournament-statistics-info` | `sofascore-tournament-statistics-info` | SofaScore player statistics table filters | +| `GET` | `/sofascore/tournament-team-of-the-season` | `sofascore-tournament-team-of-the-season` | SofaScore team of the season | +| `GET` | `/sofascore/tournament-teams` | `sofascore-tournament-teams` | SofaScore teams of a competition season | +| `GET` | `/sofascore/tournament-top-players` | `sofascore-tournament-top-players` | SofaScore season top players | +| `GET` | `/sofascore/tournament-top-teams` | `sofascore-tournament-top-teams` | SofaScore season top teams | +| `GET` | `/sofascore/tournament-venues` | `sofascore-tournament-venues` | SofaScore venues of a competition season | +| `GET` | `/sofascore/tournament-winners` | `sofascore-tournament-winners` | SofaScore past winners of a competition | +| `GET` | `/sofascore/tournaments-with-feature` | `sofascore-tournaments-with-feature` | SofaScore competitions that carry a feature | +| `GET` | `/sofascore/trending-events` | `sofascore-trending-events` | SofaScore trending events | +| `GET` | `/sofascore/trending-players` | `sofascore-trending-players` | SofaScore trending players | +| `GET` | `/sofascore/venue` | `sofascore-venue` | SofaScore venue | +| `GET` | `/sofascore/venue-events` | `sofascore-venue-events` | SofaScore matches at a venue | ## Configuration diff --git a/javascript/package-lock.json b/javascript/package-lock.json index 287342c..317f3b4 100644 --- a/javascript/package-lock.json +++ b/javascript/package-lock.json @@ -1,12 +1,12 @@ { "name": "@crawlora-org/sofascore", - "version": "0.3.4", + "version": "0.3.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@crawlora-org/sofascore", - "version": "0.3.4", + "version": "0.3.5", "license": "MIT", "engines": { "node": ">=18" }, "devDependencies": { "typescript": "5.8.3" } diff --git a/javascript/package.json b/javascript/package.json index b020ed6..e0b7801 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -1,10 +1,10 @@ { "name": "@crawlora-org/sofascore", - "version": "0.3.4", - "description": "Typed JavaScript client for the Crawlora SofaScore API", + "version": "0.3.5", + "description": "Crawlora SofaScore API client with 109 endpoints for live events, match details, lineups, statistics, tournaments, and player/team data", "homepage": "https://crawlora.net/?utm_source=npm&utm_medium=referral&utm_campaign=platform-clients&utm_content=sofascore-javascript-homepage", "bugs": { "url": "https://github.com/Crawlora-org/crawlora-sofascore/issues" }, - "keywords": ["crawlora", "api-client", "web-scraping", "sofascore", "typescript"], + "keywords": ["crawlora", "api-client", "sdk", "web-scraping", "scraping-api", "sofascore", "sofascore-api", "sofascore-scraper", "sofascore-data", "sofascore-live-events", "sofascore-match-details", "sofascore-lineups", "sofascore-statistics", "sofascore-tournaments", "sofascore-player-team-data"], "type": "module", "main": "./src/index.js", "types": "./src/index.d.ts", diff --git a/javascript/src/index.js b/javascript/src/index.js index ad3a815..c59e018 100644 --- a/javascript/src/index.js +++ b/javascript/src/index.js @@ -9,7 +9,7 @@ import { export class SofascoreClient extends CrawloraClient { constructor(options = {}) { - super({ ...options, userAgent: options.userAgent ?? "crawlora-sofascore-js/0.3.4" }); + super({ ...options, userAgent: options.userAgent ?? "crawlora-sofascore-js/0.3.5" }); this["categories"] = (...args) => this.request("sofascore-categories", ...args); this["categoryTournaments"] = (...args) => this.request("sofascore-category-tournaments", ...args); this["draft"] = (...args) => this.request("sofascore-draft", ...args); @@ -131,5 +131,5 @@ export { CrawloraServerError }; export { groups, operations, operationCount, OperationIds } from "./operations.js"; -export const VERSION = "0.3.4"; +export const VERSION = "0.3.5"; export default SofascoreClient; diff --git a/javascript/test/client.test.js b/javascript/test/client.test.js index f619c0c..85e6446 100644 --- a/javascript/test/client.test.js +++ b/javascript/test/client.test.js @@ -26,7 +26,7 @@ test("serializes required query/path values, adds API key and platform User-Agen await client.request("sofascore-categories", {"sport": "american-football"}); assert.match(seen.url, /\/sofascore\/categories/); assert.equal(seen.headers["x-api-key"], "secret"); - assert.equal(seen.headers["user-agent"], "crawlora-sofascore-js/0.3.4"); + assert.equal(seen.headers["user-agent"], "crawlora-sofascore-js/0.3.5"); }); test("allows caller User-Agent override and response text mode", async () => { diff --git a/operations.go b/operations.go index 08b6bd1..a25e29a 100644 --- a/operations.go +++ b/operations.go @@ -23,6 +23,9 @@ type operationDefinition struct { QueryParams []parameterDefinition Produces []string Security []string + // BodyParam names the JSON request body parameter of a POST operation. + BodyParam string + BodyRequired bool } var operations = map[string]operationDefinition{ diff --git a/php/CHANGELOG.md b/php/CHANGELOG.md index b218507..711b807 100644 --- a/php/CHANGELOG.md +++ b/php/CHANGELOG.md @@ -1,5 +1,5 @@ # Changelog -## 0.3.4 +## 0.3.5 - Initial focused SofaScore PHP client for Crawlora's hosted API. diff --git a/php/README.md b/php/README.md index f0ff53b..c2f2818 100644 --- a/php/README.md +++ b/php/README.md @@ -1,6 +1,6 @@ -# Crawlora SofaScore PHP client +# Crawlora SofaScore API client for PHP (`crawlora/sofascore`) -This package calls the Crawlora hosted API at `https://api.crawlora.net/api/v1`. It does not call or scrape SofaScore directly. Requests require a Crawlora API key and use your Crawlora account's service plan. +This PHP package calls Crawlora's hosted SofaScore API at `https://api.crawlora.net/api/v1`. It exposes 109 endpoints covering live events, match details, lineups, statistics, tournaments, and player/team data. It does not call or scrape SofaScore directly. Requests require a Crawlora API key and use your Crawlora account's service plan. ## Install @@ -22,4 +22,120 @@ $client->close(); The client uses PHP cURL and JSON. Constructor options are `apiKey`, `baseUrl`, and `timeout`. Call the operation-specific method for direct access to each supported operation, or `request($operationId, $params, $responseType)` to dispatch by operation ID. Set `$responseType` to `text` for raw text output such as transcript formats. The package includes 109 API operations. +## Supported SofaScore API endpoints + +Browse every route included in this Composer package. The [endpoint reference](https://github.com/Crawlora-org/crawlora-sofascore/blob/main/docs/usage.md) includes parameter and response details. + +| Method | Endpoint | API operation | Description | +| --- | --- | --- | --- | +| `GET` | `/sofascore/categories` | `sofascore-categories` | SofaScore categories for a sport | +| `GET` | `/sofascore/category-tournaments` | `sofascore-category-tournaments` | SofaScore competitions in a category | +| `GET` | `/sofascore/draft` | `sofascore-draft` | SofaScore league draft | +| `GET` | `/sofascore/draft-picks` | `sofascore-draft-picks` | SofaScore league draft picks | +| `GET` | `/sofascore/esports-game` | `sofascore-esports-game` | SofaScore esports game detail | +| `GET` | `/sofascore/event` | `sofascore-event` | SofaScore event detail | +| `GET` | `/sofascore/event-at-bat-pitches` | `sofascore-event-at-bat-pitches` | SofaScore event at-bat pitches | +| `GET` | `/sofascore/event-at-bats` | `sofascore-event-at-bats` | SofaScore event at-bats | +| `GET` | `/sofascore/event-average-positions` | `sofascore-event-average-positions` | SofaScore event average positions | +| `GET` | `/sofascore/event-baseball-top-performers` | `sofascore-event-baseball-top-performers` | SofaScore event baseball top performers | +| `GET` | `/sofascore/event-best-players` | `sofascore-event-best-players` | SofaScore event best players | +| `GET` | `/sofascore/event-comments` | `sofascore-event-comments` | SofaScore event commentary | +| `GET` | `/sofascore/event-esports-games` | `sofascore-event-esports-games` | SofaScore event esports games | +| `GET` | `/sofascore/event-graph` | `sofascore-event-graph` | SofaScore event momentum graph | +| `GET` | `/sofascore/event-h2h` | `sofascore-event-h2h` | SofaScore event head-to-head | +| `GET` | `/sofascore/event-highlights` | `sofascore-event-highlights` | SofaScore event highlights | +| `GET` | `/sofascore/event-incidents` | `sofascore-event-incidents` | SofaScore event incidents | +| `GET` | `/sofascore/event-innings` | `sofascore-event-innings` | SofaScore event innings | +| `GET` | `/sofascore/event-lineups` | `sofascore-event-lineups` | SofaScore event lineups | +| `GET` | `/sofascore/event-managers` | `sofascore-event-managers` | SofaScore event managers | +| `GET` | `/sofascore/event-odds` | `sofascore-event-odds` | SofaScore event odds | +| `GET` | `/sofascore/event-player-heatmap` | `sofascore-event-player-heatmap` | SofaScore event player heatmap | +| `GET` | `/sofascore/event-player-statistics` | `sofascore-event-player-statistics` | SofaScore event player statistics | +| `GET` | `/sofascore/event-point-by-point` | `sofascore-event-point-by-point` | SofaScore event point-by-point | +| `GET` | `/sofascore/event-pregame-form` | `sofascore-event-pregame-form` | SofaScore event pre-game form | +| `GET` | `/sofascore/event-shotmap` | `sofascore-event-shotmap` | SofaScore event shot map | +| `GET` | `/sofascore/event-statistics` | `sofascore-event-statistics` | SofaScore event statistics | +| `GET` | `/sofascore/event-team-heatmap` | `sofascore-event-team-heatmap` | SofaScore event team heatmap | +| `GET` | `/sofascore/event-team-streaks` | `sofascore-event-team-streaks` | SofaScore event team streaks | +| `GET` | `/sofascore/event-tennis-power` | `sofascore-event-tennis-power` | SofaScore event tennis power | +| `GET` | `/sofascore/event-tv-channels` | `sofascore-event-tv-channels` | SofaScore event TV channels | +| `GET` | `/sofascore/event-votes` | `sofascore-event-votes` | SofaScore event votes | +| `GET` | `/sofascore/live-events` | `sofascore-live-events` | SofaScore live events | +| `GET` | `/sofascore/manager` | `sofascore-manager` | SofaScore manager detail | +| `GET` | `/sofascore/manager-events` | `sofascore-manager-events` | SofaScore manager recent matches | +| `GET` | `/sofascore/mma-card` | `sofascore-mma-card` | SofaScore MMA card | +| `GET` | `/sofascore/mma-schedule` | `sofascore-mma-schedule` | SofaScore MMA schedule | +| `GET` | `/sofascore/odds-dropping` | `sofascore-odds-dropping` | SofaScore dropping odds | +| `GET` | `/sofascore/odds-winning` | `sofascore-odds-winning` | SofaScore winning odds | +| `GET` | `/sofascore/player` | `sofascore-player` | SofaScore player detail | +| `GET` | `/sofascore/player-attributes` | `sofascore-player-attributes` | SofaScore player attributes and characteristics | +| `GET` | `/sofascore/player-events` | `sofascore-player-events` | SofaScore player matches with per-match numbers | +| `GET` | `/sofascore/player-last-year-summary` | `sofascore-player-last-year-summary` | SofaScore player form over the last year | +| `GET` | `/sofascore/player-national-team-statistics` | `sofascore-player-national-team-statistics` | SofaScore player national team record | +| `GET` | `/sofascore/player-penalty-history` | `sofascore-player-penalty-history` | SofaScore player penalty history | +| `GET` | `/sofascore/player-ratings` | `sofascore-player-ratings` | SofaScore player match ratings for a season | +| `GET` | `/sofascore/player-season-heatmap` | `sofascore-player-season-heatmap` | SofaScore player season heatmap | +| `GET` | `/sofascore/player-season-statistics` | `sofascore-player-season-statistics` | SofaScore player season statistics | +| `GET` | `/sofascore/player-statistical-rankings` | `sofascore-player-statistical-rankings` | SofaScore player ranking among all players in a season | +| `GET` | `/sofascore/player-statistics-seasons` | `sofascore-player-statistics-seasons` | SofaScore player statistics seasons | +| `GET` | `/sofascore/player-tournaments` | `sofascore-player-tournaments` | SofaScore player competitions | +| `GET` | `/sofascore/player-transfers` | `sofascore-player-transfers` | SofaScore player transfer history | +| `GET` | `/sofascore/ranking-types` | `sofascore-ranking-types` | SofaScore ranking catalogue | +| `GET` | `/sofascore/rankings` | `sofascore-rankings` | SofaScore rankings | +| `GET` | `/sofascore/referee` | `sofascore-referee` | SofaScore referee profile | +| `GET` | `/sofascore/referee-events` | `sofascore-referee-events` | SofaScore referee officiated matches | +| `GET` | `/sofascore/referee-statistics` | `sofascore-referee-statistics` | SofaScore referee card statistics | +| `GET` | `/sofascore/round-events` | `sofascore-round-events` | SofaScore round fixtures | +| `GET` | `/sofascore/scheduled-events` | `sofascore-scheduled-events` | SofaScore events scheduled in a category on a date | +| `GET` | `/sofascore/scheduled-tournaments` | `sofascore-scheduled-tournaments` | SofaScore tournaments scheduled on a date | +| `GET` | `/sofascore/search` | `sofascore-search` | SofaScore universal search | +| `GET` | `/sofascore/search-typed` | `sofascore-search-typed` | SofaScore search by entity type | +| `GET` | `/sofascore/season-events` | `sofascore-season-events` | SofaScore season fixtures and results | +| `GET` | `/sofascore/sports` | `sofascore-sports` | SofaScore supported sports | +| `GET` | `/sofascore/stage` | `sofascore-stage` | SofaScore motorsport and cycling stage | +| `GET` | `/sofascore/stage-categories` | `sofascore-stage-categories` | SofaScore motorsport and cycling categories and competitions | +| `GET` | `/sofascore/stage-driver-performance` | `sofascore-stage-driver-performance` | SofaScore motorsport race progress per driver | +| `GET` | `/sofascore/stage-featured` | `sofascore-stage-featured` | SofaScore featured motorsport and cycling events | +| `GET` | `/sofascore/stage-schedule` | `sofascore-stage-schedule` | SofaScore motorsport and cycling events around a date | +| `GET` | `/sofascore/stage-seasons` | `sofascore-stage-seasons` | SofaScore seasons of a motorsport or cycling competition | +| `GET` | `/sofascore/stage-standings` | `sofascore-stage-standings` | SofaScore motorsport and cycling stage standings | +| `GET` | `/sofascore/stage-substages` | `sofascore-stage-substages` | SofaScore children of a motorsport or cycling stage | +| `GET` | `/sofascore/standings` | `sofascore-standings` | SofaScore standings | +| `GET` | `/sofascore/team` | `sofascore-team` | SofaScore team detail | +| `GET` | `/sofascore/team-achievements` | `sofascore-team-achievements` | SofaScore team trophies | +| `GET` | `/sofascore/team-events` | `sofascore-team-events` | SofaScore team fixtures | +| `GET` | `/sofascore/team-goal-distributions` | `sofascore-team-goal-distributions` | SofaScore team goals by match minute | +| `GET` | `/sofascore/team-near-events` | `sofascore-team-near-events` | SofaScore team previous and next match | +| `GET` | `/sofascore/team-of-the-week` | `sofascore-team-of-the-week` | SofaScore team of the week | +| `GET` | `/sofascore/team-of-the-week-periods` | `sofascore-team-of-the-week-periods` | SofaScore team of the week periods | +| `GET` | `/sofascore/team-performance` | `sofascore-team-performance` | SofaScore team recent performance | +| `GET` | `/sofascore/team-player-statistics` | `sofascore-team-player-statistics` | SofaScore team player statistics | +| `GET` | `/sofascore/team-player-statistics-seasons` | `sofascore-team-player-statistics-seasons` | SofaScore team player statistics seasons | +| `GET` | `/sofascore/team-players` | `sofascore-team-players` | SofaScore team players | +| `GET` | `/sofascore/team-rankings` | `sofascore-team-rankings` | SofaScore team rankings | +| `GET` | `/sofascore/team-season-statistics` | `sofascore-team-season-statistics` | SofaScore team season statistics | +| `GET` | `/sofascore/team-statistics-seasons` | `sofascore-team-statistics-seasons` | SofaScore team statistics seasons | +| `GET` | `/sofascore/team-top-players` | `sofascore-team-top-players` | SofaScore team top players | +| `GET` | `/sofascore/team-tournaments` | `sofascore-team-tournaments` | SofaScore team competitions | +| `GET` | `/sofascore/team-transfers` | `sofascore-team-transfers` | SofaScore team transfers | +| `GET` | `/sofascore/tennis-player-grand-slam-results` | `sofascore-tennis-player-grand-slam-results` | SofaScore tennis player grand slam results | +| `GET` | `/sofascore/tournament-cuptree` | `sofascore-tournament-cuptree` | SofaScore competition knockout tree | +| `GET` | `/sofascore/tournament-info` | `sofascore-tournament-info` | SofaScore competition info | +| `GET` | `/sofascore/tournament-player-of-the-season` | `sofascore-tournament-player-of-the-season` | SofaScore player of the season | +| `GET` | `/sofascore/tournament-player-statistics` | `sofascore-tournament-player-statistics` | SofaScore season player statistics table | +| `GET` | `/sofascore/tournament-rounds` | `sofascore-tournament-rounds` | SofaScore competition season rounds | +| `GET` | `/sofascore/tournament-seasons` | `sofascore-tournament-seasons` | SofaScore competition seasons | +| `GET` | `/sofascore/tournament-statistics-info` | `sofascore-tournament-statistics-info` | SofaScore player statistics table filters | +| `GET` | `/sofascore/tournament-team-of-the-season` | `sofascore-tournament-team-of-the-season` | SofaScore team of the season | +| `GET` | `/sofascore/tournament-teams` | `sofascore-tournament-teams` | SofaScore teams of a competition season | +| `GET` | `/sofascore/tournament-top-players` | `sofascore-tournament-top-players` | SofaScore season top players | +| `GET` | `/sofascore/tournament-top-teams` | `sofascore-tournament-top-teams` | SofaScore season top teams | +| `GET` | `/sofascore/tournament-venues` | `sofascore-tournament-venues` | SofaScore venues of a competition season | +| `GET` | `/sofascore/tournament-winners` | `sofascore-tournament-winners` | SofaScore past winners of a competition | +| `GET` | `/sofascore/tournaments-with-feature` | `sofascore-tournaments-with-feature` | SofaScore competitions that carry a feature | +| `GET` | `/sofascore/trending-events` | `sofascore-trending-events` | SofaScore trending events | +| `GET` | `/sofascore/trending-players` | `sofascore-trending-players` | SofaScore trending players | +| `GET` | `/sofascore/venue` | `sofascore-venue` | SofaScore venue | +| `GET` | `/sofascore/venue-events` | `sofascore-venue-events` | SofaScore matches at a venue | + See [Crawlora](https://crawlora.net/?utm_source=packagist&utm_medium=referral&utm_campaign=platform-clients&utm_content=sofascore-php-homepage), the [API documentation](https://crawlora.net/docs?utm_source=packagist&utm_medium=referral&utm_campaign=platform-clients&utm_content=sofascore-php-api-docs), and the [PHP client source](https://github.com/Crawlora-org/crawlora-sofascore). The complete operation and parameter reference is in the [platform repository](https://github.com/Crawlora-org/crawlora-sofascore/blob/main/docs/usage.md). diff --git a/php/composer.json b/php/composer.json index e4a40dc..72938a6 100644 --- a/php/composer.json +++ b/php/composer.json @@ -1,6 +1,23 @@ { "name": "crawlora/sofascore", - "description": "SofaScore client for the Crawlora hosted API", + "description": "Crawlora SofaScore API client with 109 endpoints for live events, match details, lineups, statistics, tournaments, and player/team data", + "keywords": [ + "crawlora", + "api-client", + "sdk", + "web-scraping", + "scraping-api", + "sofascore", + "sofascore-api", + "sofascore-scraper", + "sofascore-data", + "sofascore-live-events", + "sofascore-match-details", + "sofascore-lineups", + "sofascore-statistics", + "sofascore-tournaments", + "sofascore-player-team-data" + ], "type": "library", "license": "MIT", "require": { diff --git a/php/src/Crawlora/Sofascore/Client.php b/php/src/Crawlora/Sofascore/Client.php index 4e5a643..e5c6304 100644 --- a/php/src/Crawlora/Sofascore/Client.php +++ b/php/src/Crawlora/Sofascore/Client.php @@ -26,7 +26,7 @@ final class Client private ?\Closure $transport; public const PLATFORM = 'sofascore'; - public const VERSION = '0.3.4'; + public const VERSION = '0.3.5'; public const OPERATION_COUNT = 109; public const OPERATION_IDS = ["sofascore-categories", "sofascore-category-tournaments", "sofascore-draft", "sofascore-draft-picks", "sofascore-esports-game", "sofascore-event", "sofascore-event-at-bat-pitches", "sofascore-event-at-bats", "sofascore-event-average-positions", "sofascore-event-baseball-top-performers", "sofascore-event-best-players", "sofascore-event-comments", "sofascore-event-esports-games", "sofascore-event-graph", "sofascore-event-h2h", "sofascore-event-highlights", "sofascore-event-incidents", "sofascore-event-innings", "sofascore-event-lineups", "sofascore-event-managers", "sofascore-event-odds", "sofascore-event-player-heatmap", "sofascore-event-player-statistics", "sofascore-event-point-by-point", "sofascore-event-pregame-form", "sofascore-event-shotmap", "sofascore-event-statistics", "sofascore-event-team-heatmap", "sofascore-event-team-streaks", "sofascore-event-tennis-power", "sofascore-event-tv-channels", "sofascore-event-votes", "sofascore-live-events", "sofascore-manager", "sofascore-manager-events", "sofascore-mma-card", "sofascore-mma-schedule", "sofascore-odds-dropping", "sofascore-odds-winning", "sofascore-player", "sofascore-player-attributes", "sofascore-player-events", "sofascore-player-last-year-summary", "sofascore-player-national-team-statistics", "sofascore-player-penalty-history", "sofascore-player-ratings", "sofascore-player-season-heatmap", "sofascore-player-season-statistics", "sofascore-player-statistical-rankings", "sofascore-player-statistics-seasons", "sofascore-player-tournaments", "sofascore-player-transfers", "sofascore-ranking-types", "sofascore-rankings", "sofascore-referee", "sofascore-referee-events", "sofascore-referee-statistics", "sofascore-round-events", "sofascore-scheduled-events", "sofascore-scheduled-tournaments", "sofascore-search", "sofascore-search-typed", "sofascore-season-events", "sofascore-sports", "sofascore-stage", "sofascore-stage-categories", "sofascore-stage-driver-performance", "sofascore-stage-featured", "sofascore-stage-schedule", "sofascore-stage-seasons", "sofascore-stage-standings", "sofascore-stage-substages", "sofascore-standings", "sofascore-team", "sofascore-team-achievements", "sofascore-team-events", "sofascore-team-goal-distributions", "sofascore-team-near-events", "sofascore-team-of-the-week", "sofascore-team-of-the-week-periods", "sofascore-team-performance", "sofascore-team-player-statistics", "sofascore-team-player-statistics-seasons", "sofascore-team-players", "sofascore-team-rankings", "sofascore-team-season-statistics", "sofascore-team-statistics-seasons", "sofascore-team-top-players", "sofascore-team-tournaments", "sofascore-team-transfers", "sofascore-tennis-player-grand-slam-results", "sofascore-tournament-cuptree", "sofascore-tournament-info", "sofascore-tournament-player-of-the-season", "sofascore-tournament-player-statistics", "sofascore-tournament-rounds", "sofascore-tournament-seasons", "sofascore-tournament-statistics-info", "sofascore-tournament-team-of-the-season", "sofascore-tournament-teams", "sofascore-tournament-top-players", "sofascore-tournament-top-teams", "sofascore-tournament-venues", "sofascore-tournament-winners", "sofascore-tournaments-with-feature", "sofascore-trending-events", "sofascore-trending-players", "sofascore-venue", "sofascore-venue-events"]; @@ -37,7 +37,7 @@ public function __construct(?string $apiKey = null, string $baseUrl = 'https://a $this->timeout = $timeout; $this->transport = $transport === null ? null : \Closure::fromCallable($transport); self::$operations ??= json_decode(<<<'JSON' -{"sofascore-categories": {"id": "sofascore-categories", "method": "GET", "params": [{"description": "Sport key", "enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "football"}], "path": "/sofascore/categories", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-category-tournaments": {"id": "sofascore-category-tournaments", "method": "GET", "params": [{"description": "Numeric SofaScore category id from the categories endpoint", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "1"}], "path": "/sofascore/category-tournaments", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-draft": {"id": "sofascore-draft", "method": "GET", "params": [{"description": "League whose draft to return", "enum": ["nba", "nfl"], "in": "query", "name": "league", "required": true, "type": "string", "x-example": "nba"}, {"description": "Numeric SofaScore season id of the league", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "80229"}], "path": "/sofascore/draft", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["nba", "nfl"], "in": "query", "name": "league", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-draft-picks": {"id": "sofascore-draft-picks", "method": "GET", "params": [{"description": "League whose draft to return", "enum": ["nba", "nfl"], "in": "query", "name": "league", "required": true, "type": "string", "x-example": "nba"}, {"description": "Four-digit draft year", "in": "query", "name": "year", "required": true, "type": "string", "x-example": "2025"}, {"description": "Draft round: 1 to 2 for nba, 1 to 7 for nfl", "in": "query", "maximum": 7, "minimum": 1, "name": "round", "required": true, "type": "integer", "x-example": 1}], "path": "/sofascore/draft-picks", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["nba", "nfl"], "in": "query", "name": "league", "required": true, "type": "string"}, {"in": "query", "name": "year", "required": true, "type": "string"}, {"in": "query", "name": "round", "required": true, "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-esports-game": {"id": "sofascore-esports-game", "method": "GET", "params": [{"description": "Numeric SofaScore esports game id from sofascore-event-esports-games", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "588883"}, {"description": "Which resource of the game to return", "enum": ["statistics", "lineups", "bans", "rounds"], "in": "query", "name": "part", "required": true, "type": "string", "x-example": "lineups"}], "path": "/sofascore/esports-game", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"enum": ["statistics", "lineups", "bans", "rounds"], "in": "query", "name": "part", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event": {"id": "sofascore-event", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-at-bat-pitches": {"id": "sofascore-event-at-bat-pitches", "method": "GET", "params": [{"description": "Numeric SofaScore baseball event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17199139"}, {"description": "Numeric at-bat id from sofascore-event-at-bats for the same event", "in": "query", "name": "at_bat_id", "required": true, "type": "string", "x-example": "2595879"}], "path": "/sofascore/event-at-bat-pitches", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "at_bat_id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-at-bats": {"id": "sofascore-event-at-bats", "method": "GET", "params": [{"description": "Numeric SofaScore baseball event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17199139"}], "path": "/sofascore/event-at-bats", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-average-positions": {"id": "sofascore-event-average-positions", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-average-positions", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-baseball-top-performers": {"id": "sofascore-event-baseball-top-performers", "method": "GET", "params": [{"description": "Numeric SofaScore baseball event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17199139"}], "path": "/sofascore/event-baseball-top-performers", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-best-players": {"id": "sofascore-event-best-players", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-best-players", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-comments": {"id": "sofascore-event-comments", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-comments", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-esports-games": {"id": "sofascore-event-esports-games", "method": "GET", "params": [{"description": "Numeric SofaScore esports event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17260338"}], "path": "/sofascore/event-esports-games", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-graph": {"id": "sofascore-event-graph", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-graph", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-h2h": {"id": "sofascore-event-h2h", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event-h2h", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-highlights": {"id": "sofascore-event-highlights", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-highlights", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-incidents": {"id": "sofascore-event-incidents", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event-incidents", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-innings": {"id": "sofascore-event-innings", "method": "GET", "params": [{"description": "Numeric SofaScore cricket event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16253632"}], "path": "/sofascore/event-innings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-lineups": {"id": "sofascore-event-lineups", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event-lineups", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-managers": {"id": "sofascore-event-managers", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-managers", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-odds": {"id": "sofascore-event-odds", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event-odds", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-player-heatmap": {"id": "sofascore-event-player-heatmap", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}, {"description": "Numeric SofaScore player id that played in the match", "in": "query", "name": "player_id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/event-player-heatmap", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "player_id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-player-statistics": {"id": "sofascore-event-player-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}, {"description": "Numeric SofaScore player id that took part in the match", "in": "query", "name": "player_id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/event-player-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "player_id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-point-by-point": {"id": "sofascore-event-point-by-point", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17257382"}], "path": "/sofascore/event-point-by-point", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-pregame-form": {"id": "sofascore-event-pregame-form", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-pregame-form", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-shotmap": {"id": "sofascore-event-shotmap", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-shotmap", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-statistics": {"id": "sofascore-event-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-team-heatmap": {"id": "sofascore-event-team-heatmap", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}, {"description": "Numeric SofaScore team id of the home or away side", "in": "query", "name": "team_id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/event-team-heatmap", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "team_id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-team-streaks": {"id": "sofascore-event-team-streaks", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-team-streaks", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-tennis-power": {"id": "sofascore-event-tennis-power", "method": "GET", "params": [{"description": "Numeric SofaScore tennis event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17257382"}], "path": "/sofascore/event-tennis-power", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-tv-channels": {"id": "sofascore-event-tv-channels", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}, {"description": "Two-letter ISO 3166-1 alpha-2 country code. Omit to list the broadcasting countries only", "in": "query", "name": "country", "type": "string", "x-example": "GB"}], "path": "/sofascore/event-tv-channels", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "country", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-votes": {"id": "sofascore-event-votes", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-votes", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-live-events": {"id": "sofascore-live-events", "method": "GET", "params": [{"description": "Sport key", "enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "football"}], "path": "/sofascore/live-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-manager": {"id": "sofascore-manager", "method": "GET", "params": [{"description": "Numeric SofaScore manager id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "794873"}], "path": "/sofascore/manager", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-manager-events": {"id": "sofascore-manager-events", "method": "GET", "params": [{"description": "Numeric SofaScore manager id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "794873"}, {"description": "Zero-based page number", "in": "query", "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/manager-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-mma-card": {"id": "sofascore-mma-card", "method": "GET", "params": [{"description": "Numeric SofaScore MMA organisation id", "in": "query", "name": "org_id", "required": true, "type": "string", "x-example": "19906"}, {"description": "Numeric card id (card_id) from sofascore-mma-schedule", "in": "query", "name": "card_id", "required": true, "type": "string", "x-example": "197311"}, {"description": "Which segment of the card to return", "enum": ["all", "maincard", "prelims", "earlyprelims"], "in": "query", "name": "part", "required": true, "type": "string", "x-example": "all"}], "path": "/sofascore/mma-card", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "org_id", "required": true, "type": "string"}, {"in": "query", "name": "card_id", "required": true, "type": "string"}, {"enum": ["all", "maincard", "prelims", "earlyprelims"], "in": "query", "name": "part", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-mma-schedule": {"id": "sofascore-mma-schedule", "method": "GET", "params": [{"description": "Numeric SofaScore MMA organisation id", "in": "query", "name": "org_id", "required": true, "type": "string", "x-example": "19906"}, {"description": "Calendar month as YYYY-MM", "in": "query", "name": "month", "required": true, "type": "string", "x-example": "2026-10"}], "path": "/sofascore/mma-schedule", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "org_id", "required": true, "type": "string"}, {"in": "query", "name": "month", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-odds-dropping": {"id": "sofascore-odds-dropping", "method": "GET", "params": [{"description": "Sport key, or all for every sport. Defaults to all", "enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string", "x-example": "football"}], "path": "/sofascore/odds-dropping", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-odds-winning": {"id": "sofascore-odds-winning", "method": "GET", "params": [{"description": "Sport key, or all for every sport. Defaults to all", "enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string", "x-example": "football"}], "path": "/sofascore/odds-winning", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player": {"id": "sofascore-player", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "855833"}], "path": "/sofascore/player", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-attributes": {"id": "sofascore-player-attributes", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-attributes", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-events": {"id": "sofascore-player-events", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/player-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-player-last-year-summary": {"id": "sofascore-player-last-year-summary", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-last-year-summary", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-national-team-statistics": {"id": "sofascore-player-national-team-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-national-team-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-penalty-history": {"id": "sofascore-player-penalty-history", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-penalty-history", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-ratings": {"id": "sofascore-player-ratings", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}, {"description": "Numeric SofaScore unique-tournament (competition) id from player-statistics-seasons", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id from player-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}, {"default": "overall", "description": "Statistics view", "enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "path": "/sofascore/player-ratings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-season-heatmap": {"id": "sofascore-player-season-heatmap", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}, {"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}], "path": "/sofascore/player-season-heatmap", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-season-statistics": {"id": "sofascore-player-season-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}, {"description": "Numeric SofaScore unique-tournament (competition) id from player-statistics-seasons", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id from player-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"default": "overall", "description": "Statistics view", "enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "path": "/sofascore/player-season-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-statistical-rankings": {"id": "sofascore-player-statistical-rankings", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}, {"description": "Numeric SofaScore season id from player-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"default": "overall", "description": "Statistics view", "enum": ["overall"], "in": "query", "name": "type", "type": "string"}], "path": "/sofascore/player-statistical-rankings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall"], "in": "query", "name": "type", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-statistics-seasons": {"id": "sofascore-player-statistics-seasons", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-statistics-seasons", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-tournaments": {"id": "sofascore-player-tournaments", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-tournaments", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-transfers": {"id": "sofascore-player-transfers", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-transfers", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-ranking-types": {"id": "sofascore-ranking-types", "method": "GET", "params": [], "path": "/sofascore/ranking-types", "pathParams": [], "produces": ["application/json"], "queryParams": [], "security": ["ApiKeyAuth"]}, "sofascore-rankings": {"id": "sofascore-rankings", "method": "GET", "params": [{"description": "Ranking id from sofascore-ranking-types", "enum": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 34, 35, 36, 37, 40, 41, 42, 43, 44, 45, 46], "in": "query", "name": "type", "required": true, "type": "integer", "x-example": 5}, {"description": "Return only the first N rows, 1 to 500. Omit to return every row", "in": "query", "maximum": 500, "minimum": 1, "name": "limit", "type": "integer", "x-example": 10}], "path": "/sofascore/rankings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "34", "35", "36", "37", "40", "41", "42", "43", "44", "45", "46"], "in": "query", "name": "type", "required": true, "type": "integer"}, {"in": "query", "name": "limit", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-referee": {"id": "sofascore-referee", "method": "GET", "params": [{"description": "Numeric SofaScore referee id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "74264"}], "path": "/sofascore/referee", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-referee-events": {"id": "sofascore-referee-events", "method": "GET", "params": [{"description": "Numeric SofaScore referee id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "74264"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/referee-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-referee-statistics": {"id": "sofascore-referee-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore referee id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "74264"}], "path": "/sofascore/referee-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-round-events": {"id": "sofascore-round-events", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}, {"description": "Round number", "in": "query", "name": "round", "required": true, "type": "integer", "x-example": 1}, {"description": "Round slug from tournament-rounds, for example round-of-16; required for knockout and named cup rounds", "in": "query", "name": "slug", "type": "string", "x-example": "round-of-16"}, {"description": "Round prefix from tournament-rounds, for example Qualification; only valid together with slug", "in": "query", "name": "prefix", "type": "string", "x-example": "Qualification"}], "path": "/sofascore/round-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"in": "query", "name": "round", "required": true, "type": "integer"}, {"in": "query", "name": "slug", "type": "string"}, {"in": "query", "name": "prefix", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-scheduled-events": {"id": "sofascore-scheduled-events", "method": "GET", "params": [{"description": "Numeric SofaScore category id from the categories endpoint", "in": "query", "name": "category_id", "required": true, "type": "string", "x-example": "13"}, {"description": "UTC calendar date, YYYY-MM-DD", "in": "query", "name": "date", "required": true, "type": "string", "x-example": "2026-10-08"}], "path": "/sofascore/scheduled-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "category_id", "required": true, "type": "string"}, {"in": "query", "name": "date", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-scheduled-tournaments": {"id": "sofascore-scheduled-tournaments", "method": "GET", "params": [{"description": "Sport key", "enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "football"}, {"description": "UTC calendar date, YYYY-MM-DD", "in": "query", "name": "date", "required": true, "type": "string", "x-example": "2026-10-08"}, {"description": "One-based page number; defaults to 1", "in": "query", "maximum": 100, "minimum": 1, "name": "page", "type": "integer", "x-example": 1}], "path": "/sofascore/scheduled-tournaments", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string"}, {"in": "query", "name": "date", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-search": {"id": "sofascore-search", "method": "GET", "params": [{"description": "Free-text search query", "in": "query", "name": "q", "required": true, "type": "string", "x-example": "barcelona"}], "path": "/sofascore/search", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "q", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-search-typed": {"id": "sofascore-search-typed", "method": "GET", "params": [{"description": "Entity type to search", "enum": ["events", "teams", "players", "managers", "referees", "venues", "unique_tournaments"], "in": "query", "name": "type", "required": true, "type": "string", "x-example": "teams"}, {"description": "Search text, up to 128 characters", "in": "query", "name": "q", "required": true, "type": "string", "x-example": "arsenal"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}, {"description": "Restrict teams, players, managers or unique_tournaments to one sport", "enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string", "x-example": "football"}], "path": "/sofascore/search-typed", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["events", "teams", "players", "managers", "referees", "venues", "unique_tournaments"], "in": "query", "name": "type", "required": true, "type": "string"}, {"in": "query", "name": "q", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}, {"enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-season-events": {"id": "sofascore-season-events", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"description": "Upcoming fixtures or finished results", "enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string", "x-example": "last"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/season-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-sports": {"id": "sofascore-sports", "method": "GET", "params": [], "path": "/sofascore/sports", "pathParams": [], "produces": ["application/json"], "queryParams": [], "security": ["ApiKeyAuth"]}, "sofascore-stage": {"id": "sofascore-stage", "method": "GET", "params": [{"description": "Numeric SofaScore stage id from stage-schedule, stage-seasons or stage-substages", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "214258"}], "path": "/sofascore/stage", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-categories": {"id": "sofascore-stage-categories", "method": "GET", "params": [{"description": "Stage sport key", "enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "motorsport"}], "path": "/sofascore/stage-categories", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-driver-performance": {"id": "sofascore-stage-driver-performance", "method": "GET", "params": [{"description": "Numeric SofaScore stage id of a finished race, sprint or rally", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "214258"}], "path": "/sofascore/stage-driver-performance", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-featured": {"id": "sofascore-stage-featured", "method": "GET", "params": [{"description": "Stage sport key", "enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "motorsport"}], "path": "/sofascore/stage-featured", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-schedule": {"id": "sofascore-stage-schedule", "method": "GET", "params": [{"description": "Stage sport key", "enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "motorsport"}, {"description": "UTC calendar date, YYYY-MM-DD", "in": "query", "name": "date", "required": true, "type": "string", "x-example": "2026-10-04"}], "path": "/sofascore/stage-schedule", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string"}, {"in": "query", "name": "date", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-seasons": {"id": "sofascore-stage-seasons", "method": "GET", "params": [{"description": "Numeric SofaScore competition id from stage-categories", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "40"}], "path": "/sofascore/stage-seasons", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-standings": {"id": "sofascore-stage-standings", "method": "GET", "params": [{"description": "Numeric SofaScore stage id of a season, event, session or cycling stage", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "214258"}, {"description": "Classification kind", "enum": ["competitor", "team"], "in": "query", "name": "type", "required": true, "type": "string", "x-example": "competitor"}], "path": "/sofascore/stage-standings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"enum": ["competitor", "team"], "in": "query", "name": "type", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-substages": {"id": "sofascore-stage-substages", "method": "GET", "params": [{"description": "Numeric SofaScore stage id of a season or an event", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "214253"}], "path": "/sofascore/stage-substages", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-standings": {"id": "sofascore-standings", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}, {"description": "Standings variant", "enum": ["total", "home", "away"], "in": "query", "name": "type", "required": true, "type": "string", "x-example": "total"}], "path": "/sofascore/standings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["total", "home", "away"], "in": "query", "name": "type", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team": {"id": "sofascore-team", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "2817"}], "path": "/sofascore/team", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-achievements": {"id": "sofascore-team-achievements", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-achievements", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-events": {"id": "sofascore-team-events", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "2817"}, {"description": "Fixture direction", "enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string", "x-example": "next"}, {"description": "Zero-based page number", "in": "query", "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/team-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-team-goal-distributions": {"id": "sofascore-team-goal-distributions", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore unique-tournament (competition) id of a football competition", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}], "path": "/sofascore/team-goal-distributions", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-near-events": {"id": "sofascore-team-near-events", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-near-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-of-the-week": {"id": "sofascore-team-of-the-week", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"description": "Numeric period id from sofascore-team-of-the-week-periods", "in": "query", "name": "period", "required": true, "type": "string", "x-example": "29321"}], "path": "/sofascore/team-of-the-week", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"in": "query", "name": "period", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-of-the-week-periods": {"id": "sofascore-team-of-the-week-periods", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}], "path": "/sofascore/team-of-the-week-periods", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-performance": {"id": "sofascore-team-performance", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-performance", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-player-statistics": {"id": "sofascore-team-player-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore unique-tournament (competition) id from team-player-statistics-seasons", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id from team-player-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"default": "overall", "description": "Statistics view", "enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "path": "/sofascore/team-player-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-player-statistics-seasons": {"id": "sofascore-team-player-statistics-seasons", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-player-statistics-seasons", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-players": {"id": "sofascore-team-players", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "2817"}], "path": "/sofascore/team-players", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-rankings": {"id": "sofascore-team-rankings", "method": "GET", "params": [{"description": "Numeric SofaScore team id (a tennis player id for tennis)", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "112783"}], "path": "/sofascore/team-rankings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-season-statistics": {"id": "sofascore-team-season-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore unique-tournament (competition) id from team-statistics-seasons", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id from team-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"default": "overall", "description": "Statistics view", "enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "path": "/sofascore/team-season-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-statistics-seasons": {"id": "sofascore-team-statistics-seasons", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-statistics-seasons", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-top-players": {"id": "sofascore-team-top-players", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore unique-tournament (competition) id from team-player-statistics-seasons", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id from team-player-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"default": "overall", "description": "Statistics scope", "enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}, {"description": "Rows per category, 1 to 50. Omit to return every row", "in": "query", "maximum": 50, "minimum": 1, "name": "limit", "type": "integer", "x-example": 5}], "path": "/sofascore/team-top-players", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}, {"in": "query", "name": "limit", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-team-tournaments": {"id": "sofascore-team-tournaments", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"default": false, "description": "false returns current competitions, true returns every recorded competition", "in": "query", "name": "all", "type": "boolean"}], "path": "/sofascore/team-tournaments", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "all", "type": "boolean"}], "security": ["ApiKeyAuth"]}, "sofascore-team-transfers": {"id": "sofascore-team-transfers", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-transfers", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tennis-player-grand-slam-results": {"id": "sofascore-tennis-player-grand-slam-results", "method": "GET", "params": [{"description": "Numeric SofaScore team id of a tennis player", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14882"}], "path": "/sofascore/tennis-player-grand-slam-results", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-cuptree": {"id": "sofascore-tournament-cuptree", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id of a cup or playoff competition", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "7"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76953"}], "path": "/sofascore/tournament-cuptree", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-info": {"id": "sofascore-tournament-info", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id. Omit for competition metadata only", "in": "query", "name": "season", "type": "string", "x-example": "96668"}], "path": "/sofascore/tournament-info", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-player-of-the-season": {"id": "sofascore-tournament-player-of-the-season", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id of a finished season", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}], "path": "/sofascore/tournament-player-of-the-season", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-player-statistics": {"id": "sofascore-tournament-player-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id of a football competition", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"description": "Statistic to sort by. Defaults to rating", "enum": ["rating", "goals", "expectedGoals", "assists", "successfulDribbles", "tackles", "accuratePassesPercentage", "bigChancesMissed", "totalShots", "goalConversionPercentage", "interceptions", "clearances", "errorLeadToGoal", "outfielderBlocks", "bigChancesCreated", "accuratePasses", "keyPasses", "saves", "cleanSheet", "penaltySave", "savedShotsFromInsideTheBox", "runsOut"], "in": "query", "name": "order", "type": "string", "x-example": "goals"}, {"description": "Sort direction. Defaults to desc", "enum": ["desc", "asc"], "in": "query", "name": "direction", "type": "string", "x-example": "desc"}, {"description": "How statistics are accumulated. Defaults to total", "enum": ["total", "perGame", "per90"], "in": "query", "name": "accumulation", "type": "string", "x-example": "total"}, {"description": "Statistic columns returned. Defaults to summary", "enum": ["summary", "attack", "defence", "passing", "goalkeeper"], "in": "query", "name": "group", "type": "string", "x-example": "summary"}, {"description": "Rows per page, 1 to 100. Defaults to 20", "in": "query", "maximum": 100, "minimum": 1, "name": "limit", "type": "integer", "x-example": 20}, {"description": "Rows to skip. Defaults to 0", "in": "query", "minimum": 0, "name": "offset", "type": "integer", "x-example": 0}, {"collectionFormat": "csv", "description": "Team ids to keep, comma separated, up to 20 (ids from tournament-statistics-info or tournament-teams)", "in": "query", "items": {"type": "string"}, "name": "team", "type": "array", "x-example": "42"}, {"collectionFormat": "csv", "description": "Nationality codes to keep, comma separated, up to 20 (codes from tournament-statistics-info)", "in": "query", "items": {"type": "string"}, "name": "nationality", "type": "array", "x-example": "EN"}, {"collectionFormat": "csv", "description": "Position codes to keep, comma separated", "in": "query", "items": {"enum": ["G", "D", "M", "F"], "type": "string"}, "name": "position", "type": "array", "x-example": "F"}, {"description": "Keep players with at least this many appearances, 0 to 1000. Omit for no minimum", "in": "query", "maximum": 1000, "minimum": 0, "name": "min_appearances", "type": "integer", "x-example": 10}, {"description": "Keep players with at least this many minutes played, 0 to 100000. Omit for no minimum", "in": "query", "maximum": 100000, "minimum": 0, "name": "min_minutes", "type": "integer", "x-example": 900}], "path": "/sofascore/tournament-player-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["rating", "goals", "expectedGoals", "assists", "successfulDribbles", "tackles", "accuratePassesPercentage", "bigChancesMissed", "totalShots", "goalConversionPercentage", "interceptions", "clearances", "errorLeadToGoal", "outfielderBlocks", "bigChancesCreated", "accuratePasses", "keyPasses", "saves", "cleanSheet", "penaltySave", "savedShotsFromInsideTheBox", "runsOut"], "in": "query", "name": "order", "type": "string"}, {"enum": ["desc", "asc"], "in": "query", "name": "direction", "type": "string"}, {"enum": ["total", "perGame", "per90"], "in": "query", "name": "accumulation", "type": "string"}, {"enum": ["summary", "attack", "defence", "passing", "goalkeeper"], "in": "query", "name": "group", "type": "string"}, {"in": "query", "name": "limit", "type": "integer"}, {"in": "query", "name": "offset", "type": "integer"}, {"collectionFormat": "csv", "in": "query", "name": "team", "type": "array"}, {"collectionFormat": "csv", "in": "query", "name": "nationality", "type": "array"}, {"collectionFormat": "csv", "enum": ["G", "D", "M", "F"], "in": "query", "name": "position", "type": "array"}, {"in": "query", "name": "min_appearances", "type": "integer"}, {"in": "query", "name": "min_minutes", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-rounds": {"id": "sofascore-tournament-rounds", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "7"}, {"description": "Numeric SofaScore season id from tournament-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76953"}], "path": "/sofascore/tournament-rounds", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-seasons": {"id": "sofascore-tournament-seasons", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/tournament-seasons", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-statistics-info": {"id": "sofascore-tournament-statistics-info", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id of a football competition", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}], "path": "/sofascore/tournament-statistics-info", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-team-of-the-season": {"id": "sofascore-tournament-team-of-the-season", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id of a finished season", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}], "path": "/sofascore/tournament-team-of-the-season", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-teams": {"id": "sofascore-tournament-teams", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}], "path": "/sofascore/tournament-teams", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-top-players": {"id": "sofascore-tournament-top-players", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"description": "Statistics scope. Defaults to overall", "enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string", "x-example": "overall"}, {"description": "Rows per category, 1 to 50. Omit to return every row", "in": "query", "maximum": 50, "minimum": 1, "name": "limit", "type": "integer", "x-example": 5}], "path": "/sofascore/tournament-top-players", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}, {"in": "query", "name": "limit", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-top-teams": {"id": "sofascore-tournament-top-teams", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"description": "Statistics scope. Defaults to overall", "enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string", "x-example": "overall"}, {"description": "Rows per category, 1 to 50. Omit to return every row", "in": "query", "maximum": 50, "minimum": 1, "name": "limit", "type": "integer", "x-example": 5}], "path": "/sofascore/tournament-top-teams", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}, {"in": "query", "name": "limit", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-venues": {"id": "sofascore-tournament-venues", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}], "path": "/sofascore/tournament-venues", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-winners": {"id": "sofascore-tournament-winners", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/tournament-winners", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-tournaments-with-feature": {"id": "sofascore-tournaments-with-feature", "method": "GET", "params": [{"description": "Competition feature", "enum": ["cuptree", "standings", "totw", "power_rankings"], "in": "query", "name": "feature", "required": true, "type": "string", "x-example": "cuptree"}, {"description": "Sport key", "enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "minifootball", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "football"}], "path": "/sofascore/tournaments-with-feature", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["cuptree", "standings", "totw", "power_rankings"], "in": "query", "name": "feature", "required": true, "type": "string"}, {"enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "minifootball", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-trending-events": {"id": "sofascore-trending-events", "method": "GET", "params": [{"description": "Two-letter ISO 3166-1 alpha-2 country code", "in": "query", "name": "country", "required": true, "type": "string", "x-example": "GB"}], "path": "/sofascore/trending-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "country", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-trending-players": {"id": "sofascore-trending-players", "method": "GET", "params": [{"description": "Sport key", "enum": ["football", "basketball"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "football"}], "path": "/sofascore/trending-players", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["football", "basketball"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-venue": {"id": "sofascore-venue", "method": "GET", "params": [{"description": "Numeric SofaScore venue id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "624"}], "path": "/sofascore/venue", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-venue-events": {"id": "sofascore-venue-events", "method": "GET", "params": [{"description": "Numeric SofaScore venue id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "624"}, {"description": "Upcoming matches or finished matches", "enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string", "x-example": "last"}, {"description": "Sport filter for the venue-wide list. Defaults to all", "enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string", "x-example": "football"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}, {"description": "Numeric unique-tournament id; with season, lists that competition season's matches at the venue", "in": "query", "name": "tournament", "type": "string", "x-example": "17"}, {"description": "Numeric season id; with tournament, lists that competition season's matches at the venue", "in": "query", "name": "season", "type": "string", "x-example": "96668"}], "path": "/sofascore/venue-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string"}, {"enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string"}, {"in": "query", "name": "page", "type": "integer"}, {"in": "query", "name": "tournament", "type": "string"}, {"in": "query", "name": "season", "type": "string"}], "security": ["ApiKeyAuth"]}} +{"sofascore-categories": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-categories", "method": "GET", "params": [{"description": "Sport key", "enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "football"}], "path": "/sofascore/categories", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-category-tournaments": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-category-tournaments", "method": "GET", "params": [{"description": "Numeric SofaScore category id from the categories endpoint", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "1"}], "path": "/sofascore/category-tournaments", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-draft": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-draft", "method": "GET", "params": [{"description": "League whose draft to return", "enum": ["nba", "nfl"], "in": "query", "name": "league", "required": true, "type": "string", "x-example": "nba"}, {"description": "Numeric SofaScore season id of the league", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "80229"}], "path": "/sofascore/draft", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["nba", "nfl"], "in": "query", "name": "league", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-draft-picks": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-draft-picks", "method": "GET", "params": [{"description": "League whose draft to return", "enum": ["nba", "nfl"], "in": "query", "name": "league", "required": true, "type": "string", "x-example": "nba"}, {"description": "Four-digit draft year", "in": "query", "name": "year", "required": true, "type": "string", "x-example": "2025"}, {"description": "Draft round: 1 to 2 for nba, 1 to 7 for nfl", "in": "query", "maximum": 7, "minimum": 1, "name": "round", "required": true, "type": "integer", "x-example": 1}], "path": "/sofascore/draft-picks", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["nba", "nfl"], "in": "query", "name": "league", "required": true, "type": "string"}, {"in": "query", "name": "year", "required": true, "type": "string"}, {"in": "query", "name": "round", "required": true, "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-esports-game": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-esports-game", "method": "GET", "params": [{"description": "Numeric SofaScore esports game id from sofascore-event-esports-games", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "588883"}, {"description": "Which resource of the game to return", "enum": ["statistics", "lineups", "bans", "rounds"], "in": "query", "name": "part", "required": true, "type": "string", "x-example": "lineups"}], "path": "/sofascore/esports-game", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"enum": ["statistics", "lineups", "bans", "rounds"], "in": "query", "name": "part", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-at-bat-pitches": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-at-bat-pitches", "method": "GET", "params": [{"description": "Numeric SofaScore baseball event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17199139"}, {"description": "Numeric at-bat id from sofascore-event-at-bats for the same event", "in": "query", "name": "at_bat_id", "required": true, "type": "string", "x-example": "2595879"}], "path": "/sofascore/event-at-bat-pitches", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "at_bat_id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-at-bats": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-at-bats", "method": "GET", "params": [{"description": "Numeric SofaScore baseball event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17199139"}], "path": "/sofascore/event-at-bats", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-average-positions": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-average-positions", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-average-positions", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-baseball-top-performers": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-baseball-top-performers", "method": "GET", "params": [{"description": "Numeric SofaScore baseball event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17199139"}], "path": "/sofascore/event-baseball-top-performers", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-best-players": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-best-players", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-best-players", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-comments": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-comments", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-comments", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-esports-games": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-esports-games", "method": "GET", "params": [{"description": "Numeric SofaScore esports event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17260338"}], "path": "/sofascore/event-esports-games", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-graph": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-graph", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-graph", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-h2h": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-h2h", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event-h2h", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-highlights": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-highlights", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-highlights", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-incidents": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-incidents", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event-incidents", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-innings": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-innings", "method": "GET", "params": [{"description": "Numeric SofaScore cricket event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16253632"}], "path": "/sofascore/event-innings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-lineups": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-lineups", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event-lineups", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-managers": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-managers", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-managers", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-odds": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-odds", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event-odds", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-player-heatmap": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-player-heatmap", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}, {"description": "Numeric SofaScore player id that played in the match", "in": "query", "name": "player_id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/event-player-heatmap", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "player_id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-player-statistics": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-player-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}, {"description": "Numeric SofaScore player id that took part in the match", "in": "query", "name": "player_id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/event-player-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "player_id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-point-by-point": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-point-by-point", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17257382"}], "path": "/sofascore/event-point-by-point", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-pregame-form": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-pregame-form", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-pregame-form", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-shotmap": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-shotmap", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-shotmap", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-statistics": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-team-heatmap": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-team-heatmap", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}, {"description": "Numeric SofaScore team id of the home or away side", "in": "query", "name": "team_id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/event-team-heatmap", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "team_id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-team-streaks": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-team-streaks", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-team-streaks", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-tennis-power": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-tennis-power", "method": "GET", "params": [{"description": "Numeric SofaScore tennis event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17257382"}], "path": "/sofascore/event-tennis-power", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-tv-channels": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-tv-channels", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}, {"description": "Two-letter ISO 3166-1 alpha-2 country code. Omit to list the broadcasting countries only", "in": "query", "name": "country", "type": "string", "x-example": "GB"}], "path": "/sofascore/event-tv-channels", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "country", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-votes": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-votes", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-votes", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-live-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-live-events", "method": "GET", "params": [{"description": "Sport key", "enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "football"}], "path": "/sofascore/live-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-manager": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-manager", "method": "GET", "params": [{"description": "Numeric SofaScore manager id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "794873"}], "path": "/sofascore/manager", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-manager-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-manager-events", "method": "GET", "params": [{"description": "Numeric SofaScore manager id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "794873"}, {"description": "Zero-based page number", "in": "query", "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/manager-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-mma-card": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-mma-card", "method": "GET", "params": [{"description": "Numeric SofaScore MMA organisation id", "in": "query", "name": "org_id", "required": true, "type": "string", "x-example": "19906"}, {"description": "Numeric card id (card_id) from sofascore-mma-schedule", "in": "query", "name": "card_id", "required": true, "type": "string", "x-example": "197311"}, {"description": "Which segment of the card to return", "enum": ["all", "maincard", "prelims", "earlyprelims"], "in": "query", "name": "part", "required": true, "type": "string", "x-example": "all"}], "path": "/sofascore/mma-card", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "org_id", "required": true, "type": "string"}, {"in": "query", "name": "card_id", "required": true, "type": "string"}, {"enum": ["all", "maincard", "prelims", "earlyprelims"], "in": "query", "name": "part", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-mma-schedule": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-mma-schedule", "method": "GET", "params": [{"description": "Numeric SofaScore MMA organisation id", "in": "query", "name": "org_id", "required": true, "type": "string", "x-example": "19906"}, {"description": "Calendar month as YYYY-MM", "in": "query", "name": "month", "required": true, "type": "string", "x-example": "2026-10"}], "path": "/sofascore/mma-schedule", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "org_id", "required": true, "type": "string"}, {"in": "query", "name": "month", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-odds-dropping": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-odds-dropping", "method": "GET", "params": [{"description": "Sport key, or all for every sport. Defaults to all", "enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string", "x-example": "football"}], "path": "/sofascore/odds-dropping", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-odds-winning": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-odds-winning", "method": "GET", "params": [{"description": "Sport key, or all for every sport. Defaults to all", "enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string", "x-example": "football"}], "path": "/sofascore/odds-winning", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "855833"}], "path": "/sofascore/player", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-attributes": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-attributes", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-attributes", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-events", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/player-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-player-last-year-summary": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-last-year-summary", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-last-year-summary", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-national-team-statistics": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-national-team-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-national-team-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-penalty-history": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-penalty-history", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-penalty-history", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-ratings": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-ratings", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}, {"description": "Numeric SofaScore unique-tournament (competition) id from player-statistics-seasons", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id from player-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}, {"default": "overall", "description": "Statistics view", "enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "path": "/sofascore/player-ratings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-season-heatmap": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-season-heatmap", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}, {"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}], "path": "/sofascore/player-season-heatmap", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-season-statistics": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-season-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}, {"description": "Numeric SofaScore unique-tournament (competition) id from player-statistics-seasons", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id from player-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"default": "overall", "description": "Statistics view", "enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "path": "/sofascore/player-season-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-statistical-rankings": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-statistical-rankings", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}, {"description": "Numeric SofaScore season id from player-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"default": "overall", "description": "Statistics view", "enum": ["overall"], "in": "query", "name": "type", "type": "string"}], "path": "/sofascore/player-statistical-rankings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall"], "in": "query", "name": "type", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-statistics-seasons": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-statistics-seasons", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-statistics-seasons", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-tournaments": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-tournaments", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-tournaments", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-transfers": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-transfers", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-transfers", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-ranking-types": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-ranking-types", "method": "GET", "params": [], "path": "/sofascore/ranking-types", "pathParams": [], "produces": ["application/json"], "queryParams": [], "security": ["ApiKeyAuth"]}, "sofascore-rankings": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-rankings", "method": "GET", "params": [{"description": "Ranking id from sofascore-ranking-types", "enum": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 34, 35, 36, 37, 40, 41, 42, 43, 44, 45, 46], "in": "query", "name": "type", "required": true, "type": "integer", "x-example": 5}, {"description": "Return only the first N rows, 1 to 500. Omit to return every row", "in": "query", "maximum": 500, "minimum": 1, "name": "limit", "type": "integer", "x-example": 10}], "path": "/sofascore/rankings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "34", "35", "36", "37", "40", "41", "42", "43", "44", "45", "46"], "in": "query", "name": "type", "required": true, "type": "integer"}, {"in": "query", "name": "limit", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-referee": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-referee", "method": "GET", "params": [{"description": "Numeric SofaScore referee id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "74264"}], "path": "/sofascore/referee", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-referee-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-referee-events", "method": "GET", "params": [{"description": "Numeric SofaScore referee id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "74264"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/referee-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-referee-statistics": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-referee-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore referee id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "74264"}], "path": "/sofascore/referee-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-round-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-round-events", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}, {"description": "Round number", "in": "query", "name": "round", "required": true, "type": "integer", "x-example": 1}, {"description": "Round slug from tournament-rounds, for example round-of-16; required for knockout and named cup rounds", "in": "query", "name": "slug", "type": "string", "x-example": "round-of-16"}, {"description": "Round prefix from tournament-rounds, for example Qualification; only valid together with slug", "in": "query", "name": "prefix", "type": "string", "x-example": "Qualification"}], "path": "/sofascore/round-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"in": "query", "name": "round", "required": true, "type": "integer"}, {"in": "query", "name": "slug", "type": "string"}, {"in": "query", "name": "prefix", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-scheduled-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-scheduled-events", "method": "GET", "params": [{"description": "Numeric SofaScore category id from the categories endpoint", "in": "query", "name": "category_id", "required": true, "type": "string", "x-example": "13"}, {"description": "UTC calendar date, YYYY-MM-DD", "in": "query", "name": "date", "required": true, "type": "string", "x-example": "2026-10-08"}], "path": "/sofascore/scheduled-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "category_id", "required": true, "type": "string"}, {"in": "query", "name": "date", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-scheduled-tournaments": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-scheduled-tournaments", "method": "GET", "params": [{"description": "Sport key", "enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "football"}, {"description": "UTC calendar date, YYYY-MM-DD", "in": "query", "name": "date", "required": true, "type": "string", "x-example": "2026-10-08"}, {"description": "One-based page number; defaults to 1", "in": "query", "maximum": 100, "minimum": 1, "name": "page", "type": "integer", "x-example": 1}], "path": "/sofascore/scheduled-tournaments", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string"}, {"in": "query", "name": "date", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-search": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-search", "method": "GET", "params": [{"description": "Free-text search query", "in": "query", "name": "q", "required": true, "type": "string", "x-example": "barcelona"}], "path": "/sofascore/search", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "q", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-search-typed": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-search-typed", "method": "GET", "params": [{"description": "Entity type to search", "enum": ["events", "teams", "players", "managers", "referees", "venues", "unique_tournaments"], "in": "query", "name": "type", "required": true, "type": "string", "x-example": "teams"}, {"description": "Search text, up to 128 characters", "in": "query", "name": "q", "required": true, "type": "string", "x-example": "arsenal"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}, {"description": "Restrict teams, players, managers or unique_tournaments to one sport", "enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string", "x-example": "football"}], "path": "/sofascore/search-typed", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["events", "teams", "players", "managers", "referees", "venues", "unique_tournaments"], "in": "query", "name": "type", "required": true, "type": "string"}, {"in": "query", "name": "q", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}, {"enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-season-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-season-events", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"description": "Upcoming fixtures or finished results", "enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string", "x-example": "last"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/season-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-sports": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-sports", "method": "GET", "params": [], "path": "/sofascore/sports", "pathParams": [], "produces": ["application/json"], "queryParams": [], "security": ["ApiKeyAuth"]}, "sofascore-stage": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-stage", "method": "GET", "params": [{"description": "Numeric SofaScore stage id from stage-schedule, stage-seasons or stage-substages", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "214258"}], "path": "/sofascore/stage", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-categories": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-stage-categories", "method": "GET", "params": [{"description": "Stage sport key", "enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "motorsport"}], "path": "/sofascore/stage-categories", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-driver-performance": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-stage-driver-performance", "method": "GET", "params": [{"description": "Numeric SofaScore stage id of a finished race, sprint or rally", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "214258"}], "path": "/sofascore/stage-driver-performance", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-featured": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-stage-featured", "method": "GET", "params": [{"description": "Stage sport key", "enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "motorsport"}], "path": "/sofascore/stage-featured", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-schedule": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-stage-schedule", "method": "GET", "params": [{"description": "Stage sport key", "enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "motorsport"}, {"description": "UTC calendar date, YYYY-MM-DD", "in": "query", "name": "date", "required": true, "type": "string", "x-example": "2026-10-04"}], "path": "/sofascore/stage-schedule", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string"}, {"in": "query", "name": "date", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-seasons": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-stage-seasons", "method": "GET", "params": [{"description": "Numeric SofaScore competition id from stage-categories", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "40"}], "path": "/sofascore/stage-seasons", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-standings": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-stage-standings", "method": "GET", "params": [{"description": "Numeric SofaScore stage id of a season, event, session or cycling stage", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "214258"}, {"description": "Classification kind", "enum": ["competitor", "team"], "in": "query", "name": "type", "required": true, "type": "string", "x-example": "competitor"}], "path": "/sofascore/stage-standings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"enum": ["competitor", "team"], "in": "query", "name": "type", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-substages": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-stage-substages", "method": "GET", "params": [{"description": "Numeric SofaScore stage id of a season or an event", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "214253"}], "path": "/sofascore/stage-substages", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-standings": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-standings", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}, {"description": "Standings variant", "enum": ["total", "home", "away"], "in": "query", "name": "type", "required": true, "type": "string", "x-example": "total"}], "path": "/sofascore/standings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["total", "home", "away"], "in": "query", "name": "type", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "2817"}], "path": "/sofascore/team", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-achievements": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-achievements", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-achievements", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-events", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "2817"}, {"description": "Fixture direction", "enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string", "x-example": "next"}, {"description": "Zero-based page number", "in": "query", "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/team-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-team-goal-distributions": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-goal-distributions", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore unique-tournament (competition) id of a football competition", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}], "path": "/sofascore/team-goal-distributions", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-near-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-near-events", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-near-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-of-the-week": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-of-the-week", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"description": "Numeric period id from sofascore-team-of-the-week-periods", "in": "query", "name": "period", "required": true, "type": "string", "x-example": "29321"}], "path": "/sofascore/team-of-the-week", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"in": "query", "name": "period", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-of-the-week-periods": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-of-the-week-periods", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}], "path": "/sofascore/team-of-the-week-periods", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-performance": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-performance", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-performance", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-player-statistics": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-player-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore unique-tournament (competition) id from team-player-statistics-seasons", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id from team-player-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"default": "overall", "description": "Statistics view", "enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "path": "/sofascore/team-player-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-player-statistics-seasons": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-player-statistics-seasons", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-player-statistics-seasons", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-players": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-players", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "2817"}], "path": "/sofascore/team-players", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-rankings": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-rankings", "method": "GET", "params": [{"description": "Numeric SofaScore team id (a tennis player id for tennis)", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "112783"}], "path": "/sofascore/team-rankings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-season-statistics": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-season-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore unique-tournament (competition) id from team-statistics-seasons", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id from team-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"default": "overall", "description": "Statistics view", "enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "path": "/sofascore/team-season-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-statistics-seasons": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-statistics-seasons", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-statistics-seasons", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-top-players": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-top-players", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore unique-tournament (competition) id from team-player-statistics-seasons", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id from team-player-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"default": "overall", "description": "Statistics scope", "enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}, {"description": "Rows per category, 1 to 50. Omit to return every row", "in": "query", "maximum": 50, "minimum": 1, "name": "limit", "type": "integer", "x-example": 5}], "path": "/sofascore/team-top-players", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}, {"in": "query", "name": "limit", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-team-tournaments": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-tournaments", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"default": false, "description": "false returns current competitions, true returns every recorded competition", "in": "query", "name": "all", "type": "boolean"}], "path": "/sofascore/team-tournaments", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "all", "type": "boolean"}], "security": ["ApiKeyAuth"]}, "sofascore-team-transfers": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-transfers", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-transfers", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tennis-player-grand-slam-results": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tennis-player-grand-slam-results", "method": "GET", "params": [{"description": "Numeric SofaScore team id of a tennis player", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14882"}], "path": "/sofascore/tennis-player-grand-slam-results", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-cuptree": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-cuptree", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id of a cup or playoff competition", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "7"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76953"}], "path": "/sofascore/tournament-cuptree", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-info": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-info", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id. Omit for competition metadata only", "in": "query", "name": "season", "type": "string", "x-example": "96668"}], "path": "/sofascore/tournament-info", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-player-of-the-season": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-player-of-the-season", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id of a finished season", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}], "path": "/sofascore/tournament-player-of-the-season", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-player-statistics": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-player-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id of a football competition", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"description": "Statistic to sort by. Defaults to rating", "enum": ["rating", "goals", "expectedGoals", "assists", "successfulDribbles", "tackles", "accuratePassesPercentage", "bigChancesMissed", "totalShots", "goalConversionPercentage", "interceptions", "clearances", "errorLeadToGoal", "outfielderBlocks", "bigChancesCreated", "accuratePasses", "keyPasses", "saves", "cleanSheet", "penaltySave", "savedShotsFromInsideTheBox", "runsOut"], "in": "query", "name": "order", "type": "string", "x-example": "goals"}, {"description": "Sort direction. Defaults to desc", "enum": ["desc", "asc"], "in": "query", "name": "direction", "type": "string", "x-example": "desc"}, {"description": "How statistics are accumulated. Defaults to total", "enum": ["total", "perGame", "per90"], "in": "query", "name": "accumulation", "type": "string", "x-example": "total"}, {"description": "Statistic columns returned. Defaults to summary", "enum": ["summary", "attack", "defence", "passing", "goalkeeper"], "in": "query", "name": "group", "type": "string", "x-example": "summary"}, {"description": "Rows per page, 1 to 100. Defaults to 20", "in": "query", "maximum": 100, "minimum": 1, "name": "limit", "type": "integer", "x-example": 20}, {"description": "Rows to skip. Defaults to 0", "in": "query", "minimum": 0, "name": "offset", "type": "integer", "x-example": 0}, {"collectionFormat": "csv", "description": "Team ids to keep, comma separated, up to 20 (ids from tournament-statistics-info or tournament-teams)", "in": "query", "items": {"type": "string"}, "name": "team", "type": "array", "x-example": "42"}, {"collectionFormat": "csv", "description": "Nationality codes to keep, comma separated, up to 20 (codes from tournament-statistics-info)", "in": "query", "items": {"type": "string"}, "name": "nationality", "type": "array", "x-example": "EN"}, {"collectionFormat": "csv", "description": "Position codes to keep, comma separated", "in": "query", "items": {"enum": ["G", "D", "M", "F"], "type": "string"}, "name": "position", "type": "array", "x-example": "F"}, {"description": "Keep players with at least this many appearances, 0 to 1000. Omit for no minimum", "in": "query", "maximum": 1000, "minimum": 0, "name": "min_appearances", "type": "integer", "x-example": 10}, {"description": "Keep players with at least this many minutes played, 0 to 100000. Omit for no minimum", "in": "query", "maximum": 100000, "minimum": 0, "name": "min_minutes", "type": "integer", "x-example": 900}], "path": "/sofascore/tournament-player-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["rating", "goals", "expectedGoals", "assists", "successfulDribbles", "tackles", "accuratePassesPercentage", "bigChancesMissed", "totalShots", "goalConversionPercentage", "interceptions", "clearances", "errorLeadToGoal", "outfielderBlocks", "bigChancesCreated", "accuratePasses", "keyPasses", "saves", "cleanSheet", "penaltySave", "savedShotsFromInsideTheBox", "runsOut"], "in": "query", "name": "order", "type": "string"}, {"enum": ["desc", "asc"], "in": "query", "name": "direction", "type": "string"}, {"enum": ["total", "perGame", "per90"], "in": "query", "name": "accumulation", "type": "string"}, {"enum": ["summary", "attack", "defence", "passing", "goalkeeper"], "in": "query", "name": "group", "type": "string"}, {"in": "query", "name": "limit", "type": "integer"}, {"in": "query", "name": "offset", "type": "integer"}, {"collectionFormat": "csv", "in": "query", "name": "team", "type": "array"}, {"collectionFormat": "csv", "in": "query", "name": "nationality", "type": "array"}, {"collectionFormat": "csv", "enum": ["G", "D", "M", "F"], "in": "query", "name": "position", "type": "array"}, {"in": "query", "name": "min_appearances", "type": "integer"}, {"in": "query", "name": "min_minutes", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-rounds": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-rounds", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "7"}, {"description": "Numeric SofaScore season id from tournament-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76953"}], "path": "/sofascore/tournament-rounds", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-seasons": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-seasons", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/tournament-seasons", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-statistics-info": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-statistics-info", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id of a football competition", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}], "path": "/sofascore/tournament-statistics-info", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-team-of-the-season": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-team-of-the-season", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id of a finished season", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}], "path": "/sofascore/tournament-team-of-the-season", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-teams": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-teams", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}], "path": "/sofascore/tournament-teams", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-top-players": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-top-players", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"description": "Statistics scope. Defaults to overall", "enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string", "x-example": "overall"}, {"description": "Rows per category, 1 to 50. Omit to return every row", "in": "query", "maximum": 50, "minimum": 1, "name": "limit", "type": "integer", "x-example": 5}], "path": "/sofascore/tournament-top-players", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}, {"in": "query", "name": "limit", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-top-teams": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-top-teams", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"description": "Statistics scope. Defaults to overall", "enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string", "x-example": "overall"}, {"description": "Rows per category, 1 to 50. Omit to return every row", "in": "query", "maximum": 50, "minimum": 1, "name": "limit", "type": "integer", "x-example": 5}], "path": "/sofascore/tournament-top-teams", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}, {"in": "query", "name": "limit", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-venues": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-venues", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}], "path": "/sofascore/tournament-venues", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-winners": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-winners", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/tournament-winners", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-tournaments-with-feature": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournaments-with-feature", "method": "GET", "params": [{"description": "Competition feature", "enum": ["cuptree", "standings", "totw", "power_rankings"], "in": "query", "name": "feature", "required": true, "type": "string", "x-example": "cuptree"}, {"description": "Sport key", "enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "minifootball", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "football"}], "path": "/sofascore/tournaments-with-feature", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["cuptree", "standings", "totw", "power_rankings"], "in": "query", "name": "feature", "required": true, "type": "string"}, {"enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "minifootball", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-trending-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-trending-events", "method": "GET", "params": [{"description": "Two-letter ISO 3166-1 alpha-2 country code", "in": "query", "name": "country", "required": true, "type": "string", "x-example": "GB"}], "path": "/sofascore/trending-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "country", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-trending-players": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-trending-players", "method": "GET", "params": [{"description": "Sport key", "enum": ["football", "basketball"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "football"}], "path": "/sofascore/trending-players", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["football", "basketball"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-venue": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-venue", "method": "GET", "params": [{"description": "Numeric SofaScore venue id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "624"}], "path": "/sofascore/venue", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-venue-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-venue-events", "method": "GET", "params": [{"description": "Numeric SofaScore venue id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "624"}, {"description": "Upcoming matches or finished matches", "enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string", "x-example": "last"}, {"description": "Sport filter for the venue-wide list. Defaults to all", "enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string", "x-example": "football"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}, {"description": "Numeric unique-tournament id; with season, lists that competition season's matches at the venue", "in": "query", "name": "tournament", "type": "string", "x-example": "17"}, {"description": "Numeric season id; with tournament, lists that competition season's matches at the venue", "in": "query", "name": "season", "type": "string", "x-example": "96668"}], "path": "/sofascore/venue-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string"}, {"enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string"}, {"in": "query", "name": "page", "type": "integer"}, {"in": "query", "name": "tournament", "type": "string"}, {"in": "query", "name": "season", "type": "string"}], "security": ["ApiKeyAuth"]}} JSON, true, 512, JSON_THROW_ON_ERROR); } @@ -53,14 +53,18 @@ public function request(string $operationId, array $params = [], string $respons if ($this->apiKey === '') { throw new ClientException('Crawlora API key is required', null, $operationId); } + $payload = $this->requestBody($operation, $params); $url = $this->buildUrl($operation, $params); $headers = [ 'x-api-key: ' . $this->apiKey, - 'User-Agent: crawlora-sofascore-php/0.3.4', + 'User-Agent: crawlora-sofascore-php/0.3.5', 'Accept: ' . (in_array('text/plain', $operation['produces'], true) ? 'application/json, text/plain' : 'application/json'), ]; + if ($payload !== null) { + $headers[] = 'Content-Type: application/json'; + } try { - [$status, $contentType, $body] = $this->send($url, $headers, $operationId); + [$status, $contentType, $body] = $this->send($url, $headers, $operationId, $operation['method'], $payload); } catch (CrawloraException $exception) { throw $exception; } catch (\Throwable $exception) { @@ -753,9 +757,29 @@ public function venue_events(mixed ...$params): mixed return $this->request("sofascore-venue-events", $params, $responseType); } + /** POST operations take their JSON body under the body parameter name or "body". */ + private function requestBody(array $operation, array $params): ?string + { + $name = $operation['bodyParam'] ?? null; + if ($name === null) { + return null; + } + $value = $params[$name] ?? ($params['body'] ?? null); + if ($value === null) { + if ($operation['bodyRequired'] ?? false) { + throw new ClientException('Missing request body: ' . $name, null, $operation['id']); + } + return null; + } + return is_string($value) ? $value : json_encode($value, JSON_THROW_ON_ERROR); + } + private function buildUrl(array $operation, array $params): string { $known = array_column($operation['params'], 'name'); + if (($operation['bodyParam'] ?? null) !== null) { + $known[] = 'body'; + } $unknown = array_diff(array_keys($params), $known, ['response_type', '_response_type']); if ($unknown !== []) { throw new ClientException('Unknown parameters: ' . implode(', ', $unknown), null, $operation['id']); @@ -822,17 +846,26 @@ private function stringify(mixed $value): string return (string) $value; } - private function send(string $url, array $headers, string $operationId): array + private function send(string $url, array $headers, string $operationId, string $method = 'GET', ?string $payload = null): array { if ($this->transport !== null) { - $result = ($this->transport)($url, $headers, $this->timeout); + $result = $method === 'POST' + ? ($this->transport)($url, $headers, $this->timeout, $method, $payload) + : ($this->transport)($url, $headers, $this->timeout); return [(int) $result['status'], (string) ($result['content_type'] ?? ''), (string) ($result['body'] ?? '')]; } $handle = curl_init($url); if ($handle === false) { throw new NetworkException('Could not initialize cURL', null, $operationId); } - curl_setopt_array($handle, [ + curl_setopt_array($handle, $method === 'POST' ? [ + CURLOPT_POST => true, + CURLOPT_POSTFIELDS => $payload ?? '', + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => $headers, + CURLOPT_TIMEOUT_MS => (int) ($this->timeout * 1000), + CURLOPT_CONNECTTIMEOUT_MS => (int) ($this->timeout * 1000), + ] : [ CURLOPT_HTTPGET => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => $headers, diff --git a/php/src/Crawlora/Sofascore/operations.json b/php/src/Crawlora/Sofascore/operations.json index 2cc3a31..a43c857 100644 --- a/php/src/Crawlora/Sofascore/operations.json +++ b/php/src/Crawlora/Sofascore/operations.json @@ -263,6 +263,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Sport key", @@ -319,6 +321,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore category id from the categories endpoint", @@ -359,6 +363,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "League whose draft to return", @@ -417,6 +423,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "League whose draft to return", @@ -481,6 +489,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore esports game id from sofascore-event-esports-games", @@ -525,6 +535,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -561,6 +573,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore baseball event (match) id", @@ -599,6 +613,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore baseball event (match) id", @@ -629,6 +645,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -659,6 +677,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore baseball event (match) id", @@ -689,6 +709,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -719,6 +741,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -749,6 +773,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore esports event (match) id", @@ -779,6 +805,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -809,6 +837,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -839,6 +869,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -869,6 +901,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -899,6 +933,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore cricket event (match) id", @@ -929,6 +965,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -959,6 +997,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -989,6 +1029,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1025,6 +1067,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1069,6 +1113,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1107,6 +1153,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1137,6 +1185,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1167,6 +1217,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1197,6 +1249,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1233,6 +1287,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1271,6 +1327,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1301,6 +1359,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore tennis event (match) id", @@ -1336,6 +1396,8 @@ "type": "string" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1373,6 +1435,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1429,6 +1493,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Sport key", @@ -1485,6 +1551,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore manager id", @@ -1520,6 +1588,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore manager id", @@ -1575,6 +1645,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore MMA organisation id", @@ -1633,6 +1705,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore MMA organisation id", @@ -1697,6 +1771,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Sport key, or all for every sport. Defaults to all", @@ -1779,6 +1855,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Sport key, or all for every sport. Defaults to all", @@ -1835,6 +1913,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -1865,6 +1945,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -1900,6 +1982,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -1938,6 +2022,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -1968,6 +2054,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -1998,6 +2086,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -2052,6 +2142,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -2124,6 +2216,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -2194,6 +2288,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -2268,6 +2364,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -2316,6 +2414,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -2346,6 +2446,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -2376,6 +2478,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -2399,6 +2503,8 @@ "path": "/sofascore/ranking-types", "pathParams": [], "queryParams": [], + "bodyParam": null, + "bodyRequired": false, "params": [], "produces": [ "application/json" @@ -2459,6 +2565,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Ranking id from sofascore-ranking-types", @@ -2532,6 +2640,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore referee id", @@ -2567,6 +2677,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore referee id", @@ -2605,6 +2717,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore referee id", @@ -2657,6 +2771,8 @@ "type": "string" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -2723,6 +2839,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore category id from the categories endpoint", @@ -2798,6 +2916,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Sport key", @@ -2871,6 +2991,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Free-text search query", @@ -2952,6 +3074,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Entity type to search", @@ -3061,6 +3185,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -3112,6 +3238,8 @@ "path": "/sofascore/sports", "pathParams": [], "queryParams": [], + "bodyParam": null, + "bodyRequired": false, "params": [], "produces": [ "application/json" @@ -3133,6 +3261,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore stage id from stage-schedule, stage-seasons or stage-substages", @@ -3167,6 +3297,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Stage sport key", @@ -3201,6 +3333,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore stage id of a finished race, sprint or rally", @@ -3235,6 +3369,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Stage sport key", @@ -3279,6 +3415,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Stage sport key", @@ -3321,6 +3459,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore competition id from stage-categories", @@ -3361,6 +3501,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore stage id of a season, event, session or cycling stage", @@ -3403,6 +3545,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore stage id of a season or an event", @@ -3450,6 +3594,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -3501,6 +3647,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -3531,6 +3679,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -3576,6 +3726,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -3637,6 +3789,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -3683,6 +3837,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -3725,6 +3881,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -3777,6 +3935,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -3815,6 +3975,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -3869,6 +4031,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -3929,6 +4093,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -3959,6 +4125,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -3989,6 +4157,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id (a tennis player id for tennis)", @@ -4043,6 +4213,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -4103,6 +4275,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -4160,6 +4334,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -4232,6 +4408,8 @@ "type": "boolean" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -4269,6 +4447,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -4299,6 +4479,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id of a tennis player", @@ -4335,6 +4517,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id of a cup or playoff competition", @@ -4378,6 +4562,8 @@ "type": "string" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -4421,6 +4607,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -4569,6 +4757,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id of a football competition", @@ -4755,6 +4945,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -4793,6 +4985,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -4829,6 +5023,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id of a football competition", @@ -4873,6 +5069,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -4917,6 +5115,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -4976,6 +5176,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -5056,6 +5258,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -5121,6 +5325,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -5164,6 +5370,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -5238,6 +5446,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Competition feature", @@ -5306,6 +5516,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Two-letter ISO 3166-1 alpha-2 country code", @@ -5340,6 +5552,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Sport key", @@ -5374,6 +5588,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore venue id", @@ -5461,6 +5677,8 @@ "type": "string" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore venue id", diff --git a/platform.json b/platform.json index cbe5d98..2e8c814 100644 --- a/platform.json +++ b/platform.json @@ -5,7 +5,7 @@ "display_name": "SofaScore", "general_sdk_version": "1.46.0-sdk.1", "golang_module_name": "github.com/Crawlora-org/crawlora-sofascore", - "golang_version": "0.3.4", + "golang_version": "0.3.5", "group_name": "sofascore", "maven_artifact_id": "crawlora-sofascore", "java_description": "Java client for Crawlora's hosted SofaScore API, with direct methods for live events, match details, lineups, statistics, tournaments, and player/team data. Requires a Crawlora API key.", @@ -16,6 +16,14 @@ "platform": "sofascore", "python_name": "crawlora-sofascore", "releases": [ + { + "version": "0.3.5", + "date": "2026-10-12", + "changes": [ + "List every supported endpoint in the repository and package READMEs.", + "Add platform-specific search keywords to the npm, PyPI, and Composer package metadata." + ] + }, { "version": "0.3.4", "date": "2026-10-09", @@ -104,6 +112,6 @@ "repository": "https://github.com/Crawlora-org/crawlora-sofascore", "ruby_gem_name": "crawlora-sofascore", "source_contract_sha256": "3827d3a93489515b45354477d4e75fb05f173af262cf358e80878442d7d258f2", - "version": "0.3.4", + "version": "0.3.5", "php_repository": "https://github.com/Crawlora-org/crawlora-sofascore" } diff --git a/python/README.md b/python/README.md index 24e7420..88a0be8 100644 --- a/python/README.md +++ b/python/README.md @@ -1,7 +1,6 @@ -# crawlora-sofascore +# crawlora-sofascore — SofaScore API client for Python -Python client for Crawlora's hosted SofaScore API. It calls Crawlora's -service at [Crawlora](https://crawlora.net/?utm_source=pypi&utm_medium=referral&utm_campaign=platform-clients&utm_content=sofascore-python-homepage); it does not run a browser or scrape +Python client for Crawlora's hosted SofaScore API. It exposes 109 API endpoints covering live events, match details, lineups, statistics, tournaments, and player/team data. Requests go to [Crawlora](https://crawlora.net/?utm_source=pypi&utm_medium=referral&utm_campaign=platform-clients&utm_content=sofascore-python-homepage); the package does not run a browser or scrape SofaScore locally. A Crawlora account and `CRAWLORA_API_KEY` are required, and API use is billed under your Crawlora account. Crawlora is independent from and not endorsed by SofaScore or its owners. @@ -68,6 +67,122 @@ asyncio.run(main()) See the [runnable example](https://github.com/Crawlora-org/crawlora-sofascore/blob/main/examples/python.py) for a complete usage example. +## Supported SofaScore API endpoints + +This package exposes every route below through direct snake_case methods and the `sofascore` group. See the [endpoint and parameter reference](https://github.com/Crawlora-org/crawlora-sofascore/blob/main/docs/usage.md) for complete input details. + +| Method | Endpoint | API operation | Description | +| --- | --- | --- | --- | +| `GET` | `/sofascore/categories` | `sofascore-categories` | SofaScore categories for a sport | +| `GET` | `/sofascore/category-tournaments` | `sofascore-category-tournaments` | SofaScore competitions in a category | +| `GET` | `/sofascore/draft` | `sofascore-draft` | SofaScore league draft | +| `GET` | `/sofascore/draft-picks` | `sofascore-draft-picks` | SofaScore league draft picks | +| `GET` | `/sofascore/esports-game` | `sofascore-esports-game` | SofaScore esports game detail | +| `GET` | `/sofascore/event` | `sofascore-event` | SofaScore event detail | +| `GET` | `/sofascore/event-at-bat-pitches` | `sofascore-event-at-bat-pitches` | SofaScore event at-bat pitches | +| `GET` | `/sofascore/event-at-bats` | `sofascore-event-at-bats` | SofaScore event at-bats | +| `GET` | `/sofascore/event-average-positions` | `sofascore-event-average-positions` | SofaScore event average positions | +| `GET` | `/sofascore/event-baseball-top-performers` | `sofascore-event-baseball-top-performers` | SofaScore event baseball top performers | +| `GET` | `/sofascore/event-best-players` | `sofascore-event-best-players` | SofaScore event best players | +| `GET` | `/sofascore/event-comments` | `sofascore-event-comments` | SofaScore event commentary | +| `GET` | `/sofascore/event-esports-games` | `sofascore-event-esports-games` | SofaScore event esports games | +| `GET` | `/sofascore/event-graph` | `sofascore-event-graph` | SofaScore event momentum graph | +| `GET` | `/sofascore/event-h2h` | `sofascore-event-h2h` | SofaScore event head-to-head | +| `GET` | `/sofascore/event-highlights` | `sofascore-event-highlights` | SofaScore event highlights | +| `GET` | `/sofascore/event-incidents` | `sofascore-event-incidents` | SofaScore event incidents | +| `GET` | `/sofascore/event-innings` | `sofascore-event-innings` | SofaScore event innings | +| `GET` | `/sofascore/event-lineups` | `sofascore-event-lineups` | SofaScore event lineups | +| `GET` | `/sofascore/event-managers` | `sofascore-event-managers` | SofaScore event managers | +| `GET` | `/sofascore/event-odds` | `sofascore-event-odds` | SofaScore event odds | +| `GET` | `/sofascore/event-player-heatmap` | `sofascore-event-player-heatmap` | SofaScore event player heatmap | +| `GET` | `/sofascore/event-player-statistics` | `sofascore-event-player-statistics` | SofaScore event player statistics | +| `GET` | `/sofascore/event-point-by-point` | `sofascore-event-point-by-point` | SofaScore event point-by-point | +| `GET` | `/sofascore/event-pregame-form` | `sofascore-event-pregame-form` | SofaScore event pre-game form | +| `GET` | `/sofascore/event-shotmap` | `sofascore-event-shotmap` | SofaScore event shot map | +| `GET` | `/sofascore/event-statistics` | `sofascore-event-statistics` | SofaScore event statistics | +| `GET` | `/sofascore/event-team-heatmap` | `sofascore-event-team-heatmap` | SofaScore event team heatmap | +| `GET` | `/sofascore/event-team-streaks` | `sofascore-event-team-streaks` | SofaScore event team streaks | +| `GET` | `/sofascore/event-tennis-power` | `sofascore-event-tennis-power` | SofaScore event tennis power | +| `GET` | `/sofascore/event-tv-channels` | `sofascore-event-tv-channels` | SofaScore event TV channels | +| `GET` | `/sofascore/event-votes` | `sofascore-event-votes` | SofaScore event votes | +| `GET` | `/sofascore/live-events` | `sofascore-live-events` | SofaScore live events | +| `GET` | `/sofascore/manager` | `sofascore-manager` | SofaScore manager detail | +| `GET` | `/sofascore/manager-events` | `sofascore-manager-events` | SofaScore manager recent matches | +| `GET` | `/sofascore/mma-card` | `sofascore-mma-card` | SofaScore MMA card | +| `GET` | `/sofascore/mma-schedule` | `sofascore-mma-schedule` | SofaScore MMA schedule | +| `GET` | `/sofascore/odds-dropping` | `sofascore-odds-dropping` | SofaScore dropping odds | +| `GET` | `/sofascore/odds-winning` | `sofascore-odds-winning` | SofaScore winning odds | +| `GET` | `/sofascore/player` | `sofascore-player` | SofaScore player detail | +| `GET` | `/sofascore/player-attributes` | `sofascore-player-attributes` | SofaScore player attributes and characteristics | +| `GET` | `/sofascore/player-events` | `sofascore-player-events` | SofaScore player matches with per-match numbers | +| `GET` | `/sofascore/player-last-year-summary` | `sofascore-player-last-year-summary` | SofaScore player form over the last year | +| `GET` | `/sofascore/player-national-team-statistics` | `sofascore-player-national-team-statistics` | SofaScore player national team record | +| `GET` | `/sofascore/player-penalty-history` | `sofascore-player-penalty-history` | SofaScore player penalty history | +| `GET` | `/sofascore/player-ratings` | `sofascore-player-ratings` | SofaScore player match ratings for a season | +| `GET` | `/sofascore/player-season-heatmap` | `sofascore-player-season-heatmap` | SofaScore player season heatmap | +| `GET` | `/sofascore/player-season-statistics` | `sofascore-player-season-statistics` | SofaScore player season statistics | +| `GET` | `/sofascore/player-statistical-rankings` | `sofascore-player-statistical-rankings` | SofaScore player ranking among all players in a season | +| `GET` | `/sofascore/player-statistics-seasons` | `sofascore-player-statistics-seasons` | SofaScore player statistics seasons | +| `GET` | `/sofascore/player-tournaments` | `sofascore-player-tournaments` | SofaScore player competitions | +| `GET` | `/sofascore/player-transfers` | `sofascore-player-transfers` | SofaScore player transfer history | +| `GET` | `/sofascore/ranking-types` | `sofascore-ranking-types` | SofaScore ranking catalogue | +| `GET` | `/sofascore/rankings` | `sofascore-rankings` | SofaScore rankings | +| `GET` | `/sofascore/referee` | `sofascore-referee` | SofaScore referee profile | +| `GET` | `/sofascore/referee-events` | `sofascore-referee-events` | SofaScore referee officiated matches | +| `GET` | `/sofascore/referee-statistics` | `sofascore-referee-statistics` | SofaScore referee card statistics | +| `GET` | `/sofascore/round-events` | `sofascore-round-events` | SofaScore round fixtures | +| `GET` | `/sofascore/scheduled-events` | `sofascore-scheduled-events` | SofaScore events scheduled in a category on a date | +| `GET` | `/sofascore/scheduled-tournaments` | `sofascore-scheduled-tournaments` | SofaScore tournaments scheduled on a date | +| `GET` | `/sofascore/search` | `sofascore-search` | SofaScore universal search | +| `GET` | `/sofascore/search-typed` | `sofascore-search-typed` | SofaScore search by entity type | +| `GET` | `/sofascore/season-events` | `sofascore-season-events` | SofaScore season fixtures and results | +| `GET` | `/sofascore/sports` | `sofascore-sports` | SofaScore supported sports | +| `GET` | `/sofascore/stage` | `sofascore-stage` | SofaScore motorsport and cycling stage | +| `GET` | `/sofascore/stage-categories` | `sofascore-stage-categories` | SofaScore motorsport and cycling categories and competitions | +| `GET` | `/sofascore/stage-driver-performance` | `sofascore-stage-driver-performance` | SofaScore motorsport race progress per driver | +| `GET` | `/sofascore/stage-featured` | `sofascore-stage-featured` | SofaScore featured motorsport and cycling events | +| `GET` | `/sofascore/stage-schedule` | `sofascore-stage-schedule` | SofaScore motorsport and cycling events around a date | +| `GET` | `/sofascore/stage-seasons` | `sofascore-stage-seasons` | SofaScore seasons of a motorsport or cycling competition | +| `GET` | `/sofascore/stage-standings` | `sofascore-stage-standings` | SofaScore motorsport and cycling stage standings | +| `GET` | `/sofascore/stage-substages` | `sofascore-stage-substages` | SofaScore children of a motorsport or cycling stage | +| `GET` | `/sofascore/standings` | `sofascore-standings` | SofaScore standings | +| `GET` | `/sofascore/team` | `sofascore-team` | SofaScore team detail | +| `GET` | `/sofascore/team-achievements` | `sofascore-team-achievements` | SofaScore team trophies | +| `GET` | `/sofascore/team-events` | `sofascore-team-events` | SofaScore team fixtures | +| `GET` | `/sofascore/team-goal-distributions` | `sofascore-team-goal-distributions` | SofaScore team goals by match minute | +| `GET` | `/sofascore/team-near-events` | `sofascore-team-near-events` | SofaScore team previous and next match | +| `GET` | `/sofascore/team-of-the-week` | `sofascore-team-of-the-week` | SofaScore team of the week | +| `GET` | `/sofascore/team-of-the-week-periods` | `sofascore-team-of-the-week-periods` | SofaScore team of the week periods | +| `GET` | `/sofascore/team-performance` | `sofascore-team-performance` | SofaScore team recent performance | +| `GET` | `/sofascore/team-player-statistics` | `sofascore-team-player-statistics` | SofaScore team player statistics | +| `GET` | `/sofascore/team-player-statistics-seasons` | `sofascore-team-player-statistics-seasons` | SofaScore team player statistics seasons | +| `GET` | `/sofascore/team-players` | `sofascore-team-players` | SofaScore team players | +| `GET` | `/sofascore/team-rankings` | `sofascore-team-rankings` | SofaScore team rankings | +| `GET` | `/sofascore/team-season-statistics` | `sofascore-team-season-statistics` | SofaScore team season statistics | +| `GET` | `/sofascore/team-statistics-seasons` | `sofascore-team-statistics-seasons` | SofaScore team statistics seasons | +| `GET` | `/sofascore/team-top-players` | `sofascore-team-top-players` | SofaScore team top players | +| `GET` | `/sofascore/team-tournaments` | `sofascore-team-tournaments` | SofaScore team competitions | +| `GET` | `/sofascore/team-transfers` | `sofascore-team-transfers` | SofaScore team transfers | +| `GET` | `/sofascore/tennis-player-grand-slam-results` | `sofascore-tennis-player-grand-slam-results` | SofaScore tennis player grand slam results | +| `GET` | `/sofascore/tournament-cuptree` | `sofascore-tournament-cuptree` | SofaScore competition knockout tree | +| `GET` | `/sofascore/tournament-info` | `sofascore-tournament-info` | SofaScore competition info | +| `GET` | `/sofascore/tournament-player-of-the-season` | `sofascore-tournament-player-of-the-season` | SofaScore player of the season | +| `GET` | `/sofascore/tournament-player-statistics` | `sofascore-tournament-player-statistics` | SofaScore season player statistics table | +| `GET` | `/sofascore/tournament-rounds` | `sofascore-tournament-rounds` | SofaScore competition season rounds | +| `GET` | `/sofascore/tournament-seasons` | `sofascore-tournament-seasons` | SofaScore competition seasons | +| `GET` | `/sofascore/tournament-statistics-info` | `sofascore-tournament-statistics-info` | SofaScore player statistics table filters | +| `GET` | `/sofascore/tournament-team-of-the-season` | `sofascore-tournament-team-of-the-season` | SofaScore team of the season | +| `GET` | `/sofascore/tournament-teams` | `sofascore-tournament-teams` | SofaScore teams of a competition season | +| `GET` | `/sofascore/tournament-top-players` | `sofascore-tournament-top-players` | SofaScore season top players | +| `GET` | `/sofascore/tournament-top-teams` | `sofascore-tournament-top-teams` | SofaScore season top teams | +| `GET` | `/sofascore/tournament-venues` | `sofascore-tournament-venues` | SofaScore venues of a competition season | +| `GET` | `/sofascore/tournament-winners` | `sofascore-tournament-winners` | SofaScore past winners of a competition | +| `GET` | `/sofascore/tournaments-with-feature` | `sofascore-tournaments-with-feature` | SofaScore competitions that carry a feature | +| `GET` | `/sofascore/trending-events` | `sofascore-trending-events` | SofaScore trending events | +| `GET` | `/sofascore/trending-players` | `sofascore-trending-players` | SofaScore trending players | +| `GET` | `/sofascore/venue` | `sofascore-venue` | SofaScore venue | +| `GET` | `/sofascore/venue-events` | `sofascore-venue-events` | SofaScore matches at a venue | + ## Configuration Pass your key through `api_key` or read `CRAWLORA_API_KEY` from the environment. diff --git a/python/crawlora_sofascore/__init__.py b/python/crawlora_sofascore/__init__.py index ccb284e..3ef2331 100644 --- a/python/crawlora_sofascore/__init__.py +++ b/python/crawlora_sofascore/__init__.py @@ -6,7 +6,7 @@ Client = SofascoreClient AsyncClient = AsyncSofascoreClient -__version__ = '0.3.4' +__version__ = '0.3.5' DISPLAY_NAME = 'SofaScore' PLATFORM = 'sofascore' CONTRACT_REVISION = 'sha256:645115670262bb86bf9c49f16ddbfdd94bbec67befb2aa8497f10f86ee2d5e46' diff --git a/python/crawlora_sofascore/platform.py b/python/crawlora_sofascore/platform.py index 3bc7a9f..2530015 100644 --- a/python/crawlora_sofascore/platform.py +++ b/python/crawlora_sofascore/platform.py @@ -7,7 +7,7 @@ class SofascoreClient(CrawloraClient): """Synchronous SofaScore API client.""" def __init__(self, *args: Any, **kwargs: Any) -> None: - kwargs.setdefault('user_agent', 'crawlora-sofascore-python/0.3.4') + kwargs.setdefault('user_agent', 'crawlora-sofascore-python/0.3.5') super().__init__(*args, **kwargs) def categories(self, **params: Any) -> Any: @@ -667,7 +667,7 @@ def venue_events(self, **params: Any) -> Any: class AsyncSofascoreClient(AsyncCrawloraClient): """Asynchronous SofaScore API client.""" def __init__(self, *args: Any, **kwargs: Any) -> None: - kwargs.setdefault('user_agent', 'crawlora-sofascore-python/0.3.4') + kwargs.setdefault('user_agent', 'crawlora-sofascore-python/0.3.5') super().__init__(*args, **kwargs) async def categories(self, **params: Any) -> Any: diff --git a/python/pyproject.toml b/python/pyproject.toml index bbb316d..8f84096 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -4,9 +4,10 @@ build-backend = "setuptools.build_meta" [project] name = "crawlora-sofascore" -version = "0.3.4" -description = "Typed SofaScore client for the Crawlora hosted API" +version = "0.3.5" +description = "Crawlora SofaScore API client with 109 endpoints for live events, match details, lineups, statistics, tournaments, and player/team data" readme = "README.md" +keywords = ["crawlora", "api-client", "sdk", "web-scraping", "scraping-api", "sofascore", "sofascore-api", "sofascore-scraper", "sofascore-data", "sofascore-live-events", "sofascore-match-details", "sofascore-lineups", "sofascore-statistics", "sofascore-tournaments", "sofascore-player-team-data"] requires-python = ">=3.10" license = "MIT" license-files = ["LICENSE"] diff --git a/python/tests/test_package.py b/python/tests/test_package.py index 80d73f3..f566dca 100644 --- a/python/tests/test_package.py +++ b/python/tests/test_package.py @@ -28,7 +28,7 @@ def __call__(self, request, _timeout): class PackageTests(unittest.TestCase): def test_platform_metadata_and_aliases(self): self.assertEqual(client_package.PLATFORM, "sofascore") - self.assertEqual(client_package.__version__, "0.3.4") + self.assertEqual(client_package.__version__, "0.3.5") self.assertIs(client_package.Client, client_package.SofascoreClient) self.assertIs(client_package.AsyncClient, client_package.AsyncSofascoreClient) self.assertEqual(client_package.OPERATION_COUNT, len(client_package.OPERATION_IDS)) diff --git a/ruby/CHANGELOG.md b/ruby/CHANGELOG.md index 1264c63..141695c 100644 --- a/ruby/CHANGELOG.md +++ b/ruby/CHANGELOG.md @@ -1,5 +1,5 @@ # Changelog -## 0.3.4 +## 0.3.5 - Initial focused SofaScore Ruby client for Crawlora's hosted API. diff --git a/ruby/README.md b/ruby/README.md index c1d8469..6d8b5be 100644 --- a/ruby/README.md +++ b/ruby/README.md @@ -1,6 +1,6 @@ -# Crawlora SofaScore Ruby client +# Crawlora SofaScore API client for Ruby (`crawlora-sofascore`) -This gem calls the Crawlora hosted API at `https://api.crawlora.net/api/v1`. It does not call or scrape SofaScore directly. Requests require your Crawlora API key and use your account's service plan. +This Ruby gem calls Crawlora's hosted SofaScore API at `https://api.crawlora.net/api/v1`. It exposes 109 endpoints covering live events, match details, lineups, statistics, tournaments, and player/team data; it does not call or scrape SofaScore directly. Requests require your Crawlora API key and use your account's service plan. ## Install @@ -30,4 +30,120 @@ client.close Client options include `api_key`, `base_url`, and `timeout`. Ruby stdlib provides the HTTP and JSON support. +## Supported SofaScore API endpoints + +Browse every route included in this gem. The [endpoint reference](https://github.com/Crawlora-org/crawlora-sofascore/blob/main/docs/usage.md) includes parameter and response details. + +| Method | Endpoint | API operation | Description | +| --- | --- | --- | --- | +| `GET` | `/sofascore/categories` | `sofascore-categories` | SofaScore categories for a sport | +| `GET` | `/sofascore/category-tournaments` | `sofascore-category-tournaments` | SofaScore competitions in a category | +| `GET` | `/sofascore/draft` | `sofascore-draft` | SofaScore league draft | +| `GET` | `/sofascore/draft-picks` | `sofascore-draft-picks` | SofaScore league draft picks | +| `GET` | `/sofascore/esports-game` | `sofascore-esports-game` | SofaScore esports game detail | +| `GET` | `/sofascore/event` | `sofascore-event` | SofaScore event detail | +| `GET` | `/sofascore/event-at-bat-pitches` | `sofascore-event-at-bat-pitches` | SofaScore event at-bat pitches | +| `GET` | `/sofascore/event-at-bats` | `sofascore-event-at-bats` | SofaScore event at-bats | +| `GET` | `/sofascore/event-average-positions` | `sofascore-event-average-positions` | SofaScore event average positions | +| `GET` | `/sofascore/event-baseball-top-performers` | `sofascore-event-baseball-top-performers` | SofaScore event baseball top performers | +| `GET` | `/sofascore/event-best-players` | `sofascore-event-best-players` | SofaScore event best players | +| `GET` | `/sofascore/event-comments` | `sofascore-event-comments` | SofaScore event commentary | +| `GET` | `/sofascore/event-esports-games` | `sofascore-event-esports-games` | SofaScore event esports games | +| `GET` | `/sofascore/event-graph` | `sofascore-event-graph` | SofaScore event momentum graph | +| `GET` | `/sofascore/event-h2h` | `sofascore-event-h2h` | SofaScore event head-to-head | +| `GET` | `/sofascore/event-highlights` | `sofascore-event-highlights` | SofaScore event highlights | +| `GET` | `/sofascore/event-incidents` | `sofascore-event-incidents` | SofaScore event incidents | +| `GET` | `/sofascore/event-innings` | `sofascore-event-innings` | SofaScore event innings | +| `GET` | `/sofascore/event-lineups` | `sofascore-event-lineups` | SofaScore event lineups | +| `GET` | `/sofascore/event-managers` | `sofascore-event-managers` | SofaScore event managers | +| `GET` | `/sofascore/event-odds` | `sofascore-event-odds` | SofaScore event odds | +| `GET` | `/sofascore/event-player-heatmap` | `sofascore-event-player-heatmap` | SofaScore event player heatmap | +| `GET` | `/sofascore/event-player-statistics` | `sofascore-event-player-statistics` | SofaScore event player statistics | +| `GET` | `/sofascore/event-point-by-point` | `sofascore-event-point-by-point` | SofaScore event point-by-point | +| `GET` | `/sofascore/event-pregame-form` | `sofascore-event-pregame-form` | SofaScore event pre-game form | +| `GET` | `/sofascore/event-shotmap` | `sofascore-event-shotmap` | SofaScore event shot map | +| `GET` | `/sofascore/event-statistics` | `sofascore-event-statistics` | SofaScore event statistics | +| `GET` | `/sofascore/event-team-heatmap` | `sofascore-event-team-heatmap` | SofaScore event team heatmap | +| `GET` | `/sofascore/event-team-streaks` | `sofascore-event-team-streaks` | SofaScore event team streaks | +| `GET` | `/sofascore/event-tennis-power` | `sofascore-event-tennis-power` | SofaScore event tennis power | +| `GET` | `/sofascore/event-tv-channels` | `sofascore-event-tv-channels` | SofaScore event TV channels | +| `GET` | `/sofascore/event-votes` | `sofascore-event-votes` | SofaScore event votes | +| `GET` | `/sofascore/live-events` | `sofascore-live-events` | SofaScore live events | +| `GET` | `/sofascore/manager` | `sofascore-manager` | SofaScore manager detail | +| `GET` | `/sofascore/manager-events` | `sofascore-manager-events` | SofaScore manager recent matches | +| `GET` | `/sofascore/mma-card` | `sofascore-mma-card` | SofaScore MMA card | +| `GET` | `/sofascore/mma-schedule` | `sofascore-mma-schedule` | SofaScore MMA schedule | +| `GET` | `/sofascore/odds-dropping` | `sofascore-odds-dropping` | SofaScore dropping odds | +| `GET` | `/sofascore/odds-winning` | `sofascore-odds-winning` | SofaScore winning odds | +| `GET` | `/sofascore/player` | `sofascore-player` | SofaScore player detail | +| `GET` | `/sofascore/player-attributes` | `sofascore-player-attributes` | SofaScore player attributes and characteristics | +| `GET` | `/sofascore/player-events` | `sofascore-player-events` | SofaScore player matches with per-match numbers | +| `GET` | `/sofascore/player-last-year-summary` | `sofascore-player-last-year-summary` | SofaScore player form over the last year | +| `GET` | `/sofascore/player-national-team-statistics` | `sofascore-player-national-team-statistics` | SofaScore player national team record | +| `GET` | `/sofascore/player-penalty-history` | `sofascore-player-penalty-history` | SofaScore player penalty history | +| `GET` | `/sofascore/player-ratings` | `sofascore-player-ratings` | SofaScore player match ratings for a season | +| `GET` | `/sofascore/player-season-heatmap` | `sofascore-player-season-heatmap` | SofaScore player season heatmap | +| `GET` | `/sofascore/player-season-statistics` | `sofascore-player-season-statistics` | SofaScore player season statistics | +| `GET` | `/sofascore/player-statistical-rankings` | `sofascore-player-statistical-rankings` | SofaScore player ranking among all players in a season | +| `GET` | `/sofascore/player-statistics-seasons` | `sofascore-player-statistics-seasons` | SofaScore player statistics seasons | +| `GET` | `/sofascore/player-tournaments` | `sofascore-player-tournaments` | SofaScore player competitions | +| `GET` | `/sofascore/player-transfers` | `sofascore-player-transfers` | SofaScore player transfer history | +| `GET` | `/sofascore/ranking-types` | `sofascore-ranking-types` | SofaScore ranking catalogue | +| `GET` | `/sofascore/rankings` | `sofascore-rankings` | SofaScore rankings | +| `GET` | `/sofascore/referee` | `sofascore-referee` | SofaScore referee profile | +| `GET` | `/sofascore/referee-events` | `sofascore-referee-events` | SofaScore referee officiated matches | +| `GET` | `/sofascore/referee-statistics` | `sofascore-referee-statistics` | SofaScore referee card statistics | +| `GET` | `/sofascore/round-events` | `sofascore-round-events` | SofaScore round fixtures | +| `GET` | `/sofascore/scheduled-events` | `sofascore-scheduled-events` | SofaScore events scheduled in a category on a date | +| `GET` | `/sofascore/scheduled-tournaments` | `sofascore-scheduled-tournaments` | SofaScore tournaments scheduled on a date | +| `GET` | `/sofascore/search` | `sofascore-search` | SofaScore universal search | +| `GET` | `/sofascore/search-typed` | `sofascore-search-typed` | SofaScore search by entity type | +| `GET` | `/sofascore/season-events` | `sofascore-season-events` | SofaScore season fixtures and results | +| `GET` | `/sofascore/sports` | `sofascore-sports` | SofaScore supported sports | +| `GET` | `/sofascore/stage` | `sofascore-stage` | SofaScore motorsport and cycling stage | +| `GET` | `/sofascore/stage-categories` | `sofascore-stage-categories` | SofaScore motorsport and cycling categories and competitions | +| `GET` | `/sofascore/stage-driver-performance` | `sofascore-stage-driver-performance` | SofaScore motorsport race progress per driver | +| `GET` | `/sofascore/stage-featured` | `sofascore-stage-featured` | SofaScore featured motorsport and cycling events | +| `GET` | `/sofascore/stage-schedule` | `sofascore-stage-schedule` | SofaScore motorsport and cycling events around a date | +| `GET` | `/sofascore/stage-seasons` | `sofascore-stage-seasons` | SofaScore seasons of a motorsport or cycling competition | +| `GET` | `/sofascore/stage-standings` | `sofascore-stage-standings` | SofaScore motorsport and cycling stage standings | +| `GET` | `/sofascore/stage-substages` | `sofascore-stage-substages` | SofaScore children of a motorsport or cycling stage | +| `GET` | `/sofascore/standings` | `sofascore-standings` | SofaScore standings | +| `GET` | `/sofascore/team` | `sofascore-team` | SofaScore team detail | +| `GET` | `/sofascore/team-achievements` | `sofascore-team-achievements` | SofaScore team trophies | +| `GET` | `/sofascore/team-events` | `sofascore-team-events` | SofaScore team fixtures | +| `GET` | `/sofascore/team-goal-distributions` | `sofascore-team-goal-distributions` | SofaScore team goals by match minute | +| `GET` | `/sofascore/team-near-events` | `sofascore-team-near-events` | SofaScore team previous and next match | +| `GET` | `/sofascore/team-of-the-week` | `sofascore-team-of-the-week` | SofaScore team of the week | +| `GET` | `/sofascore/team-of-the-week-periods` | `sofascore-team-of-the-week-periods` | SofaScore team of the week periods | +| `GET` | `/sofascore/team-performance` | `sofascore-team-performance` | SofaScore team recent performance | +| `GET` | `/sofascore/team-player-statistics` | `sofascore-team-player-statistics` | SofaScore team player statistics | +| `GET` | `/sofascore/team-player-statistics-seasons` | `sofascore-team-player-statistics-seasons` | SofaScore team player statistics seasons | +| `GET` | `/sofascore/team-players` | `sofascore-team-players` | SofaScore team players | +| `GET` | `/sofascore/team-rankings` | `sofascore-team-rankings` | SofaScore team rankings | +| `GET` | `/sofascore/team-season-statistics` | `sofascore-team-season-statistics` | SofaScore team season statistics | +| `GET` | `/sofascore/team-statistics-seasons` | `sofascore-team-statistics-seasons` | SofaScore team statistics seasons | +| `GET` | `/sofascore/team-top-players` | `sofascore-team-top-players` | SofaScore team top players | +| `GET` | `/sofascore/team-tournaments` | `sofascore-team-tournaments` | SofaScore team competitions | +| `GET` | `/sofascore/team-transfers` | `sofascore-team-transfers` | SofaScore team transfers | +| `GET` | `/sofascore/tennis-player-grand-slam-results` | `sofascore-tennis-player-grand-slam-results` | SofaScore tennis player grand slam results | +| `GET` | `/sofascore/tournament-cuptree` | `sofascore-tournament-cuptree` | SofaScore competition knockout tree | +| `GET` | `/sofascore/tournament-info` | `sofascore-tournament-info` | SofaScore competition info | +| `GET` | `/sofascore/tournament-player-of-the-season` | `sofascore-tournament-player-of-the-season` | SofaScore player of the season | +| `GET` | `/sofascore/tournament-player-statistics` | `sofascore-tournament-player-statistics` | SofaScore season player statistics table | +| `GET` | `/sofascore/tournament-rounds` | `sofascore-tournament-rounds` | SofaScore competition season rounds | +| `GET` | `/sofascore/tournament-seasons` | `sofascore-tournament-seasons` | SofaScore competition seasons | +| `GET` | `/sofascore/tournament-statistics-info` | `sofascore-tournament-statistics-info` | SofaScore player statistics table filters | +| `GET` | `/sofascore/tournament-team-of-the-season` | `sofascore-tournament-team-of-the-season` | SofaScore team of the season | +| `GET` | `/sofascore/tournament-teams` | `sofascore-tournament-teams` | SofaScore teams of a competition season | +| `GET` | `/sofascore/tournament-top-players` | `sofascore-tournament-top-players` | SofaScore season top players | +| `GET` | `/sofascore/tournament-top-teams` | `sofascore-tournament-top-teams` | SofaScore season top teams | +| `GET` | `/sofascore/tournament-venues` | `sofascore-tournament-venues` | SofaScore venues of a competition season | +| `GET` | `/sofascore/tournament-winners` | `sofascore-tournament-winners` | SofaScore past winners of a competition | +| `GET` | `/sofascore/tournaments-with-feature` | `sofascore-tournaments-with-feature` | SofaScore competitions that carry a feature | +| `GET` | `/sofascore/trending-events` | `sofascore-trending-events` | SofaScore trending events | +| `GET` | `/sofascore/trending-players` | `sofascore-trending-players` | SofaScore trending players | +| `GET` | `/sofascore/venue` | `sofascore-venue` | SofaScore venue | +| `GET` | `/sofascore/venue-events` | `sofascore-venue-events` | SofaScore matches at a venue | + See [Crawlora](https://crawlora.net/?utm_source=rubygems&utm_medium=referral&utm_campaign=platform-clients&utm_content=sofascore-ruby-homepage), the [API documentation](https://crawlora.net/docs?utm_source=rubygems&utm_medium=referral&utm_campaign=platform-clients&utm_content=sofascore-ruby-api-docs), and [the package repository](https://github.com/Crawlora-org/crawlora-sofascore) for account setup, the API operation reference, and release history. diff --git a/ruby/crawlora-sofascore.gemspec b/ruby/crawlora-sofascore.gemspec index b04452a..7aa7172 100644 --- a/ruby/crawlora-sofascore.gemspec +++ b/ruby/crawlora-sofascore.gemspec @@ -3,8 +3,8 @@ require_relative "lib/crawlora/sofascore/version" Gem::Specification.new do |spec| spec.name = "crawlora-sofascore" spec.version = Crawlora::Sofascore::VERSION - spec.summary = "SofaScore client for the Crawlora hosted API" - spec.description = "Credential-free SofaScore API access through Crawlora's hosted service." + spec.summary = "SofaScore API client for Crawlora (109 endpoints)" + spec.description = "Ruby client for Crawlora's hosted SofaScore API. Covers live events, match details, lineups, statistics, tournaments, and player/team data across 109 endpoints." spec.authors = ["Crawlora"] spec.license = "MIT" spec.required_ruby_version = ">= 2.6" diff --git a/ruby/lib/crawlora/sofascore/client.rb b/ruby/lib/crawlora/sofascore/client.rb index 0c964cc..c5831c0 100644 --- a/ruby/lib/crawlora/sofascore/client.rb +++ b/ruby/lib/crawlora/sofascore/client.rb @@ -19,7 +19,7 @@ class NetworkError < Error; end end OPERATIONS = JSON.parse(<<~'JSON').freeze - {"sofascore-categories": {"id": "sofascore-categories", "method": "GET", "params": [{"description": "Sport key", "enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "football"}], "path": "/sofascore/categories", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-category-tournaments": {"id": "sofascore-category-tournaments", "method": "GET", "params": [{"description": "Numeric SofaScore category id from the categories endpoint", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "1"}], "path": "/sofascore/category-tournaments", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-draft": {"id": "sofascore-draft", "method": "GET", "params": [{"description": "League whose draft to return", "enum": ["nba", "nfl"], "in": "query", "name": "league", "required": true, "type": "string", "x-example": "nba"}, {"description": "Numeric SofaScore season id of the league", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "80229"}], "path": "/sofascore/draft", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["nba", "nfl"], "in": "query", "name": "league", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-draft-picks": {"id": "sofascore-draft-picks", "method": "GET", "params": [{"description": "League whose draft to return", "enum": ["nba", "nfl"], "in": "query", "name": "league", "required": true, "type": "string", "x-example": "nba"}, {"description": "Four-digit draft year", "in": "query", "name": "year", "required": true, "type": "string", "x-example": "2025"}, {"description": "Draft round: 1 to 2 for nba, 1 to 7 for nfl", "in": "query", "maximum": 7, "minimum": 1, "name": "round", "required": true, "type": "integer", "x-example": 1}], "path": "/sofascore/draft-picks", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["nba", "nfl"], "in": "query", "name": "league", "required": true, "type": "string"}, {"in": "query", "name": "year", "required": true, "type": "string"}, {"in": "query", "name": "round", "required": true, "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-esports-game": {"id": "sofascore-esports-game", "method": "GET", "params": [{"description": "Numeric SofaScore esports game id from sofascore-event-esports-games", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "588883"}, {"description": "Which resource of the game to return", "enum": ["statistics", "lineups", "bans", "rounds"], "in": "query", "name": "part", "required": true, "type": "string", "x-example": "lineups"}], "path": "/sofascore/esports-game", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"enum": ["statistics", "lineups", "bans", "rounds"], "in": "query", "name": "part", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event": {"id": "sofascore-event", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-at-bat-pitches": {"id": "sofascore-event-at-bat-pitches", "method": "GET", "params": [{"description": "Numeric SofaScore baseball event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17199139"}, {"description": "Numeric at-bat id from sofascore-event-at-bats for the same event", "in": "query", "name": "at_bat_id", "required": true, "type": "string", "x-example": "2595879"}], "path": "/sofascore/event-at-bat-pitches", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "at_bat_id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-at-bats": {"id": "sofascore-event-at-bats", "method": "GET", "params": [{"description": "Numeric SofaScore baseball event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17199139"}], "path": "/sofascore/event-at-bats", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-average-positions": {"id": "sofascore-event-average-positions", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-average-positions", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-baseball-top-performers": {"id": "sofascore-event-baseball-top-performers", "method": "GET", "params": [{"description": "Numeric SofaScore baseball event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17199139"}], "path": "/sofascore/event-baseball-top-performers", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-best-players": {"id": "sofascore-event-best-players", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-best-players", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-comments": {"id": "sofascore-event-comments", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-comments", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-esports-games": {"id": "sofascore-event-esports-games", "method": "GET", "params": [{"description": "Numeric SofaScore esports event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17260338"}], "path": "/sofascore/event-esports-games", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-graph": {"id": "sofascore-event-graph", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-graph", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-h2h": {"id": "sofascore-event-h2h", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event-h2h", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-highlights": {"id": "sofascore-event-highlights", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-highlights", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-incidents": {"id": "sofascore-event-incidents", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event-incidents", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-innings": {"id": "sofascore-event-innings", "method": "GET", "params": [{"description": "Numeric SofaScore cricket event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16253632"}], "path": "/sofascore/event-innings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-lineups": {"id": "sofascore-event-lineups", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event-lineups", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-managers": {"id": "sofascore-event-managers", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-managers", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-odds": {"id": "sofascore-event-odds", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event-odds", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-player-heatmap": {"id": "sofascore-event-player-heatmap", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}, {"description": "Numeric SofaScore player id that played in the match", "in": "query", "name": "player_id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/event-player-heatmap", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "player_id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-player-statistics": {"id": "sofascore-event-player-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}, {"description": "Numeric SofaScore player id that took part in the match", "in": "query", "name": "player_id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/event-player-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "player_id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-point-by-point": {"id": "sofascore-event-point-by-point", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17257382"}], "path": "/sofascore/event-point-by-point", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-pregame-form": {"id": "sofascore-event-pregame-form", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-pregame-form", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-shotmap": {"id": "sofascore-event-shotmap", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-shotmap", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-statistics": {"id": "sofascore-event-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-team-heatmap": {"id": "sofascore-event-team-heatmap", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}, {"description": "Numeric SofaScore team id of the home or away side", "in": "query", "name": "team_id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/event-team-heatmap", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "team_id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-team-streaks": {"id": "sofascore-event-team-streaks", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-team-streaks", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-tennis-power": {"id": "sofascore-event-tennis-power", "method": "GET", "params": [{"description": "Numeric SofaScore tennis event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17257382"}], "path": "/sofascore/event-tennis-power", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-tv-channels": {"id": "sofascore-event-tv-channels", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}, {"description": "Two-letter ISO 3166-1 alpha-2 country code. Omit to list the broadcasting countries only", "in": "query", "name": "country", "type": "string", "x-example": "GB"}], "path": "/sofascore/event-tv-channels", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "country", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-votes": {"id": "sofascore-event-votes", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-votes", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-live-events": {"id": "sofascore-live-events", "method": "GET", "params": [{"description": "Sport key", "enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "football"}], "path": "/sofascore/live-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-manager": {"id": "sofascore-manager", "method": "GET", "params": [{"description": "Numeric SofaScore manager id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "794873"}], "path": "/sofascore/manager", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-manager-events": {"id": "sofascore-manager-events", "method": "GET", "params": [{"description": "Numeric SofaScore manager id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "794873"}, {"description": "Zero-based page number", "in": "query", "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/manager-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-mma-card": {"id": "sofascore-mma-card", "method": "GET", "params": [{"description": "Numeric SofaScore MMA organisation id", "in": "query", "name": "org_id", "required": true, "type": "string", "x-example": "19906"}, {"description": "Numeric card id (card_id) from sofascore-mma-schedule", "in": "query", "name": "card_id", "required": true, "type": "string", "x-example": "197311"}, {"description": "Which segment of the card to return", "enum": ["all", "maincard", "prelims", "earlyprelims"], "in": "query", "name": "part", "required": true, "type": "string", "x-example": "all"}], "path": "/sofascore/mma-card", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "org_id", "required": true, "type": "string"}, {"in": "query", "name": "card_id", "required": true, "type": "string"}, {"enum": ["all", "maincard", "prelims", "earlyprelims"], "in": "query", "name": "part", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-mma-schedule": {"id": "sofascore-mma-schedule", "method": "GET", "params": [{"description": "Numeric SofaScore MMA organisation id", "in": "query", "name": "org_id", "required": true, "type": "string", "x-example": "19906"}, {"description": "Calendar month as YYYY-MM", "in": "query", "name": "month", "required": true, "type": "string", "x-example": "2026-10"}], "path": "/sofascore/mma-schedule", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "org_id", "required": true, "type": "string"}, {"in": "query", "name": "month", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-odds-dropping": {"id": "sofascore-odds-dropping", "method": "GET", "params": [{"description": "Sport key, or all for every sport. Defaults to all", "enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string", "x-example": "football"}], "path": "/sofascore/odds-dropping", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-odds-winning": {"id": "sofascore-odds-winning", "method": "GET", "params": [{"description": "Sport key, or all for every sport. Defaults to all", "enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string", "x-example": "football"}], "path": "/sofascore/odds-winning", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player": {"id": "sofascore-player", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "855833"}], "path": "/sofascore/player", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-attributes": {"id": "sofascore-player-attributes", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-attributes", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-events": {"id": "sofascore-player-events", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/player-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-player-last-year-summary": {"id": "sofascore-player-last-year-summary", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-last-year-summary", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-national-team-statistics": {"id": "sofascore-player-national-team-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-national-team-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-penalty-history": {"id": "sofascore-player-penalty-history", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-penalty-history", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-ratings": {"id": "sofascore-player-ratings", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}, {"description": "Numeric SofaScore unique-tournament (competition) id from player-statistics-seasons", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id from player-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}, {"default": "overall", "description": "Statistics view", "enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "path": "/sofascore/player-ratings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-season-heatmap": {"id": "sofascore-player-season-heatmap", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}, {"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}], "path": "/sofascore/player-season-heatmap", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-season-statistics": {"id": "sofascore-player-season-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}, {"description": "Numeric SofaScore unique-tournament (competition) id from player-statistics-seasons", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id from player-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"default": "overall", "description": "Statistics view", "enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "path": "/sofascore/player-season-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-statistical-rankings": {"id": "sofascore-player-statistical-rankings", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}, {"description": "Numeric SofaScore season id from player-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"default": "overall", "description": "Statistics view", "enum": ["overall"], "in": "query", "name": "type", "type": "string"}], "path": "/sofascore/player-statistical-rankings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall"], "in": "query", "name": "type", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-statistics-seasons": {"id": "sofascore-player-statistics-seasons", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-statistics-seasons", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-tournaments": {"id": "sofascore-player-tournaments", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-tournaments", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-transfers": {"id": "sofascore-player-transfers", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-transfers", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-ranking-types": {"id": "sofascore-ranking-types", "method": "GET", "params": [], "path": "/sofascore/ranking-types", "pathParams": [], "produces": ["application/json"], "queryParams": [], "security": ["ApiKeyAuth"]}, "sofascore-rankings": {"id": "sofascore-rankings", "method": "GET", "params": [{"description": "Ranking id from sofascore-ranking-types", "enum": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 34, 35, 36, 37, 40, 41, 42, 43, 44, 45, 46], "in": "query", "name": "type", "required": true, "type": "integer", "x-example": 5}, {"description": "Return only the first N rows, 1 to 500. Omit to return every row", "in": "query", "maximum": 500, "minimum": 1, "name": "limit", "type": "integer", "x-example": 10}], "path": "/sofascore/rankings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "34", "35", "36", "37", "40", "41", "42", "43", "44", "45", "46"], "in": "query", "name": "type", "required": true, "type": "integer"}, {"in": "query", "name": "limit", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-referee": {"id": "sofascore-referee", "method": "GET", "params": [{"description": "Numeric SofaScore referee id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "74264"}], "path": "/sofascore/referee", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-referee-events": {"id": "sofascore-referee-events", "method": "GET", "params": [{"description": "Numeric SofaScore referee id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "74264"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/referee-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-referee-statistics": {"id": "sofascore-referee-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore referee id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "74264"}], "path": "/sofascore/referee-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-round-events": {"id": "sofascore-round-events", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}, {"description": "Round number", "in": "query", "name": "round", "required": true, "type": "integer", "x-example": 1}, {"description": "Round slug from tournament-rounds, for example round-of-16; required for knockout and named cup rounds", "in": "query", "name": "slug", "type": "string", "x-example": "round-of-16"}, {"description": "Round prefix from tournament-rounds, for example Qualification; only valid together with slug", "in": "query", "name": "prefix", "type": "string", "x-example": "Qualification"}], "path": "/sofascore/round-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"in": "query", "name": "round", "required": true, "type": "integer"}, {"in": "query", "name": "slug", "type": "string"}, {"in": "query", "name": "prefix", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-scheduled-events": {"id": "sofascore-scheduled-events", "method": "GET", "params": [{"description": "Numeric SofaScore category id from the categories endpoint", "in": "query", "name": "category_id", "required": true, "type": "string", "x-example": "13"}, {"description": "UTC calendar date, YYYY-MM-DD", "in": "query", "name": "date", "required": true, "type": "string", "x-example": "2026-10-08"}], "path": "/sofascore/scheduled-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "category_id", "required": true, "type": "string"}, {"in": "query", "name": "date", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-scheduled-tournaments": {"id": "sofascore-scheduled-tournaments", "method": "GET", "params": [{"description": "Sport key", "enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "football"}, {"description": "UTC calendar date, YYYY-MM-DD", "in": "query", "name": "date", "required": true, "type": "string", "x-example": "2026-10-08"}, {"description": "One-based page number; defaults to 1", "in": "query", "maximum": 100, "minimum": 1, "name": "page", "type": "integer", "x-example": 1}], "path": "/sofascore/scheduled-tournaments", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string"}, {"in": "query", "name": "date", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-search": {"id": "sofascore-search", "method": "GET", "params": [{"description": "Free-text search query", "in": "query", "name": "q", "required": true, "type": "string", "x-example": "barcelona"}], "path": "/sofascore/search", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "q", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-search-typed": {"id": "sofascore-search-typed", "method": "GET", "params": [{"description": "Entity type to search", "enum": ["events", "teams", "players", "managers", "referees", "venues", "unique_tournaments"], "in": "query", "name": "type", "required": true, "type": "string", "x-example": "teams"}, {"description": "Search text, up to 128 characters", "in": "query", "name": "q", "required": true, "type": "string", "x-example": "arsenal"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}, {"description": "Restrict teams, players, managers or unique_tournaments to one sport", "enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string", "x-example": "football"}], "path": "/sofascore/search-typed", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["events", "teams", "players", "managers", "referees", "venues", "unique_tournaments"], "in": "query", "name": "type", "required": true, "type": "string"}, {"in": "query", "name": "q", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}, {"enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-season-events": {"id": "sofascore-season-events", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"description": "Upcoming fixtures or finished results", "enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string", "x-example": "last"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/season-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-sports": {"id": "sofascore-sports", "method": "GET", "params": [], "path": "/sofascore/sports", "pathParams": [], "produces": ["application/json"], "queryParams": [], "security": ["ApiKeyAuth"]}, "sofascore-stage": {"id": "sofascore-stage", "method": "GET", "params": [{"description": "Numeric SofaScore stage id from stage-schedule, stage-seasons or stage-substages", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "214258"}], "path": "/sofascore/stage", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-categories": {"id": "sofascore-stage-categories", "method": "GET", "params": [{"description": "Stage sport key", "enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "motorsport"}], "path": "/sofascore/stage-categories", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-driver-performance": {"id": "sofascore-stage-driver-performance", "method": "GET", "params": [{"description": "Numeric SofaScore stage id of a finished race, sprint or rally", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "214258"}], "path": "/sofascore/stage-driver-performance", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-featured": {"id": "sofascore-stage-featured", "method": "GET", "params": [{"description": "Stage sport key", "enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "motorsport"}], "path": "/sofascore/stage-featured", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-schedule": {"id": "sofascore-stage-schedule", "method": "GET", "params": [{"description": "Stage sport key", "enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "motorsport"}, {"description": "UTC calendar date, YYYY-MM-DD", "in": "query", "name": "date", "required": true, "type": "string", "x-example": "2026-10-04"}], "path": "/sofascore/stage-schedule", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string"}, {"in": "query", "name": "date", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-seasons": {"id": "sofascore-stage-seasons", "method": "GET", "params": [{"description": "Numeric SofaScore competition id from stage-categories", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "40"}], "path": "/sofascore/stage-seasons", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-standings": {"id": "sofascore-stage-standings", "method": "GET", "params": [{"description": "Numeric SofaScore stage id of a season, event, session or cycling stage", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "214258"}, {"description": "Classification kind", "enum": ["competitor", "team"], "in": "query", "name": "type", "required": true, "type": "string", "x-example": "competitor"}], "path": "/sofascore/stage-standings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"enum": ["competitor", "team"], "in": "query", "name": "type", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-substages": {"id": "sofascore-stage-substages", "method": "GET", "params": [{"description": "Numeric SofaScore stage id of a season or an event", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "214253"}], "path": "/sofascore/stage-substages", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-standings": {"id": "sofascore-standings", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}, {"description": "Standings variant", "enum": ["total", "home", "away"], "in": "query", "name": "type", "required": true, "type": "string", "x-example": "total"}], "path": "/sofascore/standings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["total", "home", "away"], "in": "query", "name": "type", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team": {"id": "sofascore-team", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "2817"}], "path": "/sofascore/team", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-achievements": {"id": "sofascore-team-achievements", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-achievements", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-events": {"id": "sofascore-team-events", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "2817"}, {"description": "Fixture direction", "enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string", "x-example": "next"}, {"description": "Zero-based page number", "in": "query", "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/team-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-team-goal-distributions": {"id": "sofascore-team-goal-distributions", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore unique-tournament (competition) id of a football competition", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}], "path": "/sofascore/team-goal-distributions", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-near-events": {"id": "sofascore-team-near-events", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-near-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-of-the-week": {"id": "sofascore-team-of-the-week", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"description": "Numeric period id from sofascore-team-of-the-week-periods", "in": "query", "name": "period", "required": true, "type": "string", "x-example": "29321"}], "path": "/sofascore/team-of-the-week", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"in": "query", "name": "period", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-of-the-week-periods": {"id": "sofascore-team-of-the-week-periods", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}], "path": "/sofascore/team-of-the-week-periods", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-performance": {"id": "sofascore-team-performance", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-performance", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-player-statistics": {"id": "sofascore-team-player-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore unique-tournament (competition) id from team-player-statistics-seasons", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id from team-player-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"default": "overall", "description": "Statistics view", "enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "path": "/sofascore/team-player-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-player-statistics-seasons": {"id": "sofascore-team-player-statistics-seasons", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-player-statistics-seasons", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-players": {"id": "sofascore-team-players", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "2817"}], "path": "/sofascore/team-players", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-rankings": {"id": "sofascore-team-rankings", "method": "GET", "params": [{"description": "Numeric SofaScore team id (a tennis player id for tennis)", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "112783"}], "path": "/sofascore/team-rankings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-season-statistics": {"id": "sofascore-team-season-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore unique-tournament (competition) id from team-statistics-seasons", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id from team-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"default": "overall", "description": "Statistics view", "enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "path": "/sofascore/team-season-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-statistics-seasons": {"id": "sofascore-team-statistics-seasons", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-statistics-seasons", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-top-players": {"id": "sofascore-team-top-players", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore unique-tournament (competition) id from team-player-statistics-seasons", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id from team-player-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"default": "overall", "description": "Statistics scope", "enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}, {"description": "Rows per category, 1 to 50. Omit to return every row", "in": "query", "maximum": 50, "minimum": 1, "name": "limit", "type": "integer", "x-example": 5}], "path": "/sofascore/team-top-players", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}, {"in": "query", "name": "limit", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-team-tournaments": {"id": "sofascore-team-tournaments", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"default": false, "description": "false returns current competitions, true returns every recorded competition", "in": "query", "name": "all", "type": "boolean"}], "path": "/sofascore/team-tournaments", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "all", "type": "boolean"}], "security": ["ApiKeyAuth"]}, "sofascore-team-transfers": {"id": "sofascore-team-transfers", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-transfers", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tennis-player-grand-slam-results": {"id": "sofascore-tennis-player-grand-slam-results", "method": "GET", "params": [{"description": "Numeric SofaScore team id of a tennis player", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14882"}], "path": "/sofascore/tennis-player-grand-slam-results", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-cuptree": {"id": "sofascore-tournament-cuptree", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id of a cup or playoff competition", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "7"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76953"}], "path": "/sofascore/tournament-cuptree", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-info": {"id": "sofascore-tournament-info", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id. Omit for competition metadata only", "in": "query", "name": "season", "type": "string", "x-example": "96668"}], "path": "/sofascore/tournament-info", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-player-of-the-season": {"id": "sofascore-tournament-player-of-the-season", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id of a finished season", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}], "path": "/sofascore/tournament-player-of-the-season", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-player-statistics": {"id": "sofascore-tournament-player-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id of a football competition", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"description": "Statistic to sort by. Defaults to rating", "enum": ["rating", "goals", "expectedGoals", "assists", "successfulDribbles", "tackles", "accuratePassesPercentage", "bigChancesMissed", "totalShots", "goalConversionPercentage", "interceptions", "clearances", "errorLeadToGoal", "outfielderBlocks", "bigChancesCreated", "accuratePasses", "keyPasses", "saves", "cleanSheet", "penaltySave", "savedShotsFromInsideTheBox", "runsOut"], "in": "query", "name": "order", "type": "string", "x-example": "goals"}, {"description": "Sort direction. Defaults to desc", "enum": ["desc", "asc"], "in": "query", "name": "direction", "type": "string", "x-example": "desc"}, {"description": "How statistics are accumulated. Defaults to total", "enum": ["total", "perGame", "per90"], "in": "query", "name": "accumulation", "type": "string", "x-example": "total"}, {"description": "Statistic columns returned. Defaults to summary", "enum": ["summary", "attack", "defence", "passing", "goalkeeper"], "in": "query", "name": "group", "type": "string", "x-example": "summary"}, {"description": "Rows per page, 1 to 100. Defaults to 20", "in": "query", "maximum": 100, "minimum": 1, "name": "limit", "type": "integer", "x-example": 20}, {"description": "Rows to skip. Defaults to 0", "in": "query", "minimum": 0, "name": "offset", "type": "integer", "x-example": 0}, {"collectionFormat": "csv", "description": "Team ids to keep, comma separated, up to 20 (ids from tournament-statistics-info or tournament-teams)", "in": "query", "items": {"type": "string"}, "name": "team", "type": "array", "x-example": "42"}, {"collectionFormat": "csv", "description": "Nationality codes to keep, comma separated, up to 20 (codes from tournament-statistics-info)", "in": "query", "items": {"type": "string"}, "name": "nationality", "type": "array", "x-example": "EN"}, {"collectionFormat": "csv", "description": "Position codes to keep, comma separated", "in": "query", "items": {"enum": ["G", "D", "M", "F"], "type": "string"}, "name": "position", "type": "array", "x-example": "F"}, {"description": "Keep players with at least this many appearances, 0 to 1000. Omit for no minimum", "in": "query", "maximum": 1000, "minimum": 0, "name": "min_appearances", "type": "integer", "x-example": 10}, {"description": "Keep players with at least this many minutes played, 0 to 100000. Omit for no minimum", "in": "query", "maximum": 100000, "minimum": 0, "name": "min_minutes", "type": "integer", "x-example": 900}], "path": "/sofascore/tournament-player-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["rating", "goals", "expectedGoals", "assists", "successfulDribbles", "tackles", "accuratePassesPercentage", "bigChancesMissed", "totalShots", "goalConversionPercentage", "interceptions", "clearances", "errorLeadToGoal", "outfielderBlocks", "bigChancesCreated", "accuratePasses", "keyPasses", "saves", "cleanSheet", "penaltySave", "savedShotsFromInsideTheBox", "runsOut"], "in": "query", "name": "order", "type": "string"}, {"enum": ["desc", "asc"], "in": "query", "name": "direction", "type": "string"}, {"enum": ["total", "perGame", "per90"], "in": "query", "name": "accumulation", "type": "string"}, {"enum": ["summary", "attack", "defence", "passing", "goalkeeper"], "in": "query", "name": "group", "type": "string"}, {"in": "query", "name": "limit", "type": "integer"}, {"in": "query", "name": "offset", "type": "integer"}, {"collectionFormat": "csv", "in": "query", "name": "team", "type": "array"}, {"collectionFormat": "csv", "in": "query", "name": "nationality", "type": "array"}, {"collectionFormat": "csv", "enum": ["G", "D", "M", "F"], "in": "query", "name": "position", "type": "array"}, {"in": "query", "name": "min_appearances", "type": "integer"}, {"in": "query", "name": "min_minutes", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-rounds": {"id": "sofascore-tournament-rounds", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "7"}, {"description": "Numeric SofaScore season id from tournament-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76953"}], "path": "/sofascore/tournament-rounds", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-seasons": {"id": "sofascore-tournament-seasons", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/tournament-seasons", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-statistics-info": {"id": "sofascore-tournament-statistics-info", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id of a football competition", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}], "path": "/sofascore/tournament-statistics-info", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-team-of-the-season": {"id": "sofascore-tournament-team-of-the-season", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id of a finished season", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}], "path": "/sofascore/tournament-team-of-the-season", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-teams": {"id": "sofascore-tournament-teams", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}], "path": "/sofascore/tournament-teams", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-top-players": {"id": "sofascore-tournament-top-players", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"description": "Statistics scope. Defaults to overall", "enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string", "x-example": "overall"}, {"description": "Rows per category, 1 to 50. Omit to return every row", "in": "query", "maximum": 50, "minimum": 1, "name": "limit", "type": "integer", "x-example": 5}], "path": "/sofascore/tournament-top-players", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}, {"in": "query", "name": "limit", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-top-teams": {"id": "sofascore-tournament-top-teams", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"description": "Statistics scope. Defaults to overall", "enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string", "x-example": "overall"}, {"description": "Rows per category, 1 to 50. Omit to return every row", "in": "query", "maximum": 50, "minimum": 1, "name": "limit", "type": "integer", "x-example": 5}], "path": "/sofascore/tournament-top-teams", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}, {"in": "query", "name": "limit", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-venues": {"id": "sofascore-tournament-venues", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}], "path": "/sofascore/tournament-venues", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-winners": {"id": "sofascore-tournament-winners", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/tournament-winners", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-tournaments-with-feature": {"id": "sofascore-tournaments-with-feature", "method": "GET", "params": [{"description": "Competition feature", "enum": ["cuptree", "standings", "totw", "power_rankings"], "in": "query", "name": "feature", "required": true, "type": "string", "x-example": "cuptree"}, {"description": "Sport key", "enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "minifootball", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "football"}], "path": "/sofascore/tournaments-with-feature", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["cuptree", "standings", "totw", "power_rankings"], "in": "query", "name": "feature", "required": true, "type": "string"}, {"enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "minifootball", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-trending-events": {"id": "sofascore-trending-events", "method": "GET", "params": [{"description": "Two-letter ISO 3166-1 alpha-2 country code", "in": "query", "name": "country", "required": true, "type": "string", "x-example": "GB"}], "path": "/sofascore/trending-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "country", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-trending-players": {"id": "sofascore-trending-players", "method": "GET", "params": [{"description": "Sport key", "enum": ["football", "basketball"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "football"}], "path": "/sofascore/trending-players", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["football", "basketball"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-venue": {"id": "sofascore-venue", "method": "GET", "params": [{"description": "Numeric SofaScore venue id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "624"}], "path": "/sofascore/venue", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-venue-events": {"id": "sofascore-venue-events", "method": "GET", "params": [{"description": "Numeric SofaScore venue id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "624"}, {"description": "Upcoming matches or finished matches", "enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string", "x-example": "last"}, {"description": "Sport filter for the venue-wide list. Defaults to all", "enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string", "x-example": "football"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}, {"description": "Numeric unique-tournament id; with season, lists that competition season's matches at the venue", "in": "query", "name": "tournament", "type": "string", "x-example": "17"}, {"description": "Numeric season id; with tournament, lists that competition season's matches at the venue", "in": "query", "name": "season", "type": "string", "x-example": "96668"}], "path": "/sofascore/venue-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string"}, {"enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string"}, {"in": "query", "name": "page", "type": "integer"}, {"in": "query", "name": "tournament", "type": "string"}, {"in": "query", "name": "season", "type": "string"}], "security": ["ApiKeyAuth"]}} + {"sofascore-categories": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-categories", "method": "GET", "params": [{"description": "Sport key", "enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "football"}], "path": "/sofascore/categories", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-category-tournaments": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-category-tournaments", "method": "GET", "params": [{"description": "Numeric SofaScore category id from the categories endpoint", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "1"}], "path": "/sofascore/category-tournaments", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-draft": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-draft", "method": "GET", "params": [{"description": "League whose draft to return", "enum": ["nba", "nfl"], "in": "query", "name": "league", "required": true, "type": "string", "x-example": "nba"}, {"description": "Numeric SofaScore season id of the league", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "80229"}], "path": "/sofascore/draft", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["nba", "nfl"], "in": "query", "name": "league", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-draft-picks": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-draft-picks", "method": "GET", "params": [{"description": "League whose draft to return", "enum": ["nba", "nfl"], "in": "query", "name": "league", "required": true, "type": "string", "x-example": "nba"}, {"description": "Four-digit draft year", "in": "query", "name": "year", "required": true, "type": "string", "x-example": "2025"}, {"description": "Draft round: 1 to 2 for nba, 1 to 7 for nfl", "in": "query", "maximum": 7, "minimum": 1, "name": "round", "required": true, "type": "integer", "x-example": 1}], "path": "/sofascore/draft-picks", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["nba", "nfl"], "in": "query", "name": "league", "required": true, "type": "string"}, {"in": "query", "name": "year", "required": true, "type": "string"}, {"in": "query", "name": "round", "required": true, "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-esports-game": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-esports-game", "method": "GET", "params": [{"description": "Numeric SofaScore esports game id from sofascore-event-esports-games", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "588883"}, {"description": "Which resource of the game to return", "enum": ["statistics", "lineups", "bans", "rounds"], "in": "query", "name": "part", "required": true, "type": "string", "x-example": "lineups"}], "path": "/sofascore/esports-game", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"enum": ["statistics", "lineups", "bans", "rounds"], "in": "query", "name": "part", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-at-bat-pitches": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-at-bat-pitches", "method": "GET", "params": [{"description": "Numeric SofaScore baseball event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17199139"}, {"description": "Numeric at-bat id from sofascore-event-at-bats for the same event", "in": "query", "name": "at_bat_id", "required": true, "type": "string", "x-example": "2595879"}], "path": "/sofascore/event-at-bat-pitches", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "at_bat_id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-at-bats": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-at-bats", "method": "GET", "params": [{"description": "Numeric SofaScore baseball event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17199139"}], "path": "/sofascore/event-at-bats", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-average-positions": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-average-positions", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-average-positions", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-baseball-top-performers": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-baseball-top-performers", "method": "GET", "params": [{"description": "Numeric SofaScore baseball event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17199139"}], "path": "/sofascore/event-baseball-top-performers", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-best-players": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-best-players", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-best-players", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-comments": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-comments", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-comments", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-esports-games": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-esports-games", "method": "GET", "params": [{"description": "Numeric SofaScore esports event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17260338"}], "path": "/sofascore/event-esports-games", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-graph": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-graph", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-graph", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-h2h": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-h2h", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event-h2h", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-highlights": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-highlights", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-highlights", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-incidents": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-incidents", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event-incidents", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-innings": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-innings", "method": "GET", "params": [{"description": "Numeric SofaScore cricket event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16253632"}], "path": "/sofascore/event-innings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-lineups": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-lineups", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event-lineups", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-managers": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-managers", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-managers", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-odds": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-odds", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event-odds", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-player-heatmap": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-player-heatmap", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}, {"description": "Numeric SofaScore player id that played in the match", "in": "query", "name": "player_id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/event-player-heatmap", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "player_id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-player-statistics": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-player-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}, {"description": "Numeric SofaScore player id that took part in the match", "in": "query", "name": "player_id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/event-player-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "player_id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-point-by-point": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-point-by-point", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17257382"}], "path": "/sofascore/event-point-by-point", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-pregame-form": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-pregame-form", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-pregame-form", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-shotmap": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-shotmap", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-shotmap", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-statistics": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14025013"}], "path": "/sofascore/event-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-team-heatmap": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-team-heatmap", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}, {"description": "Numeric SofaScore team id of the home or away side", "in": "query", "name": "team_id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/event-team-heatmap", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "team_id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-team-streaks": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-team-streaks", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-team-streaks", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-tennis-power": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-tennis-power", "method": "GET", "params": [{"description": "Numeric SofaScore tennis event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17257382"}], "path": "/sofascore/event-tennis-power", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-tv-channels": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-tv-channels", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}, {"description": "Two-letter ISO 3166-1 alpha-2 country code. Omit to list the broadcasting countries only", "in": "query", "name": "country", "type": "string", "x-example": "GB"}], "path": "/sofascore/event-tv-channels", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "country", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-event-votes": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-event-votes", "method": "GET", "params": [{"description": "Numeric SofaScore event (match) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "16363867"}], "path": "/sofascore/event-votes", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-live-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-live-events", "method": "GET", "params": [{"description": "Sport key", "enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "football"}], "path": "/sofascore/live-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-manager": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-manager", "method": "GET", "params": [{"description": "Numeric SofaScore manager id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "794873"}], "path": "/sofascore/manager", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-manager-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-manager-events", "method": "GET", "params": [{"description": "Numeric SofaScore manager id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "794873"}, {"description": "Zero-based page number", "in": "query", "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/manager-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-mma-card": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-mma-card", "method": "GET", "params": [{"description": "Numeric SofaScore MMA organisation id", "in": "query", "name": "org_id", "required": true, "type": "string", "x-example": "19906"}, {"description": "Numeric card id (card_id) from sofascore-mma-schedule", "in": "query", "name": "card_id", "required": true, "type": "string", "x-example": "197311"}, {"description": "Which segment of the card to return", "enum": ["all", "maincard", "prelims", "earlyprelims"], "in": "query", "name": "part", "required": true, "type": "string", "x-example": "all"}], "path": "/sofascore/mma-card", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "org_id", "required": true, "type": "string"}, {"in": "query", "name": "card_id", "required": true, "type": "string"}, {"enum": ["all", "maincard", "prelims", "earlyprelims"], "in": "query", "name": "part", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-mma-schedule": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-mma-schedule", "method": "GET", "params": [{"description": "Numeric SofaScore MMA organisation id", "in": "query", "name": "org_id", "required": true, "type": "string", "x-example": "19906"}, {"description": "Calendar month as YYYY-MM", "in": "query", "name": "month", "required": true, "type": "string", "x-example": "2026-10"}], "path": "/sofascore/mma-schedule", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "org_id", "required": true, "type": "string"}, {"in": "query", "name": "month", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-odds-dropping": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-odds-dropping", "method": "GET", "params": [{"description": "Sport key, or all for every sport. Defaults to all", "enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string", "x-example": "football"}], "path": "/sofascore/odds-dropping", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-odds-winning": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-odds-winning", "method": "GET", "params": [{"description": "Sport key, or all for every sport. Defaults to all", "enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string", "x-example": "football"}], "path": "/sofascore/odds-winning", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "855833"}], "path": "/sofascore/player", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-attributes": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-attributes", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-attributes", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-events", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/player-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-player-last-year-summary": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-last-year-summary", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-last-year-summary", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-national-team-statistics": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-national-team-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-national-team-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-penalty-history": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-penalty-history", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-penalty-history", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-ratings": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-ratings", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}, {"description": "Numeric SofaScore unique-tournament (competition) id from player-statistics-seasons", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id from player-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}, {"default": "overall", "description": "Statistics view", "enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "path": "/sofascore/player-ratings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-season-heatmap": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-season-heatmap", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}, {"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}], "path": "/sofascore/player-season-heatmap", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-season-statistics": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-season-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}, {"description": "Numeric SofaScore unique-tournament (competition) id from player-statistics-seasons", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id from player-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"default": "overall", "description": "Statistics view", "enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "path": "/sofascore/player-season-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-statistical-rankings": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-statistical-rankings", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}, {"description": "Numeric SofaScore season id from player-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"default": "overall", "description": "Statistics view", "enum": ["overall"], "in": "query", "name": "type", "type": "string"}], "path": "/sofascore/player-statistical-rankings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall"], "in": "query", "name": "type", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-statistics-seasons": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-statistics-seasons", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-statistics-seasons", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-tournaments": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-tournaments", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-tournaments", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-player-transfers": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-player-transfers", "method": "GET", "params": [{"description": "Numeric SofaScore player id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "839956"}], "path": "/sofascore/player-transfers", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-ranking-types": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-ranking-types", "method": "GET", "params": [], "path": "/sofascore/ranking-types", "pathParams": [], "produces": ["application/json"], "queryParams": [], "security": ["ApiKeyAuth"]}, "sofascore-rankings": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-rankings", "method": "GET", "params": [{"description": "Ranking id from sofascore-ranking-types", "enum": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 34, 35, 36, 37, 40, 41, 42, 43, 44, 45, 46], "in": "query", "name": "type", "required": true, "type": "integer", "x-example": 5}, {"description": "Return only the first N rows, 1 to 500. Omit to return every row", "in": "query", "maximum": 500, "minimum": 1, "name": "limit", "type": "integer", "x-example": 10}], "path": "/sofascore/rankings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "34", "35", "36", "37", "40", "41", "42", "43", "44", "45", "46"], "in": "query", "name": "type", "required": true, "type": "integer"}, {"in": "query", "name": "limit", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-referee": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-referee", "method": "GET", "params": [{"description": "Numeric SofaScore referee id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "74264"}], "path": "/sofascore/referee", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-referee-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-referee-events", "method": "GET", "params": [{"description": "Numeric SofaScore referee id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "74264"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/referee-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-referee-statistics": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-referee-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore referee id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "74264"}], "path": "/sofascore/referee-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-round-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-round-events", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}, {"description": "Round number", "in": "query", "name": "round", "required": true, "type": "integer", "x-example": 1}, {"description": "Round slug from tournament-rounds, for example round-of-16; required for knockout and named cup rounds", "in": "query", "name": "slug", "type": "string", "x-example": "round-of-16"}, {"description": "Round prefix from tournament-rounds, for example Qualification; only valid together with slug", "in": "query", "name": "prefix", "type": "string", "x-example": "Qualification"}], "path": "/sofascore/round-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"in": "query", "name": "round", "required": true, "type": "integer"}, {"in": "query", "name": "slug", "type": "string"}, {"in": "query", "name": "prefix", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-scheduled-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-scheduled-events", "method": "GET", "params": [{"description": "Numeric SofaScore category id from the categories endpoint", "in": "query", "name": "category_id", "required": true, "type": "string", "x-example": "13"}, {"description": "UTC calendar date, YYYY-MM-DD", "in": "query", "name": "date", "required": true, "type": "string", "x-example": "2026-10-08"}], "path": "/sofascore/scheduled-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "category_id", "required": true, "type": "string"}, {"in": "query", "name": "date", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-scheduled-tournaments": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-scheduled-tournaments", "method": "GET", "params": [{"description": "Sport key", "enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "football"}, {"description": "UTC calendar date, YYYY-MM-DD", "in": "query", "name": "date", "required": true, "type": "string", "x-example": "2026-10-08"}, {"description": "One-based page number; defaults to 1", "in": "query", "maximum": 100, "minimum": 1, "name": "page", "type": "integer", "x-example": 1}], "path": "/sofascore/scheduled-tournaments", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string"}, {"in": "query", "name": "date", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-search": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-search", "method": "GET", "params": [{"description": "Free-text search query", "in": "query", "name": "q", "required": true, "type": "string", "x-example": "barcelona"}], "path": "/sofascore/search", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "q", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-search-typed": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-search-typed", "method": "GET", "params": [{"description": "Entity type to search", "enum": ["events", "teams", "players", "managers", "referees", "venues", "unique_tournaments"], "in": "query", "name": "type", "required": true, "type": "string", "x-example": "teams"}, {"description": "Search text, up to 128 characters", "in": "query", "name": "q", "required": true, "type": "string", "x-example": "arsenal"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}, {"description": "Restrict teams, players, managers or unique_tournaments to one sport", "enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string", "x-example": "football"}], "path": "/sofascore/search-typed", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["events", "teams", "players", "managers", "referees", "venues", "unique_tournaments"], "in": "query", "name": "type", "required": true, "type": "string"}, {"in": "query", "name": "q", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}, {"enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-season-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-season-events", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"description": "Upcoming fixtures or finished results", "enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string", "x-example": "last"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/season-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-sports": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-sports", "method": "GET", "params": [], "path": "/sofascore/sports", "pathParams": [], "produces": ["application/json"], "queryParams": [], "security": ["ApiKeyAuth"]}, "sofascore-stage": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-stage", "method": "GET", "params": [{"description": "Numeric SofaScore stage id from stage-schedule, stage-seasons or stage-substages", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "214258"}], "path": "/sofascore/stage", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-categories": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-stage-categories", "method": "GET", "params": [{"description": "Stage sport key", "enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "motorsport"}], "path": "/sofascore/stage-categories", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-driver-performance": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-stage-driver-performance", "method": "GET", "params": [{"description": "Numeric SofaScore stage id of a finished race, sprint or rally", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "214258"}], "path": "/sofascore/stage-driver-performance", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-featured": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-stage-featured", "method": "GET", "params": [{"description": "Stage sport key", "enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "motorsport"}], "path": "/sofascore/stage-featured", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-schedule": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-stage-schedule", "method": "GET", "params": [{"description": "Stage sport key", "enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "motorsport"}, {"description": "UTC calendar date, YYYY-MM-DD", "in": "query", "name": "date", "required": true, "type": "string", "x-example": "2026-10-04"}], "path": "/sofascore/stage-schedule", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["motorsport", "cycling"], "in": "query", "name": "sport", "required": true, "type": "string"}, {"in": "query", "name": "date", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-seasons": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-stage-seasons", "method": "GET", "params": [{"description": "Numeric SofaScore competition id from stage-categories", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "40"}], "path": "/sofascore/stage-seasons", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-standings": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-stage-standings", "method": "GET", "params": [{"description": "Numeric SofaScore stage id of a season, event, session or cycling stage", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "214258"}, {"description": "Classification kind", "enum": ["competitor", "team"], "in": "query", "name": "type", "required": true, "type": "string", "x-example": "competitor"}], "path": "/sofascore/stage-standings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"enum": ["competitor", "team"], "in": "query", "name": "type", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-stage-substages": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-stage-substages", "method": "GET", "params": [{"description": "Numeric SofaScore stage id of a season or an event", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "214253"}], "path": "/sofascore/stage-substages", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-standings": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-standings", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}, {"description": "Standings variant", "enum": ["total", "home", "away"], "in": "query", "name": "type", "required": true, "type": "string", "x-example": "total"}], "path": "/sofascore/standings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["total", "home", "away"], "in": "query", "name": "type", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "2817"}], "path": "/sofascore/team", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-achievements": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-achievements", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-achievements", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-events", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "2817"}, {"description": "Fixture direction", "enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string", "x-example": "next"}, {"description": "Zero-based page number", "in": "query", "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/team-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-team-goal-distributions": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-goal-distributions", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore unique-tournament (competition) id of a football competition", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}], "path": "/sofascore/team-goal-distributions", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-near-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-near-events", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-near-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-of-the-week": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-of-the-week", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"description": "Numeric period id from sofascore-team-of-the-week-periods", "in": "query", "name": "period", "required": true, "type": "string", "x-example": "29321"}], "path": "/sofascore/team-of-the-week", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"in": "query", "name": "period", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-of-the-week-periods": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-of-the-week-periods", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}], "path": "/sofascore/team-of-the-week-periods", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-performance": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-performance", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-performance", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-player-statistics": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-player-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore unique-tournament (competition) id from team-player-statistics-seasons", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id from team-player-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"default": "overall", "description": "Statistics view", "enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "path": "/sofascore/team-player-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-player-statistics-seasons": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-player-statistics-seasons", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-player-statistics-seasons", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-players": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-players", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "2817"}], "path": "/sofascore/team-players", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-rankings": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-rankings", "method": "GET", "params": [{"description": "Numeric SofaScore team id (a tennis player id for tennis)", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "112783"}], "path": "/sofascore/team-rankings", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-season-statistics": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-season-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore unique-tournament (competition) id from team-statistics-seasons", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id from team-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"default": "overall", "description": "Statistics view", "enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "path": "/sofascore/team-season-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "home", "away", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-statistics-seasons": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-statistics-seasons", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-statistics-seasons", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-team-top-players": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-top-players", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore unique-tournament (competition) id from team-player-statistics-seasons", "in": "query", "name": "tournament_id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id from team-player-statistics-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"default": "overall", "description": "Statistics scope", "enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}, {"description": "Rows per category, 1 to 50. Omit to return every row", "in": "query", "maximum": 50, "minimum": 1, "name": "limit", "type": "integer", "x-example": 5}], "path": "/sofascore/team-top-players", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "tournament_id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}, {"in": "query", "name": "limit", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-team-tournaments": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-tournaments", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"default": false, "description": "false returns current competitions, true returns every recorded competition", "in": "query", "name": "all", "type": "boolean"}], "path": "/sofascore/team-tournaments", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "all", "type": "boolean"}], "security": ["ApiKeyAuth"]}, "sofascore-team-transfers": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-team-transfers", "method": "GET", "params": [{"description": "Numeric SofaScore team id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/team-transfers", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tennis-player-grand-slam-results": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tennis-player-grand-slam-results", "method": "GET", "params": [{"description": "Numeric SofaScore team id of a tennis player", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "14882"}], "path": "/sofascore/tennis-player-grand-slam-results", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-cuptree": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-cuptree", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id of a cup or playoff competition", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "7"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76953"}], "path": "/sofascore/tournament-cuptree", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-info": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-info", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id. Omit for competition metadata only", "in": "query", "name": "season", "type": "string", "x-example": "96668"}], "path": "/sofascore/tournament-info", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-player-of-the-season": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-player-of-the-season", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id of a finished season", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}], "path": "/sofascore/tournament-player-of-the-season", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-player-statistics": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-player-statistics", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id of a football competition", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"description": "Statistic to sort by. Defaults to rating", "enum": ["rating", "goals", "expectedGoals", "assists", "successfulDribbles", "tackles", "accuratePassesPercentage", "bigChancesMissed", "totalShots", "goalConversionPercentage", "interceptions", "clearances", "errorLeadToGoal", "outfielderBlocks", "bigChancesCreated", "accuratePasses", "keyPasses", "saves", "cleanSheet", "penaltySave", "savedShotsFromInsideTheBox", "runsOut"], "in": "query", "name": "order", "type": "string", "x-example": "goals"}, {"description": "Sort direction. Defaults to desc", "enum": ["desc", "asc"], "in": "query", "name": "direction", "type": "string", "x-example": "desc"}, {"description": "How statistics are accumulated. Defaults to total", "enum": ["total", "perGame", "per90"], "in": "query", "name": "accumulation", "type": "string", "x-example": "total"}, {"description": "Statistic columns returned. Defaults to summary", "enum": ["summary", "attack", "defence", "passing", "goalkeeper"], "in": "query", "name": "group", "type": "string", "x-example": "summary"}, {"description": "Rows per page, 1 to 100. Defaults to 20", "in": "query", "maximum": 100, "minimum": 1, "name": "limit", "type": "integer", "x-example": 20}, {"description": "Rows to skip. Defaults to 0", "in": "query", "minimum": 0, "name": "offset", "type": "integer", "x-example": 0}, {"collectionFormat": "csv", "description": "Team ids to keep, comma separated, up to 20 (ids from tournament-statistics-info or tournament-teams)", "in": "query", "items": {"type": "string"}, "name": "team", "type": "array", "x-example": "42"}, {"collectionFormat": "csv", "description": "Nationality codes to keep, comma separated, up to 20 (codes from tournament-statistics-info)", "in": "query", "items": {"type": "string"}, "name": "nationality", "type": "array", "x-example": "EN"}, {"collectionFormat": "csv", "description": "Position codes to keep, comma separated", "in": "query", "items": {"enum": ["G", "D", "M", "F"], "type": "string"}, "name": "position", "type": "array", "x-example": "F"}, {"description": "Keep players with at least this many appearances, 0 to 1000. Omit for no minimum", "in": "query", "maximum": 1000, "minimum": 0, "name": "min_appearances", "type": "integer", "x-example": 10}, {"description": "Keep players with at least this many minutes played, 0 to 100000. Omit for no minimum", "in": "query", "maximum": 100000, "minimum": 0, "name": "min_minutes", "type": "integer", "x-example": 900}], "path": "/sofascore/tournament-player-statistics", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["rating", "goals", "expectedGoals", "assists", "successfulDribbles", "tackles", "accuratePassesPercentage", "bigChancesMissed", "totalShots", "goalConversionPercentage", "interceptions", "clearances", "errorLeadToGoal", "outfielderBlocks", "bigChancesCreated", "accuratePasses", "keyPasses", "saves", "cleanSheet", "penaltySave", "savedShotsFromInsideTheBox", "runsOut"], "in": "query", "name": "order", "type": "string"}, {"enum": ["desc", "asc"], "in": "query", "name": "direction", "type": "string"}, {"enum": ["total", "perGame", "per90"], "in": "query", "name": "accumulation", "type": "string"}, {"enum": ["summary", "attack", "defence", "passing", "goalkeeper"], "in": "query", "name": "group", "type": "string"}, {"in": "query", "name": "limit", "type": "integer"}, {"in": "query", "name": "offset", "type": "integer"}, {"collectionFormat": "csv", "in": "query", "name": "team", "type": "array"}, {"collectionFormat": "csv", "in": "query", "name": "nationality", "type": "array"}, {"collectionFormat": "csv", "enum": ["G", "D", "M", "F"], "in": "query", "name": "position", "type": "array"}, {"in": "query", "name": "min_appearances", "type": "integer"}, {"in": "query", "name": "min_minutes", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-rounds": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-rounds", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "7"}, {"description": "Numeric SofaScore season id from tournament-seasons", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76953"}], "path": "/sofascore/tournament-rounds", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-seasons": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-seasons", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}], "path": "/sofascore/tournament-seasons", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-statistics-info": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-statistics-info", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id of a football competition", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}], "path": "/sofascore/tournament-statistics-info", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-team-of-the-season": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-team-of-the-season", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id of a finished season", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "76986"}], "path": "/sofascore/tournament-team-of-the-season", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-teams": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-teams", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}], "path": "/sofascore/tournament-teams", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-top-players": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-top-players", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"description": "Statistics scope. Defaults to overall", "enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string", "x-example": "overall"}, {"description": "Rows per category, 1 to 50. Omit to return every row", "in": "query", "maximum": 50, "minimum": 1, "name": "limit", "type": "integer", "x-example": 5}], "path": "/sofascore/tournament-top-players", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}, {"in": "query", "name": "limit", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-top-teams": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-top-teams", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}, {"description": "Statistics scope. Defaults to overall", "enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string", "x-example": "overall"}, {"description": "Rows per category, 1 to 50. Omit to return every row", "in": "query", "maximum": 50, "minimum": 1, "name": "limit", "type": "integer", "x-example": 5}], "path": "/sofascore/tournament-top-teams", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}, {"enum": ["overall", "regular_season", "playoffs"], "in": "query", "name": "type", "type": "string"}, {"in": "query", "name": "limit", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-venues": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-venues", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Numeric SofaScore season id", "in": "query", "name": "season", "required": true, "type": "string", "x-example": "96668"}], "path": "/sofascore/tournament-venues", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "season", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-tournament-winners": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournament-winners", "method": "GET", "params": [{"description": "Numeric SofaScore unique-tournament (competition) id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "17"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}], "path": "/sofascore/tournament-winners", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"in": "query", "name": "page", "type": "integer"}], "security": ["ApiKeyAuth"]}, "sofascore-tournaments-with-feature": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-tournaments-with-feature", "method": "GET", "params": [{"description": "Competition feature", "enum": ["cuptree", "standings", "totw", "power_rankings"], "in": "query", "name": "feature", "required": true, "type": "string", "x-example": "cuptree"}, {"description": "Sport key", "enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "minifootball", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "football"}], "path": "/sofascore/tournaments-with-feature", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["cuptree", "standings", "totw", "power_rankings"], "in": "query", "name": "feature", "required": true, "type": "string"}, {"enum": ["american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "minifootball", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-trending-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-trending-events", "method": "GET", "params": [{"description": "Two-letter ISO 3166-1 alpha-2 country code", "in": "query", "name": "country", "required": true, "type": "string", "x-example": "GB"}], "path": "/sofascore/trending-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "country", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-trending-players": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-trending-players", "method": "GET", "params": [{"description": "Sport key", "enum": ["football", "basketball"], "in": "query", "name": "sport", "required": true, "type": "string", "x-example": "football"}], "path": "/sofascore/trending-players", "pathParams": [], "produces": ["application/json"], "queryParams": [{"enum": ["football", "basketball"], "in": "query", "name": "sport", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-venue": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-venue", "method": "GET", "params": [{"description": "Numeric SofaScore venue id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "624"}], "path": "/sofascore/venue", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}], "security": ["ApiKeyAuth"]}, "sofascore-venue-events": {"bodyParam": null, "bodyRequired": false, "id": "sofascore-venue-events", "method": "GET", "params": [{"description": "Numeric SofaScore venue id", "in": "query", "name": "id", "required": true, "type": "string", "x-example": "624"}, {"description": "Upcoming matches or finished matches", "enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string", "x-example": "last"}, {"description": "Sport filter for the venue-wide list. Defaults to all", "enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string", "x-example": "football"}, {"description": "Zero-based page number. Defaults to 0", "in": "query", "minimum": 0, "name": "page", "type": "integer", "x-example": 0}, {"description": "Numeric unique-tournament id; with season, lists that competition season's matches at the venue", "in": "query", "name": "tournament", "type": "string", "x-example": "17"}, {"description": "Numeric season id; with tournament, lists that competition season's matches at the venue", "in": "query", "name": "season", "type": "string", "x-example": "96668"}], "path": "/sofascore/venue-events", "pathParams": [], "produces": ["application/json"], "queryParams": [{"in": "query", "name": "id", "required": true, "type": "string"}, {"enum": ["next", "last"], "in": "query", "name": "direction", "required": true, "type": "string"}, {"enum": ["all", "american-football", "aussie-rules", "badminton", "bandy", "baseball", "basketball", "beach-volley", "cricket", "darts", "esports", "floorball", "football", "futsal", "handball", "ice-hockey", "mma", "minifootball", "padel", "rugby", "snooker", "table-tennis", "tennis", "volleyball", "waterpolo"], "in": "query", "name": "sport", "type": "string"}, {"in": "query", "name": "page", "type": "integer"}, {"in": "query", "name": "tournament", "type": "string"}, {"in": "query", "name": "season", "type": "string"}], "security": ["ApiKeyAuth"]}} JSON OPERATION_IDS = JSON.parse(<<~'JSON').freeze ["sofascore-categories", "sofascore-category-tournaments", "sofascore-draft", "sofascore-draft-picks", "sofascore-esports-game", "sofascore-event", "sofascore-event-at-bat-pitches", "sofascore-event-at-bats", "sofascore-event-average-positions", "sofascore-event-baseball-top-performers", "sofascore-event-best-players", "sofascore-event-comments", "sofascore-event-esports-games", "sofascore-event-graph", "sofascore-event-h2h", "sofascore-event-highlights", "sofascore-event-incidents", "sofascore-event-innings", "sofascore-event-lineups", "sofascore-event-managers", "sofascore-event-odds", "sofascore-event-player-heatmap", "sofascore-event-player-statistics", "sofascore-event-point-by-point", "sofascore-event-pregame-form", "sofascore-event-shotmap", "sofascore-event-statistics", "sofascore-event-team-heatmap", "sofascore-event-team-streaks", "sofascore-event-tennis-power", "sofascore-event-tv-channels", "sofascore-event-votes", "sofascore-live-events", "sofascore-manager", "sofascore-manager-events", "sofascore-mma-card", "sofascore-mma-schedule", "sofascore-odds-dropping", "sofascore-odds-winning", "sofascore-player", "sofascore-player-attributes", "sofascore-player-events", "sofascore-player-last-year-summary", "sofascore-player-national-team-statistics", "sofascore-player-penalty-history", "sofascore-player-ratings", "sofascore-player-season-heatmap", "sofascore-player-season-statistics", "sofascore-player-statistical-rankings", "sofascore-player-statistics-seasons", "sofascore-player-tournaments", "sofascore-player-transfers", "sofascore-ranking-types", "sofascore-rankings", "sofascore-referee", "sofascore-referee-events", "sofascore-referee-statistics", "sofascore-round-events", "sofascore-scheduled-events", "sofascore-scheduled-tournaments", "sofascore-search", "sofascore-search-typed", "sofascore-season-events", "sofascore-sports", "sofascore-stage", "sofascore-stage-categories", "sofascore-stage-driver-performance", "sofascore-stage-featured", "sofascore-stage-schedule", "sofascore-stage-seasons", "sofascore-stage-standings", "sofascore-stage-substages", "sofascore-standings", "sofascore-team", "sofascore-team-achievements", "sofascore-team-events", "sofascore-team-goal-distributions", "sofascore-team-near-events", "sofascore-team-of-the-week", "sofascore-team-of-the-week-periods", "sofascore-team-performance", "sofascore-team-player-statistics", "sofascore-team-player-statistics-seasons", "sofascore-team-players", "sofascore-team-rankings", "sofascore-team-season-statistics", "sofascore-team-statistics-seasons", "sofascore-team-top-players", "sofascore-team-tournaments", "sofascore-team-transfers", "sofascore-tennis-player-grand-slam-results", "sofascore-tournament-cuptree", "sofascore-tournament-info", "sofascore-tournament-player-of-the-season", "sofascore-tournament-player-statistics", "sofascore-tournament-rounds", "sofascore-tournament-seasons", "sofascore-tournament-statistics-info", "sofascore-tournament-team-of-the-season", "sofascore-tournament-teams", "sofascore-tournament-top-players", "sofascore-tournament-top-teams", "sofascore-tournament-venues", "sofascore-tournament-winners", "sofascore-tournaments-with-feature", "sofascore-trending-events", "sofascore-trending-players", "sofascore-venue", "sofascore-venue-events"] @@ -29,7 +29,7 @@ class NetworkError < Error; end class Client attr_reader :base_url - def initialize(api_key: ENV["CRAWLORA_API_KEY"], base_url: "https://api.crawlora.net/api/v1", timeout: 30, user_agent: "crawlora-sofascore-ruby/0.3.4", transport: nil) + def initialize(api_key: ENV["CRAWLORA_API_KEY"], base_url: "https://api.crawlora.net/api/v1", timeout: 30, user_agent: "crawlora-sofascore-ruby/0.3.5", transport: nil) @api_key = api_key @base_url = base_url.to_s.sub(%r{/+$}, "") @timeout = Float(timeout) @@ -45,15 +45,24 @@ def request(operation_id, params = {}, response_type: :auto) raise Errors::ClientError.new("unknown operation: #{operation_id}", operation_id: operation_id) unless operation raise Errors::ClientError.new("Crawlora API key is required", operation_id: operation_id) if @api_key.nil? || @api_key.to_s.empty? normalized = params.each_with_object({}) { |(key, value), out| out[key.to_s] = value } + payload = request_body(operation, normalized) url = build_url(operation, normalized) uri = URI.parse(url) - request = Net::HTTP::Get.new(uri) + request = operation["method"] == "POST" ? Net::HTTP::Post.new(uri) : Net::HTTP::Get.new(uri) + unless payload.nil? + request.body = payload + request["Content-Type"] = "application/json" + end request["x-api-key"] = @api_key request["User-Agent"] = @user_agent request["Accept"] = operation["produces"].include?("text/plain") ? "application/json, text/plain" : "application/json" begin if @transport - response = @transport.call(url, request.to_hash, @timeout) + response = if operation["method"] == "POST" + @transport.call(url, request.to_hash, @timeout, "POST", payload) + else + @transport.call(url, request.to_hash, @timeout) + end status = Integer(response.fetch(:status) { response.fetch("status") }) body = response.fetch(:body) { response.fetch("body", "") } headers = response.fetch(:headers) { response.fetch("headers", {}) } @@ -544,8 +553,21 @@ def self.operations private + # POST operations take their JSON body under the body parameter name or "body". + def request_body(operation, params) + name = operation["bodyParam"] + return nil if name.nil? + value = params.key?(name) ? params[name] : params["body"] + if value.nil? + raise Errors::ClientError.new("missing request body: #{name}", operation_id: operation["id"]) if operation["bodyRequired"] + return nil + end + value.is_a?(String) ? value : JSON.generate(value) + end + def build_url(operation, params) known = operation["params"].map { |param| param["name"] } + known << "body" if operation["bodyParam"] unknown = params.keys - known raise Errors::ClientError.new("unknown parameters: #{unknown.join(', ')}", operation_id: operation["id"]) unless unknown.empty? path = operation["path"].dup diff --git a/ruby/lib/crawlora/sofascore/operations.json b/ruby/lib/crawlora/sofascore/operations.json index 2cc3a31..a43c857 100644 --- a/ruby/lib/crawlora/sofascore/operations.json +++ b/ruby/lib/crawlora/sofascore/operations.json @@ -263,6 +263,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Sport key", @@ -319,6 +321,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore category id from the categories endpoint", @@ -359,6 +363,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "League whose draft to return", @@ -417,6 +423,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "League whose draft to return", @@ -481,6 +489,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore esports game id from sofascore-event-esports-games", @@ -525,6 +535,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -561,6 +573,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore baseball event (match) id", @@ -599,6 +613,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore baseball event (match) id", @@ -629,6 +645,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -659,6 +677,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore baseball event (match) id", @@ -689,6 +709,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -719,6 +741,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -749,6 +773,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore esports event (match) id", @@ -779,6 +805,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -809,6 +837,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -839,6 +869,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -869,6 +901,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -899,6 +933,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore cricket event (match) id", @@ -929,6 +965,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -959,6 +997,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -989,6 +1029,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1025,6 +1067,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1069,6 +1113,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1107,6 +1153,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1137,6 +1185,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1167,6 +1217,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1197,6 +1249,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1233,6 +1287,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1271,6 +1327,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1301,6 +1359,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore tennis event (match) id", @@ -1336,6 +1396,8 @@ "type": "string" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1373,6 +1435,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore event (match) id", @@ -1429,6 +1493,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Sport key", @@ -1485,6 +1551,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore manager id", @@ -1520,6 +1588,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore manager id", @@ -1575,6 +1645,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore MMA organisation id", @@ -1633,6 +1705,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore MMA organisation id", @@ -1697,6 +1771,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Sport key, or all for every sport. Defaults to all", @@ -1779,6 +1855,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Sport key, or all for every sport. Defaults to all", @@ -1835,6 +1913,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -1865,6 +1945,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -1900,6 +1982,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -1938,6 +2022,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -1968,6 +2054,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -1998,6 +2086,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -2052,6 +2142,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -2124,6 +2216,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -2194,6 +2288,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -2268,6 +2364,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -2316,6 +2414,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -2346,6 +2446,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -2376,6 +2478,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore player id", @@ -2399,6 +2503,8 @@ "path": "/sofascore/ranking-types", "pathParams": [], "queryParams": [], + "bodyParam": null, + "bodyRequired": false, "params": [], "produces": [ "application/json" @@ -2459,6 +2565,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Ranking id from sofascore-ranking-types", @@ -2532,6 +2640,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore referee id", @@ -2567,6 +2677,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore referee id", @@ -2605,6 +2717,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore referee id", @@ -2657,6 +2771,8 @@ "type": "string" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -2723,6 +2839,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore category id from the categories endpoint", @@ -2798,6 +2916,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Sport key", @@ -2871,6 +2991,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Free-text search query", @@ -2952,6 +3074,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Entity type to search", @@ -3061,6 +3185,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -3112,6 +3238,8 @@ "path": "/sofascore/sports", "pathParams": [], "queryParams": [], + "bodyParam": null, + "bodyRequired": false, "params": [], "produces": [ "application/json" @@ -3133,6 +3261,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore stage id from stage-schedule, stage-seasons or stage-substages", @@ -3167,6 +3297,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Stage sport key", @@ -3201,6 +3333,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore stage id of a finished race, sprint or rally", @@ -3235,6 +3369,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Stage sport key", @@ -3279,6 +3415,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Stage sport key", @@ -3321,6 +3459,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore competition id from stage-categories", @@ -3361,6 +3501,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore stage id of a season, event, session or cycling stage", @@ -3403,6 +3545,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore stage id of a season or an event", @@ -3450,6 +3594,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -3501,6 +3647,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -3531,6 +3679,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -3576,6 +3726,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -3637,6 +3789,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -3683,6 +3837,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -3725,6 +3881,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -3777,6 +3935,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -3815,6 +3975,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -3869,6 +4031,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -3929,6 +4093,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -3959,6 +4125,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -3989,6 +4157,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id (a tennis player id for tennis)", @@ -4043,6 +4213,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -4103,6 +4275,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -4160,6 +4334,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -4232,6 +4408,8 @@ "type": "boolean" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -4269,6 +4447,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id", @@ -4299,6 +4479,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore team id of a tennis player", @@ -4335,6 +4517,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id of a cup or playoff competition", @@ -4378,6 +4562,8 @@ "type": "string" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -4421,6 +4607,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -4569,6 +4757,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id of a football competition", @@ -4755,6 +4945,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -4793,6 +4985,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -4829,6 +5023,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id of a football competition", @@ -4873,6 +5069,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -4917,6 +5115,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -4976,6 +5176,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -5056,6 +5258,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -5121,6 +5325,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -5164,6 +5370,8 @@ "type": "integer" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore unique-tournament (competition) id", @@ -5238,6 +5446,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Competition feature", @@ -5306,6 +5516,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Two-letter ISO 3166-1 alpha-2 country code", @@ -5340,6 +5552,8 @@ ] } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Sport key", @@ -5374,6 +5588,8 @@ "required": true } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore venue id", @@ -5461,6 +5677,8 @@ "type": "string" } ], + "bodyParam": null, + "bodyRequired": false, "params": [ { "description": "Numeric SofaScore venue id", diff --git a/ruby/lib/crawlora/sofascore/version.rb b/ruby/lib/crawlora/sofascore/version.rb index 848114d..62ba4fb 100644 --- a/ruby/lib/crawlora/sofascore/version.rb +++ b/ruby/lib/crawlora/sofascore/version.rb @@ -1,5 +1,5 @@ module Crawlora module Sofascore - VERSION = "0.3.4" + VERSION = "0.3.5" end end diff --git a/scripts/_platformsdk/documentation.py b/scripts/_platformsdk/documentation.py index e78fe17..d506adf 100644 --- a/scripts/_platformsdk/documentation.py +++ b/scripts/_platformsdk/documentation.py @@ -115,6 +115,90 @@ def _operation_catalog(operations: list[dict[str, Any]]) -> str: return "\n".join(rows) +def public_api_summary(config: dict[str, Any]) -> str: + """Return the curated endpoint-area phrase used by package landing pages.""" + description = str(config.get("java_description") or "") + marker = " API, with " + if marker in description: + summary = description.split(marker, 1)[1] + summary = summary.split(". Requires a Crawlora API key.", 1)[0] + # Older descriptions read "with [direct] methods for "; keep only + # the areas so sentences built around the summary stay grammatical. + summary = re.sub(r"^(?:direct )?methods for ", "", summary.strip()) + if summary.strip(): + return summary.strip().rstrip(".") + display = str(config.get("display_name") or config.get("platform") or "platform") + return f"the supported {display} API endpoints" + + +def seo_keywords(config: dict[str, Any]) -> list[str]: + """Build registry search keywords from the platform name and curated coverage. + + Registry search matches keywords literally, so every coverage area is + qualified with the platform ("tiktok-comments", not "comments") and the + platform also gets the "-api", "-scraper" and "-data" forms people type. + """ + platform = str(config.get("platform") or "platform").lower() + display = str(config.get("display_name") or platform).lower() + display_keyword = re.sub(r"[^a-z0-9]+", "-", display).strip("-") + names = [platform] + if display_keyword and display_keyword != platform: + names.append(display_keyword) + + keywords = ["crawlora", "api-client", "sdk", "web-scraping", "scraping-api", *names] + for suffix in ("api", "scraper", "data"): + keywords.extend(f"{name}-{suffix}" for name in names) + + ignored = { + "and", "for", "from", "the", "with", "of", "to", "by", "a", "an", "api", "direct", "methods", "method", + } + summary = public_api_summary(config) + for area in re.split(r"[,;]|\bplus\b", summary.lower()): + words = [word for word in re.findall(r"[a-z0-9]+", area) if word not in ignored] + if not words or len(words) > 3: + continue + if platform not in words: + words.insert(0, platform) + keyword = "-".join(words) + if keyword not in keywords: + keywords.append(keyword) + return list(dict.fromkeys(keywords))[:20] + + +def _endpoint_table(operations: list[dict[str, Any]]) -> str: + rows = ["| Method | Endpoint | API operation | Description |", "| --- | --- | --- | --- |"] + for operation in sorted(operations, key=lambda op: (str(op["path"]).casefold(), str(op["verb"]))): + summary = str(operation.get("summary") or operation.get("id") or "").split("\n", 1)[0] + summary = summary.replace("|", "\\|").replace("`", "\\`").replace("\r", " ") + rows.append( + f"| `{operation['verb']}` | `{operation['path']}` | `{operation['id']}` | {summary} |" + ) + return "\n".join(rows) + + +def endpoint_table_from_spec(spec: dict[str, Any], platform: str) -> str: + """Render the complete, parameter-free endpoint list for package READMEs.""" + operations: list[dict[str, str]] = [] + for path, path_item in (spec.get("paths") or {}).items(): + if not isinstance(path_item, dict): + continue + for verb, operation in path_item.items(): + if verb.lower() not in _METHODS or not isinstance(operation, dict): + continue + operation_id = str(operation.get("operationId") or "") + tags = [str(tag).strip().lower() for tag in operation.get("tags", [])] + belongs = platform.lower() in tags or operation_id.lower().startswith(platform.lower() + "-") + if not operation_id or not belongs: + continue + operations.append({ + "verb": verb.upper(), + "path": str(path), + "id": operation_id, + "summary": str(operation.get("summary") or operation.get("description") or operation_id), + }) + return _endpoint_table(operations) + + def _example_values(platform: str, operations: list[dict[str, Any]]) -> list[tuple[dict[str, Any], dict[str, Any]]]: """Choose useful calls using only methods and parameter names in this spec.""" by_id = {op["id"].lower(): op for op in operations} @@ -156,6 +240,34 @@ def add(operation_id: str, values: dict[str, Any]) -> None: elif platform == "imdb": add("imdb-search", {"query": "Inception"}) add("imdb-charts", {}) + elif platform == "google": + add("google-news", {"q": "artificial intelligence"}) + add("google-map-search", {"mapSearchOption": {"keyword": "coffee shops in Seattle", "country": "us", "language": "en"}}) + add("google-trends-trending", {"geo": "US"}) + elif platform == "bing": + add("bing-search", {"q": "open source web crawler"}) + add("bing-news", {"q": "technology"}) + elif platform == "brave": + add("brave-search", {"q": "open source web crawler"}) + add("brave-suggest", {"q": "open source"}) + elif platform == "duckduckgo": + add("duckduckgo-search", {"q": "open source web crawler"}) + add("duckduckgo-news", {"q": "technology"}) + elif platform == "ebay": + add("ebay-seller", {"seller": "musicmagpie"}) + add("ebay-search", {"option": {"keyword": "vintage camera"}}) + elif platform == "googleplay": + add("googleplay-search", {"term": "podcast player"}) + add("googleplay-app", {"app_id": "com.spotify.music"}) + elif platform == "appstore": + add("appstore-search", {"term": "podcast player"}) + add("appstore-app", {"id": "324684580"}) + elif platform == "airbnb": + add("airbnb-search", {"location": "Lisbon, Portugal"}) + add("airbnb-room", {"id": "7743405"}) + elif platform == "spotify": + add("spotify-search", {"q": "daft punk"}) + add("spotify-track", {"id": "4cOdK2wGLETKBW3PvgPWqT"}) return selected @@ -344,6 +456,15 @@ def _values(config: dict[str, Any], operations: list[dict[str, Any]]) -> dict[st "tiktok": "17 4 * * *", "amazon": "27 4 * * *", "imdb": "37 4 * * *", + "google": "47 4 * * *", + "bing": "57 4 * * *", + "brave": "07 5 * * *", + "duckduckgo": "17 5 * * *", + "ebay": "27 5 * * *", + "googleplay": "37 5 * * *", + "appstore": "47 5 * * *", + "airbnb": "57 5 * * *", + "spotify": "07 6 * * *", } try: sync_cron = sync_schedules[platform] @@ -371,6 +492,9 @@ def _values(config: dict[str, Any], operations: list[dict[str, Any]]) -> dict[st "VERSION": version, "CONTRACT_REVISION": str(config.get("contract_revision") or version), "OPERATION_COUNT": str(len(operations)), + "SEO_SUMMARY": public_api_summary(config), + "SEO_KEYWORDS_JSON": json.dumps(seo_keywords(config), ensure_ascii=False), + "ENDPOINT_TABLE": _endpoint_table(operations), "OPERATION_CATALOG": catalog, "JS_EXAMPLE": js_example.rstrip(), "PYTHON_EXAMPLE": py_example.rstrip(), diff --git a/scripts/_platformsdk/golang.py b/scripts/_platformsdk/golang.py index fa275a3..0e1ff91 100644 --- a/scripts/_platformsdk/golang.py +++ b/scripts/_platformsdk/golang.py @@ -111,9 +111,22 @@ def _operation_literal(operation: dict[str, Any]) -> str: f"Produces: {_go_string_slice([str(value) for value in operation.get('produces', [])])}", f"Security: {_go_string_slice([str(value) for value in operation.get('security', [])])}", ] + if operation.get("bodyParam"): + literals.append(f"BodyParam: {_go_string(str(operation['bodyParam']))}") + if operation.get("bodyRequired"): + literals.append("BodyRequired: true") return "operationDefinition{" + ", ".join(literals) + "}" +def _check_supported(operation_id: str, definition: dict[str, Any]) -> None: + """Platform clients send GET requests and POST requests with a JSON body.""" + method = definition["method"] + if method == "GET": + return + if method != "POST" or not definition.get("bodyParam") or definition.get("formParams"): + raise ValueError(f"Go platform clients support GET and JSON-body POST only: {operation_id}") + + def _module_name(config: dict[str, Any]) -> str: platform = str(config["platform"]) if not re.fullmatch(r"[a-z0-9]+(?:-[a-z0-9]+)*", platform): @@ -136,6 +149,15 @@ def emit(root: Path, config: dict, spec: dict, assets: Path) -> None: raise ValueError(f"invalid Go package name for platform: {package_name!r}") module_path = _module_name(config) version = str(config.get("golang_version", config.get("version", "0.1.4"))) + # Generated tests and README samples exercise GET operations. + get_meta = { + operation_id: meta for operation_id, meta in model.meta.items() + if model.operations[operation_id]["method"] == "GET" + } + if not get_meta: + raise ValueError("the sliced specification contains no GET operations") + from .documentation import public_api_summary + values = { "platform": platform, "package_name": package_name, @@ -145,19 +167,19 @@ def emit(root: Path, config: dict, spec: dict, assets: Path) -> None: "repository": str(config.get("repository", f"https://github.com/Crawlora-org/crawlora-{platform}")), "docs_url": crawlora_url(source="pkg.go.dev", platform=platform, surface="go", destination="api-docs", path="/docs"), "operation_count": str(model.operation_count), + "seo_summary": public_api_summary(config), "user_agent": f"crawlora-{platform}-go/{version}", "version_json": _go_string(version), "user_agent_json": _go_string(f"crawlora-{platform}-go/{version}"), - "sample_operation": next(iter(model.meta)), - "sample_params": _sample_params(model.meta[next(iter(model.meta))]["params"]), + "sample_operation": next(iter(get_meta)), + "sample_params": _sample_params(get_meta[next(iter(get_meta))]["params"]), } operations = [] methods = [] reserved = {"Call", "Close", "OperationIDs", "OperationCount", "NewClient"} for operation_id, definition in model.operations.items(): - if definition["method"] != "GET": - raise ValueError(f"Go platform clients currently support GET only: {operation_id}") + _check_supported(operation_id, definition) operations.append(f"\t{_go_string(operation_id)}: {_operation_literal(definition)},") method = next((name for group in model.groups.values() for name, op_id in group.items() if op_id == operation_id), None) if method and method not in reserved: @@ -172,19 +194,19 @@ def emit(root: Path, config: dict, spec: dict, assets: Path) -> None: values["operation_entries"] = "\n".join(operations) values["method_declarations"] = "\n\n".join(methods) test_operation_id = next( - (operation_id for operation_id in model.meta if operation_id.endswith("-search")), - next(iter(model.meta)), + (operation_id for operation_id in get_meta if operation_id.endswith("-search")), + next(iter(get_meta)), ) - if not any(param.get("in") == "path" for param in model.meta[test_operation_id]["params"]) or not any( - param.get("in") == "query" for param in model.meta[test_operation_id]["params"] + if not any(param.get("in") == "path" for param in get_meta[test_operation_id]["params"]) or not any( + param.get("in") == "query" for param in get_meta[test_operation_id]["params"] ): test_operation_id = next( - (operation_id for operation_id, meta in model.meta.items() + (operation_id for operation_id, meta in get_meta.items() if any(param.get("in") == "path" for param in meta["params"]) and any(param.get("in") == "query" for param in meta["params"])), test_operation_id, ) - test_meta = model.meta[test_operation_id] + test_meta = get_meta[test_operation_id] test_params = [] invalid_enum_params = [] path_values = {} diff --git a/scripts/_platformsdk/java.py b/scripts/_platformsdk/java.py index a6f39d4..5795631 100644 --- a/scripts/_platformsdk/java.py +++ b/scripts/_platformsdk/java.py @@ -18,6 +18,15 @@ "tiktok": ("tiktok-search", {"keyword": "science"}), "amazon": ("amazon-search", {"k": "wireless headphones"}), "imdb": ("imdb-search", {"query": "Inception"}), + "google": ("google-news", {"q": "artificial intelligence"}), + "bing": ("bing-search", {"q": "open source web crawler"}), + "brave": ("brave-search", {"q": "open source web crawler"}), + "duckduckgo": ("duckduckgo-search", {"q": "open source web crawler"}), + "ebay": ("ebay-seller", {"seller": "musicmagpie"}), + "googleplay": ("googleplay-search", {"term": "podcast player"}), + "appstore": ("appstore-search", {"term": "podcast player"}), + "airbnb": ("airbnb-search", {"location": "Lisbon, Portugal"}), + "spotify": ("spotify-search", {"q": "daft punk"}), } @@ -90,7 +99,9 @@ def _operation_source(operation_id: str, operation: dict[str, Any], source_param return ( f" operations.put({_quote(operation_id)}, new Operation({_quote(operation_id)}, " f"{_quote(operation['method'].upper())}, {_quote(operation['path'])}, " - f"{param_map}, List.of({produces})));" + f"{param_map}, List.of({produces})" + + (f", {_quote(str(operation['bodyParam']))}" if operation.get("bodyParam") else "") + + "));" ) @@ -114,18 +125,25 @@ def emit(root: Path, config: dict, spec: dict, assets: Path) -> None: if not model.meta: raise ValueError("the sliced specification contains no operations") for op_id, operation in model.operations.items(): - if operation["method"] != "GET": - raise ValueError(f"platform Java client supports GET only: {op_id}") + if operation["method"] != "GET" and ( + operation["method"] != "POST" or not operation.get("bodyParam") or operation.get("formParams") + ): + raise ValueError(f"platform Java client supports GET and JSON-body POST only: {op_id}") + + from .documentation import endpoint_table_from_spec, public_api_summary platform = config["platform"] + base_description = config.get("java_description") or ( + f"Java client for Crawlora's hosted {config['display_name']} API, with direct methods for supported operations. " + "Requires a Crawlora API key." + ) package_name = f"net.crawlora.{platform}" values = { "platform": platform, "display_name": config["display_name"], - "java_description": config.get("java_description") or ( - f"Java client for Crawlora's hosted {config['display_name']} API, with direct methods for supported operations. " - "Requires a Crawlora API key." - ), + "java_description": base_description, + "seo_summary": public_api_summary(config), + "endpoint_table": endpoint_table_from_spec(spec, platform), "package_name": package_name, "version": config["version"], "repository": config["repository"], @@ -205,7 +223,7 @@ def emit(root: Path, config: dict, spec: dict, assets: Path) -> None: values["usage_params"] = usage_params text_operation = next( (op_id for op_id, operation in model.operations.items() if "text/plain" in operation.get("produces", [])), - next(iter(model.operations)), + next(op_id for op_id, operation in model.operations.items() if operation["method"] == "GET"), ) values["text_operation_id"] = _quote(text_operation) values["text_params"] = _sample_param_map(model.meta[text_operation]["params"]) @@ -288,6 +306,8 @@ def _test_operation(model: Any) -> tuple[str, str, str]: candidates = [] aliases = {operation_id: method for group in model.groups.values() for method, operation_id in group.items()} for operation_id, meta in model.meta.items(): + if model.operations[operation_id]["method"] != "GET": + continue params = meta["params"] has_query = any(p.get("in") == "query" and p.get("name", "").lower() != "x-api-key" for p in params) has_string_query = any( @@ -301,6 +321,8 @@ def _test_operation(model: Any) -> tuple[str, str, str]: def _enum_assertion(model: Any) -> str: for operation_id, meta in model.meta.items(): + if model.operations[operation_id]["method"] != "GET": + continue params = meta["params"] enum = next((p for p in params if p.get("in") in {"path", "query"} and p.get("enum") and p.get("name", "").lower() != "x-api-key"), None) diff --git a/scripts/_platformsdk/javascript.py b/scripts/_platformsdk/javascript.py index 2c9a655..aa66110 100644 --- a/scripts/_platformsdk/javascript.py +++ b/scripts/_platformsdk/javascript.py @@ -95,6 +95,8 @@ def emit(root: Path, config: dict, spec: dict, assets: Path) -> None: for directory in (src_dir, test_dir, docs_dir): directory.mkdir(parents=True, exist_ok=True) + from .documentation import public_api_summary, seo_keywords + platform = config["platform"] values = { "platform": platform, @@ -102,6 +104,9 @@ def emit(root: Path, config: dict, spec: dict, assets: Path) -> None: "class_name": config["class_name"], "npm_name": config["npm_name"], "version": config["version"], + "operation_count": str(model.operation_count), + "seo_summary": public_api_summary(config), + "seo_keywords_json": json.dumps(seo_keywords(config), ensure_ascii=False), "user_agent": f"crawlora-{platform}-js/{config['version']}", "repository": config["repository"], "homepage": crawlora_url(source="npm", platform=platform, surface="javascript", destination="homepage"), diff --git a/scripts/_platformsdk/php.py b/scripts/_platformsdk/php.py index 2595363..ed64e00 100644 --- a/scripts/_platformsdk/php.py +++ b/scripts/_platformsdk/php.py @@ -52,6 +52,8 @@ def emit(root: Path, config: dict[str, Any], spec: dict[str, Any], assets: Path) package = Path(root) / "php" src = package / "src" / "Crawlora" / class_name src.mkdir(parents=True, exist_ok=True) + from .documentation import endpoint_table_from_spec, public_api_summary, seo_keywords + templates = Path(__file__).resolve().parent / "templates" / "php" values = { "PLATFORM": platform, @@ -67,6 +69,9 @@ def emit(root: Path, config: dict[str, Any], spec: dict[str, Any], assets: Path) "OPERATION_JSON": json.dumps(operations, ensure_ascii=False, sort_keys=True), "OPERATION_IDS_JSON": json.dumps(sorted(operations)), "OPERATION_COUNT": str(len(operations)), + "SEO_SUMMARY": public_api_summary(config), + "SEO_KEYWORDS_JSON": json.dumps(seo_keywords(config), ensure_ascii=False), + "ENDPOINT_TABLE": endpoint_table_from_spec(spec, platform), "OPERATION_IDS_PHP": "[" + ", ".join(json.dumps(item) for item in sorted(operations)) + "]", "DIRECT_METHODS": "\n".join( " public function " + method + "(mixed ...$params): mixed\n {\n" diff --git a/scripts/_platformsdk/python.py b/scripts/_platformsdk/python.py index 711dbe9..19c632b 100644 --- a/scripts/_platformsdk/python.py +++ b/scripts/_platformsdk/python.py @@ -2,6 +2,7 @@ from __future__ import annotations +import json import pprint import shutil import sys @@ -396,9 +397,14 @@ def emit(root: Path, config: dict[str, Any], spec: dict[str, Any], assets: Path) ) (package / "py.typed").write_text("", encoding="utf-8") + from .documentation import public_api_summary, seo_keywords + pyproject = (template_root / "pyproject.toml.tpl").read_text(encoding="utf-8") template_values = { **config, + "SEO_SUMMARY": public_api_summary(config), + "SEO_KEYWORDS_JSON": json.dumps(seo_keywords(config), ensure_ascii=False), + "OPERATION_COUNT": str(model.operation_count), "homepage_url": crawlora_url(source="pypi", platform=config["platform"], surface="python", destination="homepage"), "documentation_url": crawlora_url(source="pypi", platform=config["platform"], surface="python", destination="api-docs", path="/docs"), } diff --git a/scripts/_platformsdk/release_sync.py b/scripts/_platformsdk/release_sync.py index 7402df2..6f622cc 100644 --- a/scripts/_platformsdk/release_sync.py +++ b/scripts/_platformsdk/release_sync.py @@ -122,6 +122,96 @@ "maven_artifact": "crawlora-imdb", "packagist": "crawlora/imdb", }, + "google": { + "repository": "Crawlora-org/crawlora-google", + "npm": "@crawlora-org/google", + "pypi": "crawlora-google", + "go": "github.com/Crawlora-org/crawlora-google", + "ruby": "crawlora-google", + "maven_group": "net.crawlora", + "maven_artifact": "crawlora-google", + "packagist": "crawlora/google", + }, + "bing": { + "repository": "Crawlora-org/crawlora-bing", + "npm": "@crawlora-org/bing", + "pypi": "crawlora-bing", + "go": "github.com/Crawlora-org/crawlora-bing", + "ruby": "crawlora-bing", + "maven_group": "net.crawlora", + "maven_artifact": "crawlora-bing", + "packagist": "crawlora/bing", + }, + "brave": { + "repository": "Crawlora-org/crawlora-brave", + "npm": "@crawlora-org/brave", + "pypi": "crawlora-brave", + "go": "github.com/Crawlora-org/crawlora-brave", + "ruby": "crawlora-brave", + "maven_group": "net.crawlora", + "maven_artifact": "crawlora-brave", + "packagist": "crawlora/brave", + }, + "duckduckgo": { + "repository": "Crawlora-org/crawlora-duckduckgo", + "npm": "@crawlora-org/duckduckgo", + "pypi": "crawlora-duckduckgo", + "go": "github.com/Crawlora-org/crawlora-duckduckgo", + "ruby": "crawlora-duckduckgo", + "maven_group": "net.crawlora", + "maven_artifact": "crawlora-duckduckgo", + "packagist": "crawlora/duckduckgo", + }, + "ebay": { + "repository": "Crawlora-org/crawlora-ebay", + "npm": "@crawlora-org/ebay", + "pypi": "crawlora-ebay", + "go": "github.com/Crawlora-org/crawlora-ebay", + "ruby": "crawlora-ebay", + "maven_group": "net.crawlora", + "maven_artifact": "crawlora-ebay", + "packagist": "crawlora/ebay", + }, + "googleplay": { + "repository": "Crawlora-org/crawlora-googleplay", + "npm": "@crawlora-org/googleplay", + "pypi": "crawlora-googleplay", + "go": "github.com/Crawlora-org/crawlora-googleplay", + "ruby": "crawlora-googleplay", + "maven_group": "net.crawlora", + "maven_artifact": "crawlora-googleplay", + "packagist": "crawlora/googleplay", + }, + "appstore": { + "repository": "Crawlora-org/crawlora-appstore", + "npm": "@crawlora-org/appstore", + "pypi": "crawlora-appstore", + "go": "github.com/Crawlora-org/crawlora-appstore", + "ruby": "crawlora-appstore", + "maven_group": "net.crawlora", + "maven_artifact": "crawlora-appstore", + "packagist": "crawlora/appstore", + }, + "airbnb": { + "repository": "Crawlora-org/crawlora-airbnb", + "npm": "@crawlora-org/airbnb", + "pypi": "crawlora-airbnb", + "go": "github.com/Crawlora-org/crawlora-airbnb", + "ruby": "crawlora-airbnb", + "maven_group": "net.crawlora", + "maven_artifact": "crawlora-airbnb", + "packagist": "crawlora/airbnb", + }, + "spotify": { + "repository": "Crawlora-org/crawlora-spotify", + "npm": "@crawlora-org/spotify", + "pypi": "crawlora-spotify", + "go": "github.com/Crawlora-org/crawlora-spotify", + "ruby": "crawlora-spotify", + "maven_group": "net.crawlora", + "maven_artifact": "crawlora-spotify", + "packagist": "crawlora/spotify", + }, } _VERSION = re.compile( r"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)" diff --git a/scripts/_platformsdk/ruby.py b/scripts/_platformsdk/ruby.py index 97ec408..c2c50e0 100644 --- a/scripts/_platformsdk/ruby.py +++ b/scripts/_platformsdk/ruby.py @@ -22,8 +22,16 @@ def _replace(template: str, values: dict[str, str]) -> str: def _example_call(platform: str, model: Any) -> tuple[str, dict[str, Any]]: """Choose a contract-backed searchable operation and representative params.""" - operation_ids = list(model.meta) - operation_id = next((item for item in operation_ids if item.endswith("-search")), operation_ids[0]) + # README and generated-test calls use GET operations. + operation_ids = [item for item in model.meta if model.operations[item]["method"] == "GET"] + if not operation_ids: + raise ValueError("focused client needs at least one GET operation") + # Prefer the platform's own search over a sub-family search that lives under + # another path prefix (spotify-podcasts-search), which the generated tests reject. + operation_id = next( + (item for item in operation_ids if item == platform + "-search"), + next((item for item in operation_ids if item.endswith("-search")), operation_ids[0]), + ) preferred = { "sofascore": "Liverpool", "flashscore": "football", @@ -73,8 +81,10 @@ def _operations(spec: dict[str, Any], model: Any) -> tuple[dict[str, Any], list[ if len(names) != len(set(names)): raise ValueError("platform operation aliases must be unique") for operation_id, parsed in model.operations.items(): - if parsed["method"] != "GET": - raise ValueError(f"focused client supports GET operations only: {operation_id}") + if parsed["method"] != "GET" and ( + parsed["method"] != "POST" or not parsed.get("bodyParam") or parsed.get("formParams") + ): + raise ValueError(f"focused client supports GET and JSON-body POST only: {operation_id}") raw = source[operation_id] params = model.meta[operation_id]["params"] operations[operation_id] = { @@ -83,6 +93,8 @@ def _operations(spec: dict[str, Any], model: Any) -> tuple[dict[str, Any], list[ "path": parsed["path"], "pathParams": parsed.get("pathParams", []), "queryParams": parsed.get("queryParams", []), + "bodyParam": parsed.get("bodyParam") or None, + "bodyRequired": bool(parsed.get("bodyRequired")), "params": params, "produces": raw.get("produces", []), "security": parsed.get("security", []), @@ -120,6 +132,8 @@ def emit(root: Path, config: dict[str, Any], spec: dict[str, Any], assets: Path) package = Path(root) / "ruby" lib = package / "lib" / "crawlora" / platform lib.mkdir(parents=True, exist_ok=True) + from .documentation import endpoint_table_from_spec, public_api_summary + template_root = Path(__file__).resolve().parent / "templates" / "ruby" values = { "PLATFORM": platform, @@ -134,6 +148,8 @@ def emit(root: Path, config: dict[str, Any], spec: dict[str, Any], assets: Path) "OPERATION_JSON": json.dumps(operations, ensure_ascii=False, sort_keys=True), "OPERATION_IDS_JSON": json.dumps(sorted(operations)), "OPERATION_COUNT": str(len(operations)), + "SEO_SUMMARY": public_api_summary(config), + "ENDPOINT_TABLE": endpoint_table_from_spec(spec, platform), "DEPENDENCIES": dependency_lines, "DIRECT_METHODS": "\n".join( f" define_method({method!r}) do |**params|\n" diff --git a/scripts/_platformsdk/spec.py b/scripts/_platformsdk/spec.py index 3f51f95..f77984c 100644 --- a/scripts/_platformsdk/spec.py +++ b/scripts/_platformsdk/spec.py @@ -16,15 +16,38 @@ "tiktok": ("TikTok", "TikTokClient"), "amazon": ("Amazon", "AmazonClient"), "imdb": ("IMDb", "IMDbClient"), + "google": ("Google", "GoogleClient"), + "bing": ("Bing", "BingClient"), + "brave": ("Brave Search", "BraveClient"), + "duckduckgo": ("DuckDuckGo", "DuckDuckGoClient"), + "ebay": ("eBay", "EbayClient"), + "googleplay": ("Google Play", "GooglePlayClient"), + "appstore": ("App Store", "AppStoreClient"), + "airbnb": ("Airbnb", "AirbnbClient"), + "spotify": ("Spotify", "SpotifyClient"), } # TikTok's public API uses product-area tags for several operation groups. Keep # those in the TikTok package while excluding neighboring products that share # an operation-ID prefix (for example Amazon Jobs). PLATFORM_TAG_ALIASES = { "tiktok": frozenset({"tiktok", "tiktok creative center", "tiktok popular trend", "tiktok top ads"}), + "duckduckgo": frozenset({"duckduckgo", "duckduckgo search"}), + "spotify": frozenset({"spotify", "spotifypodcasts"}), } PLATFORM_EXCLUDED_TAGS = { "amazon": frozenset({"amazon jobs"}), + "google": frozenset({"google jobs"}), +} +# Spotify Podcasts is served from a sibling path family and belongs in the +# Spotify package. Other platforms own exactly "//". +PLATFORM_PATH_PREFIXES = { + "spotify": ("/spotify/", "/spotify-podcasts/"), +} +# Operations kept out of a package even if the public contract lists them +# again later. Google web search has no dependable upstream path, so the +# Google package must never pick it up through the daily contract sync. +PLATFORM_EXCLUDED_OPERATIONS = { + "google": frozenset({"google-search"}), } JAVA_DESCRIPTIONS = { "sofascore": ( @@ -63,6 +86,42 @@ "Java client for Crawlora's hosted IMDb API, with title and name search, charts, ratings, credits, awards, " "episodes, reviews, images, and title metadata. Requires a Crawlora API key." ), + "google": ( + "Java client for Crawlora's hosted Google API, with Maps search, places, reviews and photos; News; Trends; " + "Finance quotes and markets; suggestions; videos; and jobs. Requires a Crawlora API key." + ), + "bing": ( + "Java client for Crawlora's hosted Bing API, with web, news, image, and video search plus query suggestions. " + "Requires a Crawlora API key." + ), + "brave": ( + "Java client for Crawlora's hosted Brave Search API, with web, news, image, and video search plus query " + "suggestions. Requires a Crawlora API key." + ), + "duckduckgo": ( + "Java client for Crawlora's hosted DuckDuckGo API, with web, news, image, video, and shopping search plus " + "query suggestions. Requires a Crawlora API key." + ), + "ebay": ( + "Java client for Crawlora's hosted eBay API, with listing search, item details, seller profiles, feedback and " + "shops, and eBay Live streams. Requires a Crawlora API key." + ), + "googleplay": ( + "Java client for Crawlora's hosted Google Play API, with app search, details, reviews, ratings, permissions, " + "data safety, charts, similar apps, and developers. Requires a Crawlora API key." + ), + "appstore": ( + "Java client for Crawlora's hosted App Store API, with app search, details, reviews, ratings, privacy labels, " + "version history, charts, editorial collections, and developers. Requires a Crawlora API key." + ), + "airbnb": ( + "Java client for Crawlora's hosted Airbnb API, with listing search, room details, calendars and reviews, and " + "host profiles, listings and reviews. Requires a Crawlora API key." + ), + "spotify": ( + "Java client for Crawlora's hosted Spotify API, with search, tracks, albums, artists, playlists, profiles, " + "audiobooks, charts, and podcast shows and episodes. Requires a Crawlora API key." + ), } HTTP_METHODS = frozenset({"get", "put", "post", "delete", "options", "head", "patch"}) @@ -138,7 +197,10 @@ def select(spec: dict, platform: str) -> dict: allowed_tags = PLATFORM_TAG_ALIASES.get(platform, frozenset({platform})) if tags.intersection(PLATFORM_EXCLUDED_TAGS.get(platform, frozenset())): continue - path_matches = path.startswith("/" + platform + "/") + if identifier in PLATFORM_EXCLUDED_OPERATIONS.get(platform, frozenset()): + continue + prefixes = PLATFORM_PATH_PREFIXES.get(platform, ("/" + platform + "/",)) + path_matches = path.startswith(prefixes) tag_matches = bool(tags.intersection(allowed_tags)) if not isinstance(identifier, str) or not identifier.startswith(platform + "-"): if path_matches or tag_matches: @@ -146,7 +208,7 @@ def select(spec: dict, platform: str) -> dict: f"unexpected operation ID for {platform} operation at {path}: {identifier!r}" ) continue - if not path.startswith("/" + platform + "/"): + if not path_matches: raise ValueError(f"unexpected path for {identifier}: {path}") if tags and tags.isdisjoint(allowed_tags): raise ValueError(f"unexpected tag for {identifier}: {sorted(tags)}") diff --git a/scripts/_platformsdk/templates/documentation/README.md.tmpl b/scripts/_platformsdk/templates/documentation/README.md.tmpl index 6d2e4c4..852a531 100644 --- a/scripts/_platformsdk/templates/documentation/README.md.tmpl +++ b/scripts/_platformsdk/templates/documentation/README.md.tmpl @@ -1,6 +1,6 @@ # {{DISPLAY_NAME}} clients for Crawlora -Official Crawlora client packages for the hosted {{DISPLAY_NAME}} API. These clients call Crawlora's hosted API; they do not scrape {{DISPLAY_NAME}} locally. Requests use your Crawlora account and `CRAWLORA_API_KEY`; service usage follows your account billing plan. Crawlora is independent from and not affiliated with or endorsed by {{DISPLAY_NAME}} or its owners. +Official Crawlora client packages for the hosted {{DISPLAY_NAME}} API. Access {{OPERATION_COUNT}} API endpoints covering {{SEO_SUMMARY}} from JavaScript/TypeScript, Python, Go, Ruby, Java, and PHP. These clients call Crawlora's hosted API; they do not scrape {{DISPLAY_NAME}} locally. Requests use your Crawlora account and `CRAWLORA_API_KEY`; service usage follows your account billing plan. Crawlora is independent from and not affiliated with or endorsed by {{DISPLAY_NAME}} or its owners. ## Language packages @@ -15,9 +15,11 @@ For installation and runnable examples, use the README for your language. See th Create an account at [crawlora.net](https://crawlora.net/signup?utm_source=github&utm_medium=referral&utm_campaign=platform-clients&utm_content={{PLATFORM}}-repository-signup), open the [Crawlora console](https://crawlora.net/app?utm_source=github&utm_medium=referral&utm_campaign=platform-clients&utm_content={{PLATFORM}}-repository-console) to get an API key, or read the [API documentation](https://crawlora.net/docs?utm_source=github&utm_medium=referral&utm_campaign=platform-clients&utm_content={{PLATFORM}}-repository-api-docs). Keep `CRAWLORA_API_KEY` out of source control. -## API coverage +## API coverage and supported endpoints -The six clients provide access to {{OPERATION_COUNT}} public API operations. See the [API reference](docs/usage.md) for supported operations, parameters, and response details. +The six language clients provide access to all {{OPERATION_COUNT}} selected public {{DISPLAY_NAME}} API operations. Search or browse by endpoint path and operation ID below; the [complete API reference](docs/usage.md) adds parameters, enums, and response details. + +{{ENDPOINT_TABLE}} ## License diff --git a/scripts/_platformsdk/templates/documentation/javascript-README.md.tmpl b/scripts/_platformsdk/templates/documentation/javascript-README.md.tmpl index 290b8dc..0cb56e0 100644 --- a/scripts/_platformsdk/templates/documentation/javascript-README.md.tmpl +++ b/scripts/_platformsdk/templates/documentation/javascript-README.md.tmpl @@ -1,7 +1,7 @@ -# {{NPM_NAME}} +# {{NPM_NAME}} — {{DISPLAY_NAME}} API client for JavaScript and TypeScript JavaScript and TypeScript client for Crawlora's hosted {{DISPLAY_NAME}} API. -It calls [Crawlora](https://crawlora.net/?utm_source=npm&utm_medium=referral&utm_campaign=platform-clients&utm_content={{PLATFORM}}-javascript-homepage); it does not run a browser or scrape {{DISPLAY_NAME}} locally. A Crawlora account and `CRAWLORA_API_KEY` are required, and API use is billed under your Crawlora account. Crawlora is independent from and not endorsed by {{DISPLAY_NAME}} or its owners. +It exposes {{OPERATION_COUNT}} API endpoints for {{SEO_SUMMARY}} through [Crawlora](https://crawlora.net/?utm_source=npm&utm_medium=referral&utm_campaign=platform-clients&utm_content={{PLATFORM}}-javascript-homepage). It does not run a browser or scrape {{DISPLAY_NAME}} locally. A Crawlora account and `CRAWLORA_API_KEY` are required, and API use is billed under your Crawlora account. Crawlora is independent from and not endorsed by {{DISPLAY_NAME}} or its owners. ## Install @@ -37,6 +37,11 @@ group. See the full method and parameter list in the [online reference]({{DOCS_U Methods return promises and can be awaited. See the [runnable example]({{JS_EXAMPLE_URL}}) for a complete usage example. +## Supported {{DISPLAY_NAME}} API endpoints + +This package exposes each route below as a direct method and through the `{{PLATFORM}}` group. See the [endpoint and parameter reference]({{DOCS_URL}}) for complete input details. + +{{ENDPOINT_TABLE}} ## Configuration diff --git a/scripts/_platformsdk/templates/documentation/python-README.md.tmpl b/scripts/_platformsdk/templates/documentation/python-README.md.tmpl index f12f662..07eafa1 100644 --- a/scripts/_platformsdk/templates/documentation/python-README.md.tmpl +++ b/scripts/_platformsdk/templates/documentation/python-README.md.tmpl @@ -1,7 +1,6 @@ -# {{PYTHON_NAME}} +# {{PYTHON_NAME}} — {{DISPLAY_NAME}} API client for Python -Python client for Crawlora's hosted {{DISPLAY_NAME}} API. It calls Crawlora's -service at [Crawlora](https://crawlora.net/?utm_source=pypi&utm_medium=referral&utm_campaign=platform-clients&utm_content={{PLATFORM}}-python-homepage); it does not run a browser or scrape +Python client for Crawlora's hosted {{DISPLAY_NAME}} API. It exposes {{OPERATION_COUNT}} API endpoints covering {{SEO_SUMMARY}}. Requests go to [Crawlora](https://crawlora.net/?utm_source=pypi&utm_medium=referral&utm_campaign=platform-clients&utm_content={{PLATFORM}}-python-homepage); the package does not run a browser or scrape {{DISPLAY_NAME}} locally. A Crawlora account and `CRAWLORA_API_KEY` are required, and API use is billed under your Crawlora account. Crawlora is independent from and not endorsed by {{DISPLAY_NAME}} or its owners. @@ -64,6 +63,12 @@ asyncio.run(main()) See the [runnable example]({{PYTHON_EXAMPLE_URL}}) for a complete usage example. +## Supported {{DISPLAY_NAME}} API endpoints + +This package exposes every route below through direct snake_case methods and the `{{PLATFORM}}` group. See the [endpoint and parameter reference]({{DOCS_URL}}) for complete input details. + +{{ENDPOINT_TABLE}} + ## Configuration Pass your key through `api_key` or read `CRAWLORA_API_KEY` from the environment. diff --git a/scripts/_platformsdk/templates/documentation/usage.md.tmpl b/scripts/_platformsdk/templates/documentation/usage.md.tmpl index 700d3cc..7a21d6f 100644 --- a/scripts/_platformsdk/templates/documentation/usage.md.tmpl +++ b/scripts/_platformsdk/templates/documentation/usage.md.tmpl @@ -1,6 +1,6 @@ -# {{DISPLAY_NAME}} client usage +# {{DISPLAY_NAME}} API endpoint reference and client usage -The `{{NPM_NAME}}` and `{{PYTHON_NAME}}` packages call Crawlora's hosted API. Set `CRAWLORA_API_KEY` to a key for your Crawlora account before making requests. Service usage is billed under that account. These clients do not run a browser or scrape {{DISPLAY_NAME}} locally; Crawlora is independent from and not endorsed by {{DISPLAY_NAME}} or its owners. +This reference lists all {{OPERATION_COUNT}} public {{DISPLAY_NAME}} API endpoints exposed by the `{{NPM_NAME}}` and `{{PYTHON_NAME}}` packages, covering {{SEO_SUMMARY}}. The clients call Crawlora's hosted API. Set `CRAWLORA_API_KEY` to a key for your Crawlora account before making requests. Service usage is billed under that account. These clients do not run a browser or scrape {{DISPLAY_NAME}} locally; Crawlora is independent from and not endorsed by {{DISPLAY_NAME}} or its owners. The package tracks the public API contract revision `{{CONTRACT_REVISION}}` bundled with release `{{VERSION}}`. Maintainers can preview daily contract updates with the repository's `Sync live API contract` workflow; unchanged contracts do not produce package releases. diff --git a/scripts/_platformsdk/templates/golang/client.go.tmpl b/scripts/_platformsdk/templates/golang/client.go.tmpl index eed4650..26d8a89 100644 --- a/scripts/_platformsdk/templates/golang/client.go.tmpl +++ b/scripts/_platformsdk/templates/golang/client.go.tmpl @@ -1,8 +1,9 @@ -// Package {{package_name}} is a focused Go client for Crawlora's {{display_name}} endpoints. +// Package {{package_name}} is Crawlora's {{display_name}} API client for {{operation_count}} endpoints, covering {{seo_summary}}. // API documentation: {{docs_url}} package {{package_name}} import ( + "bytes" "context" "encoding/json" "fmt" @@ -63,12 +64,31 @@ func (c *Client) Call(ctx context.Context, operationID string, params Params) (a if !ok { return nil, fmt.Errorf("unknown {{display_name}} operation: %s", operationID) } - if operation.Method != http.MethodGet { + if operation.Method != http.MethodGet && operation.Method != http.MethodPost { return nil, fmt.Errorf("unsupported HTTP method %s for %s", operation.Method, operationID) } if params == nil { params = Params{} } + var payload io.Reader + if operation.BodyParam != "" { + // The JSON body is passed under the operation's body parameter name or "body". + value, ok := params[operation.BodyParam] + if !ok || value == nil { + value, ok = params["body"] + } + if !ok || value == nil { + if operation.BodyRequired { + return nil, fmt.Errorf("missing required request body: %s", operation.BodyParam) + } + } else { + encoded, err := json.Marshal(value) + if err != nil { + return nil, fmt.Errorf("encode request body: %w", err) + } + payload = bytes.NewReader(encoded) + } + } requestURL, err := buildURL(c.BaseURL, operation, params) if err != nil { return nil, err @@ -78,10 +98,13 @@ func (c *Client) Call(ctx context.Context, operationID string, params Params) (a ctx, cancel = context.WithTimeout(ctx, c.Timeout) defer cancel() } - request, err := http.NewRequestWithContext(ctx, http.MethodGet, requestURL, nil) + request, err := http.NewRequestWithContext(ctx, operation.Method, requestURL, payload) if err != nil { return nil, err } + if payload != nil { + request.Header.Set("Content-Type", "application/json") + } request.Header.Set("User-Agent", {{user_agent_json}}) for _, security := range operation.Security { if security == "ApiKeyAuth" && c.APIKey != "" { diff --git a/scripts/_platformsdk/templates/golang/operations.go.tmpl b/scripts/_platformsdk/templates/golang/operations.go.tmpl index c689bea..873d2cd 100644 --- a/scripts/_platformsdk/templates/golang/operations.go.tmpl +++ b/scripts/_platformsdk/templates/golang/operations.go.tmpl @@ -23,6 +23,9 @@ type operationDefinition struct { QueryParams []parameterDefinition Produces []string Security []string + // BodyParam names the JSON request body parameter of a POST operation. + BodyParam string + BodyRequired bool } var operations = map[string]operationDefinition{ diff --git a/scripts/_platformsdk/templates/java/Client.java.tmpl b/scripts/_platformsdk/templates/java/Client.java.tmpl index 569528b..a21d429 100644 --- a/scripts/_platformsdk/templates/java/Client.java.tmpl +++ b/scripts/_platformsdk/templates/java/Client.java.tmpl @@ -68,8 +68,14 @@ public final class Client implements AutoCloseable { Operation operation = OPERATIONS.get(operationId); if (operation == null) throw new IllegalArgumentException("unknown {{display_name}} operation: " + operationId); Map values = params == null ? Map.of() : params; + boolean post = operation.method().equals("POST"); Set unknown = new TreeSet<>(values.keySet()); unknown.removeAll(operation.params().keySet()); + // POST operations take their JSON body under the body parameter name or "body". + if (post) { + unknown.remove("body"); + unknown.remove(operation.bodyParam()); + } if (!unknown.isEmpty()) throw new IllegalArgumentException("unknown parameters for " + operationId + ": " + unknown); String path = operation.path(); @@ -93,11 +99,21 @@ public final class Client implements AutoCloseable { url.append(i == 0 ? '?' : '&').append(queryEncode(query.get(i).getKey())) .append('=').append(queryEncode(query.get(i).getValue())); } - HttpRequest request = HttpRequest.newBuilder(URI.create(url.toString())) + HttpRequest.Builder builder = HttpRequest.newBuilder(URI.create(url.toString())) .timeout(timeout) .header("x-api-key", apiKey) - .header("Accept", acceptHeader(operation)) - .GET().build(); + .header("Accept", acceptHeader(operation)); + if (post) { + Object body = values.get(operation.bodyParam()); + if (body == null) body = values.get("body"); + if (body == null) throw new IllegalArgumentException("missing request body for " + operationId); + String payload = body instanceof String text ? text : Json.write(body); + builder.header("Content-Type", "application/json") + .POST(HttpRequest.BodyPublishers.ofString(payload, StandardCharsets.UTF_8)); + } else { + builder.GET(); + } + HttpRequest request = builder.build(); try { HttpResponse response = http.send(request, HttpResponse.BodyHandlers.ofString(StandardCharsets.UTF_8)); String body = response.body(); diff --git a/scripts/_platformsdk/templates/java/Operation.java.tmpl b/scripts/_platformsdk/templates/java/Operation.java.tmpl index 0a1e2a9..7dc688b 100644 --- a/scripts/_platformsdk/templates/java/Operation.java.tmpl +++ b/scripts/_platformsdk/templates/java/Operation.java.tmpl @@ -4,4 +4,9 @@ import java.util.List; import java.util.Map; /** Immutable metadata for one operation in this platform client. */ -public record Operation(String id, String method, String path, Map params, List produces) {} +public record Operation(String id, String method, String path, Map params, List produces, String bodyParam) { + /** Operation without a request body. */ + public Operation(String id, String method, String path, Map params, List produces) { + this(id, method, path, params, produces, ""); + } +} diff --git a/scripts/_platformsdk/templates/java/README.md.tmpl b/scripts/_platformsdk/templates/java/README.md.tmpl index 774d5a0..25541b4 100644 --- a/scripts/_platformsdk/templates/java/README.md.tmpl +++ b/scripts/_platformsdk/templates/java/README.md.tmpl @@ -1,6 +1,6 @@ -# Crawlora {{display_name}} Java Client +# Crawlora {{display_name}} API client for Java -The official Java client for Crawlora's hosted {{display_name}} API. It calls Crawlora's hosted API with your `x-api-key`; it does not connect to the upstream site directly. +The official Java client for Crawlora's hosted {{display_name}} API. It exposes {{operation_count}} endpoints covering {{seo_summary}}. Requests use your `x-api-key`; the client does not connect to the upstream site directly. ## Install @@ -31,6 +31,12 @@ Each operation has a direct method that accepts the parameters documented for th For custom hosted API routing and timeouts, use `new Client(apiKey, baseUrl, Duration.ofSeconds(20))`. Text responses are returned as `String`; JSON responses are parsed into Java maps, lists, and scalar values. +## Supported {{display_name}} API endpoints + +Browse every route included in this Java package. The [endpoint reference]({{repository}}/blob/main/docs/usage.md) also lists parameters and response details. + +{{endpoint_table}} + ## Links - [Crawlora](https://crawlora.net/?utm_source=maven-central&utm_medium=referral&utm_campaign=platform-clients&utm_content={{platform}}-java-homepage) diff --git a/scripts/_platformsdk/templates/javascript/package.json b/scripts/_platformsdk/templates/javascript/package.json index 0c66e6e..4705d80 100644 --- a/scripts/_platformsdk/templates/javascript/package.json +++ b/scripts/_platformsdk/templates/javascript/package.json @@ -1,10 +1,10 @@ { "name": "{{npm_name}}", "version": "{{version}}", - "description": "Typed JavaScript client for the Crawlora {{display_name}} API", + "description": "Crawlora {{display_name}} API client with {{operation_count}} endpoints for {{seo_summary}}", "homepage": "{{homepage}}", "bugs": { "url": "{{bugs_url}}" }, - "keywords": ["crawlora", "api-client", "web-scraping", "{{platform}}", "typescript"], + "keywords": {{seo_keywords_json}}, "type": "module", "main": "./src/index.js", "types": "./src/index.d.ts", diff --git a/scripts/_platformsdk/templates/php/Client.php.tpl b/scripts/_platformsdk/templates/php/Client.php.tpl index c407ba9..b904ed9 100644 --- a/scripts/_platformsdk/templates/php/Client.php.tpl +++ b/scripts/_platformsdk/templates/php/Client.php.tpl @@ -53,14 +53,18 @@ JSON, true, 512, JSON_THROW_ON_ERROR); if ($this->apiKey === '') { throw new ClientException('Crawlora API key is required', null, $operationId); } + $payload = $this->requestBody($operation, $params); $url = $this->buildUrl($operation, $params); $headers = [ 'x-api-key: ' . $this->apiKey, 'User-Agent: crawlora-{{PLATFORM}}-php/{{VERSION}}', 'Accept: ' . (in_array('text/plain', $operation['produces'], true) ? 'application/json, text/plain' : 'application/json'), ]; + if ($payload !== null) { + $headers[] = 'Content-Type: application/json'; + } try { - [$status, $contentType, $body] = $this->send($url, $headers, $operationId); + [$status, $contentType, $body] = $this->send($url, $headers, $operationId, $operation['method'], $payload); } catch (CrawloraException $exception) { throw $exception; } catch (\Throwable $exception) { @@ -100,9 +104,29 @@ JSON, true, 512, JSON_THROW_ON_ERROR); {{DIRECT_METHODS}} + /** POST operations take their JSON body under the body parameter name or "body". */ + private function requestBody(array $operation, array $params): ?string + { + $name = $operation['bodyParam'] ?? null; + if ($name === null) { + return null; + } + $value = $params[$name] ?? ($params['body'] ?? null); + if ($value === null) { + if ($operation['bodyRequired'] ?? false) { + throw new ClientException('Missing request body: ' . $name, null, $operation['id']); + } + return null; + } + return is_string($value) ? $value : json_encode($value, JSON_THROW_ON_ERROR); + } + private function buildUrl(array $operation, array $params): string { $known = array_column($operation['params'], 'name'); + if (($operation['bodyParam'] ?? null) !== null) { + $known[] = 'body'; + } $unknown = array_diff(array_keys($params), $known, ['response_type', '_response_type']); if ($unknown !== []) { throw new ClientException('Unknown parameters: ' . implode(', ', $unknown), null, $operation['id']); @@ -169,17 +193,26 @@ JSON, true, 512, JSON_THROW_ON_ERROR); return (string) $value; } - private function send(string $url, array $headers, string $operationId): array + private function send(string $url, array $headers, string $operationId, string $method = 'GET', ?string $payload = null): array { if ($this->transport !== null) { - $result = ($this->transport)($url, $headers, $this->timeout); + $result = $method === 'POST' + ? ($this->transport)($url, $headers, $this->timeout, $method, $payload) + : ($this->transport)($url, $headers, $this->timeout); return [(int) $result['status'], (string) ($result['content_type'] ?? ''), (string) ($result['body'] ?? '')]; } $handle = curl_init($url); if ($handle === false) { throw new NetworkException('Could not initialize cURL', null, $operationId); } - curl_setopt_array($handle, [ + curl_setopt_array($handle, $method === 'POST' ? [ + CURLOPT_POST => true, + CURLOPT_POSTFIELDS => $payload ?? '', + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => $headers, + CURLOPT_TIMEOUT_MS => (int) ($this->timeout * 1000), + CURLOPT_CONNECTTIMEOUT_MS => (int) ($this->timeout * 1000), + ] : [ CURLOPT_HTTPGET => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => $headers, diff --git a/scripts/_platformsdk/templates/php/README.md.tpl b/scripts/_platformsdk/templates/php/README.md.tpl index 99692eb..0d52b69 100644 --- a/scripts/_platformsdk/templates/php/README.md.tpl +++ b/scripts/_platformsdk/templates/php/README.md.tpl @@ -1,6 +1,6 @@ -# Crawlora {{DISPLAY_NAME}} PHP client +# Crawlora {{DISPLAY_NAME}} API client for PHP (`{{PACKAGE_NAME}}`) -This package calls the Crawlora hosted API at `https://api.crawlora.net/api/v1`. It does not call or scrape {{DISPLAY_NAME}} directly. Requests require a Crawlora API key and use your Crawlora account's service plan. +This PHP package calls Crawlora's hosted {{DISPLAY_NAME}} API at `https://api.crawlora.net/api/v1`. It exposes {{OPERATION_COUNT}} endpoints covering {{SEO_SUMMARY}}. It does not call or scrape {{DISPLAY_NAME}} directly. Requests require a Crawlora API key and use your Crawlora account's service plan. ## Install @@ -22,4 +22,10 @@ $client->close(); The client uses PHP cURL and JSON. Constructor options are `apiKey`, `baseUrl`, and `timeout`. Call the operation-specific method for direct access to each supported operation, or `request($operationId, $params, $responseType)` to dispatch by operation ID. Set `$responseType` to `text` for raw text output such as transcript formats. The package includes {{OPERATION_COUNT}} API operations. +## Supported {{DISPLAY_NAME}} API endpoints + +Browse every route included in this Composer package. The [endpoint reference]({{REPOSITORY}}/blob/main/docs/usage.md) includes parameter and response details. + +{{ENDPOINT_TABLE}} + See [Crawlora](https://crawlora.net/?utm_source=packagist&utm_medium=referral&utm_campaign=platform-clients&utm_content={{PLATFORM}}-php-homepage), the [API documentation](https://crawlora.net/docs?utm_source=packagist&utm_medium=referral&utm_campaign=platform-clients&utm_content={{PLATFORM}}-php-api-docs), and the [PHP client source]({{REPOSITORY}}). The complete operation and parameter reference is in the [platform repository]({{REPOSITORY}}/blob/main/docs/usage.md). diff --git a/scripts/_platformsdk/templates/php/composer.json.tpl b/scripts/_platformsdk/templates/php/composer.json.tpl index 77c3ca4..b446c06 100644 --- a/scripts/_platformsdk/templates/php/composer.json.tpl +++ b/scripts/_platformsdk/templates/php/composer.json.tpl @@ -1,6 +1,7 @@ { "name": "{{PACKAGE_NAME}}", - "description": "{{DISPLAY_NAME}} client for the Crawlora hosted API", + "description": "Crawlora {{DISPLAY_NAME}} API client with {{OPERATION_COUNT}} endpoints for {{SEO_SUMMARY}}", + "keywords": {{SEO_KEYWORDS_JSON}}, "type": "library", "license": "MIT", "require": { diff --git a/scripts/_platformsdk/templates/python/pyproject.toml.tpl b/scripts/_platformsdk/templates/python/pyproject.toml.tpl index 3816bfa..ba3d1e7 100644 --- a/scripts/_platformsdk/templates/python/pyproject.toml.tpl +++ b/scripts/_platformsdk/templates/python/pyproject.toml.tpl @@ -5,8 +5,9 @@ build-backend = "setuptools.build_meta" [project] name = "{{PYTHON_NAME}}" version = "{{VERSION}}" -description = "Typed {{DISPLAY_NAME}} client for the Crawlora hosted API" +description = "Crawlora {{DISPLAY_NAME}} API client with {{OPERATION_COUNT}} endpoints for {{SEO_SUMMARY}}" readme = "README.md" +keywords = {{SEO_KEYWORDS_JSON}} requires-python = ">=3.10" license = "MIT" license-files = ["LICENSE"] diff --git a/scripts/_platformsdk/templates/ruby/README.md.tpl b/scripts/_platformsdk/templates/ruby/README.md.tpl index a14ce77..81e3bf5 100644 --- a/scripts/_platformsdk/templates/ruby/README.md.tpl +++ b/scripts/_platformsdk/templates/ruby/README.md.tpl @@ -1,6 +1,6 @@ -# Crawlora {{DISPLAY_NAME}} Ruby client +# Crawlora {{DISPLAY_NAME}} API client for Ruby (`{{GEM_NAME}}`) -This gem calls the Crawlora hosted API at `https://api.crawlora.net/api/v1`. It does not call or scrape {{DISPLAY_NAME}} directly. Requests require your Crawlora API key and use your account's service plan. +This Ruby gem calls Crawlora's hosted {{DISPLAY_NAME}} API at `https://api.crawlora.net/api/v1`. It exposes {{OPERATION_COUNT}} endpoints covering {{SEO_SUMMARY}}; it does not call or scrape {{DISPLAY_NAME}} directly. Requests require your Crawlora API key and use your account's service plan. ## Install @@ -30,4 +30,10 @@ client.close Client options include `api_key`, `base_url`, and `timeout`. Ruby stdlib provides the HTTP and JSON support. +## Supported {{DISPLAY_NAME}} API endpoints + +Browse every route included in this gem. The [endpoint reference]({{REPOSITORY}}/blob/main/docs/usage.md) includes parameter and response details. + +{{ENDPOINT_TABLE}} + See [Crawlora](https://crawlora.net/?utm_source=rubygems&utm_medium=referral&utm_campaign=platform-clients&utm_content={{PLATFORM}}-ruby-homepage), the [API documentation](https://crawlora.net/docs?utm_source=rubygems&utm_medium=referral&utm_campaign=platform-clients&utm_content={{PLATFORM}}-ruby-api-docs), and [the package repository]({{REPOSITORY}}) for account setup, the API operation reference, and release history. diff --git a/scripts/_platformsdk/templates/ruby/client.rb.tpl b/scripts/_platformsdk/templates/ruby/client.rb.tpl index d3be466..ca6bf95 100644 --- a/scripts/_platformsdk/templates/ruby/client.rb.tpl +++ b/scripts/_platformsdk/templates/ruby/client.rb.tpl @@ -45,15 +45,24 @@ module Crawlora raise Errors::ClientError.new("unknown operation: #{operation_id}", operation_id: operation_id) unless operation raise Errors::ClientError.new("Crawlora API key is required", operation_id: operation_id) if @api_key.nil? || @api_key.to_s.empty? normalized = params.each_with_object({}) { |(key, value), out| out[key.to_s] = value } + payload = request_body(operation, normalized) url = build_url(operation, normalized) uri = URI.parse(url) - request = Net::HTTP::Get.new(uri) + request = operation["method"] == "POST" ? Net::HTTP::Post.new(uri) : Net::HTTP::Get.new(uri) + unless payload.nil? + request.body = payload + request["Content-Type"] = "application/json" + end request["x-api-key"] = @api_key request["User-Agent"] = @user_agent request["Accept"] = operation["produces"].include?("text/plain") ? "application/json, text/plain" : "application/json" begin if @transport - response = @transport.call(url, request.to_hash, @timeout) + response = if operation["method"] == "POST" + @transport.call(url, request.to_hash, @timeout, "POST", payload) + else + @transport.call(url, request.to_hash, @timeout) + end status = Integer(response.fetch(:status) { response.fetch("status") }) body = response.fetch(:body) { response.fetch("body", "") } headers = response.fetch(:headers) { response.fetch("headers", {}) } @@ -109,8 +118,21 @@ module Crawlora private + # POST operations take their JSON body under the body parameter name or "body". + def request_body(operation, params) + name = operation["bodyParam"] + return nil if name.nil? + value = params.key?(name) ? params[name] : params["body"] + if value.nil? + raise Errors::ClientError.new("missing request body: #{name}", operation_id: operation["id"]) if operation["bodyRequired"] + return nil + end + value.is_a?(String) ? value : JSON.generate(value) + end + def build_url(operation, params) known = operation["params"].map { |param| param["name"] } + known << "body" if operation["bodyParam"] unknown = params.keys - known raise Errors::ClientError.new("unknown parameters: #{unknown.join(', ')}", operation_id: operation["id"]) unless unknown.empty? path = operation["path"].dup diff --git a/scripts/_platformsdk/templates/ruby/gem.gemspec.tpl b/scripts/_platformsdk/templates/ruby/gem.gemspec.tpl index 7ae3a93..5177cc0 100644 --- a/scripts/_platformsdk/templates/ruby/gem.gemspec.tpl +++ b/scripts/_platformsdk/templates/ruby/gem.gemspec.tpl @@ -3,8 +3,8 @@ require_relative "lib/crawlora/{{PLATFORM}}/version" Gem::Specification.new do |spec| spec.name = "{{GEM_NAME}}" spec.version = Crawlora::{{CLASS_NAME}}::VERSION - spec.summary = "{{DISPLAY_NAME}} client for the Crawlora hosted API" - spec.description = "Credential-free {{DISPLAY_NAME}} API access through Crawlora's hosted service." + spec.summary = "{{DISPLAY_NAME}} API client for Crawlora ({{OPERATION_COUNT}} endpoints)" + spec.description = "Ruby client for Crawlora's hosted {{DISPLAY_NAME}} API. Covers {{SEO_SUMMARY}} across {{OPERATION_COUNT}} endpoints." spec.authors = ["Crawlora"] spec.license = "MIT" spec.required_ruby_version = ">= 2.6" diff --git a/scripts/_platformsdk/test_sync.py b/scripts/_platformsdk/test_sync.py index 55fcfe0..ad98ea9 100644 --- a/scripts/_platformsdk/test_sync.py +++ b/scripts/_platformsdk/test_sync.py @@ -55,12 +55,30 @@ def _raw_spec(platform: str, *, extra: bool = False) -> dict: "tiktok": [("search", "search"), ("trending", "trending")], "amazon": [("search", "search"), ("product", "product")], "imdb": [("search", "search"), ("charts", "charts")], + "google": [("news", "news"), ("suggest", "suggest")], + "bing": [("search", "search"), ("news", "news")], + "brave": [("search", "search"), ("suggest", "suggest")], + "duckduckgo": [("search", "search"), ("news", "news")], + "ebay": [("seller", "seller"), ("live-streams", "live/streams")], + "googleplay": [("search", "search"), ("app", "app")], + "appstore": [("search", "search"), ("app", "app")], + "airbnb": [("search", "search"), ("room", "room")], + "spotify": [("search", "search"), ("track", "track")], }[platform] paths = {} for suffix, path_suffix in operation_ids: operation = _operation(platform, suffix) + if (platform, suffix) == ("ebay", "seller"): + operation["parameters"][0]["name"] = "seller" + if (platform, suffix) in {("google", "news"), ("ebay", "seller")}: + # These packages have no "-search" operation; their first + # operation carries the raw header parameter instead. + operation["parameters"].append({"name": "X-API-Key", "in": "header", "type": "string"}) if suffix == "search": - query_name = {"tiktok": "keyword", "amazon": "k", "imdb": "query"}.get(platform) + query_name = { + "tiktok": "keyword", "amazon": "k", "imdb": "query", + "googleplay": "term", "appstore": "term", "airbnb": "location", + }.get(platform) if query_name: operation["parameters"][0]["name"] = query_name operation["parameters"].append({"name": "X-API-Key", "in": "header", "type": "string"}) @@ -218,14 +236,17 @@ def test_raw_header_normalization_matches_selected_public_contract(self) -> None normalized = sync.normalize_public_spec(source, platform) prepared = copy.deepcopy(source) prepared["securityDefinitions"] = copy.deepcopy(sync._AUTH_DEFINITIONS) - search = next(op["get"] for path, op in prepared["paths"].items() if op["get"]["operationId"] == f"{platform}-search") + search = next( + op["get"] for path, op in prepared["paths"].items() + if any(p.get("in") == "header" for p in op["get"]["parameters"]) + ) search["parameters"] = [p for p in search["parameters"] if p.get("in") != "header"] search["security"] = [{"ApiKeyAuth": []}] expected = select(prepared, platform) self.assertEqual(normalized, expected) self.assertEqual(set(normalized["definitions"]), {"Envelope", "Item"}) - def test_discovers_and_generates_new_operation_for_all_nine_clients(self) -> None: + def test_discovers_and_generates_new_operation_for_all_clients(self) -> None: for platform in PLATFORMS: with self.subTest(platform=platform), tempfile.TemporaryDirectory(prefix="platform-sync-") as temp: root = Path(temp)