# Guardian News Scraper (`xtracto/guardian-scraper`) Actor

Scrape full The Guardian articles with headline, body, authors, section, and tags. Supports `mode: latest` to get newest news via Guardian world RSS. HTTP-only.

- **URL**: https://apify.com/xtracto/guardian-scraper.md
- **Developed by:** [Farhan Febrian Nauval](https://apify.com/xtracto) (community)
- **Categories:** News, Videos, Lead generation
- **Features:** Limited permissions
- **Stats:** 5 total users, 0 monthly users, 93.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

## The Guardian Article Scraper

Extract full article text, author, publication date, section, and description from any **theguardian.com** article URL. The Guardian is one of the world's most-read English-language news sites with extensive international coverage across politics, culture, and science.

### Why Use This Actor?

- **Academic research** - Guardian long-form journalism is widely used in media studies and political research.
- **Content curation** - aggregate Guardian articles by topic for newsletters or reading lists.
- **Sentiment and bias analysis** - Guardian editorial stance makes it a reference in media bias research.
- **Open access** - Guardian content is freely available globally with no paywall or geo-restriction.

### How It Works

This actor uses **only HTTP requests** - no browser, no Selenium, no Playwright. Articles are extracted in seconds with RAM usage well under 256 MB.

### Input

```json
{
  "url": "https://www.theguardian.com/world/2026/apr/13/example-article",
  "urls": [
    "https://www.theguardian.com/world/2026/apr/13/article-one",
    "https://www.theguardian.com/technology/2026/apr/12/article-two"
  ]
,
  "mode": "article",
  "limit": 10
}
```

### Output

```json
{
  "url": "https://www.theguardian.com/world/2026/may/15/mali-airstrikes-rebel-alliance-separatists",
  "source": "The Guardian",
  "title": "Mali’s forces target rebel alliance in junta’s fight to keep power",
  "description": "Army supported by Russian mercenaries launches airstrikes after offensive by coalition of Islamist extremists and Tuareg separatists",
  "content": "Mali’s armed forces, supported by Russian mercenaries, have launched airstrikes targeting a rebel alliance of Islamist extremists and Tuareg separatists as the ruling junta struggles to maintain its hold on power in the unstable west African country. Earlier this week warplanes targeted the key northern town of Kidal,which was lostwhen the rebels launched a surprise offensive across much of Mali in late April....",
  "image": "https://i.guim.co.uk/img/media/e6d26af1123d872554af9a427c5d33abf01bc499/650_22_3090_2473/master/3090.jpg?width=1200&height=630&quality=85&auto=format&fit=crop&precrop=40:21,offset-x50,offset-y0&overlay-align=bottom%2Cleft&overlay-width=100p&overlay-base64=L2ltZy9zdGF0aWMvb3ZlcmxheXMvdGctZGVmYXVsdC5wbmc&enable=upscale&s=46f9527d36a676fc922f988649bb5fe9",
  "language": "en",
  "word_count": 847,
  "published_date": "2026-05-15T14:57:35.000Z",
  "modified_date": "",
  "authors": [],
  "categories": "",
  "tags": ""
}
```

### Fetch Latest News

Set `mode` to `"latest"` to fetch the newest article URLs and titles from The Guardian instead of extracting a single article.

**Input:**

```json
{
  "mode": "latest",
  "limit": 10
}
```

**Output** - array of objects:

```json
[
  {
    "url": "https://www.theguardian.com/world/2026/apr/20/madagascar-gen-z-protesters-fear-new-regime",
    "title": "Arrests fuel fears among Madagascar’s gen Z protesters that new regime no better than one they overthrew",
    "published_date": "Mon, 20 Apr 2026 04:00:02 GMT",
    "source": "The Guardian"
  }
  //...
]
```

Source: `https://www.theguardian.com/world/rss` (RSS feed)

### Cron Schedule: Auto-Fetch Newest Articles

Combine `mode: "latest"` and `mode: "article"` to keep a fresh feed running on autopilot:

1. **Schedule** a recurring run of this Actor with `{"mode": "latest", "limit": 20}` via Apify Schedules (UI ▸ Schedules ▸ Create new). A cron expression like `*/30 * * * *` runs it every 30 minutes.
2. **Webhook** the dataset of the latest run into another Actor run with `mode: "article"` and the new URLs as input — Apify integrations let you chain runs via the "Actor finished" webhook without any glue code.
3. The article-mode run extracts the full body, image, authors, and metadata for each URL and appends to your master dataset.

Common cron expressions:

| Frequency | Cron |
|---|---|
| Every 15 minutes | `*/15 * * * *` |
| Hourly | `0 * * * *` |
| Every 6 hours | `0 */6 * * *` |
| Daily at 06:00 UTC | `0 6 * * *` |

### Notes

- The Guardian rarely paywalls content; full article text is usually returned
- For high-volume production use, register for The Guardian's free Content API

### Other News Actors

Need a different news source? All actors in this collection:

| Actor | Source |
|---|---|
| [`aljazeera-scraper`](https://apify.com/xtracto/aljazeera-scraper) | Al Jazeera |
| [`apnews-scraper`](https://apify.com/xtracto/apnews-scraper) | AP News |
| [`bbc-scraper`](https://apify.com/xtracto/bbc-scraper) | BBC News |
| [`cnbc-scraper`](https://apify.com/xtracto/cnbc-scraper) | CNBC |
| [`forbes-scraper`](https://apify.com/xtracto/forbes-scraper) | Forbes |
| [`fortune-scraper`](https://apify.com/xtracto/fortune-scraper) | Fortune |
| [`ft-scraper`](https://apify.com/xtracto/ft-scraper) | Financial Times |
| [`guardian-scraper`](https://apify.com/xtracto/guardian-scraper) | The Guardian |
| [`msn-scraper`](https://apify.com/xtracto/msn-scraper) | MSN News |
| [`nytimes-scraper`](https://apify.com/xtracto/nytimes-scraper) | New York Times |
| [`reuters-scraper`](https://apify.com/xtracto/reuters-scraper) | Reuters |
| [`scmp-scraper`](https://apify.com/xtracto/scmp-scraper) | South China Morning Post |
| [`techcrunch-scraper`](https://apify.com/xtracto/techcrunch-scraper) | TechCrunch |
| [`upi-scraper`](https://apify.com/xtracto/upi-scraper) | UPI |
| [`yahoo-finance-scraper`](https://apify.com/xtracto/yahoo-finance-scraper) | Yahoo Finance |
| [`smart-news-loader`](https://apify.com/xtracto/smart-news-loader) | Any URL - adaptive HTTP loader |
| [`bloomberg-scraper`](https://apify.com/xtracto/bloomberg-news-article-scraper) | Bloomberg |

All actors support `mode: "latest"` for fetching newest article URLs from each source.

# Actor input Schema

## `url` (type: `string`):

Single article URL to extract.

## `urls` (type: `array`):

List of article URLs to extract.

## `mode` (type: `string`):

Operation mode: 'article' to extract a single article (default), 'latest' to fetch newest headlines from the source's RSS feed.

## `limit` (type: `integer`):

Number of latest articles to return when mode is 'latest'. Default: 10.

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

Optional. Requests go through Apify Proxy when enabled; an article that does not load is retried up to 3 times, each through a new proxy session.

## Actor input object example

```json
{
  "url": "https://www.theguardian.com/society/2026/oct/09/vaccine-trial-guinea-bissau-rfk-jr",
  "mode": "article",
  "limit": 10
}
```

# Actor output Schema

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

One row per scraped record, stored in the run's default dataset.

# 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 = {
    "url": "https://www.theguardian.com/society/2026/oct/09/vaccine-trial-guinea-bissau-rfk-jr"
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/guardian-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 = { "url": "https://www.theguardian.com/society/2026/oct/09/vaccine-trial-guinea-bissau-rfk-jr" }

# Run the Actor and wait for it to finish
run = client.actor("xtracto/guardian-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 '{
  "url": "https://www.theguardian.com/society/2026/oct/09/vaccine-trial-guinea-bissau-rfk-jr"
}' |
apify call xtracto/guardian-scraper --silent --output-dataset

```

## MCP server setup

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