# FlashScore News Scraper (`romy/flashscore-news-scraper`) Actor

Fetches FlashScore's sports news feed, category/tag menu, and individual article content via FlashScore's persisted-query GraphQL API. No login or API key needed. Derived from romy/flashscore-all-in-one-api, split out as a focused news slice for content monitoring and editorial research.

- **URL**: https://apify.com/romy/flashscore-news-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 $3.10 / 1,000 news items

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 News Scraper do?

**FlashScore News Scraper** pulls the news list, the news category/tag menu, and individual article bodies from [FlashScore](https://www.flashscore.com/). It talks directly to the same persisted-query GraphQL API the official FlashScore Android app uses (`global.ds.lsapp.eu`), reverse-engineered by live MITM capture against a real device (Frida SSL-pinning bypass + mitmproxy). No FlashScore account, no API key, no scraping setup.

This is the news slice of [FlashScore All-in-One API](https://apify.com/romy/flashscore-all-in-one-api), split out as its own focused, batch-run Actor.

### Why use FlashScore News Scraper?

- **Real news feed, not scraped HTML** — the exact persisted-query GraphQL calls the app itself sends, cross-checked live
- **Discover real tag ids** — `includeMenu` returns every category/team/tournament tag FlashScore's news section supports (dozens of sports, hundreds of teams/tournaments), which you can then pass as `tagId` to filter the news list
- **Article bodies in parallel** — pass a batch of article ids and get them all fetched concurrently, one row per article
- **No account needed** — every read request works fully anonymously
- **Use cases:** sports news aggregation, content monitoring, editorial research

### Input

| Field           | Type     | Description                                                                                                                                                                               |
| --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fetchNewsList` | boolean  | Fetches the news list (optionally filtered by `tagId`). Default `true`.                                                                                                                   |
| `tagId`         | string   | Filters the news list to one tag (team, league, sport, or topic). Sourced from a tag's `id` field in the news menu output — there's no fixed short list, FlashScore has hundreds of tags. |
| `includeMenu`   | boolean  | Fetches the news category/tag menu. Default `false`. Useful to discover real `tagId` values.                                                                                              |
| `articleIds`    | string\[] | Article ids to fetch in full, in parallel. Default `[]`. Often discoverable from the news list output's nested article stub `id` fields.                                                  |

At least one of `fetchNewsList`, `includeMenu`, or a non-empty `articleIds` must be set, or the run throws immediately.

Example:

```json
{
    "fetchNewsList": true,
    "includeMenu": true,
    "articleIds": ["QFgdUkIk"]
}
```

### Output

The parent Actor's `listNews`/`getNewsMenu` were never typed beyond `unknown` — their real response shapes hadn't been verified. This Actor's live smoke test found and confirmed the following real shapes.

**News list** (`fetchNewsList: true`) — the response is `data.findNewsLayoutByProjectId.sections`, an array of **named sections** (e.g. "Top News", "Transfer News", "Premier League"), each carrying a small `articles` array of *stubs* (`id` + `isTopped` only — not full article bodies). There is no single flat array of individual articles upstream; sections are the real top-level list. One dataset row is pushed per section, tagged `type: "news-item"`:

```json
{
    "type": "news-item",
    "__typename": "CatSection",
    "title": "Transfer News",
    "articles": [
        { "__typename": "CatArticleOnLayoutSection", "id": "v5bCE1WG", "isTopped": true },
        { "__typename": "CatArticleOnLayoutSection", "id": "MZIltPuS", "isTopped": false }
    ],
    "sectionType": "MIXED",
    "tag": {
        "__typename": "CatTag",
        "id": "pG5roijlWSzc94ws",
        "entityId": "pG5roijl",
        "entityType": "TAG",
        "slug": "transfer-window"
    }
}
```

Use each section's `tag.id` as `tagId` to filter, and each article stub's `id` as an `articleIds` entry to fetch full content.

**News menu** (`includeMenu: true`) — the response is `data.findNewsMenuByProjectId.items`, a clean flat array of tags. One row per tag, tagged `type: "news-tag"`:

```json
{
    "type": "news-tag",
    "__typename": "CatMenuItem",
    "name": "Premier League",
    "tag": {
        "__typename": "CatTag",
        "id": "dYlOSQODCdnS0XT8",
        "entityId": "dYlOSQOD",
        "entityType": "TOURNAMENT_TEMPLATE",
        "slug": "premier-league"
    }
}
```

**Article** (`articleIds`) — one row per id, tagged `type: "article"`:

```json
{
    "type": "article",
    "articleId": "QFgdUkIk",
    "article": {
        "data": {
            "findCatArticleById": {
                "id": "QFgdUkIk",
                "type": "STANDARD",
                "publishedAt": 1788130743,
                "title": "Premier League talking points: Chelsea dazzle in attack as Liverpool stutter",
                "slug": "football-premier-league-premier-league-talking-points-chelsea-dazzle-in-attack-as-liverpool-stutter",
                "images": [{ "url": "https://livesport-ott-images.ssl.cdn.cra.cz/...jpeg", "altText": "..." }]
            }
        }
    }
}
```

If any of the three sections above ever return an unrecognized shape (upstream schema change), this Actor falls back to pushing the whole raw GraphQL result as one row (`type: "news-list"` or `type: "news-menu"`) instead of guessing a wrong structure.

### Known limitations

- The parent Actor's own types for `listNews`/`getNewsMenu` were `unknown` — never previously verified. This README documents the real shapes found during this Actor's live smoke test (above); a future upstream schema change could alter them.
- The `getArticle` persisted query (`nah`) returns article metadata (title, slug, publish date, images) but **not** a body/content field in the observed live response — the persisted query's field selection is fixed server-side and this Actor can't request additional fields.
- "News items" in the list response are really named sections (Top News, Transfer News, per-league sections), each holding article *stubs* (id only) rather than a single flat list of full articles — fetch full content via `articleIds`.
- This Actor only covers `/news`, `/news/menu`, and `/news/{id}`. Matches, standings, search, and everything else FlashScore-related live in the parent [FlashScore All-in-One API](https://apify.com/romy/flashscore-all-in-one-api).

### Pricing

Pay-per-event. Charged **$0.004 per `news-item` event** (one event per dataset row pushed — news list section, menu tag, or article). See the Actor's Pricing tab for current tiered rates.

# Actor input Schema

## `fetchNewsList` (type: `boolean`):

If true, fetches the news list (optionally filtered by tagId) and pushes one row per news item.

## `tagId` (type: `string`):

Filters the news list to one tag (team, league, or topic). Sourced from a tag's "id" field in the news menu output (set "includeMenu" to true to discover real tag ids first) — there is no fixed short list, FlashScore has hundreds of tags.

## `includeMenu` (type: `boolean`):

If true, fetches the news category/tag menu and pushes one row per tag. Useful for discovering real tagId values to use with fetchNewsList.

## `articleIds` (type: `array`):

FlashScore news article ids to fetch in full (fetched in parallel, one row per article). Often discoverable from the news list output's item id field.

## Actor input object example

```json
{
  "fetchNewsList": true,
  "includeMenu": false,
  "articleIds": []
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("romy/flashscore-news-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("romy/flashscore-news-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 '{}' |
apify call romy/flashscore-news-scraper --silent --output-dataset

```

## MCP server setup

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