# MLS & North American Soccer Teams, Players & Results (`dataspryva/mls-and-north-american-soccer-teams-players`) Actor

List current teams, search players, or pull season match results across MLS, USL, NWSL, Liga MX, CONCACAF, and the top five European leagues, with club details, player bios, and final scores.

- **URL**: https://apify.com/dataspryva/mls-and-north-american-soccer-teams-players.md
- **Developed by:** [Dataspryva](https://apify.com/dataspryva) (community)
- **Categories:** Automation, Developer tools, Integrations
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## MLS & North American Soccer Teams, Players & Results

Collect soccer clubs, squads, player profiles, season fixtures, final scores, league tables and match details across Major League Soccer, USL Championship, NWSL, Liga MX, the CONCACAF Champions Cup and the top five European leagues.

Everything comes from TheSportsDB's public sports database. No cookies, no login, no API key from you and no proxy setup.

### What this actor does

- **League teams** — every club in a chosen competition, with venue, city, colours, competitions, badge and social links
- **Team profiles** — one club in depth: venue capacity and location, current squad, next fixture and last result
- **Player search** — search by name, player ID or profile URL and get the full biography, birth details, position, shirt number, team, honours, former clubs and season stat lines
- **Season matches** — fixtures and results with scores, dates, rounds, venues and badges; filter by round, team or upcoming/recent (large seasons are best-effort because the shared free key is rate-limited)
- **League tables** — the source's official top rows, plus a calculated full table for European seasons when the shared key allows the full round walk
- **Match details** — one match with lineups, statistics and goal/card timeline
- **League directory** — the ten covered competitions with current season, country, badge, banner and description

### Output per record

Every record includes `recordType`, `scrapedAt` (ISO 8601 UTC) and source IDs where available. Empty fields are omitted, never sent as `null`.

**Team** (`recordType` = `<league>_team` in league mode, `team` in profile mode)

- `teamId`, `teamName`, `shortName`, `alternateName`
- `city`, `stadium`, `stadiumId`, `country`, `formedYear`
- `sport`, `league`, `leagueId`, `division`, `gender`, `keywords`
- `colours`, `competitions`
- `website`, `facebook`, `twitter`, `instagram`, `youtube`, `rss`
- `description`, `logoUrl`, `bannerUrl`, `equipmentUrl`, `teamUrl`
- Profile mode adds `venue` (capacity, location, timezone, architect, cost, map, images), `squad` (up to 10 players), `squadReturned`, `nextEvent`, `lastEvent`

**Player** (`recordType` = `<league>_player`)

- `playerId`, `playerName`, `alternateName`, `lastName`
- `team`, `teamId`, `nationalTeam`, `nationality`, `position`, `status`
- `gender`, `ethnicity`, `sport`, `height`, `weight`
- `birthDate`, `birthLocation`, `deathDate`, `deathLocation`
- `teamNumber`, `side`, `kit`, `outfitter`, `wage`, `signing`, `dateSigned`, `agent`, `college`
- `creativeCommons`, `description`
- `imageUrl`, `thumbUrl`, `cutoutUrl`, `renderUrl`, `posterUrl`, `bannerUrl`, `profileUrl`
- `website`, `facebook`, `twitter`, `instagram`
- `honours` (up to 5), `formerTeams` (up to 5), `stats` (up to 10)

**Match** (`recordType` = `<league>_game` in season mode, `event` in match mode)

- `eventId`, `eventName`, `alternateName`, `filename`
- `homeTeam`, `awayTeam`, `homeTeamId`, `awayTeamId`, `homeTeamBadge`, `awayTeamBadge`
- `homeScore`, `awayScore`, `homeScoreExtra`, `awayScoreExtra`
- `season`, `matchDate`, `localDate`, `matchTime`, `localTime`, `timestamp`
- `round`, `group`, `venue`, `venueId`, `city`, `country`, `status`, `postponed`, `result`
- `sport`, `league`, `leagueName`, `leagueId`, `leagueBadge`
- `spectators`, `officials`, `weather`, `description`
- `videoUrl`, `thumbUrl`, `posterUrl`, `bannerUrl`, `squareUrl`, `fanartUrl`, `eventUrl`
- Match mode adds `lineup` (up to 5 players), `statistics` (up to 5 rows) and `timeline` (up to 5 events)

**Standing** (`recordType` = `standing`)

- `rank`, `teamId`, `teamName`, `group`, `form`, `description`
- `played`, `wins`, `draws`, `losses`, `goalsFor`, `goalsAgainst`, `goalDifference`, `points`
- `badgeUrl`, `league`, `leagueName`, `season`, `tableSource`, `updatedAt`

**League** (`recordType` = `league`)

- `leagueId`, `leagueName`, `alternateName`, `sport`, `country`, `currentSeason`
- `formedYear`, `firstEventDate`, `gender`, `division`, `cup`
- `badgeUrl`, `bannerUrl`, `logoUrl`, `posterUrl`, `trophyUrl`, `fanart`
- `description`, `website`, `facebook`, `twitter`, `instagram`, `youtube`, `rss`
- `tvRights`, `leagueUrl`

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | select | `teams` | `teams`, `team`, `players`, `games`, `standings`, `event` or `leagues` |
| `league` | select | `mls` | MLS, USL Championship, NWSL, Liga MX, CONCACAF Champions Cup, Premier League, Bundesliga, Serie A, La Liga, Ligue 1 |
| `searchQueries` | string list | `["Lorenzo Insigne"]` | Player names, IDs or profile URLs for `players` |
| `teamQueries` | string list | `["Inter Miami"]` | Team names, IDs or team URLs for `team` |
| `eventQueries` | string list | `["2627210"]` | Event IDs or match URLs for `event` |
| `season` | text | `2026` | Single year for MLS/USL/NWSL/Liga MX/CONCACAF; start year or range for European leagues |
| `round` | text | — | Optional round filter for `games`, e.g. `10` or `r10` |
| `teamFilter` | text | — | Optional club name or team ID for `games` |
| `eventWindow` | select | `all` | `all`, `upcoming` or `recent` for `games` |
| `includeSquad` | boolean | `true` | Add the squad to team profiles |
| `includeEventDetails` | boolean | `false` | Add lineups, statistics and timeline to every returned match |
| `maxItems` | integer | `20` | Records to return, 1-5,000 |

Saved tasks that still send the old single `searchQuery` field keep working: the actor reads it and maps it onto `searchQueries`.

#### Examples

Current MLS clubs:

```json
{
  "mode": "teams",
  "league": "mls",
  "season": "2026",
  "maxItems": 30
}
```

Inter Miami with its venue and squad:

```json
{
  "mode": "team",
  "league": "mls",
  "teamQueries": ["Inter Miami"],
  "includeSquad": true
}
```

A player profile:

```json
{
  "mode": "players",
  "searchQueries": ["Lionel Messi"]
}
```

One European round:

```json
{
  "mode": "games",
  "league": "epl",
  "season": "2024-2025",
  "round": "10",
  "maxItems": 12
}
```

A full European season (walked round by round; best-effort under the shared rate limit):

```json
{
  "mode": "games",
  "league": "epl",
  "season": "2024-2025",
  "maxItems": 500
}
```

A calculated table (best-effort; falls back to the official top five):

```json
{
  "mode": "standings",
  "league": "epl",
  "season": "2024-2025",
  "maxItems": 25
}
```

One match with lineups and stats:

```json
{
  "mode": "event",
  "eventQueries": ["https://www.thesportsdb.com/event/2627210-columbus-crew-vs-inter-miami"]
}
```

The league directory:

```json
{
  "mode": "leagues",
  "maxItems": 10
}
```

### Use cases

- **Club directories** — build a current league roster with stadiums, badges and social links
- **Squad research** — pull a club's players, positions and shirt numbers
- **Player cards** — biography, birth details, honours, former clubs and stat lines for apps or editorial
- **Season archives** — collect a competition's fixtures and final scores, filtered by round or club
- **Table dashboards** — use the official top rows, or the complete calculated table for a European season
- **Match pages** — lineups, statistics and goal timelines for individual fixtures
- **Metadata and artwork** — badges, banners, player images and league artwork come attached to the same records

### FAQ

**Where does the data come from?** TheSportsDB's public sports database, through its official free API. The actor is not affiliated with or endorsed by TheSportsDB, MLS, USL, NWSL, Liga MX, CONCACAF, UEFA or any league or club named here.

**Do I need an API key, cookies or a proxy?** No. The actor uses the public free key, sends requests at a polite pace and needs no user credentials. A proxy is never configured or required.

**Why is a calendar-year season sometimes partial?** The free API returns at most 10 matches per round. European leagues have 9-10 matches per round, so walking rounds can reconstruct the whole season. MLS, USL, NWSL, Liga MX and CONCACAF can have 12-17 matches per round, so those seasons can be incomplete. The shared free key is also throttled globally: a long round walk may stop early, and the run status message then says the result is partial.

**Why does the league table sometimes have only five rows?** The free API caps its official table at five rows. For European leagues the actor reads the season's matches round by round, calculates the full table and checks its top five against the official top five; only a match unlocks the complete table. For calendar-year leagues the official five rows are returned. If the shared key throttles the round walk before validation, the official five rows are returned with a partial-run note.

**Why are there only 10 players in a squad, or 5 actors in a lineup?** The free API caps those endpoints at 10 and 5 records. The actor reports the returned count rather than inventing data.

**Why did my large run take a while?** The free API allows 30 requests per minute. Full-season and calculated-table requests walk many rounds, so the actor spaces requests and may take a minute or two. If the shared key is throttled, the actor stops, returns what it already collected and tells you to re-run later. A large full-season request can therefore be partial; run a single round at a time if you need every match.

**Are live scores included?** No. Livescores and video highlights are premium-only in the source. Season results are whatever the source has recorded at run time.

**Can I use IDs or URLs instead of names?** Yes. Team, player and event inputs accept a numeric ID or a `thesportsdb.com/...` URL, as well as a name where search is supported.

**Why is the season field a text box?** Seasons are a single year for some leagues and a two-year range for others, and the archive goes back more than a decade. The actor accepts either form and converts a European start year automatically.

### Data source and attribution

Data and artwork are provided by TheSportsDB (TheDataDB Ltd). Please credit TheSportsDB as the source when you publish the data. Artwork licences are set by the individual image, not by the dataset; check the `creativeCommons` flag on player records before republishing images.

### Limitations

- The free API returns at most 15 events from a season endpoint and 10 events per round.
- Calendar-year league seasons can be partial; European seasons are complete only when the shared key allows the full round walk, otherwise the run states it is partial.
- Official league tables are capped at 5 rows; calculated full tables are best-effort and available for European leagues when validation succeeds.
- Squads, lineups, event stats, timelines, honours and former-team lists are capped at 5-10 records by the free tier.
- Live scores, video highlights and the v2 API require a paid source subscription and are not used.

# Actor input Schema

## `mode` (type: `string`):

Choose a league roster, a club profile, player profiles, season matches, a league table, one match, or the league directory.

## `league` (type: `string`):

Competition used by the teams, games, standings and team-name lookup modes.

## `searchQueries` (type: `array`):

One or more players for the player search mode. A name, a numeric player ID, or a thesportsdb.com/player/... URL all work.

## `teamQueries` (type: `array`):

One or more clubs for the team profile mode. A name, a numeric team ID, or a thesportsdb.com/team/... URL all work.

## `eventQueries` (type: `array`):

One or more matches for the match details mode. Use a numeric event ID or a thesportsdb.com/event/... URL.

## `season` (type: `string`):

Season year or range, for example 2025. MLS, USL, NWSL, Liga MX and CONCACAF use a single year; the five European leagues accept a start year (2025 becomes 2025-2026) or a full range.

## `round` (type: `string`):

Optional round number for season matches, for example 10 or r10. Leave empty for the whole season.

## `teamFilter` (type: `string`):

Optional club name or team ID. Only matches involving that club are returned.

## `eventWindow` (type: `string`):

Return the whole season, only future fixtures, or only completed matches.

## `includeSquad` (type: `boolean`):

For team profiles, also return the club's player list.

## `includeEventDetails` (type: `boolean`):

For season matches, also return lineups, statistics and timeline for each returned match. This costs extra requests.

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

Hard cap on returned records. A high value requests a full season (about 380 matches in a European league); the shared free key can stop a long round walk early, in which case the run returns what it collected.

## Actor input object example

```json
{
  "mode": "teams",
  "league": "mls",
  "searchQueries": [
    "Lorenzo Insigne"
  ],
  "teamQueries": [
    "Inter Miami"
  ],
  "eventQueries": [
    "2627210"
  ],
  "season": "2026",
  "eventWindow": "all",
  "includeSquad": true,
  "includeEventDetails": false,
  "maxItems": 3
}
```

# Actor output Schema

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

Dataset containing the scraped teams, players, matches, standings or leagues.

# 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 = {
    "mode": "teams",
    "league": "mls",
    "searchQueries": [
        "Lorenzo Insigne"
    ],
    "teamQueries": [
        "Inter Miami"
    ],
    "eventQueries": [
        "2627210"
    ],
    "season": "2026",
    "eventWindow": "all",
    "includeSquad": true,
    "includeEventDetails": false,
    "maxItems": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("dataspryva/mls-and-north-american-soccer-teams-players").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 = {
    "mode": "teams",
    "league": "mls",
    "searchQueries": ["Lorenzo Insigne"],
    "teamQueries": ["Inter Miami"],
    "eventQueries": ["2627210"],
    "season": "2026",
    "eventWindow": "all",
    "includeSquad": True,
    "includeEventDetails": False,
    "maxItems": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("dataspryva/mls-and-north-american-soccer-teams-players").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "mode": "teams",
  "league": "mls",
  "searchQueries": [
    "Lorenzo Insigne"
  ],
  "teamQueries": [
    "Inter Miami"
  ],
  "eventQueries": [
    "2627210"
  ],
  "season": "2026",
  "eventWindow": "all",
  "includeSquad": true,
  "includeEventDetails": false,
  "maxItems": 3
}' |
apify call dataspryva/mls-and-north-american-soccer-teams-players --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dataspryva/mls-and-north-american-soccer-teams-players"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/dOuBlkPvUD9a1Us54/builds/oDXiFEe6U4kFMI9b7/openapi.json
