# New York Times Archive Index (`xtracto/nytimes-archive`) Actor

Walk the New York Times archive by date range back to 1970. Returns every article published each day with URL, headline, date and section - and optionally the article text.

- **URL**: https://apify.com/xtracto/nytimes-archive.md
- **Developed by:** [Farhan Febrian Nauval](https://apify.com/xtracto) (community)
- **Categories:** News, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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?

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 Archive Index

Enumerate the **New York Times archive by date** — every article published on a given day, with URL, headline, date and section. The archive reaches back to **1970**, so you can build a complete index of a month, a year or a decade.

### Why Use This Actor?

- **Complete daily coverage.** Each archive day lists everything the Times published that day — roughly 130–290 articles, including pieces that never reach a section front or an RSS feed.
- **Deep history.** Verified working back to 1970: `1970-04-22` returned 245 articles, `1990-07-12` returned 294, `2000-01-03` returned 213.
- **Headline included.** You get the full headline in the index, so you can filter a corpus *before* deciding which articles are worth fetching.
- **Section filtering.** Pull only `business`, `world`, `technology` — parsed from the article URL, so it works on old articles too.
- **Corpus building.** Point it at a date range and get a clean, deduplicated URL list to feed a research pipeline or a downstream extractor.

### What It's Good For

- **Media research** — how did coverage of a topic change across years?
- **Corpus construction** — build a dated, sectioned index before selective extraction.
- **Archival monitoring** — a reproducible daily list of what was published.
- **Backfilling** — fill gaps that recency-based feeds and section fronts can't reach.

### Two Modes

| Mode | What you get | Reliability |
|---|---|---|
| `index` *(default)* | URL, headline, published date, section, subsection | High — the archive pages answer plain HTTP consistently |
| `articles` | Everything above **plus** byline, timestamps, keywords and body text | Variable — see the honest note below |

#### About `articles` mode

NYT article pages are much more tightly gated than the archive pages. During testing **all 16 `curl_cffi` fingerprints tried were refused**, and only one Firefox fingerprint got through — and even that stops working once an IP has made a burst of requests, after which that address receives sustained refusals.

So `articles` mode is real but rate-limited:

- **Use a residential proxy** and keep batches modest.
- When a body can't be fetched, the actor **keeps the index row** and sets `_articleError` — it never drops the article and never fabricates text.
- For large corpora, run `index` mode first (fast and reliable), then fetch bodies in controlled batches.

### Input

| Parameter | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `index` | `index` or `articles`. |
| `dateFrom` | string | 6 days ago | First day, `YYYY-MM-DD`. Clamped to 1970. |
| `dateTo` | string | today | Last day, `YYYY-MM-DD`. |
| `sections` | array | all | Section filter from the URL path, e.g. `["business","world"]`. |
| `maxItems` | integer | `500` | Cap across the whole range. |
| `proxyConfiguration` | object | none | Optional for `index`; recommended for `articles`. |

#### Example — a month of business coverage

```json
{
  "mode": "index",
  "dateFrom": "2026-07-01",
  "dateTo": "2026-07-31",
  "sections": ["business"],
  "maxItems": 5000
}
```

### Output

**Index row:**

```json
{
  "url": "https://www.nytimes.com/2026/08/24/world/canada/us-tariffs-trade-economy.html",
  "headline": "U.S. Tariffs Could Price Canadian Firms Out of U.S. and Threaten Thousands of Jobs",
  "publishedDate": "2026-08-24",
  "archiveDate": "2026-08-25",
  "section": "world",
  "subsection": "canada",
  "source": "The New York Times",
  "_mode": "index",
  "_scrapedAt": "2026-08-26T13:20:41.512Z"
}
```

**`articles` mode adds:**

```json
{
  "authors": ["Ian Austen"],
  "publishedAt": "2026-08-24T09:00:12-04:00",
  "updatedAt": "2026-08-24T14:31:02-04:00",
  "description": "Standfirst text...",
  "keywords": ["International Trade and World Market", "Customs (Tariff)"],
  "content": "Article text...",
  "contentChars": 4820,
  "paragraphCount": 22,
  "isTruncated": false
}
```

#### Field reference

| Field | Type | Description |
|---|---|---|
| `publishedDate` | string | Date from the article URL. |
| `archiveDate` | string | Archive day the article was listed under. These can differ by a day for late-evening stories. |
| `section` / `subsection` | string | Parsed from the URL path. |
| `contentChars` | integer | Body length; `0` when the body wasn't fetched. |
| `isTruncated` | boolean | `true` when the fetched body was unusually short. |
| `_articleError` | string | Present in `articles` mode when the body couldn't be retrieved — the index row is still returned. |
| `_error` | string | Present on failures (`blocked`, `not_found`, `unexpected_shape`, `no_results`, `http_*`). |

### Known Limits

- **`archiveDate` and `publishedDate` can differ by one day.** The archive groups by publication cycle, not wall-clock midnight. Both are returned so you can pick.
- **Older days are bigger.** Pre-2010 days often carry 200–300 items including briefs and market tables; budget `maxItems` accordingly.
- **Non-article URLs appear.** Crosswords, recipes and interactives are listed by the archive too. Filter on `section` if you want editorial only.
- **`articles` mode is throttled per IP** — see the note above. This is a property of the source, not a bug in the actor.
- **Index mode returns no body.** That is deliberate: it is the fast, reliable layer.

### Scope & Compliance

- **Public content only.** The actor requests pages the same way an ordinary anonymous visitor's browser does. It uses **no login, no subscriber credentials, no cookies from a paid account**, and does not attempt to obtain content the publisher withholds from anonymous visitors.
- **Subscriber-only material is not retrieved.** Where only a headline or intro is served to anonymous visitors, that is what the actor returns, flagged via `isTruncated`.
- **No security control is defeated.** Ordinary HTTPS requests with a browser-accurate TLS fingerprint. No CAPTCHA solving, no forged authentication.
- **Copyright stays with the publisher.** Output is intended for research, monitoring, archiving and analysis. You are responsible for using it in line with the publisher's Terms of Service and copyright law — republishing article text is generally not permitted.
- **Rate limits are respected.** Requests are paced between days and between articles.

### Related Actors

| Actor | What it covers |
|---|---|
| [`nytimes-scraper`](https://apify.com/xtracto/nytimes-scraper) | NYT article extraction from URLs — pair it with this actor's index |
| [`washingtonpost-scraper`](https://apify.com/xtracto/washingtonpost-scraper) | The Washington Post |
| [`reuters-scraper`](https://apify.com/xtracto/reuters-scraper) | Reuters |
| [`ft-scraper`](https://apify.com/xtracto/ft-scraper) | Financial Times |

# Actor input Schema

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

index = URL, headline, date and section for every article (fast, reliable). articles = also open each article for byline, keywords and body text.

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

First day to walk, YYYY-MM-DD. The archive reaches back to 1970.

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

Last day to walk, YYYY-MM-DD. Defaults to today.

## `sections` (type: `array`):

Optional section filter taken from the URL path, e.g. business, world, technology, us, opinion, sports, arts. Leave empty for every section.

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

Maximum articles to return across the whole date range. A single day holds roughly 130-290 articles.

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

Optional for index mode. Strongly recommended for articles mode - NYT throttles article pages per IP.

## Actor input object example

```json
{
  "mode": "index",
  "dateFrom": "2026-08-20",
  "dateTo": "2026-08-25",
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `publishedDate` (type: `string`):

Publication date.

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

Section or category the item belongs to.

## `headline` (type: `string`):

Headline text.

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

Direct link to the scraped item.

## `contentChars` (type: `string`):

Length of the body text in characters. Whole number.

## `archiveDate` (type: `string`):

Archive Date as reported by the source.

## `subsection` (type: `string`):

Sub-section of the item.

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

Name of the source the row came from.

## `authors` (type: `string`):

Author names. List of values.

## `publishedAt` (type: `string`):

Publication timestamp, ISO 8601.

## `updatedAt` (type: `string`):

Last-updated timestamp, ISO 8601.

## `description` (type: `string`):

Short description or summary.

## `keywords` (type: `string`):

Keywords attached to the item. List of values.

## `content` (type: `string`):

Main body text.

## `paragraphCount` (type: `string`):

Number of prose blocks recovered. Whole number.

## `isTruncated` (type: `string`):

True when only a short preview was available. Boolean value.

## `articles` (type: `string`):

Articles.

## `ldSection` (type: `string`):

Ld Section as reported by the source.

## `_mode` (type: `string`):

Which run mode produced the row.

## `_scrapedAt` (type: `string`):

UTC timestamp of the scrape, ISO 8601.

## `_articleError` (type: `string`):

Article Error as reported by the source.

## `_error` (type: `string`):

Set only on diagnostic rows - why that target produced no data.

## `_message` (type: `string`):

Human-readable explanation of the error.

# 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": "index",
    "dateFrom": "2026-08-20",
    "dateTo": "2026-08-25",
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/nytimes-archive").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": "index",
    "dateFrom": "2026-08-20",
    "dateTo": "2026-08-25",
    "maxItems": 100,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("xtracto/nytimes-archive").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": "index",
  "dateFrom": "2026-08-20",
  "dateTo": "2026-08-25",
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call xtracto/nytimes-archive --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xtracto/nytimes-archive"
        }
    }
}

```

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/IP31PTxAAHXEmyE90/builds/hTVeKAUc2Aew6HdOw/openapi.json
