Help us shape the future of Go! Take the 2026 Go Developer Survey

sofascore

package module
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 11 Imported by: 0

README

SofaScore clients for Crawlora

Official Crawlora client packages for the hosted SofaScore API. These packages send requests to Crawlora's API and require a Crawlora account and CRAWLORA_API_KEY; service usage follows your Crawlora account billing plan.

The packages do not run a browser or scrape SofaScore locally. Crawlora is an independent service and is not affiliated with or endorsed by SofaScore or its owners.

Create an account at crawlora.net, open the Crawlora console to get an API key, or read the API documentation.

Install

npm install @crawlora-org/sofascore
python -m pip install crawlora-sofascore
go get github.com/Crawlora-org/crawlora-sofascore@latest
gem install crawlora-sofascore
composer require crawlora/sofascore

For Java, add net.crawlora:crawlora-sofascore:0.3.2 to your Maven dependencies; see java/README.md.

Set your Crawlora key in the environment before running a client:

export CRAWLORA_API_KEY="your-crawlora-api-key"

Do not commit API keys. See the language-specific READMEs for sync and async use.

PHP example

The Packagist package is available as crawlora/sofascore:

composer require crawlora/sofascore
<?php
require __DIR__ . '/vendor/autoload.php';

$apiKey = getenv('CRAWLORA_API_KEY');
if (!$apiKey) throw new RuntimeException('Set CRAWLORA_API_KEY before running this example.');
$client = new \Crawlora\Sofascore\Client(apiKey: $apiKey);
$result = $client->request("sofascore-search", ['q' => 'Liverpool']);
print_r($result);
$client->close();

The same example and install details are in php/README.md.

License

MIT. See LICENSE.

Documentation

Overview

Package sofascore is a focused Go client for Crawlora's SofaScore endpoints. API documentation: https://crawlora.net/docs?utm_source=pkg.go.dev&utm_medium=referral&utm_campaign=platform-clients&utm_content=sofascore-go-api-docs

Index

Constants

View Source
const (
	DefaultBaseURL = "https://api.crawlora.net/api/v1"
	Version        = "0.3.2"
)
View Source
const OperationCount = 109

OperationCount reports how many selected-platform operations this module exposes.

Variables

This section is empty.

Functions

func OperationIDs

func OperationIDs() []string

OperationIDs returns the selected operation IDs in stable sorted order.

Types

type Client

type Client struct {
	APIKey     string
	BaseURL    string
	Timeout    time.Duration
	HTTPClient *http.Client
}

Client calls only the operation IDs included in this platform module.

func NewClient

func NewClient(apiKey string) *Client

NewClient creates a client using the supplied API key, or CRAWLORA_API_KEY when empty.

func (*Client) Call

func (c *Client) Call(ctx context.Context, operationID string, params Params) (any, error)

Call executes a selected platform operation by operation ID.

func (*Client) Categories

func (c *Client) Categories(ctx context.Context, params Params) (any, error)

Categories calls the sofascore-categories operation.

func (*Client) CategoryTournaments

func (c *Client) CategoryTournaments(ctx context.Context, params Params) (any, error)

CategoryTournaments calls the sofascore-category-tournaments operation.

func (*Client) Close

func (c *Client) Close() error

Close releases idle connections held by the configured HTTP transport.

func (*Client) Draft added in v0.3.0

func (c *Client) Draft(ctx context.Context, params Params) (any, error)

Draft calls the sofascore-draft operation.

func (*Client) DraftPicks added in v0.3.0

func (c *Client) DraftPicks(ctx context.Context, params Params) (any, error)

DraftPicks calls the sofascore-draft-picks operation.

func (*Client) EsportsGame added in v0.3.0

func (c *Client) EsportsGame(ctx context.Context, params Params) (any, error)

EsportsGame calls the sofascore-esports-game operation.

func (*Client) Event

func (c *Client) Event(ctx context.Context, params Params) (any, error)

Event calls the sofascore-event operation.

func (*Client) EventAtBatPitches added in v0.3.0

func (c *Client) EventAtBatPitches(ctx context.Context, params Params) (any, error)

