IPGeolocation.io Astronomy API

API endpoints for retrieving astronomical information for a given location, including sunrise and sunset times, moonrise and moonset times, twilight phases, golden hour and blue hour windows, solar noon, sun and moon position data (altitude, azimuth, distance), and moon phase. A time series endpoint is also available to retrieve daily astronomical data across a date range of up to 90 days.

Documentation

Specifications

Other Resources

OpenAPI Specification

ipgeolocation-astronomy-api-openapi.yml Raw ↑
openapi: 3.0.7
info:
  title: 'IPGeolocation.io: Abuse Contact ASN Lookup Astronomy API'
  version: '3.0'
  description: "Retrieve abuse contact information associated with an IPv4 address or IPv6 address.\nThe API returns the organization responsible for handling abuse complaints related\nto the queried IP address, including the abuse contact role, organization name,\nregistered address, email contacts, and phone numbers.\n\nThe abuse contact data helps organizations report malicious activities such as\nspam, phishing, DDoS attacks, IP spoofing, and other network abuse to the\nresponsible network operator.\n\nOne endpoint is available:\n\n- **Abuse lookup** (`GET /v3/abuse`) returns abuse contact information for a\n  single IPv4 or IPv6 address per request.\n\nUse query parameters to control which fields are returned and which fields are\nexcluded from the response to reduce payload size when only specific data\nis required.\n\n## Authentication\n\nTwo authentication methods are supported:\n\n### API Key\n\nPass your API key as the `apiKey` query parameter on every request. You can find your\nkey in the [IPGeolocation dashboard](https://app.ipgeolocation.io/). Store it in\nserver-side environment variables. Avoid exposing it in client-side JavaScript.\n\n### Request Origin (CORS)\n\nAvailable on paid plans only. Whitelist your domain in the dashboard under the\n\"API Keys\" section. Once configured, requests from that domain (and all its subdomains)\nare accepted without passing `apiKey`. Enter your root domain (e.g. `example.com`),\nnot the full URL.\n\nEach plan has a limit on the number of extra API keys and request origins:\n\n| Plan | Extra API Keys + Request Origins |\n|---|---|\n| Starter (150K requests) | 1 |\n| Core (250K requests) | 1 |\n| Plus (500K requests) | 2 |\n| Pro (1M requests) | 2 |\n| Business (2M requests) | 3 |\n| Premium (5M requests) | 3 |\n\nAdditional keys or origins can be added for $2.50 per month each.\n\n## Response Formats\n\nThe API supports JSON (default) and XML output.\n\n- Set the `output` query parameter to `json` or `xml`.\n- Alternatively, set the `Accept` header to `application/json`, `application/xml`,\n  or `text/xml`.\n\nIf neither is specified, the response is returned as JSON. XML responses use a\n`LinkedHashMap` root element.\n\n## Credit Usage\n\nCredits are charged only for successful **HTTP 200** responses. The exact number of\ncredits consumed by a request is returned in the `X-Credits-Charged` response header.\n\nA **single IP abuse contact lookup** (`GET /v3/abuse`) consumes **1 credit** per request.\n\n\n## Field Filtering\n\nUse `fields` to cherry-pick specific fields, or `excludes` to drop fields you do not\nneed. Both accept dot-notation for nested fields (e.g. `abuse.route`,\n`abuse.organization`). The `ip` field is always present regardless of filters.\n\n## Parameter Name Casing\n\nQuery parameter names are case-sensitive. Use exact names such as\n`apiKey`, `ip`, `fields`, `excludes`, and `output`.\n\n## Plan Availability and Usage Limits\n\nThe IP Abuse Contact API is available **only on paid plans**.\n\nPaid subscriptions do not have fixed daily, hourly, or monthly rate limits.  \nIf the monthly quota is exceeded, requests continue and a surcharge may be applied according to the subscribed plan.\n\nFree plans cannot access the IP Abuse Contact API. Requests made with a free plan API key return **HTTP 401 Unauthorized**.\n"
  contact:
    name: IPGeolocation Support
    url: https://ipgeolocation.io/contact.html
    email: support@ipgeolocation.io
  termsOfService: https://ipgeolocation.io/tos.html
  license:
    name: Proprietary
    url: https://ipgeolocation.io/tos.html
