Stellar Sage

Stellar Sage · Acciones GPT

Spaceflight News API

The Spaceflight News API (SNAPI) is a product by [The Space Devs](https://thespacedevs.com) (TSD). It's the most complete and up-to-date spaceflight news API currently available. While this API is **free to use**, we do encourage developers to support us through [Patreon](https://www.patreon.com/TheSpaceDevs) to keep the API up and running. ### FAQs & Tutorials - [GitHub repository](https://github.com/TheSpaceDevs/Tutorials/): contains FAQs and tutorials for TSD APIs - [TSD FAQ](https://github.com/TheSpaceDevs/Tutorials/blob/main/faqs/faq_TSD.md): TSD-specific FAQ (e.g. history, network, funding, etc.) - [SNAPI FAQ](https://github.com/TheSpaceDevs/Tutorials/blob/main/faqs/faq_SNAPI.md): SNAPI-specific FAQ ### Feedback & Support If you need any help with SNAPI, you can ask in the [`💬feedback-and-help`](https://discord.com/channels/676725644444565514/1019976345884827750) forum of the TSD [Discord server](https://discord.gg/p7ntkNA) or email [derk@spaceflightnewsapi.net](mailto:derk@spaceflightnewsapi.net).

  • GET /v4/articles/articles_list
  • GET /v4/articles/{id}/articles_retrieve
  • GET /v4/blogs/blogs_list
  • GET /v4/blogs/{id}/blogs_retrieve
  • GET /v4/info/info_retrieve
  • GET /v4/reports/reports_list
  • GET /v4/reports/{id}/reports_retrieve
Esquema original API
{
  "openapi": "3.0.3",
  "info": {
    "title": "Spaceflight News API",
    "version": "v4.0.12 (v4)",
    "description": "The Spaceflight News API (SNAPI) is a product by [The Space Devs](https://thespacedevs.com) (TSD). It's the most complete and up-to-date spaceflight news API currently available.\n\nWhile this API is **free to use**, we do encourage developers to support us through [Patreon](https://www.patreon.com/TheSpaceDevs) to keep the API up and running.\n\n ### FAQs & Tutorials\n\n - [GitHub repository](https://github.com/TheSpaceDevs/Tutorials/): contains FAQs and tutorials for TSD APIs\n\n - [TSD FAQ](https://github.com/TheSpaceDevs/Tutorials/blob/main/faqs/faq_TSD.md): TSD-specific FAQ (e.g. history, network, funding, etc.)\n\n - [SNAPI FAQ](https://github.com/TheSpaceDevs/Tutorials/blob/main/faqs/faq_SNAPI.md): SNAPI-specific FAQ\n\n ### Feedback & Support\n\n If you need any help with SNAPI, you can ask in the [`💬feedback-and-help`](https://discord.com/channels/676725644444565514/1019976345884827750) forum of the TSD [Discord server](https://discord.gg/p7ntkNA) or email [derk@spaceflightnewsapi.net](mailto:derk@spaceflightnewsapi.net)."
  },
  "paths": {
    "/v4/articles/": {
      "get": {
        "operationId": "articles_list",
        "parameters": [
          {
            "in": "query",
            "name": "event",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "description": "Search for all documents related to a specific event using its Launch Library 2 ID.",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "has_event",
            "schema": {
              "type": "boolean"
            },
            "description": "Get all documents that have a related event."
          },
          {
            "in": "query",
            "name": "has_launch",
            "schema": {
              "type": "boolean"
            },
            "description": "Get all documents that have a related launch."
          },
          {
            "in": "query",
            "name": "launch",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Search for all documents related to a specific launch using its Launch Library 2 ID.",
            "explode": false,
            "style": "form"
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "news_site",
            "schema": {
              "type": "string"
            },
            "description": "Search for documents with a news_site__name present in a list of comma-separated values. Case insensitive."
          },
          {
            "in": "query",
            "name": "news_site_exclude",
            "schema": {
              "type": "string"
            },
            "description": "Search for documents with a news_site__name not present in a list of comma-separated values. Case insensitive."
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "ordering",
            "required": false,
            "in": "query",
            "description": "Which field to use when ordering the results.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "published_at_gt",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents published after a given ISO8601 timestamp (excluded)."
          },
          {
            "in": "query",
            "name": "published_at_gte",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents published after a given ISO8601 timestamp (included)."
          },
          {
            "in": "query",
            "name": "published_at_lt",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents published before a given ISO8601 timestamp (excluded)."
          },
          {
            "in": "query",
            "name": "published_at_lte",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents published before a given ISO8601 timestamp (included)."
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Search for documents with a specific phrase in the title or summary.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "summary_contains",
            "schema": {
              "type": "string"
            },
            "description": "Search for all documents with a specific phrase in the summary."
          },
          {
            "in": "query",
            "name": "summary_contains_all",
            "schema": {
              "type": "string"
            },
            "description": "Search for documents with a summary containing all keywords from comma-separated values."
          },
          {
            "in": "query",
            "name": "summary_contains_one",
            "schema": {
              "type": "string"
            },
            "description": "Search for documents with a summary containing at least one keyword from comma-separated values."
          },
          {
            "in": "query",
            "name": "title_contains",
            "schema": {
              "type": "string"
            },
            "description": "Search for all documents with a specific phrase in the title."
          },
          {
            "in": "query",
            "name": "title_contains_all",
            "schema": {
              "type": "string"
            },
            "description": "Search for documents with a title containing all keywords from comma-separated values."
          },
          {
            "in": "query",
            "name": "title_contains_one",
            "schema": {
              "type": "string"
            },
            "description": "Search for documents with a title containing at least one keyword from comma-separated values."
          },
          {
            "in": "query",
            "name": "updated_at_gt",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents updated after a given ISO8601 timestamp (excluded)."
          },
          {
            "in": "query",
            "name": "updated_at_gte",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents updated after a given ISO8601 timestamp (included)."
          },
          {
            "in": "query",
            "name": "updated_at_lt",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents updated before a given ISO8601 timestamp (excluded)."
          },
          {
            "in": "query",
            "name": "updated_at_lte",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents updated before a given ISO8601 timestamp (included)."
          }
        ],
        "tags": [
          "articles"
        ],
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedArticleList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/v4/articles/{id}/": {
      "get": {
        "operationId": "articles_retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this article.",
            "required": true
          }
        ],
        "tags": [
          "articles"
        ],
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Article"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/v4/blogs/": {
      "get": {
        "operationId": "blogs_list",
        "parameters": [
          {
            "in": "query",
            "name": "event",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "description": "Search for all documents related to a specific event using its Launch Library 2 ID.",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "has_event",
            "schema": {
              "type": "boolean"
            },
            "description": "Get all documents that have a related event."
          },
          {
            "in": "query",
            "name": "has_launch",
            "schema": {
              "type": "boolean"
            },
            "description": "Get all documents that have a related launch."
          },
          {
            "in": "query",
            "name": "launch",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Search for all documents related to a specific launch using its Launch Library 2 ID.",
            "explode": false,
            "style": "form"
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "news_site",
            "schema": {
              "type": "string"
            },
            "description": "Search for documents with a news_site__name present in a list of comma-separated values. Case insensitive."
          },
          {
            "in": "query",
            "name": "news_site_exclude",
            "schema": {
              "type": "string"
            },
            "description": "Search for documents with a news_site__name not present in a list of comma-separated values. Case insensitive."
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "ordering",
            "required": false,
            "in": "query",
            "description": "Which field to use when ordering the results.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "published_at_gt",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents published after a given ISO8601 timestamp (excluded)."
          },
          {
            "in": "query",
            "name": "published_at_gte",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents published after a given ISO8601 timestamp (included)."
          },
          {
            "in": "query",
            "name": "published_at_lt",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents published before a given ISO8601 timestamp (excluded)."
          },
          {
            "in": "query",
            "name": "published_at_lte",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents published before a given ISO8601 timestamp (included)."
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Search for documents with a specific phrase in the title or summary.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "summary_contains",
            "schema": {
              "type": "string"
            },
            "description": "Search for all documents with a specific phrase in the summary."
          },
          {
            "in": "query",
            "name": "summary_contains_all",
            "schema": {
              "type": "string"
            },
            "description": "Search for documents with a summary containing all keywords from comma-separated values."
          },
          {
            "in": "query",
            "name": "summary_contains_one",
            "schema": {
              "type": "string"
            },
            "description": "Search for documents with a summary containing at least one keyword from comma-separated values."
          },
          {
            "in": "query",
            "name": "title_contains",
            "schema": {
              "type": "string"
            },
            "description": "Search for all documents with a specific phrase in the title."
          },
          {
            "in": "query",
            "name": "title_contains_all",
            "schema": {
              "type": "string"
            },
            "description": "Search for documents with a title containing all keywords from comma-separated values."
          },
          {
            "in": "query",
            "name": "title_contains_one",
            "schema": {
              "type": "string"
            },
            "description": "Search for documents with a title containing at least one keyword from comma-separated values."
          },
          {
            "in": "query",
            "name": "updated_at_gt",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents updated after a given ISO8601 timestamp (excluded)."
          },
          {
            "in": "query",
            "name": "updated_at_gte",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents updated after a given ISO8601 timestamp (included)."
          },
          {
            "in": "query",
            "name": "updated_at_lt",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents updated before a given ISO8601 timestamp (excluded)."
          },
          {
            "in": "query",
            "name": "updated_at_lte",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents updated before a given ISO8601 timestamp (included)."
          }
        ],
        "tags": [
          "blogs"
        ],
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedBlogList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/v4/blogs/{id}/": {
      "get": {
        "operationId": "blogs_retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this blog.",
            "required": true
          }
        ],
        "tags": [
          "blogs"
        ],
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Blog"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/v4/info/": {
      "get": {
        "operationId": "info_retrieve",
        "tags": [
          "info"
        ],
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Info"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/v4/reports/": {
      "get": {
        "operationId": "reports_list",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "news_site",
            "schema": {
              "type": "string"
            },
            "description": "Search for documents with a news_site__name present in a list of comma-separated values. Case insensitive."
          },
          {
            "in": "query",
            "name": "news_site_exclude",
            "schema": {
              "type": "string"
            },
            "description": "Search for documents with a news_site__name not present in a list of comma-separated values. Case insensitive."
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "ordering",
            "required": false,
            "in": "query",
            "description": "Which field to use when ordering the results.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "published_at_gt",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents published after a given ISO8601 timestamp (excluded)."
          },
          {
            "in": "query",
            "name": "published_at_gte",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents published after a given ISO8601 timestamp (included)."
          },
          {
            "in": "query",
            "name": "published_at_lt",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents published before a given ISO8601 timestamp (excluded)."
          },
          {
            "in": "query",
            "name": "published_at_lte",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents published before a given ISO8601 timestamp (included)."
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Search for documents with a specific phrase in the title or summary.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "summary_contains",
            "schema": {
              "type": "string"
            },
            "description": "Search for all documents with a specific phrase in the summary."
          },
          {
            "in": "query",
            "name": "summary_contains_all",
            "schema": {
              "type": "string"
            },
            "description": "Search for documents with a summary containing all keywords from comma-separated values."
          },
          {
            "in": "query",
            "name": "summary_contains_one",
            "schema": {
              "type": "string"
            },
            "description": "Search for documents with a summary containing at least one keyword from comma-separated values."
          },
          {
            "in": "query",
            "name": "title_contains",
            "schema": {
              "type": "string"
            },
            "description": "Search for all documents with a specific phrase in the title."
          },
          {
            "in": "query",
            "name": "title_contains_all",
            "schema": {
              "type": "string"
            },
            "description": "Search for documents with a title containing all keywords from comma-separated values."
          },
          {
            "in": "query",
            "name": "title_contains_one",
            "schema": {
              "type": "string"
            },
            "description": "Search for documents with a title containing at least one keyword from comma-separated values."
          },
          {
            "in": "query",
            "name": "updated_at_gt",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents updated after a given ISO8601 timestamp (excluded)."
          },
          {
            "in": "query",
            "name": "updated_at_gte",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents updated after a given ISO8601 timestamp (included)."
          },
          {
            "in": "query",
            "name": "updated_at_lt",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents updated before a given ISO8601 timestamp (excluded)."
          },
          {
            "in": "query",
            "name": "updated_at_lte",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Get all documents updated before a given ISO8601 timestamp (included)."
          }
        ],
        "tags": [
          "reports"
        ],
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedReportList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/v4/reports/{id}/": {
      "get": {
        "operationId": "reports_retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this report.",
            "required": true
          }
        ],
        "tags": [
          "reports"
        ],
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Report"
                }
              }
            },
            "description": ""
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Article": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "title": {
            "type": "string",
            "maxLength": 250
          },
          "url": {
            "type": "string",
            "format": "uri",
            "maxLength": 200
          },
          "image_url": {
            "type": "string",
            "format": "uri",
            "maxLength": 500
          },
          "news_site": {
            "type": "string",
            "readOnly": true
          },
          "summary": {
            "type": "string"
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "featured": {
            "type": "boolean"
          },
          "launches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Launch"
            }
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            }
          }
        },
        "required": [
          "events",
          "id",
          "image_url",
          "launches",
          "news_site",
          "published_at",
          "summary",
          "title",
          "updated_at",
          "url"
        ]
      },
      "Blog": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "title": {
            "type": "string",
            "maxLength": 250
          },
          "url": {
            "type": "string",
            "format": "uri",
            "maxLength": 200
          },
          "image_url": {
            "type": "string",
            "format": "uri",
            "maxLength": 500
          },
          "news_site": {
            "type": "string",
            "readOnly": true
          },
          "summary": {
            "type": "string"
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "featured": {
            "type": "boolean"
          },
          "launches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Launch"
            }
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            }
          }
        },
        "required": [
          "events",
          "id",
          "image_url",
          "launches",
          "news_site",
          "published_at",
          "summary",
          "title",
          "updated_at",
          "url"
        ]
      },
      "Event": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "provider": {
            "type": "string",
            "readOnly": true
          }
        },
        "required": [
          "event_id",
          "provider"
        ]
      },
      "Info": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "news_sites": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "news_sites",
          "version"
        ]
      },
      "Launch": {
        "type": "object",
        "properties": {
          "launch_id": {
            "type": "string",
            "format": "uuid"
          },
          "provider": {
            "type": "string",
            "readOnly": true
          }
        },
        "required": [
          "launch_id",
          "provider"
        ]
      },
      "PaginatedArticleList": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=400&limit=100"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=200&limit=100"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Article"
            }
          }
        }
      },
      "PaginatedBlogList": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=400&limit=100"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=200&limit=100"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Blog"
            }
          }
        }
      },
      "PaginatedReportList": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=400&limit=100"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=200&limit=100"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Report"
            }
          }
        }
      },
      "Report": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "title": {
            "type": "string",
            "maxLength": 250
          },
          "url": {
            "type": "string",
            "format": "uri",
            "maxLength": 200
          },
          "image_url": {
            "type": "string",
            "format": "uri",
            "maxLength": 200
          },
          "news_site": {
            "type": "string",
            "readOnly": true
          },
          "summary": {
            "type": "string"
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "image_url",
          "news_site",
          "published_at",
          "title",
          "updated_at",
          "url"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.spaceflightnewsapi.net",
      "variables": {}
    }
  ]
}