EventAtBatPitches calls the sofascore-event-at-bat-pitches operation.

func (*Client) EventAtBats added in v0.3.0

func (c *Client) EventAtBats(ctx context.Context, params Params) (any, error)

EventAtBats calls the sofascore-event-at-bats operation.

func (*Client) EventAveragePositions added in v0.3.0

func (c *Client) EventAveragePositions(ctx context.Context, params Params) (any, error)

EventAveragePositions calls the sofascore-event-average-positions operation.

func (*Client) EventBaseballTopPerformers added in v0.3.0

func (c *Client) EventBaseballTopPerformers(ctx context.Context, params Params) (any, error)

EventBaseballTopPerformers calls the sofascore-event-baseball-top-performers operation.

func (*Client) EventBestPlayers

func (c *Client) EventBestPlayers(ctx context.Context, params Params) (any, error)

EventBestPlayers calls the sofascore-event-best-players operation.

func (*Client) EventComments

func (c *Client) EventComments(ctx context.Context, params Params) (any, error)

EventComments calls the sofascore-event-comments operation.

func (*Client) EventEsportsGames added in v0.3.0

func (c *Client) EventEsportsGames(ctx context.Context, params Params) (any, error)

EventEsportsGames calls the sofascore-event-esports-games operation.

func (*Client) EventGraph

func (c *Client) EventGraph(ctx context.Context, params Params) (any, error)

EventGraph calls the sofascore-event-graph operation.

func (*Client) EventH2h

func (c *Client) EventH2h(ctx context.Context, params Params) (any, error)

EventH2h calls the sofascore-event-h2h operation.

func (*Client) EventHighlights added in v0.3.0

func (c *Client) EventHighlights(ctx context.Context, params Params) (any, error)

EventHighlights calls the sofascore-event-highlights operation.

func (*Client) EventIncidents

func (c *Client) EventIncidents(ctx context.Context, params Params) (any, error)

EventIncidents calls the sofascore-event-incidents operation.

func (*Client) EventInnings added in v0.3.0

func (c *Client) EventInnings(ctx context.Context, params Params) (any, error)

EventInnings calls the sofascore-event-innings operation.

func (*Client) EventLineups

func (c *Client) EventLineups(ctx context.Context, params Params) (any, error)

EventLineups calls the sofascore-event-lineups operation.

func (*Client) EventManagers added in v0.3.0

func (c *Client) EventManagers(ctx context.Context, params Params) (any, error)

EventManagers calls the sofascore-event-managers operation.

func (*Client) EventOdds

func (c *Client) EventOdds(ctx context.Context, params Params) (any, error)

EventOdds calls the sofascore-event-odds operation.

func (*Client) EventPlayerHeatmap added in v0.3.0

func (c *Client) EventPlayerHeatmap(ctx context.Context, params Params) (any, error)

EventPlayerHeatmap calls the sofascore-event-player-heatmap operation.

func (*Client) EventPlayerStatistics

func (c *Client) EventPlayerStatistics(ctx context.Context, params Params) (any, error)

EventPlayerStatistics calls the sofascore-event-player-statistics operation.

func (*Client) EventPointByPoint added in v0.3.0

func (c *Client) EventPointByPoint(ctx context.Context, params Params) (any, error)

EventPointByPoint calls the sofascore-event-point-by-point operation.

func (*Client) EventPregameForm added in v0.3.0

func (c *Client) EventPregameForm(ctx context.Context, params Params) (any, error)

EventPregameForm calls the sofascore-event-pregame-form operation.

func (*Client) EventShotmap

func (c *Client) EventShotmap(ctx context.Context, params Params) (any, error)

EventShotmap calls the sofascore-event-shotmap operation.

func (*Client) EventStatistics

func (c *Client) EventStatistics(ctx context.Context, params Params) (any, error)

EventStatistics calls the sofascore-event-statistics operation.

func (*Client) EventTeamHeatmap added in v0.3.0

func (c *Client) EventTeamHeatmap(ctx context.Context, params Params) (any, error)

EventTeamHeatmap calls the sofascore-event-team-heatmap operation.

