TheSportsDBClient 1.2.0

dotnet add package TheSportsDBClient --version 1.2.0
                    
NuGet\Install-Package TheSportsDBClient -Version 1.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TheSportsDBClient" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TheSportsDBClient" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="TheSportsDBClient" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TheSportsDBClient --version 1.2.0
                    
#r "nuget: TheSportsDBClient, 1.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TheSportsDBClient@1.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TheSportsDBClient&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=TheSportsDBClient&version=1.2.0
                    
Install as a Cake Tool

TheSportsDBClient

NuGet

Unofficial C# client library for TheSportsDB API. Provides easy access to sports data including teams, players, leagues, events, and more.

Features

  • Full coverage of TheSportsDB API endpoints
  • Built-in retry logic with Polly
  • Rate limiting support
  • Strongly-typed responses
  • Source Link enabled for easy debugging

Installation

dotnet add package TheSportsDBClient

Or via NuGet Package Manager:

Install-Package TheSportsDBClient

From GitHub Packages

GitHub Packages requires authentication even for public packages.

To setup system-wide access to repository:

  1. Create a Personal Access Token (PAT) with read:packages scope at https://github.com/settings/tokens

  2. Add GitHub Packages as a NuGet source:

dotnet nuget add source \
  --username YOUR_GITHUB_USERNAME \
  --password YOUR_GITHUB_PAT \
  --store-password-in-clear-text \
  --name github \
  "https://nuget.pkg.github.com/bsv798/index.json"
  1. Install the package:
dotnet add package TheSportsDBClient --source github

To setup project-wide access to repository:

  1. Create a nuget.config file in your project root:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
    <add key="github" value="https://nuget.pkg.github.com/bsv798/index.json" />
  </packageSources>
  <packageSourceCredentials>
    <github>
      <add key="Username" value="%GITHUB_USERNAME%" />
      <add key="ClearTextPassword" value="%GITHUB_PAT%" />
    </github>
  </packageSourceCredentials>
</configuration>

Note environment variables GITHUB_USERNAME and GITHUB_PAT.

  1. Then install normally:
dotnet add package TheSportsDBClient

Quick Start

using TheSportsDBClient;

// Initialize the client with your API key
var client = new TheSportsDBClient("your-api-key");

// Search for a team
var teams = await client.SearchTeamsAsync("Arsenal");

// Get league details
var league = await client.GetLeagueByIdAsync(4328);

// Lookup player information
var player = await client.SearchPlayersAsync("Messi");

// Get upcoming events
var events = await client.GetNextEventsAsync(133604);

API Key

Get your free API key from TheSportsDB.

For development and testing, you can use the test API key: 123

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 101 1/17/2026
1.1.2 106 1/11/2026