/nytimes/articles/search

POST /api/nytimes/articles/search

Price: 20 credits

Search everything The New York Times has published since 1851 — news and opinion articles, videos, interactives, slideshows, audio, recipes, The Athletic and Wirecutter pieces, paid posts and card decks. Filter by kind of item, section, publication day range and language edition, and order by relevance, newest or oldest. Each result carries headline, summary, kicker, authors, section, topic tags, lead image and publication times.

How to use it

Search nytimes.com. Give a keyword phrase, or leave keyword empty and browse with filters and sort alone — that is how to pull the newest items in a section. Narrow with types, section, language and the start_date/end_date day range; sort takes best, newest or oldest. Each result carries uri (feed it to nytimes/articles for articles, nytimes/recipes for recipes), web_url, document_title, summary, authors, section and image. related is filled on video rows (40 of 100 sampled) and on older articles (29 of 100 sampled from 2015 against 0 of 100 from 2024), and is empty on the other kinds. The Athletic rows carry an image but no author names — The Athletic publishes none on this surface. asset_type says which kind of item the row is, so check it before feeding uri onward. language selects the newsroom edition, so an item's own language field can be finer-grained — a zh search returns zh-hans, zh-CN and zh rows. A single search reaches at most 1100 matches however large the match set says it is — narrow the date range or the section to reach further back.

Parameters

Request body

Response

Errors

Response headers