# Washington Post Scraper (`fanndev/washingtonpost-scraper`) Actor

Extract article metadata and headlines from washingtonpost.com -- no account or API key needed.

- **URL**: https://apify.com/fanndev/washingtonpost-scraper.md
- **Developed by:** [Faisal Ahdan naufal](https://apify.com/fanndev) (community)
- **Categories:** News
- **Stats:** 2 total users, 1 monthly users, 50.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Washington Post Scraper

Extract full article details or the newest headlines from The Washington Post — no account or subscription needed.

### Why use this actor

- No account or login required
- Rich article detail: headline, byline with author bios, publish/update dates, section tags, topic keywords, and lead images
- Also fetches the newest headlines from any section (Politics, World, Business, and more) without visiting each article individually
- Stable JSON output suitable for pipelines, spreadsheets, or databases
- Automatic retries on temporary network hiccups

**Note on paid articles:** The Washington Post limits full article text to subscribers. This actor returns everything that's publicly visible — headline, summary, author, dates, tags, images, and the free preview paragraphs — but not the full body text of a metered article.

### How it works

1. Give the actor one or more article URLs, or switch to `"latest"` mode and pick a section.
2. In article mode, the actor opens each URL and pulls out every publicly available detail about the story.
3. In latest mode, the actor reads that section's headline feed and returns the newest stories.
4. Results stream into your dataset, ready to download as JSON, CSV, or Excel.

You don't need to manage retries, rate limits, or figure out the site's internal data format — the actor handles all of that.

### Input

**Article mode** (default):

```json
{
  "mode": "article",
  "urls": [
    "https://www.washingtonpost.com/politics/2026/08/09/trump-picks-longtime-aide-will-scharf-new-top-white-house-lawyer/"
  ],
  "maxConcurrency": 4,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

**Latest headlines mode:**

```json
{
  "mode": "latest",
  "section": "politics",
  "limit": 10,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

| Field | Type | Description |
|---|---|---|
| `mode` | string | `"article"` (default) — extract one or more article URLs. `"latest"` — fetch the newest headlines from a section. |
| `url` | string | A single article URL. Used in article mode. |
| `urls` | array | Multiple article URLs to extract in one run. Used in article mode. |
| `section` | string | One of `politics`, `national`, `world`, `business`, `entertainment`, `opinions`, `lifestyle`, `local`. Used in latest mode. |
| `limit` | integer | Max headlines returned in latest mode. Default 10, max 12. |
| `maxConcurrency` | integer | How many articles to fetch in parallel in article mode. Default 4. |
| `proxyConfiguration` | object | Apify Proxy settings. Residential is on by default. |

### Output

**Article mode** — one record per URL (truncated here for readability; the real record includes the full topic-tag list and lead-image variants):

```json
{
  "_input": "https://www.washingtonpost.com/politics/2026/08/09/trump-picks-longtime-aide-will-scharf-new-top-white-house-lawyer/",
  "_source": "S1-nextdata",
  "_scrapedAt": "2026-08-10T06:48:52Z",
  "_id": "ZPMTJNKXZJDL5GVIGPT7GYXMYE",
  "canonical_url": "https://www.washingtonpost.com/politics/2026/08/09/trump-picks-longtime-aide-will-scharf-new-top-white-house-lawyer/",
  "headlines": { "basic": "Trump picks longtime aide Will Scharf as new top White House lawyer", "meta_title": "" },
  "description": "The White House staff secretary replaces David Warrington, who is leaving for the private sector.",
  "publish_date": "2026-08-09T23:19:35.338Z",
  "first_publish_date": "2026-08-09T23:19:35.338Z",
  "last_updated_date": "2026-08-09T23:19:35.464Z",
  "credits": {
    "by": [
      {
        "_id": "allisonn",
        "name": "Natalie Allison",
        "org": "Washington, D.C.",
        "description": "Natalie Allison is a White House reporter for the Washington Post...",
        "image": { "url": "https://author-service-images-prod-us-east-1.publishing.aws.arc.pub/washpost/8f83902d-7cf6-4522-84a9-3eb71b16a23a.png" }
      }
      /* ... 1 more author */
    ]
  },
  "content_elements": [
    { "type": "image", "...": "... lead image details" },
    { "type": "text", "content": "President Donald Trump has named Will Scharf as the next top White House lawyer..." }
    /* ... 1 more free-preview paragraph */
  ],
  "restricted": true,
  "content_restrictions": { "content_code": "default" },
  "taxonomy": { "...": "... full section/topic/keyword tree" }
  /* ... additional_properties, promo_items, websites, and other fields */
}
```

**Latest headlines mode** — one record per headline:

```json
{
  "_input": "latest:politics",
  "_source": "S3-rss",
  "_scrapedAt": "2026-08-10T06:48:19Z",
  "title": "Trump picks longtime aide Will Scharf as new top White House lawyer",
  "link": "https://www.washingtonpost.com/politics/2026/08/09/trump-picks-longtime-aide-will-scharf-new-top-white-house-lawyer/",
  "guid": "https://www.washingtonpost.com/politics/2026/08/09/trump-picks-longtime-aide-will-scharf-new-top-white-house-lawyer/",
  "creator": "Natalie Allison, Dan Diamond",
  "pubDate": "Sun, 09 Aug 2026 23:19:35 +0000",
  "description": "The White House staff secretary replaces David Warrington, who is leaving for the private sector.",
  "section": "politics"
}
```

| Field | Type | Description |
|---|---|---|
| `_input` | string | The URL or section you requested, for traceability. |
| `_source` | string | Which strategy produced this record. |
| `_scrapedAt` | string | UTC timestamp of when the record was captured. |
| `headlines.basic` | string | Article headline (article mode). |
| `title` | string | Article headline (latest mode). |
| `description` | string | Article summary/dek. |
| `credits.by` | array | Authors, with bio and photo. |
| `publish_date` / `first_publish_date` / `last_updated_date` | string | Publication timestamps. |
| `content_elements` | array | The free-preview content blocks (text paragraphs and images) available without a subscription. |
| `restricted` | boolean | Whether the full article requires a subscription. |
| `taxonomy` | object | Section, topics, and keyword tags. |
| `link` / `canonical_url` | string | The article URL. |

A record with `_error` instead of article fields means that URL could not be processed (for example, `"_error": "not_found"` for a removed article).

# Actor input Schema

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

"article" extracts one or more article URLs. "latest" fetches the newest headlines from a section.

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

A single Washington Post article URL to extract. Used when mode is "article".

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

Multiple Washington Post article URLs to extract in one run. Used when mode is "article".

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

Section to pull the newest headlines from. Used when mode is "latest".

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

Maximum number of headlines to return in "latest" mode.

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

How many article pages to fetch in parallel in "article" mode.

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

Apify Proxy configuration. Residential is on by default.

## Actor input object example

```json
{
  "mode": "article",
  "url": "https://www.washingtonpost.com/politics/2026/08/09/trump-picks-longtime-aide-will-scharf-new-top-white-house-lawyer/",
  "section": "politics",
  "limit": 10,
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

All scraped article / latest-headline records produced by this run.

# 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 = {
    "mode": "article",
    "url": "https://www.washingtonpost.com/politics/2026/08/09/trump-picks-longtime-aide-will-scharf-new-top-white-house-lawyer/",
    "section": "politics",
    "limit": 10,
    "maxConcurrency": 4,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("fanndev/washingtonpost-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 = {
    "mode": "article",
    "url": "https://www.washingtonpost.com/politics/2026/08/09/trump-picks-longtime-aide-will-scharf-new-top-white-house-lawyer/",
    "section": "politics",
    "limit": 10,
    "maxConcurrency": 4,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("fanndev/washingtonpost-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 '{
  "mode": "article",
  "url": "https://www.washingtonpost.com/politics/2026/08/09/trump-picks-longtime-aide-will-scharf-new-top-white-house-lawyer/",
  "section": "politics",
  "limit": 10,
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call fanndev/washingtonpost-scraper --silent --output-dataset

```

## MCP server setup

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