NASA API Services

API for accessing various NASA services including Near Earth Objects and Astronomy Picture of the Day.

  • GET /neo/rest/v1/feedRetrieve a list of Near Earth Objects
  • GET /planetary/apodGet Astronomy Picture of the Day

    Retrieve the astronomy picture of the day for a given date.

Esquema original API
{
  "openapi": "3.0.0",
  "info": {
    "title": "NASA API Services",
    "version": "1.0.0",
    "description": "API for accessing various NASA services including Near Earth Objects and Astronomy Picture of the Day."
  },
  "servers": [
    {
      "url": "https://api.nasa.gov"
    }
  ],
  "paths": {
    "/neo/rest/v1/feed": {
      "get": {
        "summary": "Retrieve a list of Near Earth Objects",
        "operationId": "getNearEarthObjects",
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Start date for NEO search"
          },
          {
            "name": "end_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "End date for NEO search"
          },
          {
            "name": "api_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "API key for access"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NEOFeed"
                }
              }
            }
          }
        }
      }
    },
    "/planetary/apod": {
      "get": {
        "operationId": "getAstronomyPictureOfTheDay",
        "summary": "Get Astronomy Picture of the Day",
        "description": "Retrieve the astronomy picture of the day for a given date.",
        "parameters": [
          {
            "name": "api_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "API key for access to the service."
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "The date of the astronomy picture to retrieve."
          },
          {
            "name": "hd",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Boolean flag indicating whether to retrieve the HD image."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApodResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request."
          },
          "401": {
            "description": "Unauthorized. API key is missing or invalid."
          },
          "404": {
            "description": "Not found."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "NEOFeed": {
        "type": "object",
        "properties": {
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "element_count": {
            "type": "integer",
            "description": "Number of NEOs identified in the given date range."
          },
          "near_earth_objects": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/NEO"
              }
            }
          }
        }
      },
      "NEO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the NEO."
          },
          "name": {
            "type": "string",
            "description": "Name of the NEO."
          },
          "nasa_jpl_url": {
            "type": "string",
            "format": "uri",
            "description": "Link to the NASA JPL page with detailed NEO information."
          },
          "absolute_magnitude_h": {
            "type": "number",
            "description": "Absolute magnitude of the NEO."
          },
          "estimated_diameter": {
            "$ref": "#/components/schemas/EstimatedDiameter"
          },
          "is_potentially_hazardous_asteroid": {
            "type": "boolean",
            "description": "Indicates if the NEO is potentially hazardous."
          }
        }
      },
      "EstimatedDiameter": {
        "type": "object",
        "properties": {
          "kilometers": {
            "$ref": "#/components/schemas/DiameterRange"
          },
          "meters": {
            "$ref": "#/components/schemas/DiameterRange"
          },
          "miles": {
            "$ref": "#/components/schemas/DiameterRange"
          },
          "feet": {
            "$ref": "#/components/schemas/DiameterRange"
          }
        }
      },
      "DiameterRange": {
        "type": "object",
        "properties": {
          "estimated_diameter_min": {
            "type": "number",
            "description": "Minimum estimated diameter."
          },
          "estimated_diameter_max": {
            "type": "number",
            "description": "Maximum estimated diameter."
          }
        }
      },
      "Links": {
        "type": "object",
        "properties": {
          "self": {
            "type": "string",
            "format": "uri",
            "description": "URL to the current resource."
          },
          "next": {
            "type": "string",
            "format": "uri",
            "description": "URL to the next set of resources."
          },
          "prev": {
            "type": "string",
            "format": "uri",
            "description": "URL to the previous set of resources."
          }
        }
      },
      "ApodResponse": {
        "type": "object",
        "required": [
          "date",
          "explanation",
          "media_type",
          "service_version",
          "title",
          "url"
        ],
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "description": "Date of the picture."
          },
          "explanation": {
            "type": "string",
            "description": "Explanation of the picture."
          },
          "media_type": {
            "type": "string",
            "description": "Type of media (e.g., image, video)."
          },
          "service_version": {
            "type": "string",
            "description": "Version of the service."
          },
          "title": {
            "type": "string",
            "description": "Title of the picture."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "URL of the picture."
          },
          "hdurl": {
            "type": "string",
            "format": "uri",
            "description": "URL of the high-definition picture."
          }
        }
      }
    }
  }
}

