# Sleeper Fantasy Scraper (`real-estate-api/sleeper-fantasy-scraper`) Actor

Sleeper Fantasy Scraper is a Python tool to extract fantasy sports league details, team rosters, weekly matchups, playoff brackets, draft picks, transactions, player metadata, and trending add/drop counts from the Sleeper

- **URL**: https://apify.com/real-estate-api/sleeper-fantasy-scraper.md
- **Developed by:** [real-estate-api](https://apify.com/real-estate-api) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 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.
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

### Sleeper Fantasy Scraper — Trending Fantasy Player Adds and Drops

![Sleeper Fantasy Scraper cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/sleeper-fantasy-scraper-cover.png)

Collect trending fantasy player additions and drops from Sleeper and export detailed player information as JSON, CSV, or Excel. Choose a sport, select the trend type, set the lookback period, and control the maximum number of records collected per run.

### What This Actor Does

This actor collects publicly available trending player activity from Sleeper and enriches each result with player information.

Each dataset record includes the player's ID, name, number of adds or drops, sport, position, NFL team, injury information, experience, and other available player details. Duplicate player records are removed, and `maxItems` controls the maximum number of records included in the dataset.

### Collection Mode

- **Trending Adds and Drops:** Collects trending players based on the selected sport, activity type, and lookback period.

### Input Example

```json
{
  "mode": "trendingAdds",
  "sport": "nfl",
  "trendType": "add",
  "lookbackHours": 24,
  "limit": 25,
  "maxItems": 100,
  "requestDelaySecs": 1,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30
}
```

### Input Parameters

| Parameter | Description |
|---|---|
| `mode` | Selects the trending player collection mode. |
| `sport` | Sport category to collect trending player data for, such as `nfl`. |
| `trendType` | Selects the activity type: `add` or `drop`. |
| `lookbackHours` | Number of past hours used to determine trending activity. |
| `limit` | Number of trending players requested in each result set. |
| `maxItems` | Maximum number of player records to collect per run. |
| `requestDelaySecs` | Delay between collection requests, in seconds. |
| `userAgent` | Identifies the application making the request. |
| `timeoutSecs` | Overall collection run timeout, in seconds. |
| `requestTimeoutSecs` | Maximum time allowed for an individual request, in seconds. |

### What Data Does This Actor Extract?

| Field | Description |
|---|---|
| `player_id` | Sleeper player ID. |
| `player_name` | Combined first and last name. |
| `first_name`, `last_name` | Player's first and last name. |
| `count` | Number of adds or drops. |
| `sport` | Sport. |
| `trend_type` | Activity type: `add` or `drop`. |
| `lookback_hours` | Selected lookback period. |
| `position` | Main player position. |
| `fantasy_positions` | Fantasy positions associated with the player. |
| `team` | NFL team. |
| `number` | Jersey number. |
| `age` | Player age. |
| `years_exp` | Years of experience. |
| `status` | Player status. |
| `injury_status` | Injury status. |
| `injury_start_date` | Injury start date. |
| `practice_participation` | Practice participation information. |
| `college` | College. |
| `height`, `weight` | Player's physical information. |
| `depth_chart_position` | Depth chart position. |
| `depth_chart_order` | Depth chart order. |
| `search_rank` | Sleeper search rank. |
| `birth_country` | Birth country. |
| `hashtag` | Sleeper player hashtag. |
| `scraped_at` | Date and time the record was collected. |

### Use Cases

- **Waiver Wire Research:** Track which players are being added or dropped most frequently during a selected period.
- **Fantasy League Preparation:** Review player activity before drafts, waiver decisions, and roster changes.
- **Player Analysis:** Combine trending activity with position, team, injury, and experience information.
- **Trend Monitoring:** Compare player addition and drop trends across different lookback periods.
- **Fantasy Data Analysis:** Use player IDs, names, and activity counts in fantasy research, dashboards, and analytical workflows.
- **Scheduled Snapshots:** Refresh trending player data periodically using Apify schedules.

### Working with Your Dataset

After the actor finishes running, your collected player records are available in the Apify dataset.

Export the results as JSON, CSV, Excel, or another supported dataset format for further analysis and use in your fantasy research workflows.

### FAQ

**Who is this actor for?**

It is designed for fantasy football analysts, league managers, researchers, and developers who want structured Sleeper trending player data.

**Can I collect both adds and drops?**

You can select `add` or `drop` using the `trendType` parameter.

**What player information is included?**

Records can include player names, IDs, positions, teams, injury details, experience, physical information, and trending activity counts.

**What can I export?**

You can export the collected records as JSON, CSV, Excel, and other supported Apify dataset formats.

**Can I run this actor on a schedule?**

Yes. You can configure an Apify schedule to refresh trending player data at your preferred interval.

**How many records can it collect per run?**

You can collect up to 1,000 records per run. Use `maxItems` and `limit` to control the number of records collected.

### Disclaimer

This actor is an independent tool and is not affiliated with, endorsed by, or officially associated with Sleeper. It collects publicly available information for research and data-processing purposes.

### Is Web Scraping Legal?

Collecting information that is already public is generally legal. There is no single law that bans all forms of web scraping. The limits are the usual ones: do not break into accounts, do not take private or confidential data, and be careful with personal data and copyrighted works. A site's terms can also restrict how you access it. Facts such as a public name, price, or rating are not the same as republishing someone's article or photo.

This actor collects information from public pages. It does not log in and it does not bypass access controls.

For a longer explanation, see Apify's article [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

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

Fetch trending players based on recent add or drop activity.

## `sport` (type: `string`):

Sleeper sport identifier, for example nfl.

## `trendType` (type: `string`):

Choose whether to retrieve the most-added or most-dropped players.

## `lookbackHours` (type: `integer`):

Number of hours of add or drop activity to examine.

## `limit` (type: `integer`):

Maximum number of trending players requested from Sleeper.

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

Maximum number of unique player records to save.

## `includePlayerDetails` (type: `boolean`):

Enrich trending records with player names, positions, teams, age, experience, status, and other available details. The player database is cached for 24 hours.

## `requestDelaySecs` (type: `number`):

Wait between separate requests. No initial delay is applied.

## `userAgent` (type: `string`):

User-Agent header sent with requests.

## `timeoutSecs` (type: `integer`):

Overall execution time budget.

## `requestTimeoutSecs` (type: `integer`):

Maximum time allowed for an individual request.

## `proxyConfiguration` (type: `object`):

Optional Apify proxy configuration. Leave disabled unless needed.

## Actor input object example

```json
{
  "mode": "trendingAdds",
  "sport": "nfl",
  "trendType": "add",
  "lookbackHours": 24,
  "limit": 100,
  "maxItems": 100,
  "includePlayerDetails": true,
  "requestDelaySecs": 1,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 60,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset rows in the overview table.

## `dataset` (type: `string`):

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# 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("real-estate-api/sleeper-fantasy-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("real-estate-api/sleeper-fantasy-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 '{}' |
apify call real-estate-api/sleeper-fantasy-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,real-estate-api/sleeper-fantasy-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/H5cmOgnZrD2r1kJ3J/builds/duchwCLkIYhkRnQbb/openapi.json
