> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anysite.io/llms.txt
> Use this file to discover all available pages before exploring further.

# /nytimes/articles/search

> Search everything The New York Times has published since 1851 — news and opinion articles, videos, interactives, slideshows, audio, recipes, The Athletic and Wirecutter pieces, paid posts and card decks. Filter by kind of item, section, publication day range and language edition, and order by relevance, newest or oldest. Each result carries headline, summary, kicker, authors, section, topic tags, lead image and publication times.

**Price:** 1 credit



## OpenAPI

````yaml /openapi/news-publishing.json post /api/nytimes/articles/search
openapi: 3.1.0
info:
  title: Any Site API
  description: >+
    Any Site API provides programmatic access to data from LinkedIn, Instagram,
    Twitter, and other platforms.


    ## Authentication


    All API endpoints require an `access-token` header with a valid API token.
    Tokens can be created in the [dashboard](https://app.anysite.io/).


    ## Pricing


    Each endpoint has a credit cost listed in its description. Credits are
    deducted from your token balance per request.

  version: 0.0.1
servers: []
security:
  - AccessToken: []
paths:
  /api/nytimes/articles/search:
    post:
      tags:
        - /nytimes
      summary: /nytimes/articles/search
      description: >-
        Search everything The New York Times has published since 1851 — news and
        opinion articles, videos, interactives, slideshows, audio, recipes, The
        Athletic and Wirecutter pieces, paid posts and card decks. Filter by
        kind of item, section, publication day range and language edition, and
        order by relevance, newest or oldest. Each result carries headline,
        summary, kicker, authors, section, topic tags, lead image and
        publication times.


        **Price:** 1 credit
      operationId: __api_nytimes_articles_search_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NytimesArticlesSearchPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NytimesAsset'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    NytimesArticlesSearchPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        keyword:
          type: string
          default: ''
        count:
          type: integer
          maximum: 1100
          minimum: 1
        types:
          items:
            $ref: '#/components/schemas/NytimesDocumentType'
          type: array
          default:
            - article
            - athleticarticle
            - audio
            - carddeck
            - interactive
            - legacycollection
            - paidpost
            - recipe
            - slideshow
            - video
            - wirecutterarticle
        sort:
          $ref: '#/components/schemas/NytimesSearchSort'
          default: best
        language:
          $ref: '#/components/schemas/NytimesLanguage'
          default: en
        section:
          anyOf:
            - $ref: '#/components/schemas/NytimesSection'
            - type: 'null'
        start_date:
          anyOf:
            - type: string
            - type: 'null'
        end_date:
          anyOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - count
    NytimesAsset:
      properties:
        '@type':
          type: string
          default: NytimesAsset
        uri:
          type: string
        asset_type:
          type: string
        document_type:
          anyOf:
            - type: string
            - type: 'null'
        web_url:
          anyOf:
            - type: string
            - type: 'null'
        alias:
          anyOf:
            - type: string
            - type: 'null'
        document_title:
          type: string
        seo_title:
          anyOf:
            - type: string
            - type: 'null'
        sub_headline:
          anyOf:
            - type: string
            - type: 'null'
        kicker:
          anyOf:
            - type: string
            - type: 'null'
        summary:
          anyOf:
            - type: string
            - type: 'null'
        promotional_headline:
          anyOf:
            - type: string
            - type: 'null'
        promotional_summary:
          anyOf:
            - type: string
            - type: 'null'
        published_at:
          anyOf:
            - type: integer
            - type: 'null'
        updated_at:
          anyOf:
            - type: integer
            - type: 'null'
        word_count:
          anyOf:
            - type: integer
            - type: 'null'
        tone:
          anyOf:
            - type: string
            - type: 'null'
        desk:
          anyOf:
            - type: string
            - type: 'null'
        language:
          anyOf:
            - type: string
            - type: 'null'
        section:
          anyOf:
            - $ref: '#/components/schemas/NytimesSectionRef'
            - type: 'null'
        subsection:
          anyOf:
            - $ref: '#/components/schemas/NytimesSectionRef'
            - type: 'null'
        authors:
          items:
            $ref: '#/components/schemas/NytimesPersonRef'
          type: array
          default: []
        byline:
          anyOf:
            - type: string
            - type: 'null'
        image:
          anyOf:
            - $ref: '#/components/schemas/NytimesImage'
            - type: 'null'
        tags:
          items:
            $ref: '#/components/schemas/NytimesTag'
          type: array
          default: []
        related:
          items:
            $ref: '#/components/schemas/NytimesArticleReference'
          type: array
          default: []
        duration_seconds:
          anyOf:
            - type: integer
            - type: 'null'
      type: object
      required:
        - uri
        - asset_type
        - document_title
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    NytimesDocumentType:
      type: string
      enum:
        - article
        - athleticarticle
        - audio
        - carddeck
        - interactive
        - legacycollection
        - paidpost
        - recipe
        - slideshow
        - video
        - wirecutterarticle
    NytimesSearchSort:
      type: string
      enum:
        - best
        - newest
        - oldest
    NytimesLanguage:
      type: string
      enum:
        - en
        - es
        - zh
    NytimesSection:
      type: string
      enum:
        - archives
        - arts
        - automobiles
        - blogs
        - books
        - briefing
        - business
        - climate
        - crosswords
        - dining
        - education
        - fashion
        - garden
        - health
        - insider
        - learning
        - magazine
        - movies
        - nyregion
        - nytnow
        - obituaries
        - opinion
        - pageoneplus
        - podcasts
        - reader-center
        - realestate
        - science
        - smarter-living
        - sports
        - style
        - t-magazine
        - technology
        - theater
        - travel
        - upshot
        - us
        - weather
        - weekinreview
        - world
        - your-money
    NytimesSectionRef:
      properties:
        '@type':
          type: string
          default: NytimesSectionRef
        uri:
          anyOf:
            - type: string
            - type: 'null'
        name:
          type: string
        display_name:
          anyOf:
            - type: string
            - type: 'null'
        web_url:
          anyOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - name
    NytimesPersonRef:
      properties:
        '@type':
          type: string
          default: NytimesPersonRef
        uri:
          anyOf:
            - type: string
            - type: 'null'
        name:
          type: string
        alias:
          anyOf:
            - type: string
            - type: 'null'
        job_title:
          anyOf:
            - type: string
            - type: 'null'
        web_url:
          anyOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - name
    NytimesImage:
      properties:
        '@type':
          type: string
          default: NytimesImage
        uri:
          anyOf:
            - type: string
            - type: 'null'
        image:
          type: string
        width:
          anyOf:
            - type: integer
            - type: 'null'
        height:
          anyOf:
            - type: integer
            - type: 'null'
        caption:
          anyOf:
            - type: string
            - type: 'null'
        credit:
          anyOf:
            - type: string
            - type: 'null'
        alt_text:
          anyOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - image
    NytimesTag:
      properties:
        '@type':
          type: string
          default: NytimesTag
        uri:
          anyOf:
            - type: string
            - type: 'null'
        name:
          type: string
        tag_type:
          anyOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - name
    NytimesArticleReference:
      properties:
        '@type':
          type: string
          default: NytimesArticleReference
        uri:
          type: string
        asset_type:
          anyOf:
            - type: string
            - type: 'null'
        document_title:
          anyOf:
            - type: string
            - type: 'null'
        web_url:
          anyOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - uri
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````