func (*Client) EventTeamStreaks added in v0.3.0

func (c *Client) EventTeamStreaks(ctx context.Context, params Params) (any, error)

EventTeamStreaks calls the sofascore-event-team-streaks operation.

func (*Client) EventTennisPower added in v0.3.0

func (c *Client) EventTennisPower(ctx context.Context, params Params) (any, error)

EventTennisPower calls the sofascore-event-tennis-power operation.

func (*Client) EventTvChannels added in v0.3.0

func (c *Client) EventTvChannels(ctx context.Context, params Params) (any, error)

EventTvChannels calls the sofascore-event-tv-channels operation.

func (*Client) EventVotes added in v0.3.0

func (c *Client) EventVotes(ctx context.Context, params Params) (any, error)

EventVotes calls the sofascore-event-votes operation.

func (*Client) LiveEvents

func (c *Client) LiveEvents(ctx context.Context, params Params) (any, error)

LiveEvents calls the sofascore-live-events operation.

func (*Client) Manager

func (c *Client) Manager(ctx context.Context, params Params) (any, error)

Manager calls the sofascore-manager operation.

func (*Client) ManagerEvents

func (c *Client) ManagerEvents(ctx context.Context, params Params) (any, error)

ManagerEvents calls the sofascore-manager-events operation.

func (*Client) MmaCard added in v0.3.0

func (c *Client) MmaCard(ctx context.Context, params Params) (any, error)

MmaCard calls the sofascore-mma-card operation.

func (*Client) MmaSchedule added in v0.3.0

func (c *Client) MmaSchedule(ctx context.Context, params Params) (any, error)

MmaSchedule calls the sofascore-mma-schedule operation.

func (*Client) OddsDropping added in v0.3.0

func (c *Client) OddsDropping(ctx context.Context, params Params) (any, error)

OddsDropping calls the sofascore-odds-dropping operation.

func (*Client) OddsWinning added in v0.3.0

func (c *Client) OddsWinning(ctx context.Context, params Params) (any, error)

OddsWinning calls the sofascore-odds-winning operation.

func (*Client) Player

func (c *Client) Player(ctx context.Context, params Params) (any, error)

Player calls the sofascore-player operation.

func (*Client) PlayerAttributes added in v0.3.0

func (c *Client) PlayerAttributes(ctx context.Context, params Params) (any, error)

PlayerAttributes calls the sofascore-player-attributes operation.

func (*Client) PlayerEvents added in v0.3.0

func (c *Client) PlayerEvents(ctx context.Context, params Params) (any, error)

PlayerEvents calls the sofascore-player-events operation.

func (*Client) PlayerLastYearSummary added in v0.3.0

func (c *Client) PlayerLastYearSummary(ctx context.Context, params Params) (any, error)

PlayerLastYearSummary calls the sofascore-player-last-year-summary operation.

func (*Client) PlayerNationalTeamStatistics added in v0.3.0

func (c *Client) PlayerNationalTeamStatistics(ctx context.Context, params Params) (any, error)

PlayerNationalTeamStatistics calls the sofascore-player-national-team-statistics operation.

func (*Client) PlayerPenaltyHistory added in v0.3.0

func (c *Client) PlayerPenaltyHistory(ctx context.Context, params Params) (any, error)

PlayerPenaltyHistory calls the sofascore-player-penalty-history operation.

func (*Client) PlayerRatings added in v0.3.0

func (c *Client) PlayerRatings(ctx context.Context, params Params) (any, error)

PlayerRatings calls the sofascore-player-ratings operation.

func (*Client) PlayerSeasonHeatmap added in v0.3.0

func (c *Client) PlayerSeasonHeatmap(ctx context.Context, params Params) (any, error)

PlayerSeasonHeatmap calls the sofascore-player-season-heatmap operation.

func (*Client) PlayerSeasonStatistics

func (c *Client) PlayerSeasonStatistics(ctx context.Context, params Params) (any, error)

PlayerSeasonStatistics calls the sofascore-player-season-statistics operation.

func (*Client) PlayerStatisticalRankings added in v0.3.0

