Draft_Kings_scraper avatar
Draft_Kings_scraper

Pricing

Pay per event

Go to Apify Store
Draft_Kings_scraper

Draft_Kings_scraper

The DraftKings API Actor is designed to extract comprehensive sports betting data and daily fantasy sports information from the DraftKings platform. It provides users with real-time betting odds, contest details, and player statistics, making it a valuable tool for sports enthusiasts

Pricing

Pay per event

Rating

5.0

(1)

Developer

christopher athans crow

christopher athans crow

Maintained by Community

Actor stats

0

Bookmarked

4

Total users

2

Monthly active users

3 days ago

Last modified

Share

DraftKings API Actor

The DraftKings API Actor is a powerful web scraping tool designed to extract comprehensive sports betting data and daily fantasy sports (DFS) information from the DraftKings platform. It provides real-time access to betting odds, contest details, and player statistics across multiple sports.

Features

Real-time Betting Odds

  • Scrapes current sportsbook lines across multiple sports
  • Captures point spreads, moneylines, over/under totals, and prop bets
  • Tracks odds and line movements throughout the day

Daily Fantasy Sports Data

  • Automated contest monitoring with entry fees, prize pools, and participant counts
  • Comprehensive player statistics including projected points, salaries, and ownership percentages
  • Draft group tracking and organization

Multi-Sport Coverage

  • NFL - National Football League
  • NBA - National Basketball Association
  • MLB - Major League Baseball
  • NHL - National Hockey League
  • LOL - League of Legends (Esports)
  • CS - Counter-Strike (Esports)
  • SOCCER - International Soccer
  • MMA - Mixed Martial Arts
  • NASCAR - Stock Car Racing
  • GOLF - Professional Golf
  • TENNIS - Professional Tennis

Input Configuration

The Actor accepts the following input parameters:

sport (required)

  • Type: String (select dropdown)
  • Description: Sport code to scrape contests and players for
  • Options: NFL, NBA, MLB, NHL, LOL, CS, SOCCER, MMA, NASCAR, GOLF, TENNIS
  • Default: LOL

maxContests

  • Type: Integer
  • Description: Maximum number of contests to scrape. Set to a lower number for faster runs.
  • Default: 100
  • Range: 1-1000

includePlayerData

  • Type: Boolean
  • Description: If enabled, will fetch detailed player information for each draft group. Disable for faster execution.
  • Default: true

Example Input

{
"sport": "NFL",
"maxContests": 50,
"includePlayerData": true
}

Output Data

The Actor provides structured JSON output with two types of records:

Contest Data

Each contest record includes:

  • type: "contest"
  • sport: Sport code
  • contestId: Unique contest identifier
  • contestName: Contest name/title
  • draftGroupId: Associated draft group ID
  • entryFee: Contest entry fee
  • totalPrizes: Total prize pool
  • maxEntries: Maximum number of entries allowed
  • currentEntries: Current number of entries
  • gameType: Contest game type
  • startTime: Contest start time
  • scrapedAt: Timestamp when data was collected

Player Data

Each player record includes:

  • type: "player"
  • sport: Sport code
  • draftGroupId: Associated draft group ID
  • playerId: Unique player identifier
  • playerName: Player's display name
  • firstName: Player's first name
  • lastName: Player's last name
  • position: Playing position
  • teamAbbreviation: Team abbreviation
  • salary: DFS salary
  • pointsPerGame: Average points per game
  • competition: Competition/league name
  • status: Player status
  • draftable: Whether player is available for draft
  • scrapedAt: Timestamp when data was collected

Example Output

[
{
"type": "contest",
"sport": "NFL",
"contestId": 123456,
"contestName": "$100K Sunday Million",
"draftGroupId": 98765,
"entryFee": 20,
"totalPrizes": 100000,
"maxEntries": 10000,
"currentEntries": 8543,
"gameType": "Classic",
"startTime": "2025-11-04T18:00:00Z",
"scrapedAt": "2025-11-04T17:30:00Z"
},
{
"type": "player",
"sport": "NFL",
"draftGroupId": 98765,
"playerId": 456789,
"playerName": "Patrick Mahomes",
"firstName": "Patrick",
"lastName": "Mahomes",
"position": "QB",
"teamAbbreviation": "KC",
"salary": 8500,
"pointsPerGame": 24.3,
"competition": "NFL",
"status": "Active",
"draftable": true,
"scrapedAt": "2025-11-04T17:30:00Z"
}
]

Output Views

The Actor provides three pre-configured dataset views:

Overview

Combined view showing both contests and players with key fields:

  • Type, Sport, Contest Name, Player Name, Entry Fee, Salary, Scraped At

Contests

Focused view for contest data:

  • Type, Sport, Contest Name, Entry Fee, Prize Pool, Entries, Max Entries, Game Type, Start Time, Draft Group ID

Players

Focused view for player data:

  • Type, Sport, Player Name, Position, Team, Salary, PPG, Status, Competition, Draft Group ID

Use Cases

Sports Betting Analysis

  • Track line movements and identify betting opportunities
  • Compare odds across different contest types
  • Monitor prize pool growth and entry trends

Daily Fantasy Sports Optimization

  • Build optimal lineups using salary and projection data
  • Track player ownership percentages
  • Identify value plays and contrarian picks

Market Research

  • Analyze DraftKings contest offerings
  • Track player pricing trends
  • Monitor competition landscape

Data Collection for AI/ML

  • Gather training data for prediction models
  • Historical trend analysis
  • Price modeling and optimization algorithms

Performance Tips

  1. Faster Runs: Set includePlayerData to false if you only need contest information
  2. Limit Contests: Reduce maxContests for quicker execution during testing
  3. Schedule Runs: Use Apify's scheduling feature for regular data updates
  4. Proxy Rotation: The Actor automatically uses Apify's proxy rotation to avoid rate limiting

Local Development

Prerequisites

  • Node.js 20.0.0 or higher
  • Apify CLI

Installation

# Install dependencies
npm install
# Run locally
apify run
# Login to Apify
apify login
# Deploy to Apify platform
apify push

Project Structure

draft_kings_mcp/
├── .actor/
│ ├── actor.json # Actor configuration
│ ├── input_schema.json # Input parameters schema
│ ├── output_schema.json # Output schema definition
│ └── dataset_schema.json # Dataset views configuration
├── src/
│ └── main.js # Main Actor code
├── storage/ # Local storage for development
├── Dockerfile # Container configuration
├── package.json # NPM dependencies
├── AGENTS.md # AI agent instructions
└── README.md # This file

Technical Details

  • Runtime: Node.js 22
  • Framework: Apify SDK 3.5.x, Crawlee 3.15.x
  • HTTP Client: got-scraping (with anti-blocking features)
  • Data Storage: Apify Dataset (JSON)

API Integration

After deployment, you can integrate the Actor into your applications using the Apify API:

const { ApifyClient } = require('apify-client');
const client = new ApifyClient({
token: 'YOUR_API_TOKEN',
});
// Start Actor run
const run = await client.actor('SYNTELLECT_AI/draftkings-api-actor').call({
sport: 'NFL',
maxContests: 50,
includePlayerData: true,
});
// Fetch results
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Rate Limiting & Best Practices

  • The Actor respects DraftKings' terms of service
  • Uses proxy rotation to avoid IP blocking
  • Implements error handling and retry logic
  • Recommended: Run during off-peak hours for better reliability

Troubleshooting

No contests found

  • Verify the sport code is correct
  • Check if there are active contests for the selected sport
  • Some sports may have limited availability depending on season

Player data missing

  • Ensure includePlayerData is set to true
  • Some draft groups may not have player data available yet

Timeout errors

  • Reduce maxContests value
  • Check your Apify account compute unit availability

Support

For issues or questions:

  1. Check the Apify Documentation
  2. Review the Actor logs in Apify Console
  3. Open an issue on the project repository

License

ISC

Author

SYNTELLECT_AI


Note: This Actor is for educational and research purposes. Always review and comply with DraftKings' Terms of Service and robots.txt when using this tool.