# NFL Data Scraper (`crawlerbros/nfl-data-scraper`) Actor

Scrape NFL statistics and data, teams, players, game schedules, and standings for the National Football League via TheSportsDB. Free public API, no registration required.

- **URL**: https://apify.com/crawlerbros/nfl-data-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Developer tools, Other, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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/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

## NFL Data Scraper

Scrape comprehensive NFL (National Football League) data including teams, players, game schedules, and standings. Powered by TheSportsDB — a free, open sports data API requiring no registration or API key.

### What This Actor Does

NFL Data Scraper gives you structured NFL data in seconds:

- **All 32 NFL teams** with stadium info, founding year, colors, logos, and descriptions
- **Player rosters** for any team — position, height, weight, college, nationality
- **Game schedules** for any season — home/away teams, scores, dates, venues
- **League standings** (when available) — wins, losses, points
- **Player search** — find any player by name across the league

### Output Data

Each record contains fields depending on the mode:

#### Teams
| Field | Description |
|-------|-------------|
| `teamId` | TheSportsDB unique team identifier |
| `teamName` | Full team name (e.g. "Kansas City Chiefs") |
| `shortName` | Abbreviated team name (e.g. "KC") |
| `division` | NFL division (e.g. "AFC West") |
| `stadium` | Home stadium name |
| `stadiumCapacity` | Stadium seating capacity |
| `stadiumLocation` | Stadium city and state |
| `foundedYear` | Year the team was established |
| `description` | Team history and overview |
| `badgeUrl` | Team badge/crest image URL |
| `logoUrl` | Team logo image URL |
| `website` | Official team website |
| `primaryColor` | Primary team color |

#### Players
| Field | Description |
|-------|-------------|
| `playerId` | Unique player identifier |
| `playerName` | Full player name |
| `team` | Current team |
| `position` | Playing position (QB, WR, RB, etc.) |
| `nationality` | Player nationality |
| `height` | Player height |
| `weight` | Player weight |
| `birthDate` | Date of birth |
| `college` | College attended |
| `status` | Active/Retired status |
| `thumbUrl` | Player thumbnail image |

#### Events / Schedule
| Field | Description |
|-------|-------------|
| `eventId` | Unique game identifier |
| `homeTeam` | Home team name |
| `awayTeam` | Away team name |
| `homeScore` | Home team score |
| `awayScore` | Away team score |
| `date` | Game date (YYYY-MM-DD) |
| `time` | Game time |
| `venue` | Stadium/venue name |
| `season` | Season identifier |
| `status` | Game status |

### Input Configuration

| Parameter | Type | Description |
|-----------|------|-------------|
| `mode` | select | Data type to fetch (teams/players/schedule/standings/teamDetails/searchPlayers) |
| `teamId` | string | TheSportsDB team ID (e.g. "134946") |
| `teamName` | string | Team name for lookup (e.g. "Kansas City Chiefs") |
| `season` | string | Season year (e.g. "2023" or "2023-2024") |
| `playerName` | string | Player name for search |
| `maxItems` | integer | Maximum records to return (1–1000, default 50) |

### Example Uses