func (c *Client) PlayerStatisticalRankings(ctx context.Context, params Params) (any, error)

PlayerStatisticalRankings calls the sofascore-player-statistical-rankings operation.

func (*Client) PlayerStatisticsSeasons

func (c *Client) PlayerStatisticsSeasons(ctx context.Context, params Params) (any, error)

PlayerStatisticsSeasons calls the sofascore-player-statistics-seasons operation.

func (*Client) PlayerTournaments added in v0.3.0

func (c *Client) PlayerTournaments(ctx context.Context, params Params) (any, error)

PlayerTournaments calls the sofascore-player-tournaments operation.

func (*Client) PlayerTransfers

func (c *Client) PlayerTransfers(ctx context.Context, params Params) (any, error)

PlayerTransfers calls the sofascore-player-transfers operation.

func (*Client) RankingTypes

func (c *Client) RankingTypes(ctx context.Context, params Params) (any, error)

RankingTypes calls the sofascore-ranking-types operation.

func (*Client) Rankings

func (c *Client) Rankings(ctx context.Context, params Params) (any, error)

Rankings calls the sofascore-rankings operation.

func (*Client) Referee added in v0.3.0

func (c *Client) Referee(ctx context.Context, params Params) (any, error)

Referee calls the sofascore-referee operation.

func (*Client) RefereeEvents added in v0.3.0

func (c *Client) RefereeEvents(ctx context.Context, params Params) (any, error)

RefereeEvents calls the sofascore-referee-events operation.

func (*Client) RefereeStatistics added in v0.3.0

func (c *Client) RefereeStatistics(ctx context.Context, params Params) (any, error)

RefereeStatistics calls the sofascore-referee-statistics operation.

func (*Client) RoundEvents

func (c *Client) RoundEvents(ctx context.Context, params Params) (any, error)

RoundEvents calls the sofascore-round-events operation.

func (*Client) ScheduledEvents

func (c *Client) ScheduledEvents(ctx context.Context, params Params) (any, error)

ScheduledEvents calls the sofascore-scheduled-events operation.

func (*Client) ScheduledTournaments

func (c *Client) ScheduledTournaments(ctx context.Context, params Params) (any, error)

ScheduledTournaments calls the sofascore-scheduled-tournaments operation.

func (*Client) Search

func (c *Client) Search(ctx context.Context, params Params) (any, error)

Search calls the sofascore-search operation.

func (*Client) SearchTyped added in v0.3.0

func (c *Client) SearchTyped(ctx context.Context, params Params) (any, error)

SearchTyped calls the sofascore-search-typed operation.

func (*Client) SeasonEvents

func (c *Client) SeasonEvents(ctx context.Context, params Params) (any, error)

SeasonEvents calls the sofascore-season-events operation.

func (*Client) Sports

func (c *Client) Sports(ctx context.Context, params Params) (any, error)

Sports calls the sofascore-sports operation.

func (*Client) Stage added in v0.3.0

func (c *Client) Stage(ctx context.Context, params Params) (any, error)

Stage calls the sofascore-stage operation.

func (*Client) StageCategories added in v0.3.0

func (c *Client) StageCategories(ctx context.Context, params Params) (any, error)

StageCategories calls the sofascore-stage-categories operation.

func (*Client) StageDriverPerformance added in v0.3.0

func (c *Client) StageDriverPerformance(ctx context.Context, params Params) (any, error)

StageDriverPerformance calls the sofascore-stage-driver-performance operation.

func (*Client) StageFeatured added in v0.3.0

func (c *Client) StageFeatured(ctx context.Context, params Params) (any, error)

StageFeatured calls the sofascore-stage-featured operation.

func (*Client) StageSchedule added in v0.3.0

func (c *Client) StageSchedule(ctx context.Context, params Params) (any, error)

StageSchedule calls the sofascore-stage-schedule operation.

func (*Client) StageSeasons added in v0.3.0

func (c *Client) StageSeasons(ctx context.Context, params Params) (any, error)

StageSeasons calls the sofascore-stage-seasons operation.

