canonical: https://jentic.com/apis/nytimes.com/article-search

# Nytimes NYT Article Search API

The New York Times Article Search API exposes a single search endpoint that runs queries against NYT articles published from September 18, 1851 to today. It supports keyword queries, filter queries (Lucene-style on fields such as section, byline, and date), date ranges, sorting, and faceting, and returns headlines, abstracts, lead paragraphs, multimedia links, and other article metadata. The endpoint is well suited to building topic monitors, citation tools, research dashboards, and AI agents that need to retrieve specific articles rather than walk the full archive.

## For AI agents

Run keyword and filter queries across NYT articles from 1851 to today and return headline, abstract, lead paragraph, and metadata fields, authenticated with an API key in the query string.

## Scope

Does not handle real-time alerts, full body text retrieval, or bulk monthly download - use for keyword and filter search across NYT article metadata only.

## Capabilities

- Search the full NYT corpus by free-text query and return ranked article metadata
- Filter results by structured field expressions on section, byline, type-of-material, or pub_date
- Constrain results to a specific date range using begin_date and end_date
- Page through results using a zero-based page parameter at 10 results per page
- Sort results by newest, oldest, or relevance to suit research workflows
- Request facet counts on configured fields to surface coverage trends

## Use cases

### Topic Monitoring

Run a daily query for keywords or filter expressions and surface fresh NYT coverage in a dashboard, newsletter, or Slack channel. Article Search returns headlines and lead paragraphs, which is enough to triage what to read in full on nytimes.com. Setup typically takes under a day from a developer key, with the bulk of work being query refinement.

Example prompt: GET /articlesearch.json with q='renewable energy', begin_date set to yesterday, sort='newest', and post the top three results to a Slack channel.

### Research and Citation Tool

Power a research tool for journalists or academics that returns NYT articles matching a structured query - for example, 'all Op-Ed pieces tagged with a person between 1990 and 2000'. The fq parameter supports Lucene-style filter queries on fields such as section_name, byline.original, and type_of_material, which makes it possible to build precise citation lists.

Example prompt: Call /articlesearch.json with fq="section_name:(\"Op-Ed\") AND byline.original:(\"By Maureen Dowd\")" and a date range, then return ranked headlines and URLs.

### Agent-Driven NYT Q&A

Let an AI agent answer 'has The New York Times written about this topic recently, and what did they say?' by running a search and summarising the top results. Through Jentic, the agent searches by intent and gets only the operations it needs, with the API key held in the platform's vault rather than in the agent's context.

Example prompt: Search Jentic for 'search NYT articles', load the operation, run a query for the user's topic with sort='newest', and summarise the top three results.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /articlesearch.json | Search NYT articles by query, filter, date range, and sort |

## Key resources

- **Article Search** — Keyword and filter query across the NYT corpus from 1851 to today, returning ranked article metadata.

## Why Jentic

- **Setup:** Wiring the NYT Article Search API by hand means appending your api-key to the query string against api.nytimes.com/svc/search/v2 and handling the filter and paging request plumbing yourself. Through Jentic you install once, import the NYT Article Search API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Article Search exposes a single read-only search path with no resource id, so scope the agent to that one operation and leave everything else out. You choose the operations it may call, so it only reaches the endpoint you list.
- **Credential handling:** Your NYT api-key is stored once, encrypted, by your own Jentic One instance and injected as the api-key query parameter at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'search NYT articles' or 'find NYT op-eds about a topic', and Jentic returns the matching Article Search operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **NYT Archive API** — Bulk month-by-month retrieval of NYT article metadata, complementing the query-driven Article Search.
- **NYT Top Stories API** — Current top stories for a section - for live homepage rather than historical search.
- **Guardian Content API** — Article search across The Guardian - competing newspaper-of-record corpus.
- **NewsAPI** — Aggregator across many publishers with shorter retention than the NYT archive.

## FAQ

### What authentication does the NYT Article Search API use?

The API uses an API key passed as the query parameter 'api-key'. There is no header-based auth or OAuth. Through Jentic, the api-key is stored encrypted in the vault and appended to every request URL at execution time so the agent never holds it directly.

### Can I filter results by section or byline?

Yes - the 'fq' parameter accepts Lucene-style filter queries on fields such as section_name, byline.original, type_of_material, and pub_date. Combine with a free-text 'q' query to narrow results. Use 'begin_date' and 'end_date' for date-range filtering.

### What are the rate limits for the API?

The spec does not embed explicit limits. The Times's published policy is 5 requests per minute and 500 per day for the developer tier; back off on HTTP 429 and cache common queries client-side where possible.

### How do I run a search through Jentic?

Run pip install jentic, then search for 'search NYT articles'. Jentic returns GET /articlesearch.json with its input schema; supply your query string, optional fq filter, and date range and execute. Run it through Jentic One, the self-hosted execution layer, to get an agent API key.

### How are results paged?

Results return 10 per page. Pass a zero-based 'page' parameter to walk additional pages. The 'meta.hits' field on the response indicates the total match count so you can size the iteration.

### Can I limit what my agent is allowed to do with the NYT Article Search API?

Yes. Because you run Jentic One yourself, your own rules decide which operations and credentials the agent may use, and the NYT Article Search API exposes just one read-only search path, GET /articlesearch.json, with no resource id. You scope the agent to that single search operation and leave everything else out, so it can only run keyword, filter, and date-range queries against NYT article metadata and nothing more. The NYT api-key stays with your instance and is added to the request at execution time, so the agent never handles the credential itself.
