openapi: 3.2.0 info: title: 2s — the (most) everything Space API version: '1' summary: The (most) everything API. description: 'The (most) everything API for AI agents: 575+ pay-per-call endpoints on one origin.' contact: name: 2s url: https://2s.io email: alley@2s.io x-logo: url: https://2s.io/icon-512.png altText: 2s x-guidance: 'Pay-per-call REST API for AI agents — hundreds of endpoints returning ground-truth data (US public records, company & legal identifiers, finance/SEC, crypto/web3, security & CVEs, medical codes, weather & geocoding, agriculture, energy, maritime, music, and more). Every endpoint is paid per call in USDC via x402 (Base or Solana) — no API key, no signup. Call any endpoint with no auth to get a 402 PaymentRequirements envelope, sign it (EIP-3009 on Base, partial SPL transfer on Solana), and retry with the PAYMENT-SIGNATURE header. Add ?trial=1 for one free real call per endpoint per hour to test before paying. To discover the right endpoint: GET https://2s.io/api/directory for the full catalog, or GET https://2s.io/api/search/endpoints?q= for a ranked match. Per-call price is on each operation as x-payment-info (from $0.001). Batch up to 50 calls behind one payment via POST https://2s.io/api/batch/run.' servers: - url: https://2s.io tags: - name: Space paths: /api/space/body: get: tags: - Space summary: Look up any asteroid or comet in NASA JPL's Small-Body description: Look up any asteroid or comet in NASA JPL's Small-Body Database by designation, number, or name (e.g. "433", "Eros", "433 Eros", "1P/Halley", "2024 YR4"). Returns full name + kind + orbit class (e.g. Amor, Apollo, Jupiter-family comet), NEO and potentially-hazardous-asteroid flags, physical params (absolute magnitude H, diameter, extent, rotation period, albedo, density, spectral type), and orbital elements (eccentricity, semi-major axis, perihelion/aphelion, inclination, period, Earth MOID, observation arc). Astronomy, planetary-defense, and mission-planning research. Public-domain NASA/JPL data; for a body's near-Earth close approaches see /api/space/close-approaches. operationId: space_body deprecated: false security: - x402Payment: [] responses: '200': description: 'Normalized envelope: items = [{ body }] (one small-body: identity, NEO/PHA flags, orbit class, physical + orbital params); total = 1.' content: application/json: schema: type: object required: - data - meta properties: data: type: object properties: ok: type: boolean enum: - true items: type: array items: type: object properties: body: type: object properties: fullName: type: string nullable: true shortName: type: string nullable: true kind: type: string nullable: true neo: type: boolean nullable: true pha: type: boolean nullable: true orbitClass: type: object properties: code: type: string nullable: true name: type: string nullable: true required: - code - name additionalProperties: false nullable: true physical: type: object additionalProperties: {} orbit: type: object additionalProperties: {} required: - fullName - shortName - kind - neo - pha - orbitClass - physical - orbit additionalProperties: false required: - body additionalProperties: false total: type: integer nullable: true description: Total matching rows upstream; null when unknown. source: $ref: '#/components/schemas/Source' required: - ok - items - total - source additionalProperties: false meta: $ref: '#/components/schemas/CallMeta' '400': $ref: '#/components/responses/BadRequest' '402': $ref: '#/components/responses/PaymentRequired' '405': $ref: '#/components/responses/MethodNotAllowed' '500': $ref: '#/components/responses/ServerError' '502': $ref: '#/components/responses/UpstreamError' x-2s-id: space.body x-2s-version: null x-2s-price: usd: 0.0036 x-2s-accepts: - x402 x-2s-response-shape: normalized x-payment-info: price: mode: fixed currency: USD amount: '0.003600' protocols: - x402: {} parameters: - name: q in: query required: true description: Free-text search query. schema: type: string minLength: 1 maxLength: 60 - $ref: '#/components/parameters/TrialMode' /api/space/close-approaches: get: tags: - Space summary: List near-Earth asteroid/comet close approaches to Earth description: 'List near-Earth asteroid/comet close approaches to Earth within a date window and maximum distance, from NASA JPL''s Close-Approach Data API. Filter by dateMin / dateMax (YYYY-MM-DD) and distMaxAu (max approach distance in AU; default 0.05 AU ≈ 19.5 lunar distances). Each approach: object designation, close-approach date (UTC), nominal + minimum distance in AU and lunar distances, relative velocity (km/s), and absolute magnitude H (a size proxy). Sorted nearest-first. Planetary-defense, observation planning, and "what''s passing by this month" queries. Public-domain NASA/JPL data; for full physical/orbital params of a listed object see /api/space/body.' operationId: space_close-approaches deprecated: false security: - x402Payment: [] responses: '200': description: 'Normalized envelope: items = close approaches (object, date, distance in AU + lunar distances, relative velocity, H); total = upstream match count in the window (before the limit cap).' content: application/json: schema: type: object required: - data - meta properties: data: type: object properties: ok: type: boolean enum: - true items: type: array items: type: object properties: designation: type: string nullable: true date: type: string nullable: true julianDate: type: number nullable: true distanceAu: type: number nullable: true distanceMinAu: type: number nullable: true distanceLd: type: number nullable: true relativeVelocityKmS: type: number nullable: true absoluteMagnitudeH: type: number nullable: true required: - designation - date - julianDate - distanceAu - distanceMinAu - distanceLd - relativeVelocityKmS - absoluteMagnitudeH additionalProperties: false total: type: integer nullable: true description: Total matching rows upstream; null when unknown. source: $ref: '#/components/schemas/Source' required: - ok - items - total - source additionalProperties: false meta: $ref: '#/components/schemas/CallMeta' '400': $ref: '#/components/responses/BadRequest' '402': $ref: '#/components/responses/PaymentRequired' '405': $ref: '#/components/responses/MethodNotAllowed' '500': $ref: '#/components/responses/ServerError' '502': $ref: '#/components/responses/UpstreamError' x-2s-id: space.close-approaches x-2s-version: null x-2s-price: usd: 0.0036 x-2s-accepts: - x402 x-2s-response-shape: normalized x-payment-info: price: mode: fixed currency: USD amount: '0.003600' protocols: - x402: {} parameters: - name: dateMin in: query required: false description: Date min. schema: type: string pattern: ^\d{4}-\d{2}-\d{2}$ - name: dateMax in: query required: false description: Date max. schema: type: string pattern: ^\d{4}-\d{2}-\d{2}$ - name: distMaxAu in: query required: false description: Dist max au. schema: type: number minimum: 0.0001 maximum: 1 default: 0.05 - name: limit in: query required: false description: Maximum number of results to return. schema: type: integer minimum: 1 maximum: 200 default: 50 - $ref: '#/components/parameters/TrialMode' /api/space/exoplanet: get: tags: - Space summary: Search confirmed exoplanets in the NASA Exoplanet Archive description: 'Search confirmed exoplanets in the NASA Exoplanet Archive (~6,000, updated weekly — past any LLM training cutoff). Filter by name (planet, partial), hostStar (partial), discoveryYear, or method (e.g. "Transit", "Radial Velocity", "Microlensing"). Each planet: name, host star + how many stars/planets in the system, discovery method/year/facility, orbital period, semi-major axis, radius (Earth radii), mass (Earth masses), equilibrium temperature, insolation; host-star spectral type/temperature/radius/mass; distance in parsecs + light-years; and RA/dec. Astronomy, habitability research, science education. Public-domain NASA data.' operationId: space_exoplanet deprecated: false security: - x402Payment: [] responses: '200': description: 'Normalized envelope: items = matched confirmed exoplanets (name, host star, discovery, orbit, radius/mass, distance); total = null (the archive caps rows at limit with no true match total); meta.query echoes the filters.' content: application/json: schema: type: object required: - data - meta properties: data: type: object properties: ok: type: boolean enum: - true items: type: array items: type: object properties: name: type: string nullable: true description: Planet name (e.g. "Kepler-22 b"). hostStar: type: string nullable: true starsInSystem: type: number nullable: true planetsInSystem: type: number nullable: true discoveryMethod: type: string nullable: true discoveryYear: type: number nullable: true discoveryFacility: type: string nullable: true orbitalPeriodDays: type: number nullable: true semiMajorAxisAu: type: number nullable: true radiusEarth: type: number nullable: true description: Planet radius in Earth radii. massEarth: type: number nullable: true description: Planet mass in Earth masses. equilibriumTempK: type: number nullable: true insolationEarth: type: number nullable: true description: Insolation flux relative to Earth. star: type: object properties: spectralType: type: string nullable: true effectiveTempK: type: number nullable: true radiusSolar: type: number nullable: true massSolar: type: number nullable: true required: - spectralType - effectiveTempK - radiusSolar - massSolar additionalProperties: false description: Host-star properties. distanceParsecs: type: number nullable: true distanceLightYears: type: number nullable: true ra: type: number nullable: true description: Right ascension, degrees. dec: type: number nullable: true description: Declination, degrees. required: - name - hostStar - starsInSystem - planetsInSystem - discoveryMethod - discoveryYear - discoveryFacility - orbitalPeriodDays - semiMajorAxisAu - radiusEarth - massEarth - equilibriumTempK - insolationEarth - star - distanceParsecs - distanceLightYears - ra - dec additionalProperties: false total: type: integer nullable: true description: Total matching rows upstream; null when unknown. source: $ref: '#/components/schemas/Source' meta: type: object properties: query: type: object properties: name: type: string nullable: true hostStar: type: string nullable: true discoveryYear: type: number nullable: true method: type: string nullable: true limit: type: number required: - name - hostStar - discoveryYear - method - limit additionalProperties: false required: - query additionalProperties: false required: - ok - items - total - source additionalProperties: false meta: $ref: '#/components/schemas/CallMeta' '400': $ref: '#/components/responses/BadRequest' '402': $ref: '#/components/responses/PaymentRequired' '405': $ref: '#/components/responses/MethodNotAllowed' '500': $ref: '#/components/responses/ServerError' '502': $ref: '#/components/responses/UpstreamError' x-2s-id: space.exoplanet x-2s-version: null x-2s-price: usd: 0.0036 x-2s-accepts: - x402 x-2s-response-shape: normalized x-payment-info: price: mode: fixed currency: USD amount: '0.003600' protocols: - x402: {} parameters: - name: name in: query required: false description: Name to search for. schema: type: string minLength: 1 maxLength: 60 - name: hostStar in: query required: false description: Host star. schema: type: string minLength: 1 maxLength: 60 - name: discoveryYear in: query required: false description: Discovery year. schema: type: integer minimum: 1989 maximum: 2030 - name: method in: query required: false description: Method. schema: type: string minLength: 2 maxLength: 40 - name: limit in: query required: false description: Maximum number of results to return. schema: type: integer minimum: 1 maximum: 100 default: 20 - $ref: '#/components/parameters/TrialMode' /api/space/launches: get: tags: - Space summary: Upcoming or recent orbital rocket launches from The Space description: 'Upcoming or recent orbital rocket launches from The Space Devs'' Launch Library 2 — the live manifest behind most launch-tracking apps. `when`=upcoming (default) or previous. Optional `search` filters by rocket, provider, or mission text (e.g. "Starship", "SpaceX", "Artemis"). Each launch: name, status (Go/TBD/Success/Failure), NET launch time + window (UTC), launch provider, rocket configuration, pad + location, mission name/type/orbit/description, and whether a webcast is live. Real-time data agents can''t get from training. Public CC-BY data (attribute The Space Devs).' operationId: space_launches deprecated: false security: - x402Payment: [] responses: '200': description: 'Normalized envelope: items = launches (name, status, NET, provider, rocket, pad, mission); total = upstream match count (Launch Library `count`); meta.when echoes upcoming/previous.' content: application/json: schema: type: object required: - data - meta properties: data: type: object properties: ok: type: boolean enum: - true items: type: array items: type: object properties: id: type: string nullable: true name: type: string nullable: true status: type: object properties: abbrev: type: string nullable: true description: type: string nullable: true required: - abbrev - description additionalProperties: false nullable: true net: type: string nullable: true windowStart: type: string nullable: true windowEnd: type: string nullable: true provider: type: string nullable: true rocket: type: string nullable: true pad: type: object properties: name: type: string nullable: true location: type: string nullable: true required: - name - location additionalProperties: false nullable: true mission: type: object properties: name: type: string nullable: true type: type: string nullable: true orbit: type: string nullable: true description: type: string nullable: true required: - name - type - orbit - description additionalProperties: false nullable: true webcastLive: type: boolean nullable: true image: type: string nullable: true required: - id - name - status - net - windowStart - windowEnd - provider - rocket - pad - mission - webcastLive - image additionalProperties: false total: type: integer nullable: true description: Total matching rows upstream; null when unknown. source: $ref: '#/components/schemas/Source' meta: type: object properties: when: type: string required: - when additionalProperties: false required: - ok - items - total - source additionalProperties: false meta: $ref: '#/components/schemas/CallMeta' '400': $ref: '#/components/responses/BadRequest' '402': $ref: '#/components/responses/PaymentRequired' '405': $ref: '#/components/responses/MethodNotAllowed' '500': $ref: '#/components/responses/ServerError' '502': $ref: '#/components/responses/UpstreamError' x-2s-id: space.launches x-2s-version: null x-2s-price: usd: 0.0036 x-2s-accepts: - x402 x-2s-response-shape: normalized x-payment-info: price: mode: fixed currency: USD amount: '0.003600' protocols: - x402: {} parameters: - name: when in: query required: false description: When. schema: type: string enum: - upcoming - previous default: upcoming - name: search in: query required: false description: Free-text search query. schema: type: string maxLength: 80 - name: limit in: query required: false description: Maximum number of results to return. schema: type: integer minimum: 1 maximum: 50 default: 10 - name: offset in: query required: false description: Number of results to skip before returning (pagination offset). schema: type: integer minimum: 0 default: 0 - $ref: '#/components/parameters/TrialMode' /api/space/observe: get: tags: - Space summary: Compute where any asteroid or comet is in the sky and description: Compute where any asteroid or comet is in the sky and whether you can see it. Give a body (designation/number/name, e.g. "433 Eros", "Ceres", "2024 YR4") and optionally your lat/lon and a time (ISO, default now). Returns the body's identity (NEO/PHA flags, orbit class, absolute magnitude H), its geocentric right ascension + declination, the constellation it's in, geocentric + heliocentric distance (AU), solar phase angle, and its apparent visual magnitude (IAU H-G model — how bright it appears now). With lat/lon it adds altitude/azimuth, whether it's above your horizon, a visible-now flag (up AND sky dark), and the best viewing window in the next 24 hours (when it's highest during darkness). Orbital position is computed locally from JPL elements — VALIDATED against JPL Horizons to <0.1 arcminute. Stargazing, astrophotography planning, occultation/observation prep. For the body's static physical + orbital params see /api/space/body. operationId: space_observe deprecated: false security: - x402Payment: [] responses: '200': description: 'Normalized envelope: items = [{ body, at, position, observer }] (one observability snapshot; RA/Dec validated against JPL Horizons; observer block null without lat/lon); total = 1.' content: application/json: schema: type: object required: - data - meta properties: data: type: object properties: ok: type: boolean enum: - true items: type: array items: type: object properties: body: type: object properties: fullName: type: string nullable: true neo: type: boolean nullable: true pha: type: boolean nullable: true orbitClass: type: string nullable: true absoluteMagnitudeH: type: number nullable: true required: - fullName - neo - pha - orbitClass - absoluteMagnitudeH additionalProperties: false at: type: string position: type: object properties: rightAscensionHours: type: number declinationDeg: type: number constellation: type: string nullable: true geocentricDistanceAu: type: number heliocentricDistanceAu: type: number phaseAngleDeg: type: number apparentMagnitude: type: number nullable: true required: - rightAscensionHours - declinationDeg - constellation - geocentricDistanceAu - heliocentricDistanceAu - phaseAngleDeg - apparentMagnitude additionalProperties: false observer: type: object properties: altitudeDeg: type: number azimuthDeg: type: number aboveHorizon: type: boolean visibleNow: type: boolean bestViewing: type: object properties: at: type: string altitudeDeg: type: number required: - at - altitudeDeg additionalProperties: false nullable: true required: - altitudeDeg - azimuthDeg - aboveHorizon - visibleNow - bestViewing additionalProperties: false nullable: true required: - body - at - position - observer additionalProperties: false total: type: integer nullable: true description: Total matching rows upstream; null when unknown. source: $ref: '#/components/schemas/Source' required: - ok - items - total - source additionalProperties: false meta: $ref: '#/components/schemas/CallMeta' '400': $ref: '#/components/responses/BadRequest' '402': $ref: '#/components/responses/PaymentRequired' '405': $ref: '#/components/responses/MethodNotAllowed' '500': $ref: '#/components/responses/ServerError' '502': $ref: '#/components/responses/UpstreamError' x-2s-id: space.observe x-2s-version: null x-2s-price: usd: 0.0072 x-2s-accepts: - x402 x-2s-response-shape: normalized x-payment-info: price: mode: fixed currency: USD amount: '0.007200' protocols: - x402: {} parameters: - name: body in: query required: true description: Body. schema: type: string minLength: 1 maxLength: 60 - name: lat in: query required: false description: Latitude in decimal degrees (WGS84). schema: type: number minimum: -90 maximum: 90 - name: lon in: query required: false description: Longitude in decimal degrees (WGS84). schema: type: number minimum: -180 maximum: 180 - name: altKm in: query required: false description: Alt km. schema: type: number minimum: -0.5 maximum: 9 - name: at in: query required: false description: At. schema: type: string format: date-time - $ref: '#/components/parameters/TrialMode' /api/space/satellite: get: tags: - Space summary: Compute the current position of any cataloged description: 'Compute the current position of any cataloged Earth-orbiting satellite by NORAD catalog number (e.g. 25544 = ISS, 20580 = Hubble), using fresh Celestrak orbital elements propagated with SGP4. Returns sub-point latitude/longitude, altitude (km), and speed (km/s) for the requested instant (default: now; pass `at` as an ISO timestamp for any time within a few days of the elements'' epoch). Supply observer `lat`/`lon` (and optional altKm) to also get look angles — azimuth, elevation, slant range, and whether the satellite is above your horizon — for visual/antenna pointing. Satellite tracking, pass prediction, ground-station planning. Public-domain orbital data; physical/mission metadata is not included.' operationId: space_satellite deprecated: false security: - x402Payment: [] responses: '200': description: 'Normalized envelope: items = [{ position }] (one satellite sub-point + velocity + optional observer look angles); total = 1.' content: application/json: schema: type: object required: - data - meta properties: data: type: object properties: ok: type: boolean enum: - true items: type: array items: type: object properties: position: type: object properties: noradId: type: number name: type: string nullable: true internationalDesignator: type: string nullable: true epoch: type: string nullable: true at: type: string geodetic: type: object properties: latitude: type: number longitude: type: number altitudeKm: type: number required: - latitude - longitude - altitudeKm additionalProperties: false velocityKmS: type: number look: type: object properties: azimuthDeg: type: number elevationDeg: type: number rangeKm: type: number aboveHorizon: type: boolean required: - azimuthDeg - elevationDeg - rangeKm - aboveHorizon additionalProperties: false nullable: true required: - noradId - name - internationalDesignator - epoch - at - geodetic - velocityKmS - look additionalProperties: false required: - position additionalProperties: false total: type: integer nullable: true description: Total matching rows upstream; null when unknown. source: $ref: '#/components/schemas/Source' required: - ok - items - total - source additionalProperties: false meta: $ref: '#/components/schemas/CallMeta' '400': $ref: '#/components/responses/BadRequest' '402': $ref: '#/components/responses/PaymentRequired' '405': $ref: '#/components/responses/MethodNotAllowed' '500': $ref: '#/components/responses/ServerError' '502': $ref: '#/components/responses/UpstreamError' x-2s-id: space.satellite x-2s-version: null x-2s-price: usd: 0.0036 x-2s-accepts: - x402 x-2s-response-shape: normalized x-payment-info: price: mode: fixed currency: USD amount: '0.003600' protocols: - x402: {} parameters: - name: noradId in: query required: true description: Norad ID. schema: type: integer minimum: 1 maximum: 999999 - name: lat in: query required: false description: Latitude in decimal degrees (WGS84). schema: type: number minimum: -90 maximum: 90 - name: lon in: query required: false description: Longitude in decimal degrees (WGS84). schema: type: number minimum: -180 maximum: 180 - name: altKm in: query required: false description: Alt km. schema: type: number minimum: -0.5 maximum: 9 - name: at in: query required: false description: At. schema: type: string format: date-time - $ref: '#/components/parameters/TrialMode' /api/space/satellites: get: tags: - Space summary: Search the catalog of every cataloged Earth-orbiting object description: Search the catalog of every cataloged Earth-orbiting object — ~69,000 satellites, rocket bodies, and debris tracked by US Space Force / 18 SDS (via CelesTrak SATCAT). Filter by name (q, e.g. "starlink"), owner/launching country (owner — code like US/PRC/CIS or a name like "china"), object type (type = payload | rocket body | debris | unknown), launch-year range (launchYearFrom/launchYearTo), international/COSPAR designator prefix (intlDesignator, e.g. "2024-"), on-orbit vs decayed (onOrbit), or exact NORAD number (noradId). Each result carries the NORAD id, name, international designator, object type, owner + resolved country, launch date + site, decay date (null = still in orbit), and orbital parameters (period, inclination, apogee, perigee). The envelope total is the full count matching your filter — so onOrbit=true&type=payload answers "how many active satellites are up there", and owner=PRC tells you who launched them. For a satellite's live sub-point position, pass its noradId to /api/space/satellite. operationId: space_satellites deprecated: false security: - x402Payment: [] responses: '200': description: 'Normalized envelope: items = matching catalog rows; total = full count matching the filter (use it for "how many" queries).' content: application/json: schema: type: object required: - data - meta properties: data: type: object properties: ok: type: boolean enum: - true items: type: array items: type: object properties: noradId: type: number name: type: string nullable: true intlDesignator: type: string nullable: true objectType: type: string nullable: true opsStatus: type: string nullable: true owner: type: string nullable: true ownerName: type: string nullable: true launchDate: type: string nullable: true launchSite: type: string nullable: true decayDate: type: string nullable: true onOrbit: type: boolean orbit: type: object properties: periodMin: type: number nullable: true inclinationDeg: type: number nullable: true apogeeKm: type: number nullable: true perigeeKm: type: number nullable: true orbitType: type: string nullable: true required: - periodMin - inclinationDeg - apogeeKm - perigeeKm - orbitType additionalProperties: false rcsM2: type: number nullable: true required: - noradId - name - intlDesignator - objectType - opsStatus - owner - ownerName - launchDate - launchSite - decayDate - onOrbit - orbit - rcsM2 additionalProperties: false total: type: integer nullable: true description: Total matching rows upstream; null when unknown. source: $ref: '#/components/schemas/Source' required: - ok - items - total - source additionalProperties: false meta: $ref: '#/components/schemas/CallMeta' '400': $ref: '#/components/responses/BadRequest' '402': $ref: '#/components/responses/PaymentRequired' '405': $ref: '#/components/responses/MethodNotAllowed' '500': $ref: '#/components/responses/ServerError' '502': $ref: '#/components/responses/UpstreamError' x-2s-id: space.satellites x-2s-version: null x-2s-price: usd: 0.003 x-2s-accepts: - x402 x-2s-response-shape: normalized x-payment-info: price: mode: fixed currency: USD amount: '0.003000' protocols: - x402: {} parameters: - name: q in: query required: false description: Free-text search query. schema: type: string minLength: 1 maxLength: 120 - name: owner in: query required: false description: Owner. schema: type: string minLength: 1 maxLength: 40 - name: type in: query required: false description: Filter results by type. schema: type: string minLength: 1 maxLength: 20 - name: noradId in: query required: false description: Norad ID. schema: type: integer minimum: 1 maximum: 999999 - name: intlDesignator in: query required: false description: Intl designator. schema: type: string minLength: 1 maxLength: 20 - name: launchYearFrom in: query required: false description: Launch year from. schema: type: integer minimum: 1957 maximum: 2100 - name: launchYearTo in: query required: false description: Launch year to. schema: type: integer minimum: 1957 maximum: 2100 - name: onOrbit in: query required: false description: On orbit. schema: type: string enum: - 'true' - 'false' - name: limit in: query required: false description: Maximum number of results to return. schema: type: integer minimum: 1 maximum: 100 default: 25 - name: offset in: query required: false description: Number of results to skip before returning (pagination offset). schema: type: integer minimum: 0 maximum: 100000 default: 0 - $ref: '#/components/parameters/TrialMode' /api/space/sky-tonight: get: tags: - Space summary: Observer-local sky almanac for any lat/lon and time description: 'Observer-local sky almanac for any lat/lon and time (default now). Returns the Sun''s next rise/set + current altitude/azimuth; the Moon''s rise/set, current alt/az, phase angle, phase name (New → Full → Waning Crescent), illuminated fraction, and next moon quarter; and for all seven non-Earth planets (Mercury→Neptune): altitude, azimuth, RA/dec, distance (AU), apparent magnitude, and whether each is currently above the horizon. Computed from first principles (astronomy-engine, sub-arcminute) — no external service, no key. Stargazing, astrophotography planning, ''what''s up right now'', is-it-dark-yet. `at` accepts any ISO timestamp.' operationId: space_sky-tonight deprecated: false security: - x402Payment: [] responses: '200': description: 'Normalized envelope: items = [{ sky }] (one observer-local almanac; the sun/moon/planets blocks live inside this single item); total = 1.' content: application/json: schema: type: object required: - data - meta properties: data: type: object properties: ok: type: boolean enum: - true items: type: array items: type: object properties: sky: type: object properties: at: type: string observer: type: object properties: lat: type: number lon: type: number altitudeM: type: number required: - lat - lon - altitudeM additionalProperties: false sun: type: object additionalProperties: {} moon: type: object additionalProperties: {} planets: type: array items: type: object additionalProperties: {} required: - at - observer - sun - moon - planets additionalProperties: false required: - sky additionalProperties: false total: type: integer nullable: true description: Total matching rows upstream; null when unknown. source: $ref: '#/components/schemas/Source' required: - ok - items - total - source additionalProperties: false meta: $ref: '#/components/schemas/CallMeta' '400': $ref: '#/components/responses/BadRequest' '402': $ref: '#/components/responses/PaymentRequired' '405': $ref: '#/components/responses/MethodNotAllowed' '500': $ref: '#/components/responses/ServerError' '502': $ref: '#/components/responses/UpstreamError' x-2s-id: space.sky-tonight x-2s-version: null x-2s-price: usd: 0.0025 x-2s-accepts: - x402 x-2s-response-shape: normalized x-payment-info: price: mode: fixed currency: USD amount: '0.002500' protocols: - x402: {} parameters: - name: lat in: query required: true description: Latitude in decimal degrees (WGS84). schema: type: number minimum: -90 maximum: 90 - name: lon in: query required: true description: Longitude in decimal degrees (WGS84). schema: type: number minimum: -180 maximum: 180 - name: altitudeM in: query required: false description: Altitude m. schema: type: number minimum: -500 maximum: 9000 default: 0 - name: at in: query required: false description: At. schema: type: string format: date-time - $ref: '#/components/parameters/TrialMode' /api/space/skywatch: get: tags: - Space summary: One call what's notable in YOUR sky right now, for a lat/lon description: 'One call → what''s notable in YOUR sky right now, for a lat/lon. Synthesizes three sources: (1) the live almanac — sun up/down, moon phase + illumination, and which of the 7 naked-eye planets are currently above your horizon with their altitude/azimuth/magnitude; (2) near-Earth asteroid close approaches over the next 7 days (designation, date, distance in lunar distances); and (3) the ISS — its current sub-point, and whether it is above your horizon right now with look angles. Each section reports found/error independently. The "is it dark, what''s up, anything passing" digest for stargazers and astrophotographers. For the raw almanac alone see /api/space/sky-tonight.' operationId: space_skywatch deprecated: false security: - x402Payment: [] responses: '200': description: OK content: application/json: schema: type: object required: - data - meta properties: data: type: object properties: at: type: string observer: type: object properties: lat: type: number lon: type: number altitudeM: type: number required: - lat - lon - altitudeM additionalProperties: false sky: type: object properties: isDark: type: boolean sun: type: object additionalProperties: {} moon: type: object additionalProperties: {} planetsUp: type: array items: type: object additionalProperties: {} required: - isDark - sun - moon - planetsUp additionalProperties: false closeApproaches: type: object properties: found: type: boolean error: type: string nullable: true count: type: number nullable: true approaches: type: array items: type: object additionalProperties: {} required: - found - error - count - approaches additionalProperties: false iss: type: object properties: found: type: boolean error: type: string nullable: true aboveHorizon: type: boolean nullable: true geodetic: type: object additionalProperties: {} nullable: true look: type: object additionalProperties: {} nullable: true required: - found - error - aboveHorizon - geodetic - look additionalProperties: false sources: type: array items: type: object additionalProperties: {} required: - at - observer - sky - closeApproaches - iss - sources additionalProperties: false meta: $ref: '#/components/schemas/CallMeta' '400': $ref: '#/components/responses/BadRequest' '402': $ref: '#/components/responses/PaymentRequired' '405': $ref: '#/components/responses/MethodNotAllowed' '500': $ref: '#/components/responses/ServerError' '502': $ref: '#/components/responses/UpstreamError' x-2s-id: space.skywatch x-2s-version: null x-2s-price: usd: 0.0072 x-2s-accepts: - x402 x-2s-response-shape: legacy x-payment-info: price: mode: fixed currency: USD amount: '0.007200' protocols: - x402: {} parameters: - name: lat in: query required: true description: Latitude in decimal degrees (WGS84). schema: type: number minimum: -90 maximum: 90 - name: lon in: query required: true description: Longitude in decimal degrees (WGS84). schema: type: number minimum: -180 maximum: 180 - name: altitudeM in: query required: false description: Altitude m. schema: type: number minimum: -500 maximum: 9000 default: 0 - $ref: '#/components/parameters/TrialMode' /api/space/system: get: tags: - Space summary: Profile a confirmed exoplanetary system by host-star name (e.g description: 'Profile a confirmed exoplanetary system by host-star name (e.g. "TRAPPIST-1", "Kepler-90", "TOI-700"). Groups all the star''s known planets into one view, summarizes the host star (spectral type, temperature, radius, mass, distance in light-years), and COMPUTES the star''s habitable ("Goldilocks") zone — inner and outer boundary in AU, derived from the stellar luminosity (effective temperature + radius vs. the Sun) — then flags which planets orbit within it. Each planet: radius/mass (Earth units), orbital period, semi-major axis, equilibrium temperature, and in-habitable-zone flag. Astronomy, habitability research, education. Built from the NASA Exoplanet Archive (the same data as /api/space/exoplanet) plus the computed HZ. Public-domain NASA data.' operationId: space_system deprecated: false security: - x402Payment: [] responses: '200': description: OK content: application/json: schema: type: object required: - data - meta properties: data: type: object properties: system: type: object properties: hostStar: type: string planetCount: type: number star: type: object properties: spectralType: type: string nullable: true effectiveTempK: type: number nullable: true radiusSolar: type: number nullable: true massSolar: type: number nullable: true luminositySolar: type: number nullable: true distanceLightYears: type: number nullable: true required: - spectralType - effectiveTempK - radiusSolar - massSolar - luminositySolar - distanceLightYears additionalProperties: false habitableZone: type: object properties: innerAu: type: number outerAu: type: number required: - innerAu - outerAu additionalProperties: false nullable: true planets: type: array items: type: object additionalProperties: {} required: - hostStar - planetCount - star - habitableZone - planets additionalProperties: false source: $ref: '#/components/schemas/Source' required: - system - source additionalProperties: false meta: $ref: '#/components/schemas/CallMeta' '400': $ref: '#/components/responses/BadRequest' '402': $ref: '#/components/responses/PaymentRequired' '405': $ref: '#/components/responses/MethodNotAllowed' '500': $ref: '#/components/responses/ServerError' '502': $ref: '#/components/responses/UpstreamError' x-2s-id: space.system x-2s-version: null x-2s-price: usd: 0.0072 x-2s-accepts: - x402 x-2s-response-shape: legacy x-payment-info: price: mode: fixed currency: USD amount: '0.007200' protocols: - x402: {} parameters: - name: hostStar in: query required: true description: Host star. schema: type: string minLength: 1 maxLength: 60 - $ref: '#/components/parameters/TrialMode' /api/space/weather: get: tags: - Space summary: Current space weather from NOAA SWPC public feeds description: Current space weather from NOAA SWPC public feeds. Returns the latest planetary K-index (3-hour geomagnetic activity), solar wind plasma (density / speed / temperature from ACE/DSCOVR at L1), GOES X-ray flux with NOAA flare class (A/B/C/M/X), and the current NOAA R (radio blackout) / S (solar radiation) / G (geomagnetic storm) scales plus a 24-hour forecast in 6-hour windows. All timestamps are ISO 8601 UTC. No parameters. Useful for aurora forecasting, HF-radio propagation, satellite-operations planning, and GPS-degradation alerts. Data is public domain (NOAA / US government work). operationId: space_weather deprecated: false security: - x402Payment: [] responses: '200': description: 'Normalized envelope: items = [{ kp, solarWind, xray, scales }] (one current space-weather snapshot; all four blocks live inside this single item); total = 1.' content: application/json: schema: type: object required: - data - meta properties: data: type: object properties: ok: type: boolean enum: - true items: type: array items: type: object properties: kp: type: object properties: latest: type: object properties: time: type: string description: ISO 8601 UTC timestamp of the 3-hour interval. kp: type: number description: Planetary K-index, 0..9. gScale: type: integer description: Derived NOAA G-storm scale (0..5). gLabel: type: string description: 'Plain-English label: none / minor / moderate / strong / severe / extreme.' required: - time - kp - gScale - gLabel additionalProperties: false recent: type: array items: type: object properties: time: type: string kp: type: number gScale: type: integer gLabel: type: string required: - time - kp - gScale - gLabel additionalProperties: false description: Last ~24 hours of Kp samples (up to 8 entries, oldest first). required: - latest - recent additionalProperties: false solarWind: type: object properties: time: type: string densityPerCm3: type: number nullable: true description: Proton density at L1 (n/cm³). speedKmPerSec: type: number nullable: true description: Bulk speed (km/s). Quiet ~350-450, fast > 600. temperatureK: type: number nullable: true description: Proton temperature (K). required: - time - densityPerCm3 - speedKmPerSec - temperatureK additionalProperties: false xray: type: object properties: time: type: string fluxLongWm2: type: number nullable: true description: GOES long-band (0.1-0.8 nm) flux in W/m². flareClass: type: string nullable: true description: NOAA flare class derived from long-band flux (e.g. "C2.4", "M1.0", "X9.3"). satellite: type: integer nullable: true description: GOES satellite number reporting this sample. required: - time - fluxLongWm2 - flareClass - satellite additionalProperties: false scales: type: object properties: current: type: object properties: observedAt: type: string rRadio: type: object properties: scale: type: integer label: type: string required: - scale - label additionalProperties: false sRadiation: type: object properties: scale: type: integer label: type: string required: - scale - label additionalProperties: false gGeomagnetic: type: object properties: scale: type: integer label: type: string required: - scale - label additionalProperties: false required: - observedAt - rRadio - sRadiation - gGeomagnetic additionalProperties: false forecast: type: array items: type: object properties: startsAt: type: string rMinorPercent: type: number nullable: true description: Probability of R1-R2 radio blackout (0..100). rMajorPercent: type: number nullable: true description: Probability of R3+ radio blackout (0..100). sPercent: type: number nullable: true description: Probability of S1+ solar radiation storm (0..100). gScale: type: integer gLabel: type: string required: - startsAt - rMinorPercent - rMajorPercent - sPercent - gScale - gLabel additionalProperties: false description: Forward forecast in 6-hour windows (up to 4 entries covering the next ~24h). required: - current - forecast additionalProperties: false required: - kp - solarWind - xray - scales additionalProperties: false total: type: integer nullable: true description: Total matching rows upstream; null when unknown. source: $ref: '#/components/schemas/Source' required: - ok - items - total - source additionalProperties: false meta: $ref: '#/components/schemas/CallMeta' '400': $ref: '#/components/responses/BadRequest' '402': $ref: '#/components/responses/PaymentRequired' '405': $ref: '#/components/responses/MethodNotAllowed' '500': $ref: '#/components/responses/ServerError' '502': $ref: '#/components/responses/UpstreamError' x-2s-id: space.weather x-2s-version: null x-2s-price: usd: 0.0025 x-2s-accepts: - x402 x-2s-response-shape: normalized x-payment-info: price: mode: fixed currency: USD amount: '0.002500' protocols: - x402: {} parameters: - $ref: '#/components/parameters/TrialMode' components: schemas: Source: type: object description: 'Provenance of the data: upstream provider, source URL, and license.' properties: provider: type: string description: Upstream data provider. url: type: string description: Source URL or documentation link. license: type: string description: License / usage terms for the data. CallMeta: type: object description: Per-call meta envelope — endpoint id, cost, caller kind, settlement details. X402PaymentRequiredV2: type: object description: x402 v2 PaymentRequired envelope. Pick any entry from accepts[], sign for that rail, retry with the PAYMENT-SIGNATURE header. required: - x402Version - accepts properties: x402Version: type: integer const: 2 error: type: string description: Human-readable reason payment is required. resource: type: string description: The resource URL being purchased. accepts: type: array description: Payment requirement options, one per supported network (Base USDC, Solana USDC). items: type: object required: - scheme - network - amount - asset - payTo - maxTimeoutSeconds properties: scheme: type: string enum: - exact network: type: string description: CAIP-2 network id, e.g. "eip155:8453" (Base) or "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp". amount: type: string description: Price in atomic asset units (USDC has 6 decimals). asset: type: string description: Asset contract address / mint. payTo: type: string description: Treasury address to pay. maxTimeoutSeconds: type: integer extra: type: object description: 'Rail-specific extras (EVM: EIP-712 domain name/version; Solana: feePayer).' additionalProperties: true extensions: type: object description: Optional discovery metadata (e.g. bazaar input/output schemas). additionalProperties: true responses: PaymentRequired: description: Payment required. Body contains the x402 PaymentRequirements envelope with a multi-network accepts array; the per-call price is in accepts[].amount (and on the operation as x-2s-price). Sign for whichever rail you hold USDC on (EIP-3009 for Base, partial SPL transfer for Solana) and retry with the PAYMENT-SIGNATURE header (X-PAYMENT also accepted for v1 clients). content: application/json: schema: $ref: '#/components/schemas/X402PaymentRequiredV2' UpstreamError: description: Upstream provider error. MethodNotAllowed: description: Method not allowed — see `Allow` header for the supported method. ServerError: description: Internal server error. BadRequest: description: Bad request — invalid parameters. parameters: TrialMode: name: trial in: query required: false description: 'Try before you buy. Set to 1 for one free real call per endpoint per hour — no wallet or payment needed — to verify the endpoint before paying. Equivalent to sending the "X-2s-Trial: 1" request header. Works on every endpoint.' schema: type: integer enum: - 1 securitySchemes: x402Payment: type: apiKey in: header name: PAYMENT-SIGNATURE description: 'x402 protocol v2: base64-encoded PaymentPayload. Call any paid endpoint without auth to receive a 402 with a multi-network PaymentRequirements envelope. Sign for either rail: EIP-3009 transferWithAuthorization (Base USDC) OR a partial SPL token transfer (Solana USDC). Retry with PAYMENT-SIGNATURE header. X-PAYMENT is also accepted for v1 buyer clients. See https://x402.org.'