Article Search
Find articles that match search criteria.
Usage
Parameters
query
What you want to search for
str
False
results
The amount of results that you want to receive (returns a multiple of 10)
int
False
A dictionary of the dates you'd like the results to be between
dict
False
A dictionary of additional options
dict
False
dates
dates
begin
Results should be published at or after this date
datetime.datetime
or datetime.date
False
end
Results should be published at or before this date
datetime.datetime
or datetime.date
False
options
options
sort
How you want the results to be sorted (oldest
, newest
or relevance
)
str
False
sources
Results should be from one of these sources
list
False
news_desk
list
False
type_of_material
list
False
section_name
list
False
subject
Results should contain at least one of these keywords
list
False
body
Results should contain at least one of the strings in the list in the article text
list
False
headline
Results should contain at least one of the strings in the headline
list
False
fq
str
False
Example
Advanced Usage: Filter Queries
The New York Times article search API allows for many more filters, which can be combined much more specifically. You can specify a filter query be specifying the fq
key of the options
parameter. This can be done as follows:
To learn more about all the possibilities of the advanced filter queries, you can visit the New York Times Developer API reference.
Last updated