You need live match commentary in your app this week. The fastest path starts with locating the exact team or competition so you can bind UI routes and job schedulers to the right entities. By the end of this guide, you’ll be able to search FlashScore entities programmatically, discover supported sports, enumerate country/competition groupings, and wire these results into your commentary fetch pipeline using the FlashScore - Live API on Zyla API Hub.
Why this API and what you can build
The FlashScore - Live API exposes searchable sports entities (teams, players, tournaments) and taxonomies (sports and country/competition groupings). Developers use it to:
- Resolve user input (“Real Madrid”) to canonical team IDs to power match feeds and commentary views.
- Drive navigation by sport and country so users can drill down to a match page.
- Preload assets (logos, flags) for faster live-commentary experiences.
With these endpoints you can lock onto the correct entity for a given sport before you pull live commentary or match events in your own workflow. You’ll avoid mismatches (e.g., choosing the basketball team instead of the soccer team) and keep your cache keys consistent across services.
Getting started on Zyla API Hub
Open the FlashScore - Live API listing on Zyla and start the trial to get an API key. Zyla provides one account, one API key, and a subscription + quota model across more than 10,000 public APIs. There’s no pay-per-call, and the first API typically offers a 7-day trial or 50 requests—check the listing for current details.
- Visit the marketplace item: Start 7-day trial on FlashScore - Live API
- Create a free Zyla account and subscribe to get your key. You can also browse other sports APIs anytime at zylalabs.com.
All requests shown below authenticate with Authorization: Bearer YOUR_API_KEY. Replace YOUR_API_KEY with the value from your Zyla dashboard.
Endpoints you’ll use before fetching commentary
Below are the documented endpoints you can call from the FlashScore - Live API through Zyla. Use them to find the right team or competition and build routes that lead to your match commentary UI.
1) Search entities by name
Search lets you resolve free-text queries to concrete entities (teams, players, tournaments). This is the entry point for “type-to-find” UIs and for programmatic mapping from your DB to FlashScore entities.
- Method: GET
- URL: https://zylalabs.com/api/12518/flashscore-live-api/23852/search
- Required param: q (string) – your query, e.g., “real madrid”
Official curl example:
curl -s -X GET "https://zylalabs.com/api/12518/flashscore-live-api/23852/search?q=real+madrid" \
-H "Authorization: Bearer YOUR_API_KEY"
Official JSON 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 actually use:
- id: the canonical entity identifier you should store for routing and lookups.
- type: confirm you matched the intended kind (team vs player vs tournament).
- sport.id and sport.name: disambiguate across sports (e.g., Soccer vs Basketball).
- name, gender, country_name: display strings and filter controls for UI.
- image_path, country_image_path: prefetch assets for team and country badges.
Tip: cache search results keyed by lowercased query terms, and display the sport next to each hit. Many clubs have multiple squads; sport and gender help your users pick correctly.
2) Get the list of supported sports
This endpoint returns the sports available in the API. Use it to build a sport selector or to verify your app supports a requested sport before enabling commentary views.
- Method: GET
- URL: https://zylalabs.com/api/12518/flashscore-live-api/23853/get-sports
- Params: none documented
curl:
Use returned sport_id to scope subsequent choices (e.g., to countries/competitions). Consider preloading this once at startup and refreshing periodically.
3) Get countries/competition groupings for a sport
For a specific sport, this endpoint returns groupings that map to country/competition contexts. In tennis, for example, these correspond to ATP, WTA, and other circuits. You can use these values to structure navigation leading to matches and, ultimately, commentary.
- Method: GET
- URL: https://zylalabs.com/api/12518/flashscore-live-api/23854/get-countries
- Required param: sport_id (string). Example below uses 2 (Tennis).
curl:
Store country_id and country_url in your own index so you can construct routes or lookups that lead from a user’s sport choice to a competition and then to a match commentary page.
End-to-end workflow to reach match commentary
Match commentary screens depend on accurate entity resolution. Use the FlashScore - Live API endpoints above as your discovery layer:
- User searches for a club or player. You call Search with q and show disambiguated results with sport and gender.
- User selects a sport. You read from Get sports to validate support and enable the right navigation tabs.
- For sports with many circuits or competitions, you prime your menus using Get countries for that sport to list groupings (e.g., ATP Singles vs WTA Singles).
- With the resolved entity id/type and chosen sport/country context in hand, route to your commentary fetch routine.
Why this matters: commentary feeds are only useful if they’re bound to the correct entity. Many clubs have multiple squads across genders and age groups. The search payload includes the fields you need to pin that down upfront.
Copy‑paste example in Python
This example shows how to call the Search endpoint, pick the soccer first team, and extract identifiers and images you’ll use to render your commentary header before you load the live events stream.
import os
import requests
API_KEY = os.getenv("ZYLALABS_API_KEY", "YOUR_API_KEY")
BASE_URL = "https://zylalabs.com/api/12518/flashscore-live-api/23852/search"
def search_entities(query: str):
resp = requests.get(
BASE_URL,
params={"q": query},
headers={"Authorization": f"Bearer {API_KEY}"}
)
resp.raise_for_status()
return resp.json()
def pick_primary_soccer_team(results):
for item in results:
if item.get("type") == "team" and item.get("sport", {}).get("name") == "Soccer":
# Prefer senior men's or women's first teams by name heuristic
n = (item.get("name") or "").lower()
if n == "real madrid" or n.endswith(" w") or " u" not in n and " b" not in n and " c" not in n:
return {
"id": item["id"],
"name": item["name"],
"sport_id": item["sport"]["id"],
"sport_name": item["sport"]["name"],
"gender": item.get("gender"),
"country": item.get("country_name"),
"logo": item.get("image_path"),
"country_flag": item.get("country_image_path"),
"slug": item.get("url")
}
return None
if __name__ == "__main__":
results = search_entities("real madrid")
team = pick_primary_soccer_team(results)
if not team:
raise SystemExit("No suitable team found")
print("Resolved team:")
for k, v in team.items():
print(f"- {k}: {v}")
# Next step in your app:
# 1) Render team['logo'] and team['country_flag'] in your commentary header.
# 2) Use team['id'] as the canonical identifier across your match discovery + commentary pipeline.
Practical implementation notes
- Authentication: every request uses Authorization: Bearer YOUR_API_KEY.
- Caching: cache search responses per query for a short TTL. Logos and flags can be cached longer by URL.
- Disambiguation: always inspect sport.id/name and gender when you map a search result to your data model.
- UI hints: display the sport and gender inline with names like “Real Madrid (Soccer, Men)” to reduce user error.
- Quotas: Zyla subscriptions are quota-based, not pay-per-call. See the listing for limits and the 7‑day trial conditions.
Calling the API from an AI agent via MCP
If you’re using an MCP-compatible client (e.g., Claude Code, Cursor, Windsurf), you can route calls through Zyla’s MCP endpoint. Provide your API key and have the agent hit the same Hub URLs documented above. MCP details: MCP. The request flow and Authorization header remain the same when the agent executes HTTP tools.
How to wire this into a match commentary page
Here’s a lightweight plan to go from user intent to commentary output using only the endpoints provided in this article as your discovery layer:
- Search phase: user types “Real Madrid” → call Search → pick the correct team by sport and squad.
- Navigation phase: if your app supports multiple sports, preload Get sports and gate UI elements per sport.
- Competition scoping: for sports like tennis, use Get countries with sport_id to present circuits before selecting a match.
- Commentary fetch: with the resolved entity and chosen context, your backend proceeds to fetch or render the live commentary feed you maintain or integrate elsewhere in your stack.
This separation keeps entity resolution clean and independent of your commentary rendering logic, while giving you stable IDs, slugs, and assets.
Testing tips that save time
- Golden queries: keep a small set of canonical queries (e.g., “real madrid”, “juventus”, “wta”) and assert your resolver returns the intended entity every deploy.
- Asset fallback: if image_path is unavailable for a result, show initials or a neutral badge and log the case for review.
- Error handling: treat 4xx as configuration/auth issues and 5xx as transient; back off and retry only on safe, idempotent GETs.
- Observability: log entity id, type, sport.id, and query for each search selection so you can debug mismatches in production.
Quick reference
- Search entities:
- GET https://zylalabs.com/api/12518/flashscore-live-api/23852/search?q=real+madrid
- Header: Authorization: Bearer YOUR_API_KEY
- Get sports:
- GET https://zylalabs.com/api/12518/flashscore-live-api/23853/get-sports
- Header: Authorization: Bearer YOUR_API_KEY
- Get countries (example for Tennis):
- GET https://zylalabs.com/api/12518/flashscore-live-api/23854/get-countries?sport_id=2
- Header: Authorization: Bearer YOUR_API_KEY
Real-world use cases
- Live match center: resolve the user’s favorite club via Search, persist the team id, and use it to route into your commentary page with preloaded logos and flags.
- Smart search bar: autocomplete over Search results, labeled by sport and gender; selecting an item deep-links to the latest match commentary screen for that entity.
- Competition browser: show a sport picker (Get sports), then a competition list per sport (Get countries) to help users reach a match commentary stream through hierarchical navigation.
Next steps
Subscribe to the FlashScore - Live API and start wiring these calls into your match discovery and commentary flow. The listing has the latest access options and a 7-day trial. When you’re ready to explore more sports integrations, browse the full catalog at zylalabs.com.
Start 7-day trial on FlashScore - Live API
FAQ
How do I authenticate?
Send Authorization: Bearer YOUR_API_KEY with every request. Obtain YOUR_API_KEY by subscribing to the API on the marketplace listing.
Can I filter Search by sport?
The Search endpoint takes a q parameter. Inspect the sport fields in results to filter client-side to the sport you need.
Is there a free plan?
Zyla uses a subscription + quota model, not pay-per-call. Check the listing for the current 7-day trial availability and quotas.
How do I list all sports and competitions?
Call Get sports to retrieve supported sports. Then call Get countries with the sport_id to fetch competition groupings for that sport.
Can I call these endpoints from an AI agent?
Yes. Use an MCP-compatible client and point it at Zyla’s MCP endpoint. Details here: MCP. Ensure the agent includes the Authorization header with your API key.
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…