API del cielo de Astroletra (Astroletra Sky API)

Free, keyless public API from Astroletra. One GET returns the sky for a date and IANA time zone in JSON (Moon phase and sign, exact aspects with local time, retrograde planets and the next lunation, computed from NASA JPL DE440 ephemerides); it also serves the open-data files (CSV, JSON, iCal) and live solar activity (Kp index, storms, solar wind, aurora outlook for Spain). No key or signup, CORS open (Access-Control-Allow-Origin *), 60 requests per minute with 429 and Retry-After beyond that, data under CC BY 4.0.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 3

GET /api/v1/cielo Cielo de un día en una zona horaria #
GET /api/v1/datos/{fichero} Fichero de datos abiertos (CSV, JSON o iCal) #
GET /api/v1/sol/actividad Actividad solar en directo, con el índice Kp, las tormentas, el viento solar y las auroras en España #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/astroletra-com:astroletra-sky-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

astroletra-com-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: API del cielo de Astroletra
  version: 1.2.1
  summary: El cielo de un día civil en una zona horaria (Luna, aspectos exactos, retrógrados
    y próxima lunación), los ficheros de datos abiertos y la actividad solar en directo
    con datos de la NOAA.
  description: 'Datos calculados con las efemérides JPL DE440 (NASA), zodiaco tropical,
    geocéntrico. Licencia CC BY 4.0: muestra «Datos: Astroletra» con un enlace a https://astroletra.com/.
    Sin clave; 60 peticiones por minuto e IP. La actividad solar (/api/v1/sol/actividad)
    no es cálculo propio, viene del Space Weather Prediction Center de la NOAA, de
    dominio público.'
  license:
    name: CC BY 4.0
    url: https://creativecommons.org/licenses/by/4.0/
  contact:
    name: Astroletra
    email: info@astroletra.com
    url: https://astroletra.com/datos/api/
