The New York Times Company Archive API

The Archive API from The New York Times Company — 1 operation(s) for archive.

Documentation

Specifications

Schemas & Data

Other Resources

🔗
Examples
https://raw.githubusercontent.com/api-evangelist/new-york-times-company/refs/heads/main/examples/article-search-example.json
🔗
Signup
https://developer.nytimes.com/accounts/create
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/new-york-times-company/refs/heads/main/examples/top-stories-home-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/new-york-times-company/refs/heads/main/examples/most-popular-emailed-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/new-york-times-company/refs/heads/main/examples/timeswire-content-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/new-york-times-company/refs/heads/main/examples/archive-month-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/new-york-times-company/refs/heads/main/examples/books-best-sellers-list-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/new-york-times-company/refs/heads/main/examples/movie-reviews-search-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/new-york-times-company/refs/heads/main/examples/times-tags-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/new-york-times-company/refs/heads/main/examples/semantic-concept-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/new-york-times-company/refs/heads/main/examples/geo-query-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/new-york-times-company/refs/heads/main/examples/community-comments-example.json
🔗
Status
https://developer.nytimes.com/docs/community-api-product/1/overview
🔗
APIsJSON
https://raw.githubusercontent.com/api-evangelist/new-york-times-company/refs/heads/main/apis.yml

OpenAPI Specification

new-york-times-company-archive-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  version: 2.0.0
  title: Archive API
  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

    ```

    '
host: api.nytimes.com
basePath: /svc/archive/v1
schemes:
- https
produces:
- application/json
security:
- apikey: []
tags:
- name: Archive
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:
  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
  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
  Byline:
    type: object
    properties:
      original:
        type: string
      person:
        type: array
        items:
          $ref: '#/definitions/Person'
      organization:
        type: string
  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
  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
  Keyword:
    type: object
    properties:
      name:
        type: string
      value:
        type: string
      rank:
        type: integer
      major:
        type: string
securityDefinitions:
  apikey:
    type: apiKey
    name: api-key
    in: query