#### Get all NFL teams
```json
{
  "mode": "teams",
  "maxItems": 32
}
````

#### Get Kansas City Chiefs roster

```json
{
  "mode": "players",
  "teamName": "Kansas City Chiefs",
  "maxItems": 100
}
```

#### Get 2023 season schedule

```json
{
  "mode": "schedule",
  "season": "2023",
  "maxItems": 300
}
```

#### Search for a player

```json
{
  "mode": "searchPlayers",
  "playerName": "Patrick Mahomes"
}
```

### Use Cases

- **Fantasy football research** — Get player stats, rosters, and injury status
- **Sports analytics** — Build datasets for NFL statistics analysis
- **Game prediction models** — Historical game results and schedules
- **Team comparison** — Stadium data, founding history, division info
- **Sports media** — Automate NFL content with accurate team and player data

### FAQ

**Q: Is an API key required?**
A: No. This scraper uses TheSportsDB's free public API which requires no registration.

**Q: How current is the data?**
A: TheSportsDB is updated regularly by community contributors. Player rosters and game scores may have a small delay.

**Q: How many teams are there in the NFL?**
A: There are 32 NFL teams across 8 divisions (4 in AFC, 4 in NFC).

**Q: What season format should I use?**
A: Use "2023" for the 2023 NFL season, or "2023-2024" for cross-year references. The "2023" format works best.

**Q: Are standings available?**
A: Standings access depends on TheSportsDB API tier. If unavailable, the actor returns team records instead.

**Q: Can I get historical game data?**
A: Yes, use mode=schedule with any past season year (e.g. "2020", "2021", "2022", "2023").

# Actor input Schema

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

What data to fetch from the NFL dataset.

## `teamId` (type: `string`):

TheSportsDB team ID (e.g. 134946 for Arizona Cardinals). Used in modes: players, schedule (filter), teamDetails.

## `teamName` (type: `string`):

NFL team name for lookup (e.g. 'Kansas City Chiefs'). Alternative to teamId for modes: players, teamDetails.

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

Season identifier for schedule and standings (e.g. '2023' or '2023-2024'). Used in modes: schedule, standings.

## `playerName` (type: `string`):

Player name to search for (mode=searchPlayers). E.g. 'Patrick Mahomes'.

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

Maximum number of records to return. Applies across all modes.

## Actor input object example

```json
{
  "mode": "teams",
  "season": "2023",
  "maxItems": 50
}
```

# Actor output Schema

## `nflData` (type: `string`):

Dataset containing scraped NFL data including teams, players, schedules, and standings.

# 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",
    "season": "2023",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/nfl-data-scraper").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",
    "season": "2023",
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/nfl-data-scraper").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 '{
  "mode": "teams",
  "season": "2023",
  "maxItems": 50
}' |
apify call crawlerbros/nfl-data-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=crawlerbros/nfl-data-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "NFL Data Scraper",
        "description": "Scrape NFL statistics and data, teams, players, game schedules, and standings for the National Football League via TheSportsDB. Free public API, no registration required.",
        "version": "1.0",
        "x-build-id": "VgLPXVO3FoQ9dVn9b"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/crawlerbros~nfl-data-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-crawlerbros-nfl-data-scraper",
                "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/crawlerbros~nfl-data-scraper/runs": {
            "post": {
                "operationId": "runs-sync-crawlerbros-nfl-data-scraper",
                "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/crawlerbros~nfl-data-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-crawlerbros-nfl-data-scraper",
                "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",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "teams",
                            "players",
                            "schedule",
                            "standings",
                            "teamDetails",
                            "searchPlayers"
                        ],
                        "type": "string",
                        "description": "What data to fetch from the NFL dataset.",
                        "default": "teams"
                    },
                    "teamId": {
                        "title": "Team ID",
                        "type": "string",
                        "description": "TheSportsDB team ID (e.g. 134946 for Arizona Cardinals). Used in modes: players, schedule (filter), teamDetails."
                    },
                    "teamName": {
                        "title": "Team Name",
                        "type": "string",
                        "description": "NFL team name for lookup (e.g. 'Kansas City Chiefs'). Alternative to teamId for modes: players, teamDetails."
                    },
                    "season": {
                        "title": "Season",
                        "type": "string",
                        "description": "Season identifier for schedule and standings (e.g. '2023' or '2023-2024'). Used in modes: schedule, standings.",
                        "default": "2023"
                    },
                    "playerName": {
                        "title": "Player Name",
                        "type": "string",
                        "description": "Player name to search for (mode=searchPlayers). E.g. 'Patrick Mahomes'."
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of records to return. Applies across all modes.",
                        "default": 50
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
