Geo Calculator API

API ID 2142

Widget API to calculate Geo Coordinates, Geo Fences and Sky, Sun, Moon, Eclipse information.

100% uptime 46 ms avg response

API Documentation

Endpoints

Request

Convert the list of geo coordinates to a standard format - (latlon | utm | mgrs | ecef | epsg3857 | georef | cartesian)

Endpoint ID: 1942
POST https://zylalabs.com/api/2142/geo+calculator+api/1942/convert
INPUT PARAMETERS

Convert — Endpoint Features

Object Description
Request Body Required Json

Free test requests remaining: 3 of 3.


INPUT PARAMETERS

API EXAMPLE RESPONSE
JSON
{"coordinates":"N 39º 48' 6.368\" W 86º 9' 27.968\""}
Convert — CODE SNIPPETS

curl --location --request POST 'https://zylalabs.com/api/2142/geo+calculator+api/1942/convert' --header 'Authorization: Bearer YOUR_API_KEY' 

--data-raw '{
  "coordinates": "39.801769 -86.157769",
  "system": "latlon",
  "format": "seconds"
}'

    
Request

Calculate sun, moon, eclipse and sky information for the date and location.

Endpoint ID: 1943
POST https://zylalabs.com/api/2142/geo+calculator+api/1943/sky
INPUT PARAMETERS

Sky — Endpoint Features

Object Description
Request Body Required Json

Free test requests remaining: 3 of 3.


INPUT PARAMETERS

API EXAMPLE RESPONSE
JSON
{"sun":{"isUp":true,"set":"2023-06-17T01:15:59","rise":"2023-06-17T10:17:17","noon":"2023-06-17T17:46:49","altitude":48.81284808403095,"azimuth":99.6567012311506,"dawn":"2023-06-17T09:44:35","dusk":"2023-06-17T01:48:40","lastEclipse":{"hasEclipseData":true,"date":"2021-06-10T00:00:00","type":0,"partialEclispeBegin":"2021-06-10T10:19:00","aorTEclipseBegin":"0001-01-01T00:00:00","maximumEclipse":"2021-06-10T10:19:00","aorTEclipseEnd":"0001-01-01T00:00:00","partialEclispeEnd":"2021-06-10T10:35:25","aorTDuration":"00:00:00"},"nextEclipse":{"hasEclipseData":true,"date":"2023-10-14T00:00:00","type":0,"partialEclispeBegin":"2023-10-14T15:39:28","aorTEclipseBegin":"0001-01-01T00:00:00","maximumEclipse":"2023-10-14T17:02:09","aorTEclipseEnd":"0001-01-01T00:00:00","partialEclispeEnd":"2023-10-14T18:28:39","aorTDuration":"00:00:00"},"rightAscension":85.82780110902979,"declination":23.383002369277698},"moon":{"isUp":true,"set":"2023-06-17T00:16:53.155Z","rise":"2023-06-17T09:27:25.111Z","name":null,"sign":"Gemini","altitude":56.23932723895527,"azimuth":101.71183722382726,"distance":395088331.44547164,"illumination":{"fraction":0.004394041226453371,"angle":1.9970019788686353,"phase":0.9788845298393997,"phaseName":"Waning Crescent","phaseNameEnum":7},"bearing":0.0,"lastEclipse":{"hasEclipseData":true,"date":"2022-11-08T00:00:00","type":2,"penumbralEclipseBegin":"2022-11-08T08:02:00","partialEclispeBegin":"2022-11-08T09:09:00","totalEclipseBegin":"2022-11-08T10:17:00","midEclipse":"2022-11-08T10:59:00","totalEclipseEnd":"2022-11-08T11:42:00","partialEclispeEnd":"2022-11-08T12:49:00","penumbralEclispeEnd":"2022-11-08T13:56:00"},"nextEclipse":{"hasEclipseData":true,"date":"2024-03-25T00:00:00","type":0,"penumbralEclipseBegin":"2024-03-25T04:53:00","partialEclispeBegin":"0001-01-01T00:00:00","totalEclipseBegin":"0001-01-01T00:00:00","midEclipse":"2024-03-25T07:13:00","totalEclipseEnd":"0001-01-01T00:00:00","partialEclispeEnd":"0001-01-01T00:00:00","penumbralEclispeEnd":"2024-03-25T09:32:00"},"rightAscension":78.28730335981335,"declination":26.7228180688204},"event":{"zodiacSign":"Gemini","spring":"2023-03-20T21:25:53","summer":"2023-06-21T14:58:50","fall":"2023-09-23T06:51:26","winter":"2023-12-22T03:28:51","nextPerigee":"2023-07-04T22:29:26","lastPerigee":"2023-06-06T23:08:44","nextApogee":"2023-06-22T18:31:35","lastApogee":"2023-05-26T01:39:50"}}
Sky — CODE SNIPPETS

curl --location --request POST 'https://zylalabs.com/api/2142/geo+calculator+api/1943/sky' --header 'Authorization: Bearer YOUR_API_KEY' 

