# Betcity Public Sports Event Index (`bovi/betcity-scraper`) Actor

Scrapes Betcity public event sitemaps and returns event-page URLs, sport and competition IDs, and sitemap update dates. It does not invent odds absent from the public sitemap.

- **URL**: https://apify.com/bovi/betcity-scraper.md
- **Developed by:** [Vitalii Bondarev](https://apify.com/bovi) (community)
- **Categories:** Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.45 / 1,000 betcity public sports event indices

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Betcity Event Sitemap Scraper

This Actor extracts public Betcity event-page URLs, sections, sports, competition IDs, event IDs, and sitemap update values from XML sitemaps. No Betcity login, cookie, or buyer API key is required.

- Index line, live, live-soon, results, or liveresults event pages.
- Build a URL list for one sport slug, for example `soccer`, or for `all` sports.
- Export competition and event IDs for joining with your sports data.
- Download only fields published by the sitemap; no odds, teams, locations, or dates are invented.
- Limit the saved index with `maxResults`, which defaults to `50`.

### What you get

The Actor reads the public Betcity sitemap for the selected section. Supported sections are `line`, `live`, `live-soon`, `results`, and `liveresults`.

When the root is a sitemap index, it keeps HTTPS shard URLs on `betcity.ru` under `/ru/sitemaps/{section}/`. A named sport selects shards named `{sport}.xml` or `{sport}_{number}.xml`; `all` selects every sport shard. The Actor reads shards until it has `maxResults` unique events. If the root is already a url set, it reads event URLs from it.

| Field | Type | Required | What it contains |
| --- | --- | --- | --- |
| id | string | Yes | Always present; combined section, sport, competition, and event identifiers. |
| url | string | Yes | Always present; public Betcity event-page URL from the sitemap. |
| section | string | Yes | Always present; section of the sitemap read. |
| sport | string | Yes | Always present; sport slug from the event URL. |
| competition_id | string | Yes | Always present; competition identifier from the URL. |
| event_id | string | Yes | Always present; event identifier from the URL. |
| sitemap_lastmod | string | No | The sitemap entry's `lastmod` text. This field is omitted when no value is published and is never `null`. |

Only URLs matching `https://betcity.ru/ru/{section}/{sport}/{competition_id}/{event_id}` with numeric competition and event IDs are saved. Records with the same `id` are saved once. `sitemap_lastmod` is included only when the sitemap has `lastmod`.

`sitemap_lastmod` is left out of the record when the sitemap entry has no `lastmod`. The other six fields are always present.

> **Note:** Records do not include odds, team names, locations, or start times. These values are not read from the sitemap. Odds were not exposed in the inspected event-page HTML.

### Sample output

A record from a `line` / `soccer` run. `sitemap_lastmod` is the `lastmod` text from the sitemap entry, unchanged.

```json
{
  "id": "line:soccer:396045:16512045",
  "url": "https://betcity.ru/ru/line/soccer/396045/16512045",
  "section": "line",
  "sport": "soccer",
  "competition_id": "396045",
  "event_id": "16512045",
  "sitemap_lastmod": "2026-10-24"
}
```

### Pricing

This Actor uses pay-per-event pricing on the Free plan:

| Event | When it is charged | Free plan price |
| --- | --- | --- |
| Actor Start (`apify-actor-start`) | When the Actor starts. The number of events depends on memory: one event per GB, with a minimum of one event. | $0.00005 per event (Free plan) |
| Betcity Public Sports Event Index (`apify-default-dataset-item`) | One scraped result with all fields. This is the primary event. | $0.00345 per result (Free plan) |

The default memory is 512 MB, so a run at that memory charges one Actor Start event per run. Each dataset record is one primary event.

At Free-plan prices, 1,000 Actor Start events × $0.00005 per event = $0.05 on the Free plan and 10,000 Actor Start events × $0.00005 per event = $0.50 on the Free plan; 1,000 dataset items × $0.00345 per result = $3.45 on the Free plan and 10,000 dataset items × $0.00345 per result = $34.50 on the Free plan.

50 results = $0.17255 on the Free plan: one Actor Start ($0.00005 on the Free plan) plus 50 dataset items (50 × $0.00345 = $0.17250 on the Free plan).

The Apify Free plan includes $5 of monthly platform usage credit. With the default 512 MB memory and the default 50-result cap, the $5 credit covers 28 full runs (1,400 results); after one Actor Start event, 1,449 dataset items fit within the credit at the Free-plan item price.

You pay only for the events listed below. This Actor does not use the Pay per event + usage option, so the platform usage of your runs (compute, proxy traffic and storage) is not billed to you separately.

### How to use

1. Open this Actor in Apify Console with your Apify account.
2. Choose `line`, `live`, `live-soon`, `results`, or `liveresults`.
3. Set `sport` to a sport slug or to `all`.
4. Set `maxResults` to the number of records to save.
5. Start the run and open the dataset when it finishes.
6. Repeat the run with Apify Schedules; daily is a reasonable starting point for an event-page index. Do not treat that schedule as the sitemap's update frequency.

Example input:

```json
{
  "section": "line",
  "sport": "soccer",
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

Fetches use the proxy object only when `useApifyProxy` is true. If `proxyConfiguration` is omitted or `useApifyProxy` is false, requests go directly to `betcity.ru`.

Export the dataset as JSON or CSV, or read it through the Apify dataset API.

### Input parameters

The form requires `section` and `sport`. Values are trimmed and lowercased; missing values use `line` and `soccer`.

| Parameter | What it does | Default |
| --- | --- | --- |
| section | Selects the public Betcity sitemap for the selected section. Allowed values: `line`, `live`, `live-soon`, `results`, `liveresults`. Other values fail the run. | `line` |
| sport | A sport slug such as `soccer` or `tennis`, or `all` for every listed sport. Named slugs use letters, digits, and hyphens after lowercasing. | `soccer` |
| maxResults | Maximum number of records to save. Send a whole number of at least 1. A value that cannot be read as a number falls back to 50. | `50` |
| proxyConfiguration | Uses the supplied Apify Proxy configuration when `useApifyProxy` is true; otherwise requests go directly to Betcity. | `useApifyProxy` true, group `RESIDENTIAL` |
| disableUsageStats | Set to `true` to turn off the run summary described in Usage statistics. | — |

### Limits and edge cases

The Actor fetches only HTTPS URLs on `betcity.ru`, saves at most `maxResults` unique records, and pushes records after the sitemap fetches finish. The final push loop is sequential and pushes each record separately.

| Condition | What you see | What to do |
| --- | --- | --- |
| `section` is not allowed | The run fails with `Unsupported section: ...`; nothing is saved. | Choose `line`, `live`, `live-soon`, `results`, or `liveresults`. |
| `sport` is not `all` and is not a valid lowercase slug | The run fails with `sport must be a Betcity sitemap slug or 'all'`; nothing is saved. | Use a valid sport slug or `all`. |
| `maxResults` is 0 or negative | The run returns without saving and ends as Succeeded with an empty dataset. The schema minimum is 1. | Send a whole number of at least 1. |
| `maxResults` is missing or cannot be read as a number | The cap is 50. | Send a whole number of at least 1. |
| The section index has no shard for the sport | The run fails with `No sitemap shards found for {section}/{sport}`; nothing is saved. | Try `all` or another section. |
| The root is not a parseable sitemap index or url set | The run ends as Succeeded with an empty dataset. | Retry later or change section. |
| The root is a url set and no entry matches the section and sport | The run ends as Succeeded with an empty dataset. | Check the section and sport values, or try another section or `all`. |
| A shard cannot be parsed as a url set | That shard adds no records; other successful shards are still read. | Re-run if that shard should contain events. |
| A fetch errors or reaches the 30-second timeout | The Actor tries 3 times, waiting 1 second and then 2 seconds. If the last try fails, the run ends as Failed with nothing saved. | Start again or switch between the residential proxy default and direct requests. |
| More matching events than `maxResults` | Only the first unique matches up to the cap are saved. | Raise `maxResults`. |
| The same combined `id` (section, sport, competition and event) appears again | The later duplicate is skipped. The same `event_id` under another sport or competition is kept. | No change is needed. |
| A URL is not an HTTPS `betcity.ru` event path with numeric IDs | The URL is skipped. | Use `/ru/{section}/{sport}/{competition}/{event}` pages. |
| An abort or timeout occurs during the final push loop | Some records may already be saved because each record is pushed separately. | Check the dataset and run status. |
| You need odds, teams, venues, or dates | Those fields are absent. | Use another source for prices and fixture details. |

A named sport returns only event URLs whose sport slug equals that input. `all` does not apply that filter. The Actor does not claim that the sitemap lists every Betcity event.

### FAQ

#### How much does it cost to scrape Betcity event pages?

On the Free plan, `apify-actor-start` costs $0.00005 per event and `apify-default-dataset-item` costs $0.00345 per event; see Pricing.

#### Why is my dataset empty?

See Limits and edge cases for the conditions that produce an empty dataset, including `maxResults` resolving to 0, an unusable root, or no matching url-set entry.

#### What should I do if the run fails?

See Limits and edge cases for unsupported inputs, missing shards, fetch retries, and what is saved after a failure.

#### Why are odds and team names missing?

The Actor extracts event URLs and identifiers from the public sitemap, plus `sitemap_lastmod` when present; it does not scrape odds, prices, teams, locations, or dates from event HTML.

#### Is collecting this public sitemap data legal?

The Actor reads public XML sitemaps published by Betcity at `https://betcity.ru/ru/sitemaps/`. Whether that use is allowed under Betcity's terms and applicable law depends on your use case. This README provides no legal guarantee.

### Usage statistics

This Actor creates a small, content-free summary at the end of each run, used only to monitor reliability and improve this Actor. No input values, credentials or scraped data are sent.

A copy of the exact record for your run is saved as `USAGE_STATS` in your own Apify key-value store.

To opt out, set `disableUsageStats` to `true` in the input. Nothing is sent then.

[Full list of collected fields](https://api.apify.com/v2/key-value-stores/v9rgHjMKLDGtHf8tD/records/index.html)

# Actor input Schema

## `section` (type: `string`):

Public Betcity event section to index.

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

Betcity sport slug, such as soccer or tennis. Use all to include all listed sports.

## `maxResults` (type: `integer`):

Maximum number of event-page records to save.

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

Optional Apify Proxy configuration. Direct requests are used when disabled or omitted.

## Actor input object example

```json
{
  "section": "line",
  "sport": "soccer",
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset with the scraped event-page records.

# 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 = {
    "section": "line",
    "sport": "soccer",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bovi/betcity-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 = {
    "section": "line",
    "sport": "soccer",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("bovi/betcity-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 '{
  "section": "line",
  "sport": "soccer",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call bovi/betcity-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bovi/betcity-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/fQeaPJyrnI5tedlzr/builds/M7EZMPDLc2LdYNZlK/openapi.json
