New York Times API

⭐ Beginner's Pick News / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

The New York Times API gives developers access to articles, book reviews, movie reviews, bestseller lists, and more from one of the most prestigious news organizations in the world. It is well-documented and beginner-friendly with generous free tier limits. Registering for a key takes just a few minutes on the NYT developer portal.

💡

Beginner Tip

Start with the Article Search API using a simple keyword query to explore the millions of NYT articles available, many dating back to 1851. Remember that the API returns article metadata and snippets, not full article text, due to subscription requirements.

Available Data

New York Times data via REST API
JSON-formatted response data
Requires API key authentication

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from New York Times",
    "description": "The New York Times Developer Network",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

response.docs Array of article objects matching the search query
response.docs[].headline.main Main headline of the article
response.docs[].snippet Short excerpt or summary from the article
response.docs[].web_url Direct URL to the full article on nytimes.com
response.docs[].pub_date Publication date in ISO 8601 format
response.docs[].section_name NYT section the article belongs to such as Technology or Politics

Implementation Example

const url = "https://developer.nytimes.com/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized The api-key query parameter is missing or incorrect
Append &api-key=YOUR_API_KEY to your request and confirm the key is active in your NYT developer account
429 Too Many Requests Exceeded the rate limit of 10 requests per minute or 4000 per day
Add a delay of at least 6 seconds between requests to stay within the per-minute limit
Empty response docs array No articles match the search query or the date range is too restrictive
Broaden your search term and remove or widen the begin_date and end_date filters

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category News
Difficulty Intermediate
Verified: 2026-04-04

Alternatives to New York Times

Technical alternatives for different use cases.

Premium journalism API with article search and metadata

Better For

Multi-source news aggregation

Trade-off

High-quality journalism and archive access

Similar APIs

View All →