Mashable Articles API

Search across all indexed articles.

OpenAPI Specification

mashable-articles-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Mashable via News Articles API
  summary: Access Mashable headlines and articles through the News API REST service.
  description: Mashable content is accessible via the News API, a third-party REST API that provides live headlines, articles, images, and metadata from Mashable and over 150,000 other worldwide news sources. Use the source identifier "mashable" or domain "mashable.com" to retrieve content published by Mashable.
  version: '2'
  contact:
    name: News API
    url: https://newsapi.org/
servers:
- url: https://newsapi.org/v2
  description: News API production endpoint
security:
- apiKeyAuth: []
tags:
- name: Articles
  description: Search across all indexed articles.
paths:
  /everything:
    get:
      tags:
      - Articles
      summary: Search Mashable articles
      description: Searches across all indexed articles. Limit results to Mashable by passing sources=mashable or domains=mashable.com. An API key is required.
      operationId: searchMashableArticles
      parameters:
      - name: sources
        in: query
        description: Pass "mashable" to scope to Mashable's News API source.
        schema:
          type: string
          default: mashable
      - name: domains
        in: query
        description: Pass "mashable.com" to scope to Mashable's domain.
        schema:
          type: string
      - name: q
        in: query
        description: Keywords or phrase to search.
        schema:
          type: string
      - name: from
        in: query
        schema:
          type: string
          format: date
      - name: to
        in: query
        schema:
          type: string
          format: date
      - name: language
        in: query
        schema:
          type: string
          default: en
      - name: sortBy
        in: query
        schema:
          type: string
          enum:
          - relevancy
          - popularity
          - publishedAt
          default: publishedAt
      - name: pageSize
        in: query
        schema:
          type: integer
          default: 20
          maximum: 100
      - name: page
        in: query
        schema:
          type: integer
          default: 1
      responses:
        '200':
          description: Article search response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArticlesResponse'
components:
  schemas:
    ArticlesResponse:
      type: object
      properties:
        status:
          type: string
        totalResults:
          type: integer
        articles:
          type: array
          items:
            $ref: '#/components/schemas/Article'
    Article:
      type: object
      properties:
        source:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
        author:
          type: string
          nullable: true
        title:
          type: string
        description:
          type: string
          nullable: true
        url:
          type: string
          format: uri
        urlToImage:
          type: string
          format: uri
          nullable: true
        publishedAt:
          type: string
          format: date-time
        content:
          type: string
          nullable: true
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: News API key. May also be passed via apiKey query parameter.