You need to wire live sports data into an app this week. By the end of this guide, you’ll be able to search FlashScore entities (teams, players, tournaments), list supported sports, and fetch sport-specific country groupings using the FlashScore - Live API on Zyla API Hub—complete with working curl and Python code you can paste into your project.
What the FlashScore - Live API gives you
The FlashScore - Live API provides searchable access to FlashScore entities (teams, players, tournaments) and metadata endpoints that help you scope your queries to supported sports and their country groupings. Typical integrations include in-app search bars, pre-populating selection lists by sport, or narrowing a user’s exploration to the right country/tour category before they drill down.
This API is available on Zyla API Hub, a marketplace with more than 10,000 public APIs. With one account and one API key, you subscribe once and call any listed API through a consistent interface.
Getting started on Zyla API Hub
Open the FlashScore - Live API listing and start a trial to get your key:
- Go to the API page: Start 7-day trial on FlashScore - Live API.
- Click Subscribe or Start Free Trial (when available) to receive your API key.
- Use the Authorization: Bearer YOUR_API_KEY header in every request.
Billing on Zyla uses subscription + quota (not pay-per-call). For the first API you use, you’ll typically see a 7-day trial or a small request quota to evaluate. Check the API page for current access options and pricing.
Endpoints you will use
Below are the documented endpoints available on the FlashScore - Live API listing. Each section states its HTTP method, exact request URL, and any required parameters. Copy the curl samples as-is and replace YOUR_API_KEY with your key.
1) Search (teams, players, tournaments)
Search across FlashScore entities by a free-text query.
- Method: GET
- URL: https://zylalabs.com/api/12518/flashscore-live-api/23852/search
- Required query parameter:
- q (string): The text to search. Example: real madrid
Official curl (copy-paste):
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…
What you’ll use in practice:
- id: The FlashScore entity identifier (string). Use this to persist selections or build deep links in your app.
- type: entity category (e.g., team). Useful to branch UI behavior by result type.
- name: display label for the entity.
- url: the slug path fragment used on FlashScore.
- sport.id and sport.name: sport classification for the result. Helpful to filter multi-sport search UIs.
- gender: where applicable, for sport contexts that split competitions.
- country_name: high-level country/region label for the entity.
- image_path and country_image_path: PNG URLs for team and country badges you can render in UI components.
Python example: call Search and handle results
This Python snippet calls the Search endpoint, checks for teams named “Real Madrid,” and prints a simplified view you can drop into your UI layer.
import requests
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://zylalabs.com/api/12518/flashscore-live-api/23852/search"
def search_entities(query):
resp = requests.get(
BASE_URL,
params={"q": query},
headers={"Authorization": f"Bearer {API_KEY}"},
timeout=20,
)
resp.raise_for_status()
return resp.json()
if __name__ == "__main__":
results = search_entities("real madrid")
teams = [r for r in results if r.get("type") == "team"]
for t in teams:
sport = t.get("sport", {})
print({
"id": t.get("id"),
"name": t.get("name"),
"sport": sport.get("name"),
"country": t.get("country_name"),
"badge": t.get("image_path"),
})
2) Get sports
Retrieve a list of sports supported by FlashScore in this API. Use this to populate a sport switcher or to validate sport_id values before calling other endpoints.
- Method: GET
- URL: https://zylalabs.com/api/12518/flashscore-live-api/23853/get-sports
- Parameters: none documented
curl:
The response returns an array of objects with fields such as sport_id, sport_url, and name. Use sport_id values in context where a sport identifier is required downstream.
3) Get countries (by sport)
Return the list of country (or tour/category) groupings for a specific sport. This is useful for building a “Sport → Country/Category → Competition” navigation flow.
- Method: GET
- URL: https://zylalabs.com/api/12518/flashscore-live-api/23854/get-countries
- Required query parameter:
- sport_id (string): e.g., 2 for Tennis
curl (Tennis example):
The response returns an array of objects with fields such as country_id, country_url, and name that denote the sport’s categories or country groupings (for Tennis, groupings like ATP - Singles, WTA - Doubles, etc.). Use these to scope user exploration before triggering search or match lookups.
Putting the endpoints together in your app
Search-first UI
Many apps start with the Search endpoint to let users quickly find teams, players, or tournaments. For a responsive experience:
- Trigger GET /search after users pause typing (e.g., 300–500 ms debounce) to reduce calls.
- Cache the last N queries client-side to avoid re-fetching identical terms.
- Use sport.id or gender filters in your render logic to group or prioritize results.
Browse-first UI (sport → country/category)
If you want structured navigation:
- Call GET /get-sports to build the top-level sport selector.
- When a sport is chosen, call GET /get-countries?sport_id=... to show its country/category list.
- Use those selections to refine your subsequent search, or to display lists constrained to the chosen sport and grouping.
Server-side recommendations
- Centralize calls to Zyla endpoints in a small service module to standardize headers and handle HTTP errors consistently.
- Cache reference data such as sports and countries/categories in memory for minutes to hours, as these lists don’t change frequently.
- Log query strings for search to optimize autocomplete suggestions later.
End-to-end example: Tennis category picker with search
Here’s a quick plan to build a tennis picker flow:
- Call GET /get-sports once at boot and map the “Tennis” sport_id (from the response, Tennis has a sport_id field).
- Call GET /get-countries?sport_id=2 when the user opens the Tennis section.
- Render category names such as “ATP - Singles,” “WTA - Doubles,” etc.
- Provide a search box that queries GET /search with the user’s term; render only results where sport.id corresponds to Tennis.
This narrows user intent before any downstream data fetches, improving both UX and backend efficiency.
Calling the API from AI agents via MCP
If your workflow uses MCP-compatible clients (like Claude Code, Cursor, or Windsurf), you can route calls through Zyla’s MCP endpoint at https://mcp.zylalabs.com/mcp?apikey=YOUR_API_KEY. This lets an agent invoke the same FlashScore - Live API tools without re-implementing HTTP calls in your app. For integration notes and the MCP protocol expectations, see the MCP documentation.
Typical usage patterns include:
- Letting an AI assistant perform a search (e.g., “Find Real Madrid teams”).
- Having an agent enumerate supported sports first, then drill into a specific sport’s countries/categories before searching.
You still authenticate with your Zyla API key, and usage counts toward your subscription quota.
Operational notes that save time
- Authentication: Every request must include Authorization: Bearer YOUR_API_KEY.
- Quota model: Subscription + quota. This is not pay-per-call. See the listing page for details.
- Trials: For your first API on Zyla, you’ll typically get a 7-day trial or a small request allowance. Always check the listing’s current terms.
- Caching: Cache the outputs of GET /get-sports and GET /get-countries aggressively; they are reference lists and don’t change often.
- Search UX: Debounce user input and cache recent queries to reduce duplicate calls.
- Error handling: Treat non-2xx responses as errors and surface actionable messages; log response bodies to diagnose invalid parameters quickly.
If you are new to Zyla, browse the catalog at zylalabs.com—one account and one key unlock access across thousands of APIs without changing your HTTP client patterns.
Reference: All endpoints covered
- Search
- GET https://zylalabs.com/api/12518/flashscore-live-api/23852/search
- Params: q (string, required)
- Get sports
- GET https://zylalabs.com/api/12518/flashscore-live-api/23853/get-sports
- Params: none documented
- Get countries
- GET https://zylalabs.com/api/12518/flashscore-live-api/23854/get-countries
- Params: sport_id (string, required)
FAQ
How do I authenticate my requests?
Include the header Authorization: Bearer YOUR_API_KEY on every call. Obtain YOUR_API_KEY from the API’s listing page after subscribing.
Is there a free plan?
There is no free plan. Zyla uses a subscription + quota model. For your first API, you’ll typically see a 7-day trial or a small request quota to evaluate. Check the listing for current access options.
What does the Search endpoint return?
An array of entities (e.g., teams) with fields like id, type, name, sport.id, sport.name, gender, country_name, and image URLs you can render in UI components.
How do I find the right sport_id for Get countries?
Call GET /get-sports to list supported sports and their sport_id values. Then pass the chosen sport_id to GET /get-countries.
Can I call the API from an AI code assistant?
Yes. Use Zyla’s MCP endpoint at https://mcp.zylalabs.com/mcp?apikey=YOUR_API_KEY with an MCP-compatible client. See the linked MCP documentation for details.
Ready to ship your sports integration? Subscribe and get your key on the listing: Start 7-day trial on FlashScore - Live API. Once your key is active, paste the curl above and you’re live in minutes.
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…