Archive API

Returns an array of NYT articles for a given month, going back to 1851. Response fields mirror the Article Search API. Useful for bulk-loading article metadata locally. Responses can be ~20MB and contain thousands of articles per month.

Archive API is one of 11 APIs that The New York Times Company publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 1 machine-runnable capability that can be deployed as REST, MCP, or Agent Skill surfaces via Naftiko and 1 JSON Schema definition.

Tagged areas include Articles, Archive, History, and Bulk Data. The published artifact set on APIs.io includes API documentation, an OpenAPI specification, sample payloads, 1 Naftiko capability spec, and 1 JSON Schema.

OpenAPI Specification

archive-api-openapi.yml Raw ↑
swagger: '2.0'
basePath: /svc/archive/v1
host: api.nytimes.com
info:
  version: 2.0.0
  title: Archive
  description: |
    The Archive API returns an array of NYT articles for a given month, going back to 1851.  Its response fields are the same as the Article Search API. The Archive API is very useful if you want to build your own database of NYT article metadata. You simply pass the API the year and month and it returns a JSON object with all articles for that month.  The response size can be large (~20mb).

    ```
    /{year}/{month}.json
    ```

    ## Example Call
    ```
    https://api.nytimes.com/svc/archive/v1/2019/1.json?api-key=yourkey
    ```
schemes:
  - https
produces:
  - application/json
security:
  - apikey: []
paths:
  '/{year}/{month}.json':
    get:
      summary: Returns an array of articles for a given month.
      description: |
        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.
      parameters:
        - name: year
          in: path
          description: 'Year: 1851-2019'
          required: true
          type: integer
          default: 2018
        - name: month
          in: path
          description: 'Year: 1-12'
          required: true
          type: integer
          default: 9
      tags:
        - Archive
      responses:
        '200':
          description: An array of articles.
          schema:
            type: object
            properties:
              copyright:
                type: string
              response:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      hits:
                        type: integer
                  docs:
                    type: array
                    items:
                      $ref: '#/definitions/Article'
        '401':
          description: Unauthorized request, check api-key is set.
          schema:
            type: object
            properties:
              fault:
                type: object
                properties:
                  faultstring:
                    type: string
                  detail:
                    type: object
                    properties:
                      errorcode:
                        type: string
        '429':
          description: Too many requests.  You reached your per minute or per day rate limit.
definitions:
  Article:
    type: object
    properties:
      web_url:
        type: string
      snippet:
        type: string
      print_page:
        type: integer
      source:
        type: string
      multimedia:
        type: array
        items:
          $ref: '#/definitions/Multimedia'
      headline:
        $ref: '#/definitions/Headline'
      keywords:
        type: array
        items:
          $ref: '#/definitions/Keyword'
      pub_date:
        type: string
      document_type:
        type: string
      news_desk:
        type: string
      byline:
        $ref: '#/definitions/Byline'
      type_of_material:
        type: string
      _id:
        type: string
      word_count:
        type: integer
      score:
        type: integer
      uri:
        type: string
  Byline:
    type: object
    properties:
      original:
        type: string
      person:
        type: array
        items:
          $ref: '#/definitions/Person'
      organization:
        type: string
  Headline:
    type: object
    properties:
      main:
        type: string
      kicker:
        type: string
      content_kicker:
        type: string
      print_headline:
        type: string
      name:
        type: string
      seo:
        type: string
      sub:
        type: string
  Keyword:
    type: object
    properties:
      name:
        type: string
      value:
        type: string
      rank:
        type: integer
      major:
        type: string
  Multimedia:
    type: object
    properties:
      rank:
        type: integer
      subtype:
        type: string
      caption:
        type: string
      credit:
        type: string
      type:
        type: string
      url:
        type: string
      height:
        type: integer
      width:
        type: integer
      legacy:
        type: object
        properties:
          xlarge:
            type: string
          xlargewidth:
            type: integer
          xlargeheight:
            type: integer
      crop_name:
        type: string
  Person:
    type: object
    properties:
      firstname:
        type: string
      middlename:
        type: string
      lastname:
        type: string
      qualifier:
        type: string
      title:
        type: string
      role:
        type: string
      organization:
        type: string
      rank:
        type: integer
securityDefinitions:
  apikey:
    type: apiKey
    name: api-key
    in: query