--data-raw '{
  "date": "2023-06-17T14:47:30.9231894Z",
  "coordinate": "39.801769 -86.157769"
}'

    
Request

Check if a list of coordinates are inside of a fence of coordinates.

Endpoint ID: 1944
POST https://zylalabs.com/api/2142/geo+calculator+api/1944/fence
INPUT PARAMETERS

Fence — Endpoint Features

Object Description
Request Body Required Json

Free test requests remaining: 3 of 3.


INPUT PARAMETERS

API EXAMPLE RESPONSE
JSON
{"insides":[true],"distances":[13438.80200086406]}
Fence — CODE SNIPPETS

curl --location --request POST 'https://zylalabs.com/api/2142/geo+calculator+api/1944/fence' --header 'Authorization: Bearer YOUR_API_KEY' 

--data-raw '{
  "fenceCoordinates": [
    "39.801769 -86.157769",
    "40.801769 -86.157769",
    "40.801769 -87.157769",
    "39.801769 -87.157769",
    "39.801769 -86.157769"
  ],
  "checkCoordinates": [
    "40 -87"
  ]
}'

    
Request

Calculate the distance between two geo coordinates.

Endpoint ID: 1945
POST https://zylalabs.com/api/2142/geo+calculator+api/1945/distance
INPUT PARAMETERS

Distance — Endpoint Features

Object Description
Request Body Required Json

Free test requests remaining: 3 of 3.


INPUT PARAMETERS

API EXAMPLE RESPONSE
JSON
{"meters":140596.58853321144,"bearing":141.94878033913545}
Distance — CODE SNIPPETS

curl --location --request POST 'https://zylalabs.com/api/2142/geo+calculator+api/1945/distance' --header 'Authorization: Bearer YOUR_API_KEY' 

--data-raw '{
  "coordinate1": "39.801769 -86.157769",
  "coordinate2": "38.801769 -85.157769",
  "useEllipse": false
}'

    

API Access Key & Authentication

After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the Geo Calculator API simply include your bearer token in the Authorization header.

Headers
Header Description
Authorization Required Should be Bearer access_key. See "Your API Access Key" above when you are subscribed.

Simple Transparent Pricing

No long-term commitment. Upgrade, downgrade, or cancel anytime.

(Save 2 months with annual billing 🎉)

🚀 Enterprise Plan
Custom Volume

  • Custom Rate Limit
  • Team & Access Management
  • SLA-backed Uptime
  • Specialized Customer Support
  • Real-Time API Monitoring
  • Enterprise Security & Compliance
Minimum annual contract: USD 10,000

Trusted by leading companies

Overview

Geo Calculator offers four endpoints to help you work with coordinates:

  • Convert - Convert a list of geo coordinates to a standard format - (latlon | utm | mgrs | ecef | epsg3857 | georef | cartesian)
  • Distance - Calculate the distance between two geo coordinates
  • Fence - Check if a list of coordinates are inside of a fence of coordinates.
  • Sky - Calculate sun, moon, eclipse and sky information for the date and location

Some Common Use Cases:

  1. Mapping and Navigation: The API enables developers to calculate accurate geo coordinates, allowing for precise mapping and navigation applications.  Results can be used to find locations, plan routes, and real-time directions.

  2. Geofencing Applications: With the API's geo fence functionality, developers can check virtual boundaries around specific locations. This is useful for applications that require monitoring and triggering actions based on entering or exiting these boundaries, such as geofencing for asset tracking, location-based notifications, or safety alerts.

  3. Weather Applications: By utilizing the accurate geo coordinates provided by the API, developers can enhance weather forecasting applications. Real-time location data enables more precise and localized weather predictions, improving the user experience.

  4. Astronomy and Celestial Events: The API's information about the sky, sun, moon, and eclipses is valuable for applications related to astronomy, stargazing, photography, and outdoor activities. Users can access data such as sunrise and sunset times, moon phases, moonrise and moonset times, and eclipse predictions.

  5. Photography and Filmmaking: Photographers and filmmakers can benefit from the API's features when planning shoots. They can determine the ideal times for golden hour or blue hour, plan moonlit or starry sky shots, or even schedule specific eclipse events.

  6. Outdoor Recreation and Adventure: Outdoor enthusiasts can use the API to check sunrise and sunset times for planning hikes, camping trips, or outdoor activities. Additionally, moonrise and moonset times can assist with moonlit hikes or moonlight photography.

  7. Event Planning: Event organizers can incorporate the API to determine sunrise and sunset times, allowing them to schedule outdoor events at the optimal hours. They can also consider moon phases and other celestial events to enhance the overall experience

 

Geo Calculator API FAQs

Calculate sun, moon, eclipse and sky information for the date and location.

Calculate the distance between two geo coordinates.

Check if a list of coordinates are inside of a fence of coordinates.

Convert a list of geo coordinates to a standard format - (latlon | utm | mgrs | ecef | epsg3857 | georef | cartesian)

