# FlashScore Odds Scraper (`romy/flashscore-odds-scraper`) Actor

Fetch live betting odds for a FlashScore match by matchId, bookmaker, bet type, and bet scope, including opening line and movement. No login or API key needed. Derived from romy/flashscore-all-in-one-api as a focused odds-only spin-off for odds-comparison and closing-line tracking.

- **URL**: https://apify.com/romy/flashscore-odds-scraper.md
- **Developed by:** [Romy](https://apify.com/romy) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.50 / 1,000 odds line fetcheds

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

### What does FlashScore Odds Scraper do?

**FlashScore Odds Scraper** takes one or more `{ matchId, bookmakerId, betType, betScope }` queries and pushes the betting odds for that market, one dataset row per query.

It talks directly to the same internal GraphQL persisted-query API the official [FlashScore](https://www.flashscore.com/) Android app uses (`global.ds.lsapp.eu`), reverse-engineered by live Frida SSL-pinning bypass + mitmproxy capture against a real device (`x-fsign` is a static header value, confirmed identical across ~960 captured requests — no login, no per-request signing). This is the odds slice of [FlashScore All-in-One API](https://apify.com/romy/flashscore-all-in-one-api), split out as its own focused Actor.

### Why use FlashScore Odds Scraper?

- **Batch odds lookups** — pass many `{ matchId, bookmakerId, betType, betScope }` queries at once, fetched in parallel
- **Real bookmaker odds, including opening line + last movement** — each market returns current value, opening value, and the direction it moved
- **No account needed** — every read request works fully anonymously
- **Use cases:** odds-comparison tools, closing-line-value tracking, betting research, market-movement analysis

### Input

| Field     | Type    | Description                                                                                                                                                                                                                          |
| --------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `queries` | array   | **Required.** Each item: `{ matchId, bookmakerId, betType, betScope }`. `matchId` is a FlashScore match/event id (from [flashscore-all-in-one-api](https://apify.com/romy/flashscore-all-in-one-api) or a FlashScore URL). |

`bookmakerId`, `betType`, and `betScope` are genuinely required upstream parameters — FlashScore's odds API has no default market. Only **`bookmakerId: 16`, `betType: "HOME_DRAW_AWAY"`, `betScope: "FULL_TIME"`** is confirmed live (bookmaker 16 = bet365; this exact combo is the parent Actor's own documented example call). Other bookmaker ids and bet type/scope values exist upstream but were not individually enumerated — discover them either by running the parent Actor's `/matches` or `/matches/:id` endpoints and inspecting a match page on flashscore.com for the bookmaker/market names it offers, or by your own capture.

Example:

```json
{
    "queries": [
        { "matchId": "OvnzmiZQ", "bookmakerId": 16, "betType": "HOME_DRAW_AWAY", "betScope": "FULL_TIME" }
    ]
}
```

### Output

One dataset row per query. Real output from a live run (Monaco vs Marseille, Ligue 1, bookmaker 16/bet365):

```json
{
    "matchId": "OvnzmiZQ",
    "bookmakerId": 16,
    "betType": "HOME_DRAW_AWAY",
    "betScope": "FULL_TIME",
    "odds": {
        "data": {
            "findLiveOddsForBookmaker": {
                "eventOddsOverview": {
                    "bookmakerId": 16,
                    "type": "HOME_DRAW_AWAY",
                    "home": { "value": "1.0", "opening": "2.2", "change": { "type": "DOWN", "previous": "2.2" } },
                    "draw": { "value": "51.0", "opening": "3.5", "change": { "type": "UP", "previous": "3.5" } },
                    "away": { "value": "451.0", "opening": "3.2", "change": { "type": "UP", "previous": "3.2" } }
                }
            }
        }
    }
}
```

### Known limitations

- Only `bookmakerId: 16` / `betType: "HOME_DRAW_AWAY"` / `betScope: "FULL_TIME"` is confirmed against live traffic — other combinations are expected to work (the upstream query accepts them as plain parameters) but were not individually captured.
- During a smoke test, odds for matches still hours from kickoff came back with a `null` `eventOddsOverview` for several markets — odds for a given bookmaker/market only populate once FlashScore actually has a live quote for it (typically once the match is in progress or has finished); an empty result for a not-yet-started match is expected upstream behavior, not a bug in this Actor.
- Every other FlashScore endpoint (match detail, lineups, stats, standings, results, fixtures, news, search) is out of scope here — see [flashscore-all-in-one-api](https://apify.com/romy/flashscore-all-in-one-api) or its other spin-off Actors.

### Pricing

Pay-per-result. One `odds-line` event is charged per query processed (one query = one odds market/bookmaker line), starting at **$0.007** on the Free plan. See the Actor's Pricing tab for tier rates.

# Actor input Schema

## `queries` (type: `array`):

Each item: { matchId, bookmakerId, betType, betScope }. matchId is a FlashScore match/event id (from flashscore-all-in-one-api or a FlashScore URL). bookmakerId, betType (e.g. "HOME_DRAW_AWAY"), and betScope (e.g. "FULL_TIME") are genuinely required upstream params with no safe default — only bookmakerId 16 / HOME_DRAW_AWAY / FULL_TIME is confirmed live; discover others via the parent Actor or your own capture.

## Actor input object example

```json
{
  "queries": [
    {
      "matchId": "4GzyLE2N",
      "bookmakerId": 16,
      "betType": "HOME_DRAW_AWAY",
      "betScope": "FULL_TIME"
    }
  ]
}
```

# Actor output Schema

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

No description

# 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 = {
    "queries": [
        {
            "matchId": "4GzyLE2N",
            "bookmakerId": 16,
            "betType": "HOME_DRAW_AWAY",
            "betScope": "FULL_TIME"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("romy/flashscore-odds-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 = { "queries": [{
            "matchId": "4GzyLE2N",
            "bookmakerId": 16,
            "betType": "HOME_DRAW_AWAY",
            "betScope": "FULL_TIME",
        }] }

# Run the Actor and wait for it to finish
run = client.actor("romy/flashscore-odds-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 '{
  "queries": [
    {
      "matchId": "4GzyLE2N",
      "bookmakerId": 16,
      "betType": "HOME_DRAW_AWAY",
      "betScope": "FULL_TIME"
    }
  ]
}' |
apify call romy/flashscore-odds-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,romy/flashscore-odds-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/VZAragHpe5cztsi4K/builds/0MLyTQpvrKnkBUvdM/openapi.json