func (*Client) StageStandings added in v0.3.0

func (c *Client) StageStandings(ctx context.Context, params Params) (any, error)

StageStandings calls the sofascore-stage-standings operation.

func (*Client) StageSubstages added in v0.3.0

func (c *Client) StageSubstages(ctx context.Context, params Params) (any, error)

StageSubstages calls the sofascore-stage-substages operation.

func (*Client) Standings

func (c *Client) Standings(ctx context.Context, params Params) (any, error)

Standings calls the sofascore-standings operation.

func (*Client) Team

func (c *Client) Team(ctx context.Context, params Params) (any, error)

Team calls the sofascore-team operation.

func (*Client) TeamAchievements added in v0.3.0

func (c *Client) TeamAchievements(ctx context.Context, params Params) (any, error)

TeamAchievements calls the sofascore-team-achievements operation.

func (*Client) TeamEvents

func (c *Client) TeamEvents(ctx context.Context, params Params) (any, error)

TeamEvents calls the sofascore-team-events operation.

func (*Client) TeamGoalDistributions added in v0.3.0

func (c *Client) TeamGoalDistributions(ctx context.Context, params Params) (any, error)

TeamGoalDistributions calls the sofascore-team-goal-distributions operation.

func (*Client) TeamNearEvents added in v0.3.0

func (c *Client) TeamNearEvents(ctx context.Context, params Params) (any, error)

TeamNearEvents calls the sofascore-team-near-events operation.

func (*Client) TeamOfTheWeek

func (c *Client) TeamOfTheWeek(ctx context.Context, params Params) (any, error)

TeamOfTheWeek calls the sofascore-team-of-the-week operation.

func (*Client) TeamOfTheWeekPeriods

func (c *Client) TeamOfTheWeekPeriods(ctx context.Context, params Params) (any, error)

TeamOfTheWeekPeriods calls the sofascore-team-of-the-week-periods operation.

func (*Client) TeamPerformance added in v0.3.0

func (c *Client) TeamPerformance(ctx context.Context, params Params) (any, error)

TeamPerformance calls the sofascore-team-performance operation.

func (*Client) TeamPlayerStatistics added in v0.3.0

func (c *Client) TeamPlayerStatistics(ctx context.Context, params Params) (any, error)

TeamPlayerStatistics calls the sofascore-team-player-statistics operation.

func (*Client) TeamPlayerStatisticsSeasons added in v0.3.0

func (c *Client) TeamPlayerStatisticsSeasons(ctx context.Context, params Params) (any, error)

TeamPlayerStatisticsSeasons calls the sofascore-team-player-statistics-seasons operation.

func (*Client) TeamPlayers

func (c *Client) TeamPlayers(ctx context.Context, params Params) (any, error)

TeamPlayers calls the sofascore-team-players operation.

func (*Client) TeamRankings added in v0.3.0

func (c *Client) TeamRankings(ctx context.Context, params Params) (any, error)

TeamRankings calls the sofascore-team-rankings operation.

func (*Client) TeamSeasonStatistics

func (c *Client) TeamSeasonStatistics(ctx context.Context, params Params) (any, error)

TeamSeasonStatistics calls the sofascore-team-season-statistics operation.

func (*Client) TeamStatisticsSeasons

func (c *Client) TeamStatisticsSeasons(ctx context.Context, params Params) (any, error)

TeamStatisticsSeasons calls the sofascore-team-statistics-seasons operation.

func (*Client) TeamTopPlayers added in v0.3.0

func (c *Client) TeamTopPlayers(ctx context.Context, params Params) (any, error)

TeamTopPlayers calls the sofascore-team-top-players operation.

func (*Client) TeamTournaments added in v0.3.0

func (c *Client) TeamTournaments(ctx context.Context, params Params) (any, error)

TeamTournaments calls the sofascore-team-tournaments operation.

func (*Client) TeamTransfers

func (c *Client) TeamTransfers(ctx context.Context, params Params) (any, error)

TeamTransfers calls the sofascore-team-transfers operation.

func (*Client) TennisPlayerGrandSlamResults added in v0.3.0

