Custom Connector
NYTimes Connector
US
The NYTimes Connector provides seamless integration with The New York Times, enabling easy access to article search, archive data, and top stories. Acting as a secure proxy, it manages authentication, headers, and query parameters automatically — supporting searching articles, retrieving historical archives by month and year, and fetching top stories by section through a single interface.
Overview
Integration Overview
This document provides a detailed guide for each integration point, its purpose, configuration, and workflow support using the NYTimes Connector.
- /svc/search/v2/articlesearch.json. Searches for articles based on query parameters.
- /svc/archive/v1/{year}/{month}.json. Retrieves archive data for a specific month and year.
- /svc/topstories/v2/{section}.json. Fetches top stories for a specified section.
Documentation
Detailed Integration Documentation
Article Search
| Action | /svc/search/v2/articlesearch.json |
|---|---|
| Purpose | Searches for articles based on query parameters provided by the client. |
| Parameters | Required: api-key (via environment variable or query parameter). Optional: Various search parameters (e.g. q, fq, begin_date) per NYTimes API documentation. |
| Configuration | Configure the connector with environment variables CONNECTOR_ENV_NYTIMES_BASE_URL and CONNECTOR_ENV_NYTIMES_API_KEY. |
| Output | Successful: JSON object with search results. Failure: 401 if no API key is provided, or 500 if the API request fails. |
| Workflow example | Set the API key, input search parameters (e.g. q=technology), execute the articlesearch action, then use the returned articles for content aggregation or analysis. |
Archive Retrieval
| Action | /svc/archive/v1/{year}/{month}.json |
|---|---|
| Purpose | Retrieves archive data for a specific month and year from the NYTimes API. |
| Parameters | Required: year (integer, e.g. 2025), month (integer, e.g. 9). Optional: api-key, additional archive parameters. |
| Configuration | Configure the connector with CONNECTOR_ENV_NYTIMES_BASE_URL and CONNECTOR_ENV_NYTIMES_API_KEY. |
| Output | Successful: JSON object with archive data. Failure: 401 if no API key, or 500 on API failure. |
| Workflow example | Set the API key, input the year and month in the URL path, execute the archive action, then use the data for historical analysis or reporting. |
Top Stories Retrieval
| Action | /svc/topstories/v2/{section}.json |
|---|---|
| Purpose | Fetches top stories for a specified section from the NYTimes API. |
| Parameters | Required: section (string, e.g. home). Optional: api-key. |
| Configuration | Configure the connector with CONNECTOR_ENV_NYTIMES_BASE_URL and CONNECTOR_ENV_NYTIMES_API_KEY. |
| Output | Successful: JSON object with top stories. Failure: 401 if no API key, or 500 on API failure. |
| Workflow example | Set the API key, input the section (e.g. home), execute the topstories action, then use the data for news aggregation or display. |
Example Workflow: News Data Retrieval and Analysis
| Article search | Set the API key, input a search term (e.g. climate), execute articlesearch, and review articles for relevant content. |
|---|---|
| Archive retrieval | Set the API key, input year (e.g. 2025) and month (e.g. 9), execute the archive action, and analyze historical data. |
| Top stories retrieval | Set the API key, input a section (e.g. home), execute topstories, and display top stories on a dashboard. |
Support
For technical support, contact custom-connectors-support@isolutions.sa.