# New York Times Article Scraper (`kibaale/nyt-scraper`) Actor

Complete New York Times articles as clean structured records — full body text, headline, authors, section, timestamps, summary, tags and word count. One article URL in, one tidy record out.

- **URL**: https://apify.com/kibaale/nyt-scraper.md
- **Developed by:** [kibalee](https://apify.com/kibaale) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $7.00 / 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.

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

## New York Times Article Scraper

Complete New York Times articles as clean, structured records — full body
text, headline, authors, section, timestamps, summary, tags and word count.
One article URL in, one tidy record out.

Works even where nytimes.com itself is blocked or unreachable from your
network — if you can run this actor, you get the article.

### What you get

- **The complete article** — every paragraph of the body, in reading order
- **Editorial metadata** — headline, authors, section, publication & update
  times, summary, topic tags, word count
- **No login, no subscription, no API key** — paste the URL and run
- **Nothing to install** — runs fully in the cloud
- **Always fresh** — content is fetched live on every run, never a stale copy
- **Stable schema** — the same record shape for every article, easy to parse

### Quick start

Input — just the article URL:

```json
{
  "url": "https://www.nytimes.com/2026/08/26/world/canada/carney-canada-trump-tariffs-retaliate.html"
}
```

### Example result

Real output for the URL above (article body truncated):

```json
{
  "id": "QXJ0aWNsZTpueXQ6Ly9hcnRpY2xlLzA1YjQ1NjMyLTdiMzItNTNmZi1hODlmLTYyZTU4ZWI0ZDUwNw==",
  "url": "https://www.nytimes.com/2026/08/26/world/canada/carney-canada-trump-tariffs-retaliate.html",
  "headline": "Canadians Stand Their Ground as Trade War Intensifies",
  "byline": ["Vjosa Isai"],
  "section": "World",
  "sectionUrl": "/section/world",
  "firstPublished": "2026-08-26T09:03:57.000Z",
  "lastModified": "2026-08-27T03:14:20.479Z",
  "wordCount": 881,
  "summary": "Business owners are preparing for financial pain after the latest U.S.-Canada trade talks collapsed. But many Canadians are embracing a show of resistance.",
  "tags": ["Canada", "US", "Tariff", "Mark Carney", "Donald Trump", "..."],
  "body": [
    "Canadians responded to President Trump's first round of tariffs a year and a half ago with a grass-roots effort to bruise the United States, boycotting alcohol, vegetables and cross-border travel.",
    "They rallied around the flag, inspected grocery labels like detectives and shopped local, all while Prime Minister Mark Carney looked across the ocean for new trade partnerships.",
    "..."
  ]
}
```

### Field reference

| Field | Description |
|---|---|
| `headline` | Article title |
| `seoHeadline` | Longer headline variant used in search-result previews (when provided) |
| `kicker` | Short label shown above the headline (often empty) |
| `byline` | Author name(s) |
| `section` | News section the article appears in |
| `sectionUrl` | Link to that section on the site |
| `summary` | Short editor's description of the piece |
| `tags` | Topic labels attached by the publisher |
| `firstPublished` | Date and time the article was published |
| `lastModified` | Date and time the article was last updated |
| `wordCount` | Number of words in the article |
| `body` | Full article text — one list item per paragraph, in order |
| `id` | Stable publisher identifier (the same article always returns the same id) |
| `url` | The article URL that was fetched |

### Ideas

- News monitoring and alert feeds
- Research archives and clipping libraries
- Media tracking and competitive analysis
- Databases for AI and content pipelines

### FAQ

**Do I need a New York Times account or subscription?** No. Paste the public
article URL and run.

**Why is the site blocked for me but this still works?** NYT restricts access
from some networks. This scraper does not depend on loading the website, so
the article comes through even where the site will not open.

**Do some articles fail?** A small share of older pieces is no longer served
in full. Those return a clear error message so you know exactly which URL
needs a second look.

**Is the content fresh?** Yes — every run fetches the article as it is
published right now, including its latest update time.

**Can I scrape many articles?** Each run takes one article URL. Run the actor
as often as you like — on a schedule, or once per URL — and every run adds
one record to the dataset.

# Actor input Schema

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

Full URL of the nytimes.com article you want to scrape.

## Actor input object example

```json
{
  "url": "https://www.nytimes.com/2026/08/26/world/canada/carney-canada-trump-tariffs-retaliate.html"
}
```

# Actor output Schema

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

Article records 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.nytimes.com/2026/08/26/world/canada/carney-canada-trump-tariffs-retaliate.html"
};

// Run the Actor and wait for it to finish
const run = await client.actor("kibaale/nyt-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.nytimes.com/2026/08/26/world/canada/carney-canada-trump-tariffs-retaliate.html" }

# Run the Actor and wait for it to finish
run = client.actor("kibaale/nyt-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.nytimes.com/2026/08/26/world/canada/carney-canada-trump-tariffs-retaliate.html"
}' |
apify call kibaale/nyt-scraper --silent --output-dataset

```

## MCP server setup

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