# Flashscore Countries Leagues (`extractify-labs/flashscore-countries-leagues`) Actor

Extract Flashscore countries and leagues for 9 sports: football, tennis, basketball, hockey, baseball, volleyball, handball, rugby, snooker. No proxy required.

- **URL**: https://apify.com/extractify-labs/flashscore-countries-leagues.md
- **Developed by:** [Extractify Labs](https://apify.com/extractify-labs) (community)
- **Categories:** News, Integrations
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Flashscore Countries & Leagues – Multi-Sport Directory

Extract a complete directory of countries and leagues from [Flashscore](https://www.flashscore.com) across 9 sports — football, tennis, basketball, hockey, baseball, volleyball, handball, rugby, and snooker — in a single run. No proxy required.

This actor scrapes Flashscore's public sport and country pages, returning one structured record per league. Each record includes the sport, country, and league names alongside their Flashscore URLs — ready to use as a reference dataset, a database seed, or a foundation for downstream match queries.

### Who is this for?

- **Sports dashboard builders** — populate country and league dropdowns, autocomplete fields, and filter controls with verified, up-to-date Flashscore structure.
- **Database architects and data engineers** — seed your sports reference tables with clean country/league slugs and URLs before running match-data actors.
- **Researchers and analysts** — map global sports league distributions, identify which leagues Flashscore tracks, and compare coverage across sports.
- **Flashscore ecosystem users** — discover the exact league URLs needed to drive the [Flashscore Results](https://apify.com/extractify-labs/flashscore-results) or [Flashscore Extractor](https://apify.com/extractify-labs/flashscore-extractor) actors without manual lookup.

### Key features

- **9 sports in one actor** — football, tennis, basketball, hockey, baseball, volleyball, handball, rugby, and snooker.
- **Full directory, no filtering** — returns every country and league Flashscore currently lists, so you always have the complete picture.
- **No proxy required** — plain HTTP requests to public HTML pages. No residential or datacenter proxy costs.
- **Clean URL slugs included** — every item carries both the display name and the URL-safe slug for both country and league.
- **Output cap** — the `maxItems` parameter lets you limit results for quick testing without stopping the full crawl.
- **Fast for a single sport** — football runs in approximately 177 requests; crawling all 9 sports takes approximately 1,200 requests.

### Supported sports

| Input value | Sport | URL on Flashscore |
|-------------|-------|-------------------|
| `football` | Football (soccer) | flashscore.com/football/ |
| `tennis` | Tennis | flashscore.com/tennis/ |
| `basketball` | Basketball | flashscore.com/basketball/ |
| `hockey` | Hockey | flashscore.com/hockey/ |
| `baseball` | Baseball | flashscore.com/baseball/ |
| `volleyball` | Volleyball | flashscore.com/volleyball/ |
| `handball` | Handball | flashscore.com/handball/ |
| `rugby` | Rugby Union | flashscore.com/rugby-union/ |
| `snooker` | Snooker | flashscore.com/snooker/ |

> **Note on rugby:** The input value is `"rugby"`. Flashscore uses the slug `rugby-union` in URLs, but the `sport` field in output always reads `"rugby"` — the mapping is transparent.

> **Note on tennis:** Tennis does not have geographic countries in the same sense as team sports. The `country_name` field for tennis entries reflects tour or category names such as `"ATP - Singles"`, `"WTA - Singles"`, or `"ITF - Women"`.

### How to use it

1. Open the actor on the [Apify Store](https://apify.com/extractify-labs/flashscore-countries-leagues).
2. Select the sport(s) you want in the `sports` input — or leave the default (`["football"]`) to crawl football only.
3. Optionally set `maxItems` to cap output during testing.
4. Click **Start** and download results as JSON, CSV, or XLSX when the run completes.

**Sample input — all 9 sports:**

```json
{
  "sports": ["football", "tennis", "basketball", "hockey", "baseball", "volleyball", "handball", "rugby", "snooker"]
}
````

**Sample input — football only, first 50 leagues:**

```json
{
  "sports": ["football"],
  "maxItems": 50
}
```

### Input parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `sports` | string\[] | No | `["football"]` | Which sports to crawl. Select one or more from the supported list. Unknown values are ignored with a warning. |
| `maxItems` | integer or null | No | `null` (unlimited) | Global cap on total output items. Useful for testing. Leave unset to return all leagues. |

**Allowed values for `sports`:** `football`, `tennis`, `basketball`, `hockey`, `baseball`, `volleyball`, `handball`, `rugby`, `snooker`

### Output format

The actor returns one item per league. Each item contains 9 fields.

| Field | Type | Description | Example |
|-------|------|-------------|---------|
| `sport` | string | Normalised sport name as supplied in input | `"football"` |
| `sport_url` | string | Absolute URL of the Flashscore sport index page | `"https://www.flashscore.com/football/"` |
| `country_name` | string | Display name of the country (or tour/category for tennis) | `"England"` |
| `country_slug` | string | URL path segment for the country | `"england"` |
| `country_url` | string | Absolute URL of the country page on Flashscore | `"https://www.flashscore.com/football/england/"` |
| `league_name` | string | Display name of the league | `"Premier League"` |
| `league_slug` | string | URL path segment for the league | `"premier-league"` |
| `league_url` | string | Absolute URL of the league page on Flashscore | `"https://www.flashscore.com/football/england/premier-league/"` |
| `scraped_at` | string (ISO 8601 UTC) | Timestamp when the item was extracted | `"2026-04-28T11:06:50+00:00"` |

**Complete example record:**

```json
{
  "sport": "football",
  "sport_url": "https://www.flashscore.com/football/",
  "country_name": "England",
  "country_slug": "england",
  "country_url": "https://www.flashscore.com/football/england/",
  "league_name": "Premier League",
  "league_slug": "premier-league",
  "league_url": "https://www.flashscore.com/football/england/premier-league/",
  "scraped_at": "2026-04-28T11:06:50+00:00"
}
```

**Tennis example record:**

```json
{
  "sport": "tennis",
  "sport_url": "https://www.flashscore.com/tennis/",
  "country_name": "ATP - Singles",
  "country_slug": "atp-singles",
  "country_url": "https://www.flashscore.com/tennis/atp-singles/",
  "league_name": "Australian Open",
  "league_slug": "australian-open",
  "league_url": "https://www.flashscore.com/tennis/atp-singles/australian-open/",
  "scraped_at": "2026-04-28T11:06:50+00:00"
}
```

### Use cases

#### Sports dashboard and application development

Populate country and league dropdowns, search autocomplete, and filter controls in your sports app. Instead of hand-curating a list and re-checking it manually after each Flashscore update, run this actor periodically to refresh your reference data automatically.

#### Database seeding

Use this actor as a one-time (or recurring) seed for your sports reference tables. The clean slugs and full URLs mean your downstream queries to match-data actors can be built programmatically without manual URL construction.

#### Building a multi-sport league catalog

Run with all 9 sports to produce a comprehensive catalog of every active Flashscore league — useful for analysts studying global sports league distributions or building sports knowledge graphs.

#### Powering match-data pipelines

This actor complements the Flashscore match-data actors in this suite. Use the `league_url` field from the output here as input to [Flashscore Results](https://apify.com/extractify-labs/flashscore-results) or [Flashscore Extractor](https://apify.com/extractify-labs/flashscore-extractor) to target specific competitions without guessing URL structure.

#### Data journalism and research

Map which countries and leagues Flashscore covers for a given sport. Compare coverage across sports. Identify which regions are represented or absent.

### Limitations

- **No match data** — this actor returns country and league listings only. For match results, fixtures, or live scores, use the sibling actors listed in the Related actors section.
- **No numeric IDs or logo URLs** — Flashscore numeric league IDs and logo/flag images are not available on the HTML pages this actor scrapes. They are absent from the output by design.
- **No country filtering** — the actor always returns the full directory for each requested sport. You can filter output yourself using `maxItems` or post-processing.
- **Tennis uses tour names, not countries** — the `country_name` field for tennis entries reflects Flashscore's tour/category structure (e.g. `"ATP - Singles"`, `"WTA - Doubles"`), not geographic countries.
- **Rugby maps to rugby union** — the input value `"rugby"` maps to Flashscore's rugby union section. Other rugby formats (e.g. rugby league) are not available.
- **Point-in-time snapshot** — the actor reads Flashscore's current HTML. Leagues added or removed by Flashscore after the run are not reflected until the actor runs again.
- **Scale** — crawling all 9 sports makes approximately 1,200 requests and returns several thousand league records. Football alone is approximately 177 requests covering ~176 countries.

### FAQ

#### Do I need a proxy to run this actor?

No. The actor makes plain HTTP GET requests to Flashscore's public HTML pages without requiring any proxy. You are charged only for standard Apify compute.

#### How do I get match data for a specific league?

This actor returns the `league_url` for every league. Pass that URL to one of the sibling match-data actors (Flashscore Results, Flashscore Extractor) to retrieve fixtures, results, or live scores for that league.

#### Why does tennis show "ATP - Singles" instead of a country name?

Tennis on Flashscore is organised by tour and category rather than by country. The `country_name` field reflects the Flashscore page structure exactly — for tennis this means tour names like `"ATP - Singles"`, `"WTA - Singles"`, `"ITF - Men"`, and so on.

#### Can I filter results to a specific country or league?

The actor does not support filtering by country or league name during the crawl — it always returns the full directory for each requested sport. To narrow results, use `maxItems` to cap output, or filter the dataset after the run using Apify's dataset filters or your own tooling.

#### How often should I run this actor?

Flashscore's league structure changes infrequently (new leagues are added or retired rarely). Running once to seed a database, then periodically (e.g. monthly) to check for changes, is a typical usage pattern.

#### Is this actor different from the Flashscore Extractor?

Yes. The Flashscore Extractor returns match data (scores, teams, fixtures). This actor returns the league directory — the catalog of countries and leagues that Flashscore tracks — with no match data at all. They are complementary: use this actor first to discover the leagues, then use the match actors to retrieve data from those leagues.

### Related actors

- [Flashscore Extractor](https://apify.com/extractify-labs/flashscore-extractor) — Match listings, live scores, and fixtures for football and basketball.
- [Flashscore Results](https://apify.com/extractify-labs/flashscore-results) — Historical match results with filtering by tournament page.
- [Flashscore Tennis Matches](https://apify.com/extractify-labs/flashscore-tennis-matches) — ATP, WTA, ITF, and Challenger tennis match data with set-by-set results.
- [Flashscore Live Matches](https://apify.com/extractify-labs/flashscore-live-matches) — Real-time live match scores.
- [Flashscore H2H](https://apify.com/extractify-labs/flashscore-h2h) — Head-to-head records between two teams.
- [Flashscore Football Seasons](https://apify.com/extractify-labs/flashscore-football-seasons) — Historical season data by tournament.

# Actor input Schema

## `sports` (type: `array`):

Which sports to crawl. Leave unset to crawl football only.

## `maxItems` (type: `integer`):

Global cap on total output items. Leave unset (null) for unlimited.

## Actor input object example

```json
{
  "sports": [
    "football"
  ]
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("extractify-labs/flashscore-countries-leagues").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("extractify-labs/flashscore-countries-leagues").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call extractify-labs/flashscore-countries-leagues --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=extractify-labs/flashscore-countries-leagues",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Flashscore Countries Leagues",
        "description": "Extract Flashscore countries and leagues for 9 sports: football, tennis, basketball, hockey, baseball, volleyball, handball, rugby, snooker. No proxy required.",
        "version": "0.0",
        "x-build-id": "REc8vaIUMVMqNyVBZ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/extractify-labs~flashscore-countries-leagues/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-extractify-labs-flashscore-countries-leagues",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/extractify-labs~flashscore-countries-leagues/runs": {
            "post": {
                "operationId": "runs-sync-extractify-labs-flashscore-countries-leagues",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/extractify-labs~flashscore-countries-leagues/run-sync": {
            "post": {
                "operationId": "run-sync-extractify-labs-flashscore-countries-leagues",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "sports": {
                        "title": "Sports",
                        "type": "array",
                        "description": "Which sports to crawl. Leave unset to crawl football only.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "football",
                                "tennis",
                                "basketball",
                                "hockey",
                                "baseball",
                                "volleyball",
                                "handball",
                                "rugby",
                                "snooker"
                            ]
                        },
                        "default": [
                            "football"
                        ]
                    },
                    "maxItems": {
                        "title": "Maximum items",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Global cap on total output items. Leave unset (null) for unlimited."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
