You have to ship match commentary and live context into your sports app this week. By the end of this guide, you’ll be able to resolve teams and competitions, enumerate supported sports, and scope countries/categories using the FlashScore - Live API on Zyla API Hub—so you can reliably locate the exact match entities you’ll attach your commentary to.
What this API gives you (and how it helps with commentary)
The FlashScore - Live API on Zyla API Hub provides searchable sports entities and structured lists of sports and countries/categories. Concretely, you can:
- Search entities like teams, players, and tournaments by name (to get stable IDs and metadata).
- Enumerate all supported sports.
- List countries/categories for a sport (e.g., ATP/WTA groupings for Tennis).
For building a commentary feature, the first non-negotiable step is reliably resolving the right match context: sport → competition/category → team → match. The endpoints below cover discovery and scoping so you can anchor commentary to the correct entity IDs and metadata (sport, gender, images, and country/category names).
Getting started on Zyla API Hub
Open the API’s listing on Zyla API Hub, click Subscribe or Start Free Trial when available, and obtain your API key. Zyla uses a single account, one API key, and a subscription + quota model across more than 10,000 public APIs—no per-call billing. For this API, you can start with a 7-day trial or 50 requests; there is no Free Plan. Check the listing for current access options and pricing.
All requests use the header Authorization: Bearer YOUR_API_KEY and the base host is provided for you by the marketplace. Do not add extra parameters that are not documented.
Endpoints you’ll use to anchor match commentary
These are the discovery and scoping endpoints available on the listing. Use them to find the right team, sport, and country/category before associating commentary in your system.
1) Search
Search FlashScore entities (teams, players, tournaments) by query string.
- Method: GET
- URL: https://zylalabs.com/api/12518/flashscore-live-api/23852/search
- Required query parameter: q
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…
Why this matters for commentary pipelines:
- Use id to uniquely identify the team or entity.
- Use sport.id and sport.name to separate football vs basketball commentary contexts.
- Use gender and country_name to disambiguate squads and league setups.
- Use image_path for UI elements next to commentary ticks.
2) Get sports
Returns a list of all available sports supported.
- Method: GET
- URL: https://zylalabs.com/api/12518/flashscore-live-api/23853/get-sports
- Parameters: none documented
Example:
Use this to build a sport picker or to validate that your commentary feature is tied to a supported sport (e.g., Football, Tennis, Basketball). The response includes sport_id, sport_url, and name.
3) Get countries
Returns a list of countries for a specific sport.
- Method: GET
- URL: https://zylalabs.com/api/12518/flashscore-live-api/23854/get-countries
- Required query parameter: sport_id
Example (tennis = 2):
The response returns items like ATP/WTA groupings with country_id, country_url, and name. Use this list to constrain your commentary sources by competition family (e.g., ATP - Singles vs WTA - Doubles), which is critical when mapping live commentary to the right bracket or tour.
End-to-end: resolving entities before attaching commentary
- Get sports: Populate your sport selector using the get-sports endpoint. Cache this list aggressively; it does not change frequently.
- Pick a sport and list countries/categories: For the selected sport, call get-countries with sport_id to retrieve the relevant categories or country groupings. Cache these per sport, with a daily refresh.
- Search for a team/player/tournament: Use the search endpoint to resolve the exact entity (e.g., “Real Madrid” → multiple teams, including women’s and youth squads). Present disambiguation in your UI.
- Attach live commentary in your system: Once you’ve selected the correct entity id, use it in your internal data model to associate commentary events with the right team/category. The endpoints above give you the identifiers and metadata you need to avoid mismatches.
Note: Only the endpoints documented above are covered here. If you require additional match-level data, consult the API’s page on Zyla API Hub for the current, complete interface.
Copy-paste code: search from Python
This example calls the Search endpoint, filters by type=team, and prints the team id, name, sport, and image.
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()
items = resp.json()
# Use id to bind your commentary to the right team
for it in items:
if it.get("type") == "team":
team_id = it.get("id")
name = it.get("name")
sport = (it.get("sport") or {}).get("name")
gender = it.get("gender")
country = it.get("country_name")
logo = it.get("image_path")
print(f"{team_id} | {name} | {sport} | {gender} | {country} | {logo}")
You can store the id and url fields in your database as foreign keys for commentary attribution, and use image_path to render a badge in your live feed UI.
Field notes that save time
- Authentication: Always send Authorization: Bearer YOUR_API_KEY. Do not add other auth fields.
- Caching: Cache get-sports and get-countries for hours to days. Keep search results in a short-lived cache (minutes to hours) to minimize repeat lookups during editorial or ingestion workflows.
- Pagination: No pagination parameters are documented for the endpoints shown here. If your query returns multiple entities, filter client-side.
- Images: image_path and country_image_path URLs are provided in entity results, useful for UI elements beside commentary entries.
- Quotas and pricing: Zyla uses subscription + quota (not pay-per-call). For this API you can start with a 7-day trial or 50 requests. Check the listing for the current quotas and tiers.
- Error handling: A 401 typically indicates a missing/invalid Authorization header. Treat empty arrays from search as “no matches” and prompt users to refine their terms.
Practical use cases
- Match-finder autocomplete: As users type a team name, call search and bind commentary to the chosen id.
- Competition-scoped feeds: Use get-countries for a given sport to scope commentary feeds to ATP/WTA or national leagues.
- Live ticker UI: Resolve the team with search, show image_path as the logo, and stream your commentary next to it.
- Editorial tools: Pre-populate entity pickers by sport and country/category to prevent commentary tagging errors.
Calling the API from AI agents via MCP
If you automate commentary operations (e.g., an internal assistant that tags teams or fetches supported sports), you can connect an MCP-compatible client to Zyla’s MCP endpoint.
- MCP server URL: https://mcp.zylalabs.com/mcp?apikey=YOUR_API_KEY
- Works with clients that support MCP, including popular developer IDE agents.
Configure your client with your Zyla API key. Then issue the same GET requests shown above through your MCP client, using the documented endpoint URLs and the Authorization header. See the MCP page for connection details.
How to integrate on Zyla API Hub
- Open the API page: Start 7-day trial on FlashScore - Live API
- Click Subscribe or Start Free Trial when available. You’ll receive a single API key usable across Zyla.
- Send requests with Authorization: Bearer YOUR_API_KEY to the documented endpoints.
- Store entity ids returned by Search and use get-sports/get-countries to keep your commentary mapped to valid scopes.
If you are new to the marketplace, explore other sports and gaming APIs on zylalabs.com—one account and one key work across listings.
FAQ
How do I authenticate requests?
Include the header Authorization: Bearer YOUR_API_KEY on every call.
Which endpoint helps me find the right team for my commentary?
Use GET https://zylalabs.com/api/12518/flashscore-live-api/23852/search with q to resolve entities like teams and tournaments. Persist the returned id.
How do I scope commentary to a sport or competition family?
Call GET https://zylalabs.com/api/12518/flashscore-live-api/23853/get-sports to choose a sport, then GET https://zylalabs.com/api/12518/flashscore-live-api/23854/get-countries?sport_id=... to list country/category groupings (e.g., ATP/WTA for Tennis).
Are there pagination or extra parameters?
No additional parameters are documented for the endpoints covered here. Filter responses client-side as needed.
What is the pricing model?
Zyla uses subscription + quota (not pay-per-call). For this API, you can start with a 7-day trial or 50 requests. Check the API page for current access options and pricing.
Ready to resolve entities and wire up your commentary workflow? Subscribe on the listing and start calling the endpoints today: 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…