# Betonline.ag Scraper (`lexis-solutions/betonline-ag-scraper`) Actor

Scrape BetOnline.ag sports betting odds and market data with this Apify actor. Extract moneyline, spread, totals, team names, leagues, event URLs, and period-specific markets from listing and game pages in JSON, CSV, Excel.

- **URL**: https://apify.com/lexis-solutions/betonline-ag-scraper.md
- **Developed by:** [Lexis Solutions](https://apify.com/lexis-solutions) (community)
- **Categories:** AI, Agents, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

![BetOnline.ag Scraper](https://i.postimg.cc/3RQbgbQ1/image.png)

### What does BetOnline.ag Scraper do?

BetOnline.ag Scraper extracts sports betting data (odds and markets) from **betonline.ag**. It navigates category/search pages and game detail pages to collect structured market data including moneyline, spread, and totals for each team, plus period-specific markets when available. The scraper supports exporting the extracted dataset via REST API and standard download formats.

### BetOnline.ag Scraper

This actor collects sports event metadata and odds from BetOnline.ag. It targets listing pages to discover event URLs and detail pages to extract the full market payload (spread, moneyline, total with Over/Under). The output is normalized per-game JSON items suitable for analytics, monitoring, and odds aggregation.

### What data can I extract from BetOnline.ag with this actor?

The actor extracts structured game and market data. Typical fields include:

<table>
<tr>
<td>gameId</td>
<td>Numeric event identifier</td>
</tr>
<tr>
<td>wagerCutOff</td>
<td>Event wager cutoff (ISO datetime)</td>
</tr>
<tr>
<td>awayTeam / homeTeam</td>
<td>Team names</td>
</tr>
<tr>
<td>sport / league</td>
<td>Sport and league strings</td>
</tr>
<tr>
<td>gameUrl</td>
<td>Canonical event URL on betonline.ag</td>
</tr>
<tr>
<td>gameData</td>
<td>Array of period objects containing `name`, `lineType` (AwayLine/HomeLine) and `lineDict` (SpreadLine, MoneyLine, TotalLine with Over/Under)</td>
</tr>
</table>

### Why scrape BetOnline.ag?

Betting market data is useful for odds aggregation, trading signals, market monitoring, and historical analysis. Scraping BetOnline.ag enables:

- Aggregation of live odds across sports and leagues
- Tracking line movements over time for trading or analytics
- Building alerts for odds changes or market anomalies
- Backtesting betting strategies with historical snapshots

### How to use BetOnline.ag Scraper?

Quick start guide:

1. Create or log into your Apify account.
2. Open the BetOnline.ag Scraper actor on Apify.
3. Click **Try for free** or run the actor with your configuration.
4. Provide one or more `startUrls` (category/listing pages or direct game detail pages).
5. Set `maxItems` to limit how many games to process per start URL.
6. Start the actor and wait for completion; download results as JSON/CSV/Excel/NDJSON.

### Input

The actor accepts the following input parameters:

- `startUrls` (array of objects) - **Required**. URLs to start crawling from. Use listing/category pages to discover games or direct game URLs to scrape details.
- `maxItems` (integer) - Maximum number of games to scrape per start URL. Default: 3.
- `proxyConfiguration` (object) - Proxy configuration for crawling. Residential proxies are recommended for reliability.

#### Supported URL Types

**Category / Listing Page Example:**

- `https://www.betonline.ag/sportsbook/basketball/ncaa`

**Detail Page Example:**

- `https://www.betonline.ag/sportsbook/basketball/ncaa/game/490976637`

Example input:

```json
{
    "startUrls": [
        { "url": "https://www.betonline.ag/sportsbook/basketball/ncaa" },
        { "url": "https://www.betonline.ag/sportsbook/baseball/mlb" }
    ],
    "maxItems": 3,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"]
    }
}
````

#### Note: The `startUrls` field is required

### Output

The scraped data is saved as a dataset. Each item represents one game detail with market lines. You can download the output in JSON, JSONL, CSV, Excel, or NDJSON.

Sample output (one dataset item):

```json
{
    "gameId": 491018289,
    "wagerCutOff": "2026-04-21T08:15:00.000Z",
    "awayTeam": "St Chamond",
    "homeTeam": "Chalons-Reims",
    "sport": "Basketball",
    "league": "France",
    "gameUrl": "https://www.betonline.ag/sportsbook/basketball/france/game/491018289",
    "gameData": [
        {
            "name": "Game",
            "lineType": "AwayLine",
            "lineDict": [
                { "type": "SpreadLine", "point": 2.5, "line": -115, "decimalLine": 1.87 },
                { "type": "MoneyLine", "line": 113, "decimalLine": 2.13 },
                {
                    "type": "TotalLine",
                    "point": 0,
                    "Over": { "Line": 0, "DecimalLine": 0 },
                    "Under": { "Line": 0, "DecimalLine": 0 }
                }
            ]
        },
        {
            "name": "Game",
            "lineType": "HomeLine",
            "lineDict": [
                { "type": "SpreadLine", "point": -2.5, "line": -115, "decimalLine": 1.87 },
                { "type": "MoneyLine", "line": -145, "decimalLine": 1.69 },
                {
                    "type": "TotalLine",
                    "point": 0,
                    "Over": { "Line": 0, "DecimalLine": 0 },
                    "Under": { "Line": 0, "DecimalLine": 0 }
                }
            ]
        }
    ]
}
```

#### Notes and Limitations

- The actor depends on the current BetOnline.ag page structure. If the site changes, the actor may require updates.
- Use the actor in compliance with BetOnline.ag terms of service and applicable laws.
- If you encounter blocking, try running with residential proxies and reasonable concurrency settings.

#### Looking to Scrape more Sports Websites?

In addition to this actor, you can explore our suite of dedicated scrapers. Each scraper is optimized for its target site to provide accurate, structured, and reliable data extraction.

| Scraper                                                                                      | Region    | Description                                                                                                                                                                                                                                                                                        |
| -------------------------------------------------------------------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Zeturf.fr Scraper](https://apify.com/lexis-solutions/zeturf-scraper)                        | France    | Scrape horse racing data from Zeturf.fr—race results, reports, programme schedules, statuses, favorites beaten, and statistics. Ideal for enthusiasts, bettors, and researchers. Fast, structured, and customizable JSON extraction from France’s premier horse racing platform.                   |
| [Procyclingstats.com Scraper](https://apify.com/lexis-solutions/procyclingstats-com-scraper) | Global    | Scrape race results, rider statistics, team info, and historical cycling data from ProCyclingStats.com. Ideal for analysts, journalists, team managers, and enthusiasts needing structured race standings, performance metrics, and career records. Fast, structured, and customizable extraction. |
| [Sportsbet.com.au Scraper](https://apify.com/lexis-solutions/sportsbet-com-au-scraper)       | Australia | Scrape sports betting markets from Sportsbet.com.au - including events, markets, odds, results, and payouts. Ideal for gambling analytics, odds comparison, and market research. Fast, structured, and customizable extraction from Australia’s leading sportsbook.                                |

Explore these solutions to expand your data collection capabilities.

***

p.s.

Got feedback or need an extension?

Lexis Solutions is a [certified Apify Partner](https://apify.com/partners). We can help you with custom solutions or data extraction projects.

Contact us over [Email](mailto:info@lexis.solutions) or [LinkedIn](https://www.linkedin.com/company/lexis-solutions)

### Image Credit

Image credit: https://www.betonline.ag

# Actor input Schema

## `startUrls` (type: `array`):

URLs to start with.

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

Maximum number of games that will be scraped.

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

Select proxies to be used by your crawler.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.betonline.ag/sportsbook/basketball/nba-series"
    }
  ],
  "maxItems": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `results` (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 = {
    "startUrls": [
        {
            "url": "https://www.betonline.ag/sportsbook/basketball/nba-series"
        }
    ],
    "maxItems": 3,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("lexis-solutions/betonline-ag-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 = {
    "startUrls": [{ "url": "https://www.betonline.ag/sportsbook/basketball/nba-series" }],
    "maxItems": 3,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("lexis-solutions/betonline-ag-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.betonline.ag/sportsbook/basketball/nba-series"
    }
  ],
  "maxItems": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call lexis-solutions/betonline-ag-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=lexis-solutions/betonline-ag-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Betonline.ag Scraper",
        "description": "Scrape BetOnline.ag sports betting odds and market data with this Apify actor. Extract moneyline, spread, totals, team names, leagues, event URLs, and period-specific markets from listing and game pages in JSON, CSV, Excel.",
        "version": "1.0",
        "x-build-id": "Hy3DGDLc4gVnJZSF6"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/lexis-solutions~betonline-ag-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-lexis-solutions-betonline-ag-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/lexis-solutions~betonline-ag-scraper/runs": {
            "post": {
                "operationId": "runs-sync-lexis-solutions-betonline-ag-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/lexis-solutions~betonline-ag-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-lexis-solutions-betonline-ag-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "URLs to start with.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxItems": {
                        "title": "Maximum number of games to scrape",
                        "type": "integer",
                        "description": "Maximum number of games that will be scraped."
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Select proxies to be used by your crawler."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
