# 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:** 5 total users, 4 monthly users, 100.0% runs succeeded, 0 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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(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",
  "season": "2023",
  "maxItems": 50
}' |
apify call crawlerbros/nfl-data-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlerbros/nfl-data-scraper"
        }
    }
}

```

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/0BsYBrYDr08sLNwYx/builds/VgLPXVO3FoQ9dVn9b/openapi.json