NASA Images API

  • GET /searchSearch for images

    Retrieve images based on query parameters

  • GET /asset/{asset_id}Retrieve asset details

    Retrieve details of an asset based on its ID

Esquema original API
{
  "openapi": "3.0.0",
  "info": {
    "title": "NASA Images API",
    "version": 1
  },
  "servers": [
    {
      "url": "https://images-api.nasa.gov"
    }
  ],
  "paths": {
    "/search": {
      "get": {
        "operationId": "searchImages",
        "summary": "Search for images",
        "description": "Retrieve images based on query parameters",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Query string, e.g., 'apollo 11'"
          },
          {
            "in": "query",
            "name": "description",
            "schema": {
              "type": "string"
            },
            "description": "Description of the image"
          },
          {
            "in": "query",
            "name": "media_type",
            "schema": {
              "type": "string"
            },
            "description": "Type of media, e.g., 'image'"
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageCollectionResponse"
                }
              }
            }
          }
        }
      }
    },
    "/asset/{asset_id}": {
      "get": {
        "operationId": "getAssetById",
        "summary": "Retrieve asset details",
        "description": "Retrieve details of an asset based on its ID",
        "parameters": [
          {
            "in": "path",
            "name": "asset_id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The ID of the asset"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetResponse"
                }
              }
            }
          },
          "404": {
            "description": "Asset not found"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ImageCollectionResponse": {
        "type": "object",
        "properties": {
          "collection": {
            "$ref": "#/components/schemas/Collection"
          }
        }
      },
      "Collection": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string",
            "format": "uri"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Item"
            }
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Link"
            }
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "version": {
            "type": "string"
          }
        }
      },
      "Item": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Data"
            }
          },
          "href": {
            "type": "string",
            "format": "uri"
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Link"
            }
          }
        }
      },
      "Data": {
        "type": "object",
        "properties": {
          "center": {
            "type": "string"
          },
          "date_created": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string"
          },
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "media_type": {
            "type": "string"
          },
          "nasa_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        }
      },
      "Link": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string",
            "format": "uri"
          },
          "rel": {
            "type": "string"
          },
          "render": {
            "type": "string"
          }
        }
      },
      "Metadata": {
        "type": "object",
        "properties": {
          "total_hits": {
            "type": "integer"
          }
        }
      },
      "AssetResponse": {
        "type": "object",
        "properties": {
          "collection": {
            "$ref": "#/components/schemas/AssetCollection"
          }
        }
      },
      "AssetCollection": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string",
            "format": "uri"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssetItem"
            }
          },
          "version": {
            "type": "string"
          }
        }
      },
      "AssetItem": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    }
  }
}