Article Search
Last updated
Last updated
Find articles that match search criteria.
Variables | Description | Data type | Required |
---|---|---|---|
dates
Variables | Description | Data type | Required |
---|---|---|---|
options
Variables | Description | Data type | Required |
---|---|---|---|
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.
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
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
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
Results should be from one of these news desks (valid options)
list
False
type_of_material
Results should be from this type of material (valid options)
list
False
section_name
Results should be from this section (valid options)
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