servers:
- url: https://api.astroletra.com
paths:
  /api/v1/cielo:
    get:
      operationId: cielo
      summary: Cielo de un día en una zona horaria
      parameters:
      - name: date
        in: query
        required: false
        description: Día civil AAAA-MM-DD, a ±7 días de hoy en la zona pedida. Por
          defecto, hoy.
        schema:
          type: string
          format: date
      - name: tz
        in: query
        required: false
        description: Zona IANA de la lista admitida (España y las capitales de los
          países hispanohablantes, entre otras), p. ej. America/Mexico_City. Por defecto,
          Europe/Madrid. Otra zona devuelve 422.
        schema:
          type: string
          default: Europe/Madrid
          enum:
          - Europe/Madrid
          - Atlantic/Canary
          - Europe/London
          - Europe/Paris
          - Europe/Berlin
          - America/Mexico_City
          - America/Guatemala
          - America/El_Salvador
          - America/Tegucigalpa
          - America/Managua
          - America/Costa_Rica
          - America/Panama
          - America/Havana
          - America/Santo_Domingo
          - America/Puerto_Rico
          - America/Bogota
          - America/Caracas
          - America/Guayaquil
          - America/Lima
          - America/La_Paz
          - America/Santiago
          - America/Argentina/Buenos_Aires
          - America/Asuncion
          - America/Montevideo
          - America/New_York
          - America/Chicago
          - America/Los_Angeles
          - America/Sao_Paulo
      responses:
        '200':
          description: Cielo del día
          headers:
            Cache-Control:
              schema:
                type: string
              description: public, max-age=3600 (86400 en fechas pasadas, que no cambian)
            Access-Control-Allow-Origin:
              schema:
                type: string
              description: '*'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cielo'
              example:
                date: '2026-11-24'
                tz: Europe/Madrid
                moon:
                  sign: Taurus
                  sign_label: Tauro
                  degree: 29.9
                  phase: Full Moon
                  illumination: 1.0
                  changes_sign_today: true
                  next_sign_change:
                    at_local: 2026-11-24T12:09+01:00
                    time: '12:09'
                    date_local: '2026-11-24'
                    to_sign: Gemini
                    to_sign_label: Géminis
                    from_sign: Taurus
                  sign_change:
                    at_local: 2026-11-24T12:09+01:00
                    time: '12:09'
                    date_local: '2026-11-24'
                    to_sign: Gemini
                    to_sign_label: Géminis
                retrogrades:
                - planet: Saturn
                  planet_label: Saturno
                  sign: Aries
                  sign_label: Aries
                  since: '2026-07-26'
                  until: '2026-12-10'
                  shadow_to: '2027-03-15'
                - planet: Uranus
                  planet_label: Urano
                  sign: Gemini
                  sign_label: Géminis
                  since: '2026-09-10'
                  until: '2027-02-08'
                  shadow_to: null
                - planet: Neptune
                  planet_label: Neptuno
                  sign: Aries
                  sign_label: Aries
                  since: '2026-07-07'
                  until: '2026-12-12'
                  shadow_to: null
                next_lunation:
                  phase: full
                  at_local: 2026-11-24T15:53+01:00
                  date_local: '2026-11-24'
                  sign: Gemini
                  sign_label: Géminis
                source: Astroletra — https://astroletra.com
                license: CC BY 4.0
                license_url: https://creativecommons.org/licenses/by/4.0/
                ephemeris: JPL DE440 (NASA), zodiaco tropical, geocéntrico
                docs: https://astroletra.com/datos/api/
                aspects:
                - p1: Sun
                  p2: Neptune
                  p1_label: Sol
                  p2_label: Neptuno
                  type: trine
                  type_label: trígono
                  exact: true
                  at_local: 2026-11-24T01:07+01:00
                  time: 01:07
                  orb: 0.0
                - p1: Moon
                  p2: Jupiter
                  p1_label: Luna
                  p2_label: Júpiter
                  type: square
                  type_label: cuadratura
                  exact: true
                  at_local: 2026-11-24T06:28+01:00
                  time: 06:28
                  orb: 0.0
                planets:
                - name: Sun
                  name_label: Sol
                  sign: Sagittarius
                  sign_label: Sagitario
                  degree: 2.17
                  retrograde: false
                - name: Moon
                  name_label: Luna
                  sign: Taurus
                  sign_label: Tauro
                  degree: 29.9
                  retrograde: false
        '422':
          description: Zona o fecha no válidas
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Demasiadas peticiones (más de 60 por minuto); mira Retry-After
          headers:
            Retry-After:
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Techo total por hora del servicio alcanzado (con Retry-After)
            o cálculo no disponible en este momento
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /api/v1/datos/{fichero}:
    get:
      operationId: datos
      summary: Fichero de datos abiertos (CSV, JSON o iCal)
      description: Los mismos ficheros de https://astroletra.com/datos/ servidos desde
        la API, para descargarlos con cualquier cliente, también con urllib de Python
        y con pandas. Sin clave; 60 peticiones por minuto e IP.
      parameters:
      - name: fichero
        in: path
        required: true
        description: Nombre del fichero, por ejemplo lunaciones.csv, eclipses.json,
          retrogrados.csv, ingresos-solares.csv, calendario-2027.csv o todo.ics. La
          lista está en https://astroletra.com/datos/.
        schema:
          type: string
          pattern: ^[a-z0-9][a-z0-9-]*\.(csv|json|ics)$
        example: lunaciones.csv
      responses:
        '200':
          description: El fichero pedido
          content:
            text/csv:
              schema:
                type: string
            application/json:
              schema:
                type: object
            text/calendar:
              schema:
                type: string
        '404':
          description: No existe un fichero con ese nombre
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Demasiadas peticiones (más de 60 por minuto); mira Retry-After
          headers:
            Retry-After:
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Techo total por hora del servicio alcanzado (con Retry-After)
            o fichero no disponible en este momento
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /api/v1/sol/actividad:
    get:
      operationId: solActividad
      summary: Actividad solar en directo, con el índice Kp, las tormentas, el viento
        solar y las auroras en España
      description: 'Los datos del Space Weather Prediction Center de la NOAA (dominio
        público), leídos cada 15 minutos y explicados en castellano. La petición nunca
        llama a la NOAA: sirve la última copia. Sin clave; 60 peticiones por minuto
        e IP y un techo total por hora para todo el servicio. Cita «Datos de NOAA
        SWPC, tratamiento de Astroletra».'
      responses:
        '200':
          description: La actividad solar de la última lectura
          headers:
            Cache-Control:
              schema:
                type: string
              description: public, max-age=300
            Access-Control-Allow-Origin:
              schema:
                type: string
              description: '*'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActividadSolar'
              example:
                updated_at: '2026-11-20T20:20:19Z'
                kp:
                  now: 0.67
                  now_time: '2026-11-20T20:16:00Z'
                  last_3h: 0.33
                  last_3h_time: '2026-11-20T15:00:00Z'
                  g: 0
                  g_label: Sin tormenta
                  stale: false
                kp_recent:
                - time: '2026-11-20T09:00:00Z'
                  kp: 0.67
                  g: 0
                - time: '2026-11-20T12:00:00Z'
                  kp: 0.33
                  g: 0
                - time: '2026-11-20T15:00:00Z'
                  kp: 0.33
                  g: 0
                kp_forecast:
                - time: '2026-11-21T00:00:00Z'
                  kp: 2.33
                  g: 0
                - time: '2026-11-21T03:00:00Z'
                  kp: 2.67
                  g: 0
                - time: '2026-11-21T06:00:00Z'
                  kp: 2
                  g: 0
                scales:
                  now:
                    r: 0
                    s: 0
                    g: 0
                  forecast:
                  - date: '2026-11-20'
                    r_minor_prob: 10
                    r_major_prob: 5
                    s_prob: 1
                    g: 0
                  - date: '2026-11-21'
                    r_minor_prob: 10
                    r_major_prob: 5
                    s_prob: 1
                    g: 0
                  - date: '2026-11-22'
                    r_minor_prob: 10
                    r_major_prob: 5
                    s_prob: 1
                    g: 0
                  stale: false
                solar_wind:
                  time: '2026-11-20T20:15:00Z'
                  speed_km_s: 369
                  bt_nt: 6
                  bz_nt: -1
                  stale: false
                xray:
                  time: '2026-11-20T20:17:00Z'
                  flux: 2.870734192583768e-07
                  class: B2.8
                  peak_6h:
                    time: '2026-11-20T18:05:00Z'
                    flux: 7.271871709235711e-07
                    class: B7.2
                  stale: false
                alerts:
                - issued: '2026-11-19T01:18:16.670Z'
                  code: WARK04
                  type: aviso
                  label: Aviso, se espera un índice K de 4
                  headline: 'EXTENDED WARNING: Geomagnetic K-index of 4 expected'
                aurora:
                  observed_at: '2026-11-20T20:12:00Z'
                  forecast_at: '2026-11-20T21:22:00Z'
                  max_probability: 29
                  europe_lowest_lat_10: 63
                  north:
                  - - 0
                    - 60
                    - 3
                  - - 0
                    - 61
                    - 5
                  - - 0
                    - 62
                    - 8
                  stale: false
                stale_parts: []
                source: NOAA Space Weather Prediction Center (https://www.swpc.noaa.gov),
                  dominio público; tratamiento de Astroletra
                license: CC BY 4.0
                license_url: https://creativecommons.org/licenses/by/4.0/
                docs: https://astroletra.com/datos/api/
                aurora_spain:
                  rule: Regla de Astroletra a partir de las auroras documentadas en
                    España de 2024 a 2026, no un umbral oficial. Se ven de noche,
                    casi siempre solo con cámara, como un resplandor rojo bajo sobre
                    el horizonte norte.
                  kp_max_next_24h: 2.67
                  zones:
                  - zone: north
                    label: Norte (Cantábrico y Pirineos)
                    geomag_lat: 46
                    kp_needed: 8.67
                    now: false
                    next_24h: false
                  - zone: centre
                    label: Centro (Madrid, Ebro, Levante)
                    geomag_lat: 42.9
                    kp_needed: 9
                    now: false
                    next_24h: false
                  - zone: south
                    label: Sur (Andalucía y Murcia)
                    geomag_lat: 40
                    kp_needed: 9
                    now: false
                    next_24h: false
        '429':
          description: Más de 60 peticiones por minuto desde la misma IP
          headers:
            Retry-After:
              schema:
                type: string
              description: '60'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Techo total por hora alcanzado o datos de la NOAA no disponibles
            todavía
          headers:
            Retry-After:
              schema:
                type: string
              description: '600'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        details:
          type:
          - array
          - 'null'
          items:
            type: object
            properties:
              path:
                type: string
              message:
                type: string
      required:
      - error
    Cielo:
      type: object
      required:
      - date
      - tz
      - moon
      - aspects
      - retrogrades
      - source
      - license
      - ephemeris
      properties:
        date:
          type: string
          format: date
        tz:
          type: string
        moon:
          type: object
          properties:
            sign:
              type: string
            sign_label:
              type: string
            degree:
              type: number
              description: Grado dentro del signo (0-30)
            phase:
              type:
              - string
              - 'null'
            illumination:
              type:
              - number
              - 'null'
              minimum: 0
              maximum: 1
            changes_sign_today:
              type: boolean
            next_sign_change:
              type:
              - object
              - 'null'
              properties:
                at_local:
                  type: string
                time:
                  type: string
                date_local:
                  type: string
                to_sign:
                  type: string
                to_sign_label:
                  type: string
        planets:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              name_label:
                type: string
              sign:
                type: string
              sign_label:
                type: string
              degree:
                type: number
              retrograde:
                type: boolean
        aspects:
          type: array
          items:
            type: object
            properties:
              p1:
                type: string
              p2:
                type: string
              p1_label:
                type: string
              p2_label:
                type: string
              type:
                type: string
              type_label:
                type: string
              exact:
                type: boolean
              at_local:
                type:
                - string
                - 'null'
              time:
                type:
                - string
                - 'null'
              orb:
                type: number
        retrogrades:
          type: array
          items:
            type: object
            properties:
              planet:
                type: string
              planet_label:
                type: string
              sign:
                type: string
              sign_label:
                type: string
              since:
                type:
                - string
                - 'null'
              until:
                type:
                - string
                - 'null'
              shadow_to:
                type:
                - string
                - 'null'
        lunation_today:
          type:
          - object
          - 'null'
        next_lunation:
          type:
          - object
          - 'null'
          properties:
            phase:
              type: string
              enum:
              - new
              - full
            at_local:
              type: string
            date_local:
              type: string
            sign:
              type: string
            sign_label:
              type: string
        source:
          type: string
        license:
          type: string
        license_url:
          type: string
        ephemeris:
          type: string
        docs:
          type: string
        generated_at:
          type: string
    ActividadSolar:
      type: object
      description: La actividad del Sol en directo, reducida y explicada en castellano.
        Todas las horas en UTC (ISO 8601).
      required:
      - updated_at
      - kp
      - kp_recent
      - kp_forecast
      - scales
      - aurora_spain
      - source
      - license
      properties:
        updated_at:
          type: string
          format: date-time
          description: Hora de la última lectura de la NOAA.
        kp:
          type: object
          description: Índice Kp planetario, el estimado del último minuto y el último
            valor de 3 horas, con su nivel de la escala G (0 sin tormenta, 1 a 5 de
            G1 a G5).
          properties:
            now:
              type:
              - number
              - 'null'
            now_time:
              type:
              - string
              - 'null'
            last_3h:
              type:
              - number
              - 'null'
            last_3h_time:
              type:
              - string
              - 'null'
            g:
              type: integer
            g_label:
              type: string
            stale:
              type: boolean
        kp_recent:
          type: array
          items:
            type: object
            properties:
              time:
                type: string
                format: date-time
              kp:
                type: number
              g:
                type: integer
                minimum: 0
                maximum: 5
          description: El Kp de 3 horas de los últimos días.
        kp_forecast:
          type: array
          items:
            type: object
            properties:
              time:
                type: string
                format: date-time
              kp:
                type: number
              g:
                type: integer
                minimum: 0
                maximum: 5
          description: La previsión de Kp de la NOAA para los próximos tres días,
            por bloques de 3 horas.
        scales:
          type: object
          description: Escalas de la NOAA, R (apagones de radio), S (tormentas de
            radiación) y G (tormentas geomagnéticas), ahora y su previsión de tres
            días.
          properties:
            now:
              type: object
              properties:
                r:
                  type: integer
                s:
                  type: integer
                g:
                  type: integer
            forecast:
              type: array
              items:
                type: object
                properties:
                  date:
                    type: string
                    format: date
                  r_minor_prob:
                    type:
                    - number
                    - 'null'
                  r_major_prob:
                    type:
                    - number
                    - 'null'
                  s_prob:
                    type:
                    - number
                    - 'null'
                  g:
                    type: integer
            stale:
              type: boolean
        solar_wind:
          type: object
          description: Viento solar en el punto L1, con la velocidad en km/s y el
            campo magnético (Bt y Bz) en nanoteslas.
          properties:
            time:
              type:
              - string
              - 'null'
            speed_km_s:
              type:
              - number
              - 'null'
            bt_nt:
              type:
              - number
              - 'null'
            bz_nt:
              type:
              - number
              - 'null'
            stale:
              type: boolean
        xray:
          type:
          - object
          - 'null'
          description: Flujo de rayos X del satélite GOES, con su clase (A, B, C,
            M o X) y el pico de las últimas 6 horas.
        alerts:
          type: array
          description: Alertas, avisos y vigilancias en vigor, con su código de la
            NOAA, el titular en inglés tal cual y una etiqueta en castellano.
          items:
            type: object
            properties:
              issued:
                type: string
                format: date-time
              code:
                type: string
              type:
                type: string
              label:
                type: string
              headline:
                type: string
        aurora:
          type: object
          description: Modelo OVATION de la NOAA reducido a Europa, con la probabilidad
            máxima, la latitud más baja con un 10 % y la rejilla [longitud, latitud,
            probabilidad %] del norte.
        aurora_spain:
          type: object
          description: Qué Kp hace falta para ver auroras en el norte, el centro y
            el sur de España, y si se alcanza ahora o en las próximas 24 horas. Es
            una regla de Astroletra, no un umbral oficial.
          properties:
            rule:
              type: string
            kp_max_next_24h:
              type:
              - number
              - 'null'
            zones:
              type: array
              items:
                type: object
                properties:
                  zone:
                    type: string
                    enum:
                    - north
                    - centre
                    - south
                  label:
                    type: string
                  geomag_lat:
                    type: number
                  kp_needed:
                    type: number
                  now:
                    type: boolean
                  next_24h:
                    type: boolean
        stale_parts:
          type: array
          items:
            type: string
          description: Partes que no se pudieron renovar en la última lectura y se
            sirven con el valor anterior.
        source:
          type: string
        license:
          type: string
        license_url:
          type: string
        docs:
          type: string
x-provenance:
  method: harvested
  publisher: Astroletra
  source: https://astroletra.com/datos/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)