API-FOOTBALL

फ्रीमियम
Verified
द्वारा API-SPORTS | अपडेट किया गया 9 days ago | Sports
लोकप्रियता

10 / 10

लेटेंसी

364ms

सेवा का स्तर

99%

Health Check

N/A

सभी चर्चाओं पर वापस जाएं

Fixture with league identifier

Rapid account: Xat
Xat
2 years ago

H guys,

Trying to get fixtures for “Brazil - Serie A” with this URL :

https://api-football-v1.p.rapidapi.com/v3/fixtures?league=71

But I get 0 fixtures while it should return something.

Did I miss something there ?
Thanks a lot.
Regards.

Rapid account: Xat
Xat Commented 2 years ago

Ouh yeah, thanks a lot for this tip 😃

Rapid account: Api Sports
api-sports Commented 2 years ago

It’s indicated in the API response :

{
get: "fixtures"
parameters: {
league: “71”
}
errors: {
season: “The Season field is required.”
}
results: 0
paging: {
current: 1
total: 1
}
response: [
]
}

And you have also all examples in the API documentation in the right section.

Best

Rapid account: Xat
Xat Commented 2 years ago

Ok but there is no indication what are mandatories parameters when using league.

For the future, can I know what is the problem when doing a bad request, such as missing parameters ?

Rapid account: Api Sports
api-sports Commented 2 years ago

Hi,

you need to add the “season” parameter : fixtures?league=71&season=2022.

https://www.api-football.com/documentation-v3#tag/Fixtures/operation/get-fixtures

Best

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें