Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 20 additions & 21 deletions use-cases/sports-fantasy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ curl -s https://api.firecrawl.dev/v2/search \
```
</CodeGroup>

The search returned these tools on October 26, 2026 (cURL response, first three results):
A sample cURL response, trimmed to the first three results:

```json
{
Expand Down Expand Up @@ -182,7 +182,7 @@ curl -s https://api.firecrawl.dev/v2/scrape \
```
</CodeGroup>

The Python and JavaScript versions printed this on October 26, 2026:
Sample output from the Python and JavaScript versions:

```text
Jared Goff Detroit Lions vs GB 19.9
Expand All @@ -200,7 +200,6 @@ The raw response (trimmed to the first player and one prop) shows the fields you
{
"provider": "startwho-com",
"capability": "fantasy-sports-rankings/projections",
"creditsCost": 5,
"data": {
"week_label": "Week 7",
"scoring": "PPR",
Expand Down Expand Up @@ -233,9 +232,9 @@ The raw response (trimmed to the first player and one prop) shows the fields you

Raw HTTP responses wrap the SDK result in `data`. A provider error arrives inside a successful response, so check each result's `error` field before you use its `data`.

### List a provider's tools and prices
### List a provider's tools

Find Tools lists every capability a provider offers with its credit cost, for free. This example lists the Sleeper tools.
Find Tools lists every capability a provider offers, for free. Each item's `creditsCost` field holds the tool's current price. This example lists the Sleeper tools.

<CodeGroup>
```python Python
Expand All @@ -247,7 +246,7 @@ firecrawl = Firecrawl(api_key=os.environ.get("FIRECRAWL_API_KEY"))
catalogue = firecrawl.find_tools(providers=["sleeper-com"], limit=10)

for tool in catalogue.items:
print(tool["capability"], tool["creditsCost"])
print(tool["capability"])
```

```javascript JavaScript
Expand All @@ -258,7 +257,7 @@ const firecrawl = new Firecrawl({ apiKey: process.env.FIRECRAWL_API_KEY });
const catalogue = await firecrawl.findTools({ providers: ["sleeper-com"], limit: 10 });

for (const tool of catalogue.items) {
console.log(tool.capability, tool.creditsCost);
console.log(tool.capability);
}
```

Expand All @@ -276,18 +275,18 @@ curl -s https://api.firecrawl.dev/v2/scrape \
```
</CodeGroup>

Output from October 26, 2026:
Sample output:

```text
fantasy-football-leagues/league 5
fantasy-football-leagues/league_rosters 5
fantasy-football-leagues/league_users 5
fantasy-football-leagues/matchups 5
fantasy-football-leagues/nfl_schedule 5
fantasy-football-leagues/nfl_state 5
fantasy-football-leagues/players 5
fantasy-football-leagues/transactions 5
fantasy-football-leagues/trending_players 5
fantasy-football-leagues/league
fantasy-football-leagues/league_rosters
fantasy-football-leagues/league_users
fantasy-football-leagues/matchups
fantasy-football-leagues/nfl_schedule
fantasy-football-leagues/nfl_state
fantasy-football-leagues/players
fantasy-football-leagues/transactions
fantasy-football-leagues/trending_players
```

Pass a capability from that list plus `expand: ["options", "response"]` to read its inputs and response fields. Each item's `next` field holds that request ready to send.
Expand Down Expand Up @@ -324,7 +323,7 @@ for position in sorted({p["position"] for p in trending["players"]}):
cbs = run(
"cbssports-com",
"fantasy-sports-rankings/projections",
{"position": position, "type": "ros", "scoring": "PPR"},
{"position": "DST" if position == "DEF" else position, "type": "ros", "scoring": "PPR"},
)
for row in cbs["players"]:
projected[row["name"]] = row["fantasy_points"]
Expand Down Expand Up @@ -356,7 +355,7 @@ const trending = await run("sleeper-com", "fantasy-football-leagues/trending_pla
const projected = new Map();
for (const position of new Set(trending.players.map((p) => p.position))) {
const cbs = await run("cbssports-com", "fantasy-sports-rankings/projections", {
position,
position: position === "DEF" ? "DST" : position,
type: "ros",
scoring: "PPR",
});
Expand All @@ -373,7 +372,7 @@ for (const p of ranked) {
```
</CodeGroup>

The Python version printed this on October 26, 2026:
Sample output from the Python version:

```text
Caleb Douglas WR 286544 adds ROS pts 111.9
Expand All @@ -388,7 +387,7 @@ Seth McGowan RB 371792 adds ROS pts 6.9
KC Concepcion Jr. WR 237150 adds ROS pts -
```

The most-added player that day ranked seventh by rest-of-season projection, so the ranking changes which pickup to make. CBS Sports projects the top 100 players per position, and a dash means the player wasn't in that list. To check a pickup before a start, read the Sleeper player's `flags`, which mark players who are locked, out, on bye, or injured.
In this sample, the most-added player ranked seventh by rest-of-season projection, so the ranking changes which pickup to make. CBS Sports projects the top 100 players per position, and a dash means the player wasn't in that list. Sleeper labels team defenses `DEF` and CBS Sports uses `DST`, so the recipe maps one to the other. To check a pickup before a start, read the Sleeper player's `flags`, which mark players who are locked, out, on bye, or injured.

## How do you use sports data from the CLI or an MCP client?

Expand Down
Loading