You need to ship sports data features this week: a live team finder, a list of supported sports, and country/competition groupings to anchor schedules or odds. By the end of this article you’ll search for teams like “Real Madrid,” enumerate supported sports, and fetch country/competition lists for a sport—all using the FlashScore - Live API on Zyla API Hub with copy-pasteable requests.
What you can build with FlashScore - Live API
The FlashScore - Live API exposes search across FlashScore entities (teams, players, tournaments), a catalog of supported sports, and per-sport country/competition groupings. Developers use it to power:
- Autocomplete and entity pickers for teams, players, and tournaments.
- Navigation scaffolding: sports → countries/competitions → entities.
- Back-end joins that normalize user input into canonical IDs.
All calls run through Zyla API Hub, which gives you one account, one API key, and a consistent subscription + quota model across more than 10,000 public APIs. See the FlashScore - Live API listing here: Start 7-day trial on FlashScore - Live API.
Getting started on Zyla API Hub
Open the FlashScore - Live API page on Zyla API Hub, click Subscribe or Start Free Trial (when available), and copy your API key. Authentication is a single header on every request:
- Authorization: Bearer YOUR_API_KEY
Billing is subscription + quota (not pay-per-call). For your first API on Zyla, you get a 7-day trial or 50 requests—check the API page for current access options and pricing.
Endpoints you’ll use
All endpoints below are served by Zyla API Hub. Do not change the base URL or path segments.
1) Search (teams, players, tournaments)
- Method: GET
- URL: https://zylalabs.com/api/12518/flashscore-live-api/23852/search
- Required query parameter: q (string)
- Description: Search FlashScore entities by query string.
Example: search for “real madrid”.
curl -s -X GET "https://zylalabs.com/api/12518/flashscore-live-api/23852/search?q=real+madrid" \
-H "Authorization: Bearer YOUR_API_KEY"
Official sample response:
[{"id":"W8mj7MDD","type":"team","name":"Real Madrid","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/E99TZ05n-ttfpEDUq.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"SlAdQJK4","type":"team","name":"Real Madrid U19","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/IgG3LUAK-xGwa4c2B.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"MP6gLUO7","type":"team","name":"Real Madrid","url":"real-madrid","sport":{"id":3,"name":"Basketball"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/pn8TQOkQ-bXlcmj9T.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"2anA8FkF","type":"team","name":"Real Madrid U21","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/p048BCQt-SKpsUss3.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"4xlfVfnP","type":"team","name":"Real Madrid W","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Women","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/4CKmt8Rt-WpmKUEXD.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"fyNss8GQ","type":"team","name":"Real Madrid B","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/f5FO93Tc-ltKPQjEk.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"46uFRv4a","type":"team","name":"Real Madrid C","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/bupmbK6n-QkBtimSf.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"UiUgFWdq","type":"team","name":"Real Madrid U20","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flash…
Fields you’ll likely use immediately:
- id: stable identifier you can store and re-use.
- type: helps you branch for teams vs players vs tournaments.
- name, gender, country_name: display metadata.
- sport.id and sport.name: filter results by sport.
- image_path, country_image_path: render badges or flags.
2) Get sports
- Method: GET
- URL: https://zylalabs.com/api/12518/flashscore-live-api/23853/get-sports
- Params: none documented
- Description: Returns a list of all available sports supported.
Example response:
[{"sport_id":"1","sport_url":"\/football\/","name":"Football"},{"sport_id":"2","sport_url":"\/tennis\/","name":"Tennis"},{"sport_id":"3","sport_url":"\/basketball\/","name":"Basketball"},{"sport_id":"4","sport_url":"\/hockey\/","name":"Hockey"},{"sport_id":"23","sport_url":"\/golf\/","name":"Golf"},{"sport_id":"7","sport_url":"\/handball\/","name":"Handball"},{"sport_id":"6","sport_url":"\/baseball\/","name":"Baseball"},{"sport_id":"15","sport_url":"\/snooker\/","name":"Snooker"},{"sport_id":"5","sport_url":"\/american-football\/","name":"Am. football"},{"sport_id":"18","sport_url":"\/aussie-rules\/","name":"Aussie rules"},{"sport_id":"21","sport_url":"\/badminton\/","name":"Badminton"},{"sport_id":"10","sport_url":"\/bandy\/","name":"Bandy"},{"sport_id":"6","sport_url":"\/baseball\/","name":"Baseball"},{"sport_id":"3","sport_url":"\/basketball\/","name":"Basketball"},{"sport_id":"26","sport_url":"\/beach-soccer\/","name":"Beach soccer"},{"sport_id":"17","sport_url":"\/beach-volleyball\/","name":"Beach volleyball"},{"sport_id":"16","sport_url":"\/boxing\/","name":"Boxing"},{"sport_id":"13","sport_url":"\/cricket\/","name":"Cricket"},{"sport_id":"34","sport_url":"\/cycling\/","name"…
Common next step: take a sport_id from this list and drill down into its countries/competitions.
3) Get countries for a sport
- Method: GET
- URL: https://zylalabs.com/api/12518/flashscore-live-api/23854/get-countries
- Required query parameter: sport_id (string)
- Description: Returns a list of countries or competition groupings for a specific sport.
Example: fetch countries/competitions for Tennis (sport_id=2).
Example response:
[{"country_id":5724,"country_url":"\/tennis\/atp-singles\/","name":"ATP - Singles"},{"country_id":5725,"country_url":"\/tennis\/wta-singles\/","name":"WTA - Singles"},{"country_id":5726,"country_url":"\/tennis\/atp-doubles\/","name":"ATP - Doubles"},{"country_id":5727,"country_url":"\/tennis\/wta-doubles\/","name":"WTA - Doubles"},{"country_id":5728,"country_url":"\/tennis\/mixed-doubles\/","name":"Mixed Doubles"},{"country_id":5737,"country_url":"\/tennis\/exhibition-men\/","name":"Exhibition - Men"},{"country_id":5738,"country_url":"\/tennis\/exhibition-women\/","name":"Exhibition - Women"},{"country_id":33053,"country_url":"\/tennis\/exhibition-mixed\/","name":"Exhibition - Mixed"},{"country_id":5729,"country_url":"\/tennis\/challenger-men-singles\/","name":"Challenger Men - Singles"},{"country_id":5730,"country_url":"\/tennis\/challenger-women-singles\/","name":"Challenger Women - Singles"},{"country_id":5731,"country_url":"\/tennis\/challenger-men-doubles\/","name":"Challenger Men - Doubles"},{"country_id":5732,"country_url":"\/tennis\/challenger-women-doubles\/","name":"Challenger Women - Doubles"},{"country_id":5733,"country_url":"\/tennis\/itf-men-singles\/","name":"ITF Men…
Use country_id and name to populate filters or route users toward event lists in your app. The country_url is a human-readable slug that mirrors FlashScore’s structure.
Python example: search and parse teams
The snippet below calls the Search endpoint to find “Real Madrid” entities and prints canonical ids, names, and sport info. It uses the exact URL and header you saw in the curl.
import requests
API_KEY = "YOUR_API_KEY"
url = "https://zylalabs.com/api/12518/flashscore-live-api/23852/search"
params = {"q": "real madrid"}
headers = {"Authorization": f"Bearer {API_KEY}"}
resp = requests.get(url, params=params, headers=headers, timeout=15)
resp.raise_for_status()
results = resp.json()
# Filter to 'team' results and print a concise view
for item in results:
if item.get("type") == "team":
team_id = item.get("id")
name = item.get("name")
sport = item.get("sport", {})
sport_id = sport.get("id")
sport_name = sport.get("name")
country = item.get("country_name")
print(f"{team_id}: {name} | sport={sport_id}:{sport_name} | country={country}")
Tip: store id and type together to disambiguate the namespace if you support multiple entity kinds in one table. Use sport.id to filter cross-sport homonyms.
Practical implementation notes
- Authentication: every request must include Authorization: Bearer YOUR_API_KEY.
- Query encoding: percent-encode q; the official curl uses q=real+madrid.
- Caching: search results for popular queries can be cached briefly to reduce latency. Sports and countries lists are relatively static—cache longer and refresh periodically.
- Error handling: handle non-200 responses by surfacing a generic message and logging the response for diagnostics.
- Pagination: not documented for these endpoints; if you need more than one page of results, consider narrowing q or post-filtering client-side.
- Images: image_path and country_image_path are absolute HTTPS URLs you can render directly.
Concrete use cases to ship this week
- Team search box: call Search with the user’s input, restrict to type === "team", then render name, country_name, and sport.name in the dropdown. Persist id on selection.
- Sport catalog: call Get sports to build your left-rail navigation, each item linking to a sport_id route in your app.
- Tennis explorer: use Get countries with sport_id=2 to list ATP/WTA/ITF sections. When the user selects one, you can branch to your own event pages anchored by the chosen name and country_id.
- Admin tools: pre-warm caches for top queries (e.g., “real madrid”, “lakers”, “warriors”) on deploy, using server-side calls with your Zyla API key.
Calling the API from AI agents via MCP
If your workflow runs inside an MCP-compatible client (Claude Code, Cursor, Windsurf, and others), you can call Zyla APIs through the MCP endpoint. Point your client to:
Pass your Zyla API key as the apikey query parameter (YOUR_API_KEY). Your agent can then invoke the same FlashScore - Live API Hub paths you saw above, with the same Authorization header semantics. This keeps local secrets minimal while enabling tool-driven calls during coding sessions or automated scripts.
End-to-end workflow sketch
- Fetch supported sports once at app start (Get sports). Build a sport_id → display name map and cache it.
- When the user picks a sport, load its countries/competitions via Get countries with the chosen sport_id. Cache the result.
- Add a universal search box that calls Search with q, then conditionally routes to team, player, or tournament views based on the type field.
- Store selected entities by id and type; render name and sport badges using sport.name, image_path, and country_image_path.
Reference: all curl examples
Search by query:
Get sports:
Get countries for a sport:
Why Zyla API Hub for sports integrations
Zyla API Hub gives you a single key, subscription + quota billing, and an MCP-compatible endpoint for agent workflows. When you need to add enrichment or utilities alongside sports, you can browse more than 10,000 public APIs and integrate them with the same header.
FAQ
How do I authenticate?
Include Authorization: Bearer YOUR_API_KEY on every request.
Is there a free plan?
No. Your first API on Zyla includes a 7-day trial or 50 requests. Check the API page for current access options and pricing.
Which parameters are supported on Search?
q is required. Use a URL-encoded string like q=real+madrid.
How do I find the correct sport_id for Get countries?
Call Get sports first and select the sport_id that matches your target sport.
Are there pagination or sorting parameters?
They are not documented for these endpoints. If you expect many results, narrow your q or filter client-side.
Ready to integrate? Create a free account on Zyla and start with the FlashScore - Live API. Your first API includes a 7-day trial or 50 requests so you can prototype quickly. Grab your key and run the examples on the listing: Start 7-day trial on FlashScore - Live API.
Official API response
[{"id":"W8mj7MDD","type":"team","name":"Real Madrid","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/E99TZ05n-ttfpEDUq.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"SlAdQJK4","type":"team","name":"Real Madrid U19","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/IgG3LUAK-xGwa4c2B.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"MP6gLUO7","type":"team","name":"Real Madrid","url":"real-madrid","sport":{"id":3,"name":"Basketball"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/pn8TQOkQ-bXlcmj9T.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"2anA8FkF","type":"team","name":"Real Madrid U21","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/p048BCQt-SKpsUss3.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"4xlfVfnP","type":"team","name":"Real Madrid W","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Women","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/4CKmt8Rt-WpmKUEXD.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"fyNss8GQ","type":"team","name":"Real Madrid B","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/f5FO93Tc-ltKPQjEk.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"46uFRv4a","type":"team","name":"Real Madrid C","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/bupmbK6n-QkBtimSf.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"UiUgFWdq","type":"team","name":"Real Madrid U20","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flash…
Official API response
[{"id":"W8mj7MDD","type":"team","name":"Real Madrid","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/E99TZ05n-ttfpEDUq.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"SlAdQJK4","type":"team","name":"Real Madrid U19","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/IgG3LUAK-xGwa4c2B.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"MP6gLUO7","type":"team","name":"Real Madrid","url":"real-madrid","sport":{"id":3,"name":"Basketball"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/pn8TQOkQ-bXlcmj9T.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"2anA8FkF","type":"team","name":"Real Madrid U21","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/p048BCQt-SKpsUss3.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"4xlfVfnP","type":"team","name":"Real Madrid W","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Women","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/4CKmt8Rt-WpmKUEXD.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"fyNss8GQ","type":"team","name":"Real Madrid B","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/f5FO93Tc-ltKPQjEk.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"46uFRv4a","type":"team","name":"Real Madrid C","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/bupmbK6n-QkBtimSf.png","country_image_path":"https:\/\/static.flashscore.com\/res\/image\/data\/QFbOpTR6-GtJBBjyH.png"},{"id":"UiUgFWdq","type":"team","name":"Real Madrid U20","url":"real-madrid","sport":{"id":1,"name":"Soccer"},"gender":"Men","country_name":"Spain","image_path":"https:\/\/static.flash…