servers:
- url: https://api.ipgeolocation.io
  description: Production
security:
- ApiKeyAuth: []
tags:
- name: Astronomy
  description: 'API endpoints for retrieving astronomical information for a given

    location, including sunrise and sunset times, moonrise and moonset

    times, twilight phases, golden hour and blue hour windows, solar noon,

    sun and moon position data (altitude, azimuth, distance), and moon

    phase.


    A time series endpoint is also available to retrieve daily astronomical

    data across a date range of up to 90 days.

    '
  externalDocs:
    description: IPGeolocation Astronomy API documentation
    url: https://ipgeolocation.io/documentation/astronomy-api.html
paths:
  /v3/astronomy:
    get:
      operationId: lookupAstronomy
      summary: IPGeolocation.io Astronomy Lookup
      description: 'Returns astronomical information for a specific location and date,

        including:


        - Sunrise and sunset times

        - Moonrise and moonset times

        - Morning and evening twilight phases (astronomical, nautical, civil)

        - Golden hour and blue hour windows (morning and evening)

        - Solar noon, day length, and astronomical midnight

        - Sun position: altitude, azimuth, distance from Earth

        - Moon position: altitude, azimuth, distance from Earth, parallactic angle

        - Moon phase, illumination percentage, and angular diameter


        The location can be resolved using geographic coordinates (`lat` and

        `long`), a location address (`location`), or an IP address (`ip`).


        If multiple lookup parameters are provided, the API resolves the

        location using the following priority order:


        1. `lat` and `long`

        2. `location`

        3. `ip`


        If none of the lookup parameters are provided, the API resolves the

        location using the public IP address of the requesting client.


        By default, results are calculated for the current date. Pass the

        `date` parameter to retrieve data for a specific date.


        Each successful lookup consumes **1 credit**.

        '
      tags:
      - Astronomy
      parameters:
      - $ref: '#/components/parameters/Lat'
      - $ref: '#/components/parameters/Long'
      - $ref: '#/components/parameters/Location'
      - $ref: '#/components/parameters/Ip'
      - $ref: '#/components/parameters/Date'
      - $ref: '#/components/parameters/Elevation'
      - $ref: '#/components/parameters/TimeZone'
      - $ref: '#/components/parameters/Lang'
      responses:
        '200':
          description: Successful response
          headers:
            X-Credits-Charged:
              description: Number of API credits consumed by this request.
              schema:
                type: number
                example: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AstronomyLookupResponse'
              example:
                location:
                  latitude: '40.76473'
                  longitude: '-74.00084'
                  country_name: United States
                  state_prov: New York
                  city: New York
                  locality: Midtown West
                  elevation: '9'
                astronomy:
                  date: '2026-03-18'
                  current_time: '10:15:00.000'
                  mid_night: 00:06
                  night_end: 04:49
                  morning:
                    astronomical_twilight_begin: 04:49
                    astronomical_twilight_end: 05:21
                    nautical_twilight_begin: 05:21
                    nautical_twilight_end: 05:53
                    civil_twilight_begin: 05:53
                    civil_twilight_end: 06:20
                    blue_hour_begin: 05:42
                    blue_hour_end: 06:03
                    golden_hour_begin: 06:03
                    golden_hour_end: 06:57
                  sunrise: 06:20
                  sunset: '19:00'
                  evening:
                    golden_hour_begin: '18:23'
                    golden_hour_end: '19:16'
                    blue_hour_begin: '19:16'
                    blue_hour_end: '19:38'
                    civil_twilight_begin: '19:00'
                    civil_twilight_end: '19:27'
                    nautical_twilight_begin: '19:27'
                    nautical_twilight_end: '19:59'
                    astronomical_twilight_begin: '19:59'
                    astronomical_twilight_end: '20:31'
                  night_begin: '20:31'
                  sun_status: '-'
                  solar_noon: '12:40'
                  day_length: '12:40'
                  sun_altitude: 42.5
                  sun_distance: 148900000.0
                  sun_azimuth: 150.3
                  moon_phase: WAXING_CRESCENT
                  moonrise: 08:45
                  moonset: '22:10'
                  moon_status: '-'
                  moon_altitude: 15.2
                  moon_distance: 384400.0
                  moon_azimuth: 220.5
                  moon_parallactic_angle: 30.1
                  moon_illumination_percentage: '25.40'
                  moon_angle: 0.52
            application/xml:
              schema:
                $ref: '#/components/schemas/AstronomyLookupResponse'
              example: "<LinkedHashMap>\n  <location>\n      <latitude>40.76473</latitude>\n      <longitude>-74.00084</longitude>\n      <country_name>United States</country_name>\n      <state_prov>New York</state_prov>\n      <city>New York</city>\n      <locality>Midtown West</locality>\n      <elevation>9</elevation>\n  </location>\n  <astronomy>\n      <date>2026-03-18</date>\n      <current_time>15:54:15.261</current_time>\n      <mid_night>01:03</mid_night>\n      <night_end>05:31</night_end>\n      <morning>\n          <astronomical_twilight_begin>05:31</astronomical_twilight_begin>\n          <astronomical_twilight_end>06:03</astronomical_twilight_end>\n          <nautical_twilight_begin>06:03</nautical_twilight_begin>\n          <nautical_twilight_end>06:35</nautical_twilight_end>\n          <civil_twilight_begin>06:35</civil_twilight_begin>\n          <civil_twilight_end>07:02</civil_twilight_end>\n          <blue_hour_begin>06:24</blue_hour_begin>\n          <blue_hour_end>06:46</blue_hour_end>\n          <golden_hour_begin>06:46</golden_hour_begin>\n          <golden_hour_end>07:38</golden_hour_end>\n      </morning>\n      <sunrise>07:02</sunrise>\n      <sunset>19:06</sunset>\n      <evening>\n          <golden_hour_begin>18:30</golden_hour_begin>\n          <golden_hour_end>19:22</golden_hour_end>\n          <blue_hour_begin>19:22</blue_hour_begin>\n          <blue_hour_end>19:44</blue_hour_end>\n          <civil_twilight_begin>19:06</civil_twilight_begin>\n          <civil_twilight_end>19:33</civil_twilight_end>\n          <nautical_twilight_begin>19:33</nautical_twilight_begin>\n          <nautical_twilight_end>20:05</nautical_twilight_end>\n          <astronomical_twilight_begin>20:05</astronomical_twilight_begin>\n          <astronomical_twilight_end>20:38</astronomical_twilight_end>\n      </evening>\n      <night_begin>20:38</night_begin>\n      <sun_status>-</sun_status>\n      <solar_noon>13:04</solar_noon>\n      <day_length>12:04</day_length>\n      <sun_altitude>33.35169743090959</sun_altitude>\n      <sun_distance>148782269.19009596</sun_distance>\n      <sun_azimuth>234.07341944671086</sun_azimuth>\n      <moon_phase>NEW_MOON</moon_phase>\n      <moonrise>06:44</moonrise>\n      <moonset>18:57</moonset>\n      <moon_status>-</moon_status>\n      <moon_altitude>31.430127664137917</moon_altitude>\n      <moon_distance>374392.1525559059</moon_distance>\n      <moon_azimuth>237.27212480757834</moon_azimuth>\n      <moon_parallactic_angle>39.582319837764366</moon_parallactic_angle>\n      <moon_illumination_percentage>-0.07</moon_illumination_percentage>\n      <moon_angle>357.01360045404493</moon_angle>\n  </astronomy>\n</LinkedHashMap>\n"
        '400':
          description: "Bad Request – Possible reasons include:\n  - If the provided IPv4 or IPv6 address is invalid.\n  - If special character(s) `( ) [ ] { } | ^ \\`` is passed in the\n    API URL either as a parameter or its value, especially in the\n    case of an API key.\n  - If the provided `date` is not in the format `yyyy-MM-dd`.\n  - If an invalid or unsupported `lang` parameter is provided.\n  - If the provided values for `lat` and `long` are not numbers,\n    or fall outside the acceptable ranges. Valid latitude range is\n    **-90 to 90**; valid longitude range is **-180 to 180**.\n  - If the provided `elevation` value exceeds the maximum allowed\n    value of **10,000 meters**.\n  - If the provided `time_zone` is invalid or unrecognized.\n"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalidIp:
                  summary: Invalid IPv4 or IPv6 address
                  value:
                    message: Provided name, service or IP address '999.999.999.999' is not valid.
                specialCharacters:
                  summary: Invalid characters in request
                  value:
                    message: Invalid character found in the request target.
                invalidDate:
                  summary: Invalid date format
                  value:
                    message: You must provide date in the 'yyyy-MM-dd' format
                invalidCoordinates:
                  summary: Coordinates out of range
                  value:
                    message: Longitude must be between -180 and 180 or latitude must be between -90 and 90.
                invalidElevation:
                  summary: Elevation exceeds maximum
                  value:
                    message: Elevation cannot be greater than 10000 meters.
                invalidTimezone:
                  summary: Invalid timezone identifier
                  value:
                    message: Check whether your input values are correct; time_zone_name = Europe/InvalidCity
                invalidLang:
                  summary: Unsupported language parameter
                  value:
                    message: This 'xx' lang is not valid. Please use 'en' as the default language.
        '401':
          description: "Unauthorized – Possible reasons include:\n  - Missing or invalid API key.\n  - If your account has been disabled or locked by the admin due\n    to abuse or illegal activity.\n  - When the request is made using an API key for a database\n    subscription.\n  - When the request is made on a paused subscription.\n  - If you are making API requests after your subscription trial\n    has expired.\n  - If your active-until date has passed and you need to renew\n    or upgrade your subscription.\n  - A language other than English is specified in the `lang`\n    parameter while using a Free/Developer plan API key.\n"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                missingApiKey:
                  summary: Missing API key
                  value:
                    message: Please provide an API key (as 'apiKey=YOUR_API_KEY' URL parameter) to use IPGeolocation API. To get your free API Key, sign up at https://app.ipgeolocation.io/login
                invalidApiKey:
                  summary: Invalid API key
                  value:
                    message: Provided API key is not valid. Contact technical support for assistance at support@ipgeolocation.io
                lockedAccount:
                  summary: Account locked
                  value:
                    message: Your account has been locked to use IPGeolocation API. Contact technical support for assistance at support@ipgeolocation.io
                databaseSubscription:
                  summary: Database subscription key used
                  value:
                    message: You cannot query IPGeolocation API on a database plan subscription.
                pausedSubscription:
                  summary: Subscription paused
                  value:
                    message: Your subscription has been paused. Please resume your subscription to use IPGeolocation API.
                expiredSubscription:
                  summary: Subscription expired
                  value:
                    message: Your subscription has expired at DATE. Please subscribe to a paid plan to continue using IPGeolocation API without interruption or contact technical support for assistance at support@ipgeolocation.io
                freePlanLang:
                  summary: Non-English language on Free plan
                  value:
                    message: This 'de' lang is not supported for your current subscription. Please use 'en' as the default language or upgrade your subscription to use this feature.
        '404':
          $ref: '#/components/responses/NotFound'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '499':
          $ref: '#/components/responses/ClientClosedRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        '505':
          $ref: '#/components/responses/HttpVersionNotSupported'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /v3/astronomy/timeSeries:
    get:
      operationId: lookupAstronomyTimeSeries
      summary: IPGeolocation.io Astronomy Time Series Lookup
      description: "Returns daily astronomical information for a specific location across\na date range.\n\nThe response contains an array of daily astronomy records, each\nincluding sunrise, sunset, moonrise, moonset, twilight phases,\nsolar noon, day length, and moon phase. Real-time positional data\n(altitude, azimuth, distance) is not included in time series\nresponses.\n\nThe location can be resolved using geographic coordinates (`lat` and\n`long`), a location address (`location`), or an IP address (`ip`).\n\n**Date range constraints:**\n- Both `dateStart` and `dateEnd` are required.\n- The maximum allowed span between `dateStart` and `dateEnd` is\n  **90 days**.\n- Both past and future dates are supported within the 90-day window.\n\nEach successful lookup consumes **1 credit** per request.\n"
      tags:
      - Astronomy
      parameters:
      - $ref: '#/components/parameters/Lat'
      - $ref: '#/components/parameters/Long'
      - $ref: '#/components/parameters/Location'
      - $ref: '#/components/parameters/Ip'
      - $ref: '#/components/parameters/DateStart'
      - $ref: '#/components/parameters/DateEnd'
      - $ref: '#/components/parameters/Elevation'
      - $ref: '#/components/parameters/TimeZone'
      - $ref: '#/components/parameters/Lang'
      responses:
        '200':
          description: Successful response
          headers:
            X-Credits-Charged:
              description: Number of API credits consumed by this request.
              schema:
                type: number
                example: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AstronomyTimeSeriesResponse'
              example:
                location:
                  latitude: '40.76473'
                  longitude: '-74.00084'
                  country_name: United States
                  state_prov: New York
                  city: New York
                  locality: Midtown West
                  elevation: '9'
                astronomy:
                - date: '2026-03-18'
                  mid_night: 00:06
                  night_end: 04:49
                  morning:
                    astronomical_twilight_begin: 04:49
                    astronomical_twilight_end: 05:21
                    nautical_twilight_begin: 05:21
                    nautical_twilight_end: 05:53
                    civil_twilight_begin: 05:53
                    civil_twilight_end: 06:20
                    blue_hour_begin: 05:42
                    blue_hour_end: 06:03
                    golden_hour_begin: 06:03
                    golden_hour_end: 06:57
                  sunrise: 06:20
                  sunset: '19:00'
                  evening:
                    golden_hour_begin: '18:23'
                    golden_hour_end: '19:16'
                    blue_hour_begin: '19:16'
                    blue_hour_end: '19:38'
                    civil_twilight_begin: '19:00'
                    civil_twilight_end: '19:27'
                    nautical_twilight_begin: '19:27'
                    nautical_twilight_end: '19:59'
                    astronomical_twilight_begin: '19:59'
                    astronomical_twilight_end: '20:31'
                  night_begin: '20:31'
                  sun_status: '-'
                  solar_noon: '12:40'
                  day_length: '12:40'
                  moon_phase: WAXING_CRESCENT
                  moonrise: 08:45
                  moonset: '22:10'
                  moon_status: '-'
                - date: '2026-03-19'
                  mid_night: 00:06
                  night_end: 04:47
                  morning:
                    astronomical_twilight_begin: 04:47
                    astronomical_twilight_end: 05:19
                    nautical_twilight_begin: 05:19
                    nautical_twilight_end: 05:51
                    civil_twilight_begin: 05:51
                    civil_twilight_end: 06:18
                    blue_hour_begin: 05:40
                    blue_hour_end: 06:01
                    golden_hour_begin: 06:01
                    golden_hour_end: 06:55
                  sunrise: 06:18
                  sunset: '19:02'
                  evening:
                    golden_hour_begin: '18:25'
                    golden_hour_end: '19:18'
                    blue_hour_begin: '19:18'
                    blue_hour_end: '19:40'
                    civil_twilight_begin: '19:02'
                    civil_twilight_end: '19:29'
                    nautical_twilight_begin: '19:29'
                    nautical_twilight_end: '20:01'
                    astronomical_twilight_begin: '20:01'
                    astronomical_twilight_end: '20:33'
                  night_begin: '20:33'
                  sun_status: '-'
                  solar_noon: '12:40'
                  day_length: '12:44'
                  moon_phase: WAXING_CRESCENT
                  moonrise: 09:30
                  moonset: '23:05'
                  moon_status: '-'
            application/xml:
              schema:
                $ref: '#/components/schemas/AstronomyLookupResponse'
              example: "<LinkedHashMap>\n  <location>\n      <latitude>40.76473</latitude>\n      <longitude>-74.00084</longitude>\n      <country_name>United States</country_name>\n      <state_prov>New York</state_prov>\n      <city>New York</city>\n      <locality>Midtown West</locality>\n      <elevation>9</elevation>\n  </location>\n  <astronomy>\n      <date>2026-03-18</date>\n      <current_time>15:54:15.261</current_time>\n      <mid_night>01:03</mid_night>\n      <night_end>05:31</night_end>\n      <morning>\n          <astronomical_twilight_begin>05:31</astronomical_twilight_begin>\n          <astronomical_twilight_end>06:03</astronomical_twilight_end>\n          <nautical_twilight_begin>06:03</nautical_twilight_begin>\n          <nautical_twilight_end>06:35</nautical_twilight_end>\n          <civil_twilight_begin>06:35</civil_twilight_begin>\n          <civil_twilight_end>07:02</civil_twilight_end>\n          <blue_hour_begin>06:24</blue_hour_begin>\n          <blue_hour_end>06:46</blue_hour_end>\n          <golden_hour_begin>06:46</golden_hour_begin>\n          <golden_hour_end>07:38</golden_hour_end>\n      </morning>\n      <sunrise>07:02</sunrise>\n      <sunset>19:06</sunset>\n      <evening>\n          <golden_hour_begin>18:30</golden_hour_begin>\n          <golden_hour_end>19:22</golden_hour_end>\n          <blue_hour_begin>19:22</blue_hour_begin>\n          <blue_hour_end>19:44</blue_hour_end>\n          <civil_twilight_begin>19:06</civil_twilight_begin>\n          <civil_twilight_end>19:33</civil_twilight_end>\n          <nautical_twilight_begin>19:33</nautical_twilight_begin>\n          <nautical_twilight_end>20:05</nautical_twilight_end>\n          <astronomical_twilight_begin>20:05</astronomical_twilight_begin>\n          <astronomical_twilight_end>20:38</astronomical_twilight_end>\n      </evening>\n      <night_begin>20:38</night_begin>\n      <sun_status>-</sun_status>\n      <solar_noon>13:04</solar_noon>\n      <day_length>12:04</day_length>\n      <sun_altitude>33.35169743090959</sun_altitude>\n      <sun_distance>148782269.19009596</sun_distance>\n      <sun_azimuth>234.07341944671086</sun_azimuth>\n      <moon_phase>NEW_MOON</moon_phase>\n      <moonrise>06:44</moonrise>\n      <moonset>18:57</moonset>\n      <moon_status>-</moon_status>\n      <moon_altitude>31.430127664137917</moon_altitude>\n      <moon_distance>374392.1525559059</moon_distance>\n      <moon_azimuth>237.27212480757834</moon_azimuth>\n      <moon_parallactic_angle>39.582319837764366</moon_parallactic_angle>\n      <moon_illumination_percentage>-0.07</moon_illumination_percentage>\n      <moon_angle>357.01360045404493</moon_angle>\n  </astronomy>\n</LinkedHashMap>\n"
        '400':
          description: "Bad Request – Possible reasons include:\n  - If the provided IPv4 or IPv6 address is invalid.\n  - If special character(s) `( ) [ ] { } | ^ \\`` is passed in the\n    API URL either as a parameter or its value.\n  - If `dateStart` or `dateEnd` is not in the format `yyyy-MM-dd`.\n  - If the span between `dateStart` and `dateEnd` is greater than\n    **90 days**.\n  - If the provided values for `lat` and `long` are not numbers,\n    or fall outside the acceptable ranges.\n  - If the provided `elevation` value exceeds **10,000 meters**.\n  - If the provided `time_zone` is invalid or unrecognized.\n  - If an invalid or unsupported `lang` parameter is provided.\n"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalidIp:
                  summary: Invalid IPv4 or IPv6 address
                  value:
                    message: Provided name, service or IP address '999.999.999.999' is not valid.
                specialCharacters:
                  summary: Invalid characters in request
                  value:
                    message: Invalid character found in the request target.
                invalidDateFormat:
                  summary: Invalid date format
                  value:
                    message: You must provide date in the 'yyyy-MM-dd' format
                dateRangeExceeded:
                  summary: Date range exceeds 90 days
                  value:
                    message: Date range cannot exceed 90 days.
                invalidCoordinates:
                  summary: Coordinates out of range
                  value:
                    message: Longitude must be between -180 and 180 or latitude must be between -90 and 90.
                invalidElevation:
                  summary: Elevation exceeds maximum
                  value:
                    message: Elevation cannot be greater than 10000 meters.
                invalidTimezone:
                  summary: Invalid timezone identifier
                  value:
                    message: Check whether your input values are correct; time_zone_name = Europe/InvalidCity
                invalidLang:
                  summary: Unsupported language parameter
                  value:
                    message: This 'xx' lang is not valid. Please use 'en' as the default language.
        '401':
          description: "Unauthorized – Possible reasons include:\n  - Missing or invalid API key.\n  - If your account has been disabled or locked by the admin.\n  - When the request is made using an API key for a database\n    subscription.\n  - When the request is made on a paused subscription.\n  - If your subscription trial has expired.\n  - If your active-until date has passed.\n  - A language other than English is specified in the `lang`\n    parameter while using a Free/Developer plan API key.\n"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                missingApiKey:
                  summary: Missing API key
                  value:
                    message: Please provide an API key (as 'apiKey=YOUR_API_KEY' URL parameter) to use IPGeolocation API. To get your free API Key, sign up at https://app.ipgeolocation.io/login
                invalidApiKey:
                  summary: Invalid API key
                  value:
                    message: Provided API key is not valid. Contact technical support for assistance at support@ipgeolocation.io
                lockedAccount:
                  summary: Account locked
                  value:
                    message: Your account has been locked to use IPGeolocation API. Contact technical support for assistance at support@ipgeolocation.io
                databaseSubscription:
                  summary: Database subscription key used
                  value:
                    message: You cannot query IPGeolocation API on a database plan subscription.
                pausedSubscription:
                  summary: Subscription paused
                  value:
                    message: Your subscription has been paused. Please resume your subscription to use IPGeolocation API.
                expiredSubscription:
                  summary: Subscription expired
                  value:
                    message: Your subscription has expired at DATE. Please subscribe to a paid plan to continue using IPGeolocation API without interruption or contact technical support for assistance at support@ipgeolocation.io
                freePlanLang:
                  summary: Non-English language on Free plan
                  value:
                    message: This 'de' lang is not supported for your current subscription. Please use 'en' as the default language or upgrade your subscription to use this feature.
        '404':
          $ref: '#/components/responses/NotFound'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '499':
          $ref: '#/components/responses/ClientClosedRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
        '505':
          $ref: '#/components/responses/HttpVersionNotSupported'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  parameters:
    DateEnd:
      name: dateEnd
      in: query
      required: true
      description: 'End date of the time series range.


        Must be in `yyyy-MM-dd` format. The maximum allowed span between

        `dateStart` and `dateEnd` is **90 days**.

        '
      schema:
        type: string
        format: date
      examples:
        example:
          summary: End date
          value: '2026-04-18'
    Location:
      name: location
      in: query
      required: false
      description: 'Address or location name used to determine the astronomical

        information. Typically a city-level or region-level address such as

        `New York, USA` or `London, UK`.


        When this parameter is used, the API returns a `location` object

        containing geolocation details alongside the `astronomy` object.

        '
      schema:
        type: string
      examples:
        none:
          summary: Do not provide location
          value: ''
        newYork:
          summary: City address
          value: New York, USA
        london:
          summary: City address
          value: London, UK
    Lat:
      name: lat
      in: query
      required: false
      description: 'Latitude coordinate of the location. Must be provided together with

        the `long` parameter.


        Valid lati

# --- truncated at 32 KB (61 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/ipgeolocation/refs/heads/main/openapi/ipgeolocation-astronomy-api-openapi.yml