# NASA Media Library Compare Queries

> NASA Media Library Compare Queries is a paid API for AI agents from nasa-media.x402tookit.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-11-02).

Compares two search queries against NASA's media library, returning total hit counts and breakdowns by media type (image, video, audio) with the ratio between them.

## Facts

- Endpoint: GET https://nasa-media.x402tookit.com/nasa-media-compare?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nasa-media-library-compare-queries-9d9dc55d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7XT27IF7vjdo-SvpzvpI5

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability nasa-media-library-compare-queries-9d9dc55d
```

Example prompt: Compare 'Apollo' and 'Artemis' in NASA's media library — I want to see the total hit counts for each, broken down by images, videos, and audio, and the ratio between them.

## When to prefer this

Use this endpoint when you need a side-by-side quantitative comparison of two topics in NASA's media library rather than a raw search. It's ideal when you want to understand relative media coverage, popularity, or content volume between two subjects without manually running two searches and doing the math yourself.

## Known failure modes

- Missing required q1 or q2 parameters returns an error
- Query strings exceeding 100 characters may be rejected
- NASA API upstream unavailability may return degraded or null results
- Invalid media_type value (not image, video, or audio) may be ignored or error
- Rate limiting from the underlying NASA API may cause timeouts

## How this service works

Compare two queries in NASA's library: total hits and hits per media type (image, video, audio) with the ratio.

## Output

Returns a JSON object with both query strings, their total hit counts, per-media-type counts (image, video, audio), the ratio of q1 to q2, a natural language summary and verdict, a timestamp (asOf), source URL, and optional degraded/disclaimer flags if the data is partial.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "q1",
      "q2"
     ],
     "properties": {
      "q1": {
       "type": "string",
       "description": "First query, up to 100 characters"
      },
      "q2": {
       "type": "string",
       "description": "Second query, up to 100 characters"
      },
      "media_type": {
       "type": "string",
       "description": "Limit the comparison to image, video or audio; default all three"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "q1": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "query": {
         "type": [
          "null",
          "string"
         ]
        },
        "total": {
         "type": [
          "null",
          "number"
         ]
        },
        "byMediaType": {
         "type": [
          "null",
          "object"
         ],
         "properties": {
          "audio": {
           "type": [
            "null",
            "number"
           ]
          },
          "image": {
           "type": [
            "null",
            "number"
           ]
          },
          "video": {
           "type": [
            "null",
            "number"
           ]
          }
         }
        }
       }
      },
      "q2": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "query": {
         "type": [
          "null",
          "string"
         ]
        },
        "total": {
         "type": [
          "null",
          "number"
         ]
        },
        "byMediaType": {
         "type": [
          "null",
          "object"
         ],
         "properties": {
          "audio": {
           "type": [
            "null",
            "number"
           ]
          },
          "image": {
           "type": [
            "null",
            "number"
           ]
          },
     
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nasa-media-library-compare-queries-9d9dc55d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from nasa-media.x402tookit.com](https://www.zero.xyz/host/nasa-media.x402tookit.com/llms.txt)
