# Turkish Football Scraper (`dodoflix/sports-scraper`) Actor

Scrape Turkish football standings, fixtures, results, lineups, goals and cards from TFF and Mackolik: Super Lig, 1. Lig, 2. Lig, 3. Lig and past seasons. Fast HTTP scraper, no browser.

- **URL**: https://apify.com/dodoflix/sports-scraper.md
- **Developed by:** [Doğukan Metan](https://apify.com/dodoflix) (community)
- **Categories:** Sports
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 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/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

## Turkish Football Scraper

Get standings, fixtures, results, lineups, goals and cards for Turkish football as clean JSON, CSV or Excel. It reads the Turkish Football Federation ([TFF](https://www.tff.org)) and [Mackolik](https://www.mackolik.com) over plain HTTP, so it is fast and cheap. No browser, no code and no proxy setup needed, and the price already includes platform usage.

### What you can do with it

- **Track the table.** Get the current Süper Lig, 1. Lig, 2. Lig, 3. Lig or Women's Süper Lig standings, or the table after every week of the season to chart a title race.
- **Follow a round or a team.** Fixtures and results by week or by date range, with kickoff in UTC and in local date, and an optional team filter such as `galatasaray`.
- **Analyse matches.** Add referee, stadium, lineups with substitutes and coaches, and every goal, card and substitution with minute and player.
- **Go back in time.** With Mackolik you can read any season since 1997 (half-time scores, form, possession and shots included), and cups or foreign leagues through a competition URL.

### Quick start

Press Start with the default input: it returns the current Süper Lig table and the current round of matches. Or try one of these:

**Standings after every week of the Süper Lig (title race)**

```json
{
    "leagues": ["superLig"],
    "dataTypes": ["standings"],
    "weeks": "all"
}
```

**One week with referee, stadium and lineups**

```json
{
    "leagues": ["superLig"],
    "dataTypes": ["matches"],
    "weeks": "11",
    "includeDetails": true
}
```

**Every goal and card of a team's matches**

```json
{
    "leagues": ["superLig"],
    "dataTypes": ["events"],
    "weeks": "all",
    "teams": ["galatasaray"]
}
```

**A past season from Mackolik, final table and matches of one date range**

```json
{
    "source": "mackolik",
    "leagues": ["superLig"],
    "season": "2023-2024",
    "dateFrom": "2024-05-01",
    "dateTo": "2024-05-31"
}
```

### Input

| Field | What it does |
|---|---|
| `leagues` | `superLig`, `lig1`, `lig2`, `lig3`, `womenSuperLig`. 2. Lig and 3. Lig have groups and all groups are returned. With Mackolik only `superLig` and `lig1` are presets |
| `source` | `tff` (official, current season, default) or `mackolik` (any season) |
| `season` | For example `2023-2024`. Needs `mackolik`. Empty means the current season |
| `dataTypes` | Any of `standings`, `matches`, `events`. Default: standings and matches |
| `weeks` | `current`, `all`, `5`, `3-6` or `1,4,9-10`. Empty means current, or all when a date range is set |
| `dateFrom`, `dateTo` | Only matches on these local (Istanbul) dates, `YYYY-MM-DD` |
| `teams` | Only matches of these teams. Part of the name, Turkish letters optional |
| `includeDetails` | Add venue, referee, officials, lineups and the event list to every match row (one extra request per match) |
| `startUrls` | A TFF league page, a TFF match page (`macId`) or a Mackolik competition URL, including cups and foreign leagues |
| `maxItems`, `maxItemsPerLeague` | Stop after this many results, in total or per league |
| `maxConcurrency`, `maxRequestsPerMinute` | Request speed, 4 parallel and 120 per minute by default |
| `proxyConfiguration` | Apify residential proxy in Turkey, on by default, because Mackolik only answers Turkish IPs. TFF works without a proxy, so switch it off for TFF-only runs to save cost |

### Output

Every result has a `type`: `standing`, `match` or `event`. Download the dataset as JSON, CSV, Excel, XML or HTML, or read it through the API.

**Standing**

```json
{
    "type": "standing",
    "source": "tff",
    "league": "Trendyol Süper Lig",
    "leagueId": "198",
    "season": "2026-2027",
    "group": null,
    "week": 11,
    "rank": 1,
    "team": "GALATASARAY A.Ş.",
    "teamId": "3604",
    "played": 11,
    "won": 9,
    "drawn": 1,
    "lost": 1,
    "goalsFor": 27,
    "goalsAgainst": 15,
    "goalDifference": 12,
    "points": 28,
    "form": null,
    "zone": null
}
```

**Match** (with `includeDetails`; without it `venue`, `attendance` and `referee` are `null` and the detail fields are missing)

```json
{
    "type": "match",
    "source": "tff",
    "matchId": "317880",
    "league": "Trendyol Süper Lig",
    "leagueId": "198",
    "season": "2026-2027",
    "week": 11,
    "round": null,
    "group": null,
    "date": "2026-11-07",
    "kickoff": "2026-11-07T16:00:00.000Z",
    "homeTeam": "GALATASARAY A.Ş.",
    "awayTeam": "AMED SPORTİF FAALİYETLER",
    "url": "https://www.tff.org/Default.aspx?pageId=29&macId=317880",
    "status": "played",
    "homeTeamId": "3604",
    "awayTeamId": "3678",
    "homeScore": 4,
    "awayScore": 3,
    "halfTimeHome": null,
    "halfTimeAway": null,
    "venue": "ALİ SAMİ YEN SPOR KOMPLEKSİ RAMS PARK - İSTANBUL",
    "attendance": null,
    "referee": "HALİL UMUT MELER",
    "officials": [{ "name": "HALİL UMUT MELER", "role": "Hakem" }],
    "lineups": { "home": { "formation": null, "coaches": ["..."], "starters": [{ "number": 1, "name": "...", "id": "...", "position": null }], "substitutes": [] }, "away": {} },
    "events": [{ "kind": "goal", "detail": "foot", "minute": 7, "addedTime": null, "team": "home", "player": "RAFAEL ALEXANDRE DA CONCEIÇÃO LEÃO", "playerId": "2936673", "relatedPlayer": null, "score": null }],
    "stats": null
}
```

**Event** (`dataTypes` with `events`): the match fields above plus `kind` (`goal`, `card`, `substitution`), `detail`, `minute`, `addedTime`, `team` (`home` or `away`), `teamName`, `player`, `playerId`, `relatedPlayer` and `score`.

**Standing** fields from Mackolik also fill `form` (last results, for example `WWWWW`) and `zone` (for example the Champions League places).

What differs by source:

- **TFF** names clubs by their legal name in capitals (`GALATASARAY A.Ş.`). It has no half-time scores, formations or match stats (`null`). Referees and venues come with the match page, so scheduled matches get a referee once TFF appoints one. A goal, card or substitution `team` is the player's own team, and `detail: "ownGoal"` counts for the opponent. Substitutions are listed as separate `in` and `out` rows without pairing.
- **Mackolik** uses short club names (`Galatasaray`), adds half-time scores, form, zones, formations, possession and shots, and pairs a substitution (`player` came on, `relatedPlayer` went off). `relatedPlayer` of a goal is the assist. Possession is `null` when Mackolik omits it for a team.
- **Weeks.** With TFF `current` is the week TFF shows by default, and the standings are the table after each requested week. With Mackolik `current` is the next round that still has matches (the last round for a finished season), and the standings are the latest table.
- **Dates.** `kickoff` is a UTC timestamp, `null` while the time is not announced. `date` is the local Istanbul date.
- `status` is `played` when a score exists, `scheduled` otherwise, or the site's own wording for anything else.

### Pricing

You pay per result: **$1.00 per 1,000 results**, and less on higher Apify plans (down to $0.90). Platform usage is included, so there are no extra charges. A current table and round is 27 results, about $0.03. A whole Süper Lig season with details is 306 matches, about $0.31. You only pay for results you get, and a run that finds nothing costs almost nothing.

You can cap spending on every run in the run options. The Actor stops cleanly when the cap is reached.

### Why this Actor

- **Two sources in one.** The federation's official pages for referees, lineups and every Turkish league, and Mackolik for history.
- **More than scores.** Standings week by week, lineups, goals, cards and substitutions.
- **Data you can use directly.** ISO timestamps, numeric scores, stable ids, no HTML clean-up.
- **Polite by default.** It stays under the request rate the sites tolerated in testing and waits when a site answers 429.

### FAQ

**Do I need a proxy?** For Mackolik, yes: it only answers Turkish IPs, so the default is Apify residential proxy with country TR. TFF works without a proxy; turn it off for TFF-only runs. A proxy does not make the sites answer faster, so keep the request rate settings as they are.

**How fast is it?** About 2 requests per second by default. One request returns a whole round (TFF) or a whole season (Mackolik), so a table and a round take a couple of seconds. With details every match costs one more request.

**Why is a referee or venue `null`?** Turn on `includeDetails` or the `events` type: league pages do not carry them. A referee is also empty until TFF appoints one.

**Can I get live scores?** No. The sites are read as they are, and a running match is shown with whatever score the site lists at that moment.

**Why did I get fewer results than I set?** The league has fewer matches in the weeks or dates you chose, a team filter matched fewer, or `maxItems` ended the run first.

**Can I use it from code?**

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('dodoflix/sports-scraper').call({
    leagues: ['superLig'],
    dataTypes: ['standings'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

It also connects to Make, Zapier, Google Sheets, Slack and webhooks from the Integrations tab.

**Something broke or a field is missing.** Open an issue on the Issues tab with the input you used.

### Legal

This Actor collects public pages. You are responsible for how you use the data, including KVKK/GDPR and the sites' terms and robots.txt.

### Türkçe özet

Süper Lig, 1. Lig, 2. Lig ve 3. Lig puan durumunu, fikstürü, maç sonuçlarını, kadroları, golleri ve kartları TFF ve Mackolik'ten JSON, CSV veya Excel olarak indirin. Proxy ayarı gerekmez.

# Actor input Schema

## `leagues` (type: `array`):

Leagues to scrape. 2. Lig and 3. Lig are split into groups and every group is returned. With source Mackolik only Super Lig and 1. Lig are available here: use Start URLs for any other competition.

## `source` (type: `string`):

TFF is the official federation site: current season only, with referees, venues and lineups. Mackolik has every season since 1997 and any competition (via Start URLs), plus half-time scores, form and match stats.

## `season` (type: `string`):

Season such as 2023-2024. Needs source Mackolik. Leave empty for the current season.

## `dataTypes` (type: `array`):

standings: one row per team. matches: one row per match. events: one row per goal, card or substitution (needs one extra request per match).

## `weeks` (type: `string`):

Which rounds to return: 5, 3-6, 1,4,9-10, all, or current. Empty means current, or all when a date range is set. With TFF the standings are the table after each requested week (use all for the title race); with Mackolik the standings are the latest table.

## `dateFrom` (type: `string`):

Only matches on or after this local (Istanbul) date, YYYY-MM-DD. Searches all weeks unless you set Weeks.

## `dateTo` (type: `string`):

Only matches on or before this local (Istanbul) date, YYYY-MM-DD.

## `teams` (type: `array`):

Only matches of these teams. Part of the name is enough and Turkish letters are optional, for example galatasaray or fenerbahce. Standings are not filtered.

## `includeDetails` (type: `boolean`):

Add venue, referee and officials, lineups (starters, substitutes, coaches) and the goal, card and substitution list to every match row. Needs one extra request per match, so the run takes longer.

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

Optional. A TFF league page (https://www.tff.org/Default.aspx?pageID=198), a TFF match page (Default.aspx?pageId=29\&macId=317827) or a Mackolik competition page such as https://www.mackolik.com/puan-durumu/turkiye-trendyol-super-lig/2024-2025/482ofyysbdbeoxauk19yg7tdt. Mackolik covers cups and foreign leagues too.

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

Stop the whole run after this many results.

## `maxItemsPerLeague` (type: `integer`):

Stop collecting for a league after this many results (standings, matches and events together).

## `maxConcurrency` (type: `integer`):

Parallel requests. TFF answered 15 parallel requests without errors in testing, but its pages take 1 to 5 seconds each, so the default is kept low.

## `maxRequestsPerMinute` (type: `integer`):

Request speed limit across all parallel requests. Raise this only if you see no errors in the log.

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

Apify residential proxy in Turkey is on by default: Mackolik only answers Turkish IPs (a plain geo block, 403 elsewhere). TFF works without a proxy, so for TFF-only runs you can switch it off to save cost.

## Actor input object example

```json
{
  "leagues": [
    "superLig"
  ],
  "source": "tff",
  "dataTypes": [
    "standings",
    "matches"
  ],
  "includeDetails": false,
  "maxConcurrency": 4,
  "maxRequestsPerMinute": 120,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "TR"
  }
}
```

# 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 = {
    "leagues": [
        "superLig"
    ],
    "dataTypes": [
        "standings",
        "matches"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "TR"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("dodoflix/sports-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 = {
    "leagues": ["superLig"],
    "dataTypes": [
        "standings",
        "matches",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "TR",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("dodoflix/sports-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 '{
  "leagues": [
    "superLig"
  ],
  "dataTypes": [
    "standings",
    "matches"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "TR"
  }
}' |
apify call dodoflix/sports-scraper --silent --output-dataset

```

## MCP server setup

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