Mapping and Navigation: The API enables developers to calculate accurate geo coordinates, allowing for precise mapping and navigation applications. Results can be used to find locations, plan routes, and real-time directions.

The Convert endpoint returns geo coordinates in a standardized format, such as latlon, utm, mgrs, ecef, epsg3857, georef, or cartesian. The response includes the converted coordinates, making it easy to integrate into various applications.

The Sky endpoint response includes fields like sun and moon status, rise and set times, altitude, azimuth, and eclipse data. This information is crucial for applications related to astronomy and outdoor planning.

Users can customize requests to the Distance endpoint by providing two sets of geo coordinates (latitude and longitude). The API calculates the distance and bearing between these points, allowing for tailored distance measurements.

Typical use cases for the Fence endpoint include geofencing for asset tracking, location-based notifications, and safety alerts. It helps determine if specific coordinates fall within defined boundaries, enabling real-time monitoring.

The Distance endpoint response is organized into key fields: "meters" for the calculated distance and "bearing" for the direction from the first coordinate to the second. This structure allows for straightforward interpretation of distance data.

The Sky endpoint provides information about sun and moon positions, eclipse events, and celestial timings such as sunrise, sunset, moonrise, and moonset. This data is valuable for planning outdoor activities and astronomical observations.

The Convert endpoint accepts a list of geo coordinates and the desired output format (e.g., latlon, utm). Users can specify multiple coordinates in a single request, allowing for batch processing of conversions.

Data accuracy is maintained through the use of reliable geospatial databases and algorithms for calculations. Regular updates and quality checks ensure that the information provided by the API remains precise and trustworthy.

General FAQs

To obtain your API key, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key to authenticate your requests.

You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.

The free trial lasts for 7 days and allows you to make up to 50 API requests.

No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.

Yes. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.

Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.

Prices are listed in USD (United States Dollar), EUR (Euro), CAD (Canadian Dollar), AUD (Australian Dollar), and GBP (British Pound). We accept all major debit and credit cards. Our payment system uses the latest security technology and is powered by Stripe, one of the world's most reliable payment companies. If you have any trouble paying by card, just contact us at [email protected]

Additionally, if you already have an active subscription in any of these currencies (USD, EUR, CAD, AUD, GBP), that currency will remain for subsequent subscriptions. You can change the currency at any time as long as you don't have any active subscriptions.
The local currency shown on the pricing page is based on the country of your IP address and is provided for reference only. The actual prices are in USD (United States Dollar). When you make a payment, the charge will appear on your card statement in USD, even if you see the equivalent amount in your local currency on our website. This means you cannot pay directly with your local currency.
Occasionally, a bank may decline the charge due to its fraud protection settings. We suggest reaching out to your bank initially to check if they are blocking our charges. Also, you can access the Billing Portal and change the card associated to make the payment. If these does not work and you need further assistance, please contact our team at [email protected]
Prices are determined by a recurring monthly or yearly subscription, depending on the chosen plan.
API calls are deducted from your plan based on successful requests. Each plan comes with a specific number of calls that you can make per month. Only successful calls, indicated by a Status 200 response, will be counted against your total. This ensures that failed or incomplete requests do not impact your monthly quota.
Zyla API Hub works on a recurring monthly subscription system. Your billing cycle will start the day you purchase one of the paid plans, and it will renew the same day of the next month. So be aware to cancel your subscription beforehand if you want to avoid future charges.
To upgrade your current subscription plan, simply go to the pricing page of the API and select the plan you want to upgrade to. The upgrade will be instant, allowing you to immediately enjoy the features of the new plan. Please note that any remaining calls from your previous plan will not be carried over to the new plan, so be aware of this when upgrading. You will be charged the full amount of the new plan.
To check how many API calls you have left for the current month, refer to the 'X-Zyla-API-Calls-Monthly-Remaining' field in the response header. For example, if your plan allows 1,000 requests per month and you've used 100, this field in the response header will indicate 900 remaining calls.

You can monitor your API usage through the response headers included with every request:

x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.

The 'X-Zyla-RateLimit-Reset' header shows the number of seconds until your rate limit resets. This tells you when your request count will start fresh. For example, if it displays 3,600, it means 3,600 seconds are left until the limit resets.

Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.

Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.

After 7 days, you will be charged the full amount for the plan you were subscribed to during the trial. Therefore, it's important to cancel before the trial period ends. Refund requests for forgetting to cancel on time are not accepted.
When you subscribe to an API free trial, you can make up to 50 API calls. If you wish to make additional API calls beyond this limit, the API will prompt you to perform an "Start Your Paid Plan." You can find the "Start Your Paid Plan" button in your profile under Subscription -> Choose the API you are subscribed to -> Pricing tab.
You can contact us through our chat channel to receive immediate assistance. We are always online from 8 am to 5 pm (EST). If you reach us after that time, we will get back to you as soon as possible. Additionally, you can contact us via email at [email protected]

Please have a look at our Refund Policy: https://zylalabs.com/terms#refund


Related APIs


You might also like