Spaceflight News API Blogs API

Space blog post operations

OpenAPI Specification

spaceflight-news-api-blogs-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Spaceflight News Articles Blogs API
  description: The Spaceflight News API (SNAPI) is a free, open REST API aggregating space-related news, blogs, and reports from over 43 sources including NASA, SpaceX, Reuters, NASASpaceflight, and Spaceflight Now. It provides paginated access to articles, blogs, and reports, with integration to Launch Library 2 for linking content to specific launches and events. No authentication is required.
  version: 4.30.2
  contact:
    name: The Space Devs
    url: https://discord.gg/thespacedevs
  license:
    name: BSD 2-Clause
    url: https://opensource.org/licenses/BSD-2-Clause
servers:
- url: https://api.spaceflightnewsapi.net/v4
  description: Spaceflight News API v4 production server
tags:
- name: Blogs
  description: Space blog post operations
paths:
  /blogs/:
    get:
      operationId: listBlogs
      summary: List Blogs
      description: Returns a paginated list of spaceflight blog posts from various space news sources. Blog posts typically provide more in-depth coverage than news articles.
      tags:
      - Blogs
      parameters:
      - name: limit
        in: query
        description: Number of results to return per page (default 10, max 100)
        required: false
        schema:
          type: integer
          default: 10
          maximum: 100
      - name: offset
        in: query
        description: The initial index from which to return the results
        required: false
        schema:
          type: integer
          default: 0
      - name: search
        in: query
        description: Filter blogs by title or summary keywords
        required: false
        schema:
          type: string
      - name: news_site
        in: query
        description: Filter blogs by news site name
        required: false
        schema:
          type: string
      - name: ordering
        in: query
        description: Sort field. Prefix with - for descending order
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Successful response with paginated blog list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedBlogList'
  /blogs/{id}/:
    get:
      operationId: getBlog
      summary: Get Blog
      description: Returns a single blog post by its unique ID
      tags:
      - Blogs
      parameters:
      - name: id
        in: path
        description: Unique identifier of the blog post
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Successful response with blog post details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blog'
        '404':
          description: Blog post not found
components:
  schemas:
    LaunchRef:
      type: object
      description: Reference to a Launch Library 2 launch linked to a news item
      properties:
        launch_id:
          type: string
          format: uuid
          description: Unique Launch Library 2 launch UUID
        provider:
          type: string
          description: Launch service provider name
    Blog:
      type: object
      description: A spaceflight blog post providing in-depth coverage of space topics
      properties:
        id:
          type: integer
          description: Unique identifier for the blog post
        title:
          type: string
          description: Title of the blog post
        authors:
          type: array
          description: List of authors who contributed to this blog post
          items:
            $ref: '#/components/schemas/Author'
        url:
          type: string
          format: uri
          description: Link to the full blog post
        image_url:
          type: string
          format: uri
          description: URL of the featured image
        news_site:
          type: string
          description: Name of the publishing organization or blog
        summary:
          type: string
          description: Brief summary or excerpt of the blog post
        published_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of when the post was published
        updated_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of the last update
        featured:
          type: boolean
          description: Whether this blog post is featured
        launches:
          type: array
          description: Related Launch Library 2 launches
          items:
            $ref: '#/components/schemas/LaunchRef'
        events:
          type: array
          description: Related Launch Library 2 events
          items:
            $ref: '#/components/schemas/EventRef'
    EventRef:
      type: object
      description: Reference to a Launch Library 2 event linked to a news item
      properties:
        event_id:
          type: integer
          description: Unique Launch Library 2 event ID
        provider:
          type: string
          description: Event provider name
    PaginatedBlogList:
      type: object
      description: Paginated list of spaceflight blog posts
      properties:
        count:
          type: integer
          description: Total number of blogs available
        next:
          type: string
          format: uri
          nullable: true
          description: URL for the next page of results
        previous:
          type: string
          format: uri
          nullable: true
          description: URL for the previous page of results
        results:
          type: array
          items:
            $ref: '#/components/schemas/Blog'
    Author:
      type: object
      description: An author who contributed to an article, blog, or report
      properties:
        name:
          type: string
          description: Full name of the author
          example: Sarah Johnson
        socials:
          type: object
          description: Social media links for the author
          additionalProperties:
            type: string
externalDocs:
  description: Official Spaceflight News API Documentation
  url: https://api.spaceflightnewsapi.net/v4/docs/