func (c *Client) TennisPlayerGrandSlamResults(ctx context.Context, params Params) (any, error)

TennisPlayerGrandSlamResults calls the sofascore-tennis-player-grand-slam-results operation.

func (*Client) TournamentCuptree added in v0.3.0

func (c *Client) TournamentCuptree(ctx context.Context, params Params) (any, error)

TournamentCuptree calls the sofascore-tournament-cuptree operation.

func (*Client) TournamentInfo

func (c *Client) TournamentInfo(ctx context.Context, params Params) (any, error)

TournamentInfo calls the sofascore-tournament-info operation.

func (*Client) TournamentPlayerOfTheSeason added in v0.3.0

func (c *Client) TournamentPlayerOfTheSeason(ctx context.Context, params Params) (any, error)

TournamentPlayerOfTheSeason calls the sofascore-tournament-player-of-the-season operation.

func (*Client) TournamentPlayerStatistics

func (c *Client) TournamentPlayerStatistics(ctx context.Context, params Params) (any, error)

TournamentPlayerStatistics calls the sofascore-tournament-player-statistics operation.

func (*Client) TournamentRounds

func (c *Client) TournamentRounds(ctx context.Context, params Params) (any, error)

TournamentRounds calls the sofascore-tournament-rounds operation.

func (*Client) TournamentSeasons

func (c *Client) TournamentSeasons(ctx context.Context, params Params) (any, error)

TournamentSeasons calls the sofascore-tournament-seasons operation.

func (*Client) TournamentStatisticsInfo added in v0.3.0

func (c *Client) TournamentStatisticsInfo(ctx context.Context, params Params) (any, error)

TournamentStatisticsInfo calls the sofascore-tournament-statistics-info operation.

func (*Client) TournamentTeamOfTheSeason added in v0.3.0

func (c *Client) TournamentTeamOfTheSeason(ctx context.Context, params Params) (any, error)

TournamentTeamOfTheSeason calls the sofascore-tournament-team-of-the-season operation.

func (*Client) TournamentTeams added in v0.3.0

func (c *Client) TournamentTeams(ctx context.Context, params Params) (any, error)

TournamentTeams calls the sofascore-tournament-teams operation.

func (*Client) TournamentTopPlayers

func (c *Client) TournamentTopPlayers(ctx context.Context, params Params) (any, error)

TournamentTopPlayers calls the sofascore-tournament-top-players operation.

func (*Client) TournamentTopTeams

func (c *Client) TournamentTopTeams(ctx context.Context, params Params) (any, error)

TournamentTopTeams calls the sofascore-tournament-top-teams operation.

func (*Client) TournamentVenues added in v0.3.0

func (c *Client) TournamentVenues(ctx context.Context, params Params) (any, error)

TournamentVenues calls the sofascore-tournament-venues operation.

func (*Client) TournamentWinners added in v0.3.0

func (c *Client) TournamentWinners(ctx context.Context, params Params) (any, error)

TournamentWinners calls the sofascore-tournament-winners operation.

func (*Client) TournamentsWithFeature added in v0.3.0

func (c *Client) TournamentsWithFeature(ctx context.Context, params Params) (any, error)

TournamentsWithFeature calls the sofascore-tournaments-with-feature operation.

func (*Client) TrendingEvents added in v0.3.0

func (c *Client) TrendingEvents(ctx context.Context, params Params) (any, error)

TrendingEvents calls the sofascore-trending-events operation.

func (*Client) TrendingPlayers added in v0.3.0

func (c *Client) TrendingPlayers(ctx context.Context, params Params) (any, error)

TrendingPlayers calls the sofascore-trending-players operation.

func (*Client) Venue added in v0.3.0

func (c *Client) Venue(ctx context.Context, params Params) (any, error)

Venue calls the sofascore-venue operation.

func (*Client) VenueEvents added in v0.3.0

func (c *Client) VenueEvents(ctx context.Context, params Params) (any, error)

VenueEvents calls the sofascore-venue-events operation.

type Params

type Params map[string]any

Params maps the exact OpenAPI parameter names expected by this platform client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL