SportScore

FREEMIUM
Verified
(Ким) Tipsters CO | Оновлено 4 days ago | Sports
Популярність

9.9 / 10

Затримки

134ms

Рівень обслуговування

100%

Health Check

100%

Назад до всіх навчальних посібників (1)

SportScore API Tutorial

SportScore API Tutorial

tags: SportScore

Consuming API

What is RapidAPI?
RapidAPI is the world’s largest API hub where over three million developers find, test, and connect to thousands of APIs — all with a single account and API key.

How to start?

  1. Log In or Sign Up
  2. Subscribing to an API
  3. Testing an API from the browser
  4. Integrating the API into an application
  5. Profit!

RapidAPI Consumer Quick Start Guide
FAQs - RapidAPI Hub

This api is free?
Yes. But there are limits on requests per month.

I need other limits or a tariff plan
Support: hello@xscore.cc


How to use SportScore API?

Structural scheme:

Structural scheme

Let’s consider a general example of API data synchronization.
Based on the scheme, you need to start with sports.

1. Get a list of the sports available

Endpoint: @Sport list /sports

  "data": [
    {
      "id": 1,
      "slug": "football",
      "name": "Football",
      "name_translations": {
        "en": "Football",
        "ru": "Футбол",
        "de": "Fußball",
        "es": "Fútbol",
        "fr": "Football",
        "zh": "足球",
        "tr": "Futbol",
    ....
2. Get all sections by sport

Endpoint: @Sections by sport ID /sports/{sport_id}/sections

 "data": [
    {
      "id": 1,
      "sport_id": 1,
      "slug": "northern-ireland",
      "name": "Northern Ireland",
      "name_translations": {
        "en": "Northern Ireland",
        "ru": "Северная Ирландия",
        "de": "Nordirland",
        "es": "Irlanda del Norte",
        "fr": "Irlande du Nord",
        "zh": "北爱尔兰",
        "tr": "Kuzey İrlanda",
        "el": "Βόρεια Ιρλανδία",
        "it": "Irlanda del Nord",
        "nl": "Noord-Ierland",
        "pt": "Irlanda do Norte"
      },
      "priority": 0,
      "flag": "northern-ireland"
    },
    {
      "id": 2,
      "sport_id": 1,
     ...
3. Get Leagues and Challenges by sections

Endpoint: @Leagues by section ID /sections/{section_id}/leagues

Endpoint: @Challenges by section ID /sections/{section_id}/challenges

4. Get all seasons of leagues

Endpoint: @Seasons by league ID /leagues/{league_id}/seasons

You now have the entire structure in sync with the API.
Continue to use different points to api your needs.



The main use cases

Get events list by date

Endpoint: @Events by sport ID and date /sports/{sport_id}/events/date/2020-06-07

Get a list of events belonging to a specified sport and date.
Returns a list of events.
Use Meta/List of event status to translate.

{
  "data": [
    {
      "id": 899543,
      "sport_id": 1,
      "home_team_id": 4146,
      "away_team_id": 4179,
      "league_id": 268,
      "challenge_id": 553,
      "season_id": 8241,
      "venue_id": 7927,
      "referee_id": null,
      "slug": "2021-09-08-vinbergs-if-dalstorps-if",
      "name": "Vinbergs IF – Dalstorps IF",
      "status": "finished",
      "status_more": "FT",
      "time_details": {

Same as:
events list


Get lineups

Endpoint: @Lineups by event ID /events/561559/lineups

Get a list of lineups belonging to a specified event. Returns lineups list. Use Meta/Player positions list to translate.

Use the is_confirmed property to filter only confirmed compositions!

{
  "data": [
    {
      "id": 158714,
      "team_id": 3,
      "event_id": 908893,
      "is_confirmed": false,
      "formation": "4-3-3",
      "avg_rating": null,
      "attacking": null,

Same as:
Get lineups


Get markets

Endpoint: @Markets by event ID /events/966887/markets

Get a list of markets belonging to a specified event.
Returns a list of markets

{
  "data": [
    {
      "id": 1345118,
      "event_id": 966887,
      "name": "Full time",
      "name_short": "1X2",
      "order": 0,
      "handicap": null,
      "structure": 1,
      "is_live": false,
      "is_suspended": false,

Same as:
Get markets


Get incidents

Endpoint: @Incidents by event ID /events/890233/incidents

Get a list of incidents belonging to a specified event. Sort in order.
Returns a list of incidents.

    {
      "id": 6425804,
      "event_id": 890233,
      "incident_type": "substitution",
      "time": 57,
      "time_over": null,
      "order": 6,
      "text": null,
      "scoring_team": null,

Same as:
Get incidents


Get tennis player info or team info

Endpoint: @Team data /teams/17488
Returns a team data.

{
  "data": {
    "id": 17488,
    "sport_id": 2,
    "category_id": null,
    "venue_id": null,
    "manager_id": null,
    "slug": "djokovic-n",
    "name": "Djokovic N.",
    "has_logo": true,
    "logo": "https:\/\/xscore.cc\/resb\/team\/djokovic-n.png",
    "name_translations": {
      "en": "Djokovic N.",
      "ru": "Джокович, Новак",
      "es": "Djokovic, Novak",
      "zh": "德约科维奇,诺瓦克",
      "el": "Τζόκοβιτς, Νόβακ",
      "pt": "Novak Djokovic"
    },
    "name_short": "Djokovic N.",

Same as:
Get tennis player info or team info


Get standings

Endpoint: @Standings-tables by season ID /seasons/7448/standings-tables

Get a standings belonging to a specified season.
Returns a list of standings.

{
  "data": [
    {
      "id": 9766,
      "slug": "Botola 20\/21",
      "round": 1,
      "total_keys": {
        "matches_total": "P",
        "wins_total": "W",
        "draws_total": "D",
        "losses_total": "L",
        "goals_total": "Goals",

Same as:
Get standings tables


Get team squad

Endpoint: @Players by team ID /teams/17/players

Get a list of players belonging to a specified team.
Returns a list of players.

{
  "data": [
    {
      "id": 446,
      "sport_id": 1,
      "slug": "youssef-en-nesyri",
      "name": "Youssef En-Nesyri",
      "name_translations": {
        "en": "Youssef En-Nesyri"
      },
      "name_short": "Y. En-Nesyri",
      "has_photo": true,
      "photo": "https:\/\/xscore.cc\/resb\/player\/youssef-en-nesyri.png",
      "position": "F",
      "position_name": "Forward",
      "weight": 73,
      "age": 24,
      "date_birth_at": "1997-06-01",
      "height": 1.9,
      "shirt_number": 15,
      "preferred_foot": "Left",

Same as:
Get team squad


FAQ

What is the difference between Leagues and Challenges?

Leagues have seasons, these are competitions that are repeated from year to year.
Tournaments tables and statistics are available only for leagues.
Challenges are one-off events and do not have seasons.

How to find tennis players?

Tennis players are teams.
Use all points associated with commands.
Endpoint: @Teams by sport ID /sports/2/teams

How do I get translations?

Use api endpoints:
@Meta List of event status
@Meta List of common translations
@Meta Player positions list

How do I get a player’s transfer type?

1 - Loan
2 - End of loan
3 - Sale
4 - Free
6 - Free rent