{"id":17602461,"url":"https://github.com/johnwmillr/sportradarapis","last_synced_at":"2025-10-31T14:30:28.760Z","repository":{"id":48243319,"uuid":"138257002","full_name":"johnwmillr/SportradarAPIs","owner":"johnwmillr","description":"Python wrapper for the Sportradar APIs  ⚽️🏈","archived":false,"fork":false,"pushed_at":"2024-08-18T06:24:02.000Z","size":105,"stargazers_count":49,"open_issues_count":11,"forks_count":19,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-29T14:55:49.946Z","etag":null,"topics":["api","api-wrapper","data-mining","nba","nfl","soccer","sportradar","sports","sports-stats","sportsanalytics"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnwmillr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"johnwmillr"}},"created_at":"2018-06-22T05:07:56.000Z","updated_at":"2024-10-14T02:03:03.000Z","dependencies_parsed_at":"2023-09-27T04:43:14.282Z","dependency_job_id":"9d60d029-4dc5-48a5-a77c-3bbdc5dbf17d","html_url":"https://github.com/johnwmillr/SportradarAPIs","commit_stats":{"total_commits":76,"total_committers":8,"mean_commits":9.5,"dds":0.3421052631578947,"last_synced_commit":"0f1a8eb4daf8dba57e73df860cca19f98cfa4003"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnwmillr%2FSportradarAPIs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnwmillr%2FSportradarAPIs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnwmillr%2FSportradarAPIs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnwmillr%2FSportradarAPIs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnwmillr","download_url":"https://codeload.github.com/johnwmillr/SportradarAPIs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239201667,"owners_count":19599079,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-wrapper","data-mining","nba","nfl","soccer","sportradar","sports","sports-stats","sportsanalytics"],"created_at":"2024-10-22T13:08:27.229Z","updated_at":"2025-10-31T14:30:28.679Z","avatar_url":"https://github.com/johnwmillr.png","language":"Python","funding_links":["https://github.com/sponsors/johnwmillr"],"categories":[],"sub_categories":[],"readme":"# Sportradar APIs\n---\n[![Build Status](https://travis-ci.org/johnwmillr/SportradarAPIs.svg?branch=master)](https://travis-ci.org/johnwmillr/SportradarAPIs)\n[![PyPI version](https://badge.fury.io/py/sportradar.svg)](https://pypi.org/project/sportradar/)\n[![Python version](https://img.shields.io/badge/python-3.x-brightgreen.svg)](https://pypi.org/project/sportradar/)\n\nThis is a Python wrapper for the sports APIs provided by [Sportradar](https://developer.sportradar.com/io-docs). You'll need to [sign up](https://developer.sportradar.com/member/register) for an API key to use the service. Sportradar provides a free trial evaluation that provides 1,000 API queries at up to 1 query per second.\n\n## Supported APIs\n| Sport         | API Wrapper   | Unit Tests  |\n|:--------------|:-------------:|:-----------:|\n| [Soccer](https://developer.sportradar.com/files/indexSoccer.html)  :soccer: | :heavy_check_mark: | :heavy_check_mark: |\n| [NBA](https://developer.sportradar.com/files/indexBasketball.html#nba-api-v4)  :basketball: | :heavy_check_mark: | :heavy_check_mark: |\n| [WNBA](https://developer.sportradar.com/files/indexBasketball.html#wnba-api-v4)  :basketball: | :heavy_check_mark: | :heavy_check_mark: |\n| [NCAAMB](https://developer.sportradar.com/files/indexBasketball.html#ncaamb-api-v7)  :basketball: | :heavy_check_mark: | :heavy_check_mark: |\n| [NFL](https://developer.sportradar.com/files/indexFootball.html)  :football: | :heavy_check_mark: | :heavy_check_mark: |\n| [NHL](https://developer.sportradar.com/files/indexHockey.html)  :trophy: | :heavy_check_mark: | :heavy_check_mark: |\n| [Tennis](https://developer.sportradar.com/files/indexTennis.html)  :tennis: | :heavy_check_mark: | :heavy_check_mark: |\n| [MLB](https://developer.sportradar.com/files/indexBaseball.html)  :baseball: | :heavy_check_mark: | :heavy_check_mark: |\n| [Darts](https://developer.sportradar.com/files/indexDarts.html)   :dart:   | :heavy_check_mark: | :heavy_check_mark: |\n| [Beach volleyball](https://developer.sportradar.com/files/indexVolleyball.html) :palm_tree: | :heavy_check_mark: | :heavy_check_mark: |\n| [Golf](https://developer.sportradar.com/files/indexGolf.html) :golf: | :heavy_check_mark: | :heavy_check_mark: |\n| [NASCAR](https://developer.sportradar.com/files/indexRacing.html#official-nascar-api) :red_car: | :heavy_check_mark: | :heavy_check_mark: |\n| [LoL](https://developer.sportradar.com/files/indexeSports.html) :video_game: | :heavy_check_mark: | :heavy_check_mark: |\n| [Dota2](https://developer.sportradar.com/files/indexeSports.html) :video_game: | :heavy_check_mark: | :heavy_check_mark: |\n| [Cricket](https://developer.sportradar.com/files/indexCricket.html) :cricket: | :heavy_check_mark: | :heavy_check_mark: |\n| [Rugby](https://developer.sportradar.com/docs/read/rugby/Rugby_v2) :rugby_football: | :heavy_check_mark: | :heavy_check_mark: |\n| [Handball](https://developer.sportradar.com/docs/read/handball/handball_v2) :handball_person:| :heavy_check_mark: | :heavy_check_mark: |\n\n## Installation\nThe easiest way to start using this package is via [PyPI](https://pypi.org/project/sportradar/) using `pip`:\n\n`$pip install sportradar`\n\nIf you'd prefer to clone the repository and install the package manually, follow these steps:\n1. Clone this repo:\n`$git clone https://github.com/johnwmillr/SportradarAPIs.git`\n2. Enter the cloned directory:\n`$cd SportradarAPIs`\n3. Install:\n`$python setup.py install`\n\n## Usage\nBelow is a brief demonstration of how to use the package to download data for the 2018 FIFA World Cup.\n\n```python\nfrom sportradar import Soccer\n\n# Create an instance of the Sportradar Soccer API class\nsr = Soccer.Soccer(\"paste your api key here\")\n\n# Get a list of all tournaments\ntournaments = sr.get_tournaments().json()\n\n# Get info on the 2018 World Cup (Teams, Rounds, etc.)\nworldcup = sr.get_tournament_info(tournaments['tournaments'][4]['id']).json()\n\n# Get more information on each team in the World Cup\nteams = []\nteam_counter = 0\nfor group in worldcup['groups']:\n    for team in group['teams']:\n        team_counter += 1\n        team_id = team['id']\n        team_name = team['name']\n        print(\"({}): {}, {}\".format(team_counter, team_name, team_id))\n        try:\n            teams.append(sr.get_team_profile(team_id).json())\n        except Exception as e:\n            print(\"Error: {}\".format(e))\n        time.sleep(5) # wait 5 seconds before next API call\n\n# Save the team data to a .json file\nprint(\"Saving the data...\", end=\"\", flush=True)\nwith open(\"world_cup_team_data.json\", \"w\") as outfile:\n    json.dump(teams, outfile)\nprint(\" Done.\")\n\n```\n\n## Example projects\n  - [2018 FIFA World Cup player stats](https://www.johnwmillr.com/fifa-world-cup-data/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnwmillr%2Fsportradarapis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnwmillr%2Fsportradarapis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnwmillr%2Fsportradarapis/lists"}