NASA API Reference

    by Khristian Kopachelli

    1

    Implementation guide for NASA's APOD and Near Earth Object (NEO) API endpoints with caching and query patterns.

    $9

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    NASA API Reference

    Example session with this skill installed

    I need to fetch the last 3 days of Near Earth Object data. Give me the correct endpoint and curl command for this.

    • Read your context and instructions
    • Compiled the nasa api reference

    I have retrieved the endpoint details and query patterns for the NASA NEO feed. For a 3-day range, you should use the feed endpoint with specific start and end dates.

    NASA NEO Feed Implementation

    To fetch asteroid data for a specific date range, use the following request structure. Ensure your date range does not exceed 7 days to avoid API rejection.

    Endpoint: GET https://api.nasa.gov/neo/rest/v1/feed

    Curl Command:

    curl "https://api.nasa.gov/neo/rest/v1/feed?start_date=2023-10-01&end_date=2023-10-03&api_key=YOUR_API_KEY"
    
    ParameterTypeDescription
    start_dateYYYY-MM-DDStarting date for asteroid search
    end_dateYYYY-MM-DDEnding date for asteroid search
    api_keystringYour NASA API key (or DEMO_KEY)

    Implementation Notes:

    • Caching: This endpoint has an upstream cache TTL of approximately 60 minutes. Do not re-fetch more frequently.
    • Handling Empty Sets: If no asteroids are near Earth during this window, the API returns an empty array. Check the array length before processing to avoid errors.
    • Rate Limiting: If using DEMO_KEY, you are limited to 30 requests per hour. Use a personal API key for production workloads.

    Next steps

    1. Replace YOUR_API_KEY with a valid key from api.nasa.gov.
    2. Implement a 60-minute local cache to respect the upstream TTL.
    3. Add a check to differentiate between a 429 Rate Limit error and a valid empty data response.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Integrating NASA's public data into your application often involves navigating inconsistent parameter requirements and aggressive rate limits. This skill provides a precise reference for consuming Astronomy Picture of the Day (APOD) and Near Earth Object (NEO) data without the trial and error of manual documentation searches.

    What it does

    • Endpoint selection helps you identify the correct path for APOD images or asteroid tracking data.
    • Parameter mapping defines required inputs like date ranges and API keys for every request.
    • Query optimization provides patterns for filtering selective parameters to avoid timeouts.
    • Cache management offers TTL hints to reduce redundant API calls and stay within rate limits.
    • Error handling distinguishes between valid empty sets and API errors to prevent broken retry loops.

    How it works

    1. Identify the data requirement, such as daily astronomy media or near-earth asteroid tracking.
    2. Select the corresponding endpoint from the reference list: apod, feed, or browse.
    3. Apply query patterns like narrow-to-wide filtering to ensure the request succeeds.
    4. Implement the suggested 60-minute caching logic to manage public rate limits.

    Frameworks & tools

    This skill interfaces with the api.nasa.gov public endpoints. It is protocol-agnostic, supporting any stack capable of making HTTPS GET requests via curl, fetch, or standard HTTP libraries.

    Why this beats prompting it yourself

    Generic LLMs often hallucinate endpoint paths or mix up required parameters for NASA's various API versions. This skill provides a verified field guide that includes specific upstream TTL hints and anti-patterns that prevent your API key from being throttled.

    Use cases

    • Build a Slack bot that posts the Astronomy Picture of the Day every morning.
    • Create a dashboard for tracking asteroids with close approach dates.
    • Populate a space-themed educational app with paginated NEO discovery data.
    • Automate data collection for astronomy research using narrow-to-wide filtering.

    Known limitations

    Coverage is restricted to what the upstream public API exposes. Responses are in the native NASA format and require manual normalization before use.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 5 days ago

    Permissions

    Terminal / Shell
    Network Access
    Listed5 days ago

    What's inside

    Frequently Asked Questions

    The skill provides a verified integration framework for NASA's APOD and NEO endpoints, offering specific query patterns and cache management strategies to prevent the common rate-limiting and parameter errors found in manual implementations.

    Yes, the skill is protocol-agnostic and works with any AI agent or development stack capable of making HTTPS GET requests, including custom bots, LangChain agents, or standard web applications.

    You receive a comprehensive implementation guide featuring endpoint mappings, optimized query patterns for filtering asteroid data, and TTL (Time-to-Live) hints for efficient cache management.

    While this skill focuses on the most popular APOD and NEO (Near Earth Object) endpoints, the query optimization and error-handling patterns provided are designed to be adaptable for other NASA public data sets.

    No specialized tools are required; as long as your environment supports standard HTTP libraries or curl, you can implement the patterns and logic provided in this skill.

    New in APIs & Backend

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.