# Formula 1 Sessions & Lineups Scraper (OpenF1) (`hipersoft/openf1-scraper`) Actor

Scrape Formula 1 sessions and driver lineups: session name and type (Practice, Qualifying, Race), circuit, location, country, dates and the full grid of drivers with number, team and country. Filter by year, country and session. One row per session as JSON, CSV or Excel.

- **URL**: https://apify.com/hipersoft/openf1-scraper.md
- **Developed by:** [hiper soft](https://apify.com/hipersoft) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.001 / session scraped

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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?

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

## Formula 1 Sessions & Lineups Scraper (OpenF1)

Pull **Formula 1 session and driver data** with the **F1 Sessions & Lineups Scraper**, powered by OpenF1. Choose a season, country or session type and export each session's **name and type, circuit, location, country, dates and the full grid of drivers** (number, name, team, country) — one clean row per session as **JSON, CSV or Excel**.

Built for **F1 fan sites and apps, fantasy F1 tools, sports dashboards and motorsport research**, it turns the F1 calendar into structured data.

### What it does

- 🏁 **All sessions** — Practice, Qualifying, Sprint and Race sessions for a season.
- 📍 **Session detail** — circuit, location, country, start/end dates and GMT offset.
- 👥 **Driver lineups** — the full grid for each session with car number, name, team and country.
- 🎛️ **Filters** — by year, Grand Prix country and session name.
- 📤 **Export anywhere** — JSON, CSV or Excel, or straight into an app, sheet or dashboard.

### Example output

```json
{
  "year": 2024,
  "sessionName": "Race",
  "location": "Marina Bay",
  "country": "Singapore",
  "dateStart": "2024-09-22T12:00:00+00:00",
  "drivers": [
    { "number": 1, "fullName": "Max VERSTAPPEN", "team": "Red Bull Racing", "countryCode": "NED" },
    { "number": 4, "fullName": "Lando NORRIS", "team": "McLaren", "countryCode": "GBR" }
  ]
}
```

### How to use it

1. Set a **year** (and optionally a **country** and **session**).
2. Keep **Include driver lineup** on for the full grid.
3. Set **Max sessions** and run. Download the results as **JSON, CSV or Excel**.

### Input fields

| Field | Description |
|-------|-------------|
| **Year** | Season year; defaults to current year. |
| **Country** | Filter by Grand Prix country. |
| **Session** | Filter by session (Race, Qualifying, Sprint, Practice…). |
| **Include driver lineup** | Add the full grid of drivers per session. |
| **Max sessions** | Maximum sessions to collect (0 = no limit). |

### Output fields

`sessionKey`, `meetingKey`, `sessionName`, `sessionType`, `circuit`, `location`, `country`, `countryCode`, `year`, `dateStart`, `dateEnd`, `gmtOffset`, `drivers`.

### Popular use cases

- **F1 fan sites & apps** — power schedules and session pages with structured data.
- **Fantasy F1 tools** — pull the session calendar and driver lineups.
- **Sports dashboards** — track the season across circuits and countries.
- **Motorsport research** — build datasets of sessions, circuits and grids.

### FAQ

**Do I need an account or key?**
No. Set a year and run.

**Which sessions are covered?**
All session types for a season — Practice, Qualifying, Sprint and Race — filterable by country and session name.

**Can I get the driver grid?**
Yes — keep the driver-lineup option on to include number, name, team and country for each session.

**Can I export to Excel or Google Sheets?**
Yes — results download as JSON, CSV or Excel and integrate with Sheets, apps and dashboards.

***

Structured **Formula 1 sessions and driver lineups** by season and circuit — clean and export-ready for F1 apps, fantasy tools and dashboards.

# Actor input Schema

## `year` (type: `string`):

Season year — e.g. '2024', '2023'. Defaults to the current year.

## `country` (type: `string`):

Filter by Grand Prix country — e.g. 'Singapore', 'Italy', 'United States'. Leave blank for all.

## `sessionName` (type: `string`):

Filter by session — e.g. 'Race', 'Qualifying', 'Sprint', 'Practice 1'. Leave blank for all sessions.

## `includeDrivers` (type: `boolean`):

Include the full grid of drivers (number, name, team, country) for each session.

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

Maximum number of sessions to collect (0 = no limit).

## Actor input object example

```json
{
  "year": "2024",
  "includeDrivers": true,
  "maxItems": 0
}
```

# Actor output Schema

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

The results as dataset items.

# 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 = {
    "year": "2024"
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/openf1-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 = { "year": "2024" }

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/openf1-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 '{
  "year": "2024"
}' |
apify call hipersoft/openf1-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hipersoft/openf1-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/XaYBOzlA6MPQHS8xw/builds/MfxjSiqX2sDgI2BJ3/openapi.json
