Article Search API
With the Article Search API, you can search New York Times articles from Sept. 18, 1851 to today, retrieving headlines, abstracts, lead paragraphs, links to associated multimedia and other article metadata. Note: In URI examples and field names, italics indicate placeholders for variables or values. Brackets [ ] indicate optional items. Parentheses ( ) are not a convention — when URIs include parentheses, interpret them literally.
The API endpoint is located at the following URL:
These are the methods supported by the API:
GET /articlesearch.jsonArticle Search
Article Search requests use the following URI structure:
q Search query term. Search is performed on the article body, headline and byline. fq "Filtered search query using standard Lucene syntax. The filter query can be specified with or without a limiting field: label. See Filtering Your Search for more information about filtering." begin_date "Format: YYYYMMDD Restricts responses to results with publication dates of the date specified or later." end_date "Format: YYYYMMDD Restricts responses to results with publication dates of the date specified or earlier." sort "By default, search results are sorted by their relevance to the query term (q). Use the sort parameter to sort by pub_date." fl "Comma-delimited list of fields (no limit) Limits the fields returned in your search results. By default (unless you include an fl list in your request), the following fields are returned: web_url snippet lead_paragraph abstract print_page blog source multimedia headline keywords pub_date document_type news_desk byline type_of_material _id word_count" hl Enables highlighting in search results. When set to true, the query term (q) is highlighted in the headline and lead_paragraph fields. Note: If highlighting is enabled, snippet will be returned even if it is not specified in your fl list." page "The value of page corresponds to a set of 10 results (it does not indicate the starting number of the result set). For example, page=0 corresponds to records 0-9. To return records 10-19, set page to 1, not 10." facet_field Comma-delimited list of facets Specifies the sets of facet values to include in the facets array at the end of response, which collects the facet values from all the search results. By default no facet fields will be returned. Below is the list of valid facets: section_name document_type type_of_material source day_of_week To learn more about using facets, see Using Facets. facet_filter When set to true, facet counts will respect any applied filters (fq, date range, etc.) in addition to the main query term. To filter facet counts, specifying at least one facet_field is required. To learn more about using facets, see Using Facets.
The docs requested by the article search.
Status Code 200
- URI / COID
- Last updated
- 2017-05-28 10:05 (UTC)
- Created at
- 2020-01-19 16:03 (UTC)
- Usage permission