SportScore

FREEMIUM
By Tipsters CO | Updated 15 дней назад | Sports
Popularity

9.9 / 10

Latency

138ms

Service Level

100%

Health Check

100%

Back to All Discussions

Live event statistics by ID (Tennis)

Rapid account: Danikgan
danikgan
3 года назад

I am trying to test what statistics can be retrieved using your API. For events which have ended, I have a thorough and detailed statistics – just as expected. However, for LIVE events, I get the following output:

	{
	    "data": [],
	     meta": null
	}

Do you provide any LIVE statistical data for tennis?

Rapid account: Danikgan
danikgan Commented 3 года назад

After some tries, I was only getting data on a single live event. Right now, this is 0 - all events are having no data.

Is this a limitation of the free trial? This is the only thing that keeps me from purchasing your endpoint services.

Rapid account: Danikgan
danikgan Commented 3 года назад

Hello, once again an issue fetching live stats.

For instance, if I try to fetch live stats for event 1095997, I get the following response:

{'data': [], 'meta': None}

This happens for many other events too, though there are live events which fetch normally.

Is this a bug or you simply do not have that live data for the event?

Rapid account: Tipsters
tipsters Commented 3 года назад

Hi. Everything should be working now. Thank you!

Rapid account: Danikgan
danikgan Commented 3 года назад

What is the full API endpoint?

I am using the following:

import requests
import json

url = "https://sportscore1.p.rapidapi.com/v1/events/1073328/statistics"

headers = {
    'x-rapidapi-host': "sportscore1.p.rapidapi.com",
    'x-rapidapi-key': "HIDDEN"
    }

response = requests.request("GET", url, headers=headers)

And received error “404”.

Could you kindly following these steps:
(1) Find a live event
(2) Fetch stats on that event

Here’s what I did.

(1)

import requests

url = "https://sportscore1.p.rapidapi.com/sports/2/events/live"

querystring = {"page":"1"}

headers = {
    'x-rapidapi-host': "sportscore1.p.rapidapi.com",
    'x-rapidapi-key': "HIDDEN"
    }

response = requests.request("GET", url, headers=headers, params=querystring)

print(json.dumps(response.json(), sort_keys=True, indent=4))

Chose event with id 1076884.

Tried to fetch stats:
(2)

import requests

url = "https://sportscore1.p.rapidapi.com/events/1076884/statistics"

headers = {
    'x-rapidapi-host': "sportscore1.p.rapidapi.com",
    'x-rapidapi-key': "HIDDEN"
    }

response = requests.request("GET", url, headers=headers)
print(response)

Got “Response 200”. But no data.

Tried your URL:

import requests

url = "https://sportscore1.p.rapidapi.com/v1/events/1076884/statistics"

headers = {
    'x-rapidapi-host': "sportscore1.p.rapidapi.com",
    'x-rapidapi-key': "HIDDEN"
    }

response = requests.request("GET", url, headers=headers)
print(response)

Got error “404”.

Could you try your endpoint with live data? As I have no problem fetching matches that have finished.

Rapid account: Tipsters
tipsters Commented 3 года назад

Hi. Yes. This dot returns the result you want. /v1/events/1073328/statistics

Rapid account: Danikgan
danikgan Commented 3 года назад

Hi ! I am still curious whether it is possible to fetch live stats and whether I can test this behaviour on the Basic plan. Otherwise, I’m very interested in your API.

Rapid account: Danikgan
danikgan Commented 3 года назад

Can I test whether it worked while on “Basic” pricing plan?

Here’s what I am trying to test:

(1) I got a list of live events using “https://sportscore1.p.rapidapi.com/sports/2/events/live
(2) I then found an event of Jabeur playing against Muguruza (checked whether it exists online). I copied the id number which is 1073328
(3) I used stats and incidents with this id, but both give null results

Am I missing something? I think I might be coping the wrong id, yet, it works for finished matches

Rapid account: Tipsters
tipsters Commented 3 года назад

Hi. Yes. Use @Incidents by event ID and @Statistics by event ID /events/1072186/statistics

Join in the discussion - add comment below:

Login / Signup to post new comments