Article Search
Find articles that match search criteria.
Usage
Parameters
Variables | Description | Data type | Required |
---|---|---|---|
| What you want to search for |
| False |
| The amount of results that you want to receive (returns a multiple of 10) |
| False |
A dictionary of the dates you'd like the results to be between |
| False | |
A dictionary of additional options |
| False |
dates
dates
Variables | Description | Data type | Required |
---|---|---|---|
| Results should be published at or after this date |
| False |
| Results should be published at or before this date |
| False |
options
options
Variables | Description | Data type | Required |
---|---|---|---|
| How you want the results to be sorted ( |
| False |
| Results should be from one of these sources |
| False |
| Results should be from one of these news desks (valid options) |
| False |
| Results should be from this type of material (valid options) |
| False |
| Results should be from this section (valid options) |
| False |
| Results should contain at least one of these keywords |
| False |
| Results should contain at least one of the strings in the list in the article text |
| False |
| Results should contain at least one of the strings in the headline |
| False |
|
| 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