ArchiveService
A list of all methods in the ArchiveService
service. Click on the method name to view detailed information about that method.
Methods | Description |
---|---|
get_by_year_month_json | Pass in year and month and get back JSON with all articles for that month. The response can be big (~20 megabytes) and contain thousands of articles, depending on the year and month. |
get_by_year_month_json
Pass in year and month and get back JSON with all articles for that month. The response can be big (~20 megabytes) and contain thousands of articles, depending on the year and month.
- HTTP Method:
GET
- Endpoint:
/{year}/{month}.json
Parameters
Name | Type | Required | Description |
---|---|---|---|
year | number | ✅ | Year: 1851-2019 |
month | number | ✅ | Year: 1-12 |
Return Type
GetByYearMonthJsonOkResponse
Example Usage Code Snippet
import { NytArchives } from 'nyt-archives';
(async () => {
const nytArchives = new NytArchives({
apiKey: '',
});
const { data } = await nytArchives.archive.getByYearMonthJson(2018, 9);
console.log(data);
})();
Build Your Own SDKs with liblab
Build developer friendly SDKs in minutes from your APIs