Distance To Coast

The Coastal Distance API endpoint is designed to provide you with accurate geospatial data regarding the distance of a property to the nearest coastline. This can be a critical parameter for various use cases such as real estate, risk assessment, climate studies, and much more.

By providing an address, our API calculates the shortest straight-line distance from the given property to the closest coastal point. The response includes distances in three convenient units: feet, miles, and kilometers, allowing you to choose the most suitable measurement unit for your specific requirements.

In addition to this, the API returns the geographical coordinates (longitude and latitude) of both the given property and the corresponding coastal point based on Google Maps' data. This information can be useful for a wide array of applications, from plotting and mapping to complex geo-analytical tasks.

Our API is designed to deliver fast, reliable, and accurate data, enabling you to focus on what matters: making informed decisions based on precise geographical information. Stay tuned as you explore this documentation to learn how to integrate and make the best use of our Coastal Distance API endpoint in your applications.

Endpoints
POST /v1/distance-to-coast

Distance Call

Distance by address

POST https://api.askfetch.com/v1/distance-to-coast

Headers

Name
Type
Description

Authorization*

Bearer

Fetch API Key

Request Body

Name
Type
Description

address*

string

The formatted address (i.e. 58 bahama cir tampa fl 33606)

{
    "address": {
        "lat": 25.789935,
        "lng": -80.129767
    },
    "coast": {
        "lat": 25.78823773,
        "lng": -80.12077137
    },
    "distance": {
        "raw": {
            "kilometers": 0.92,
            "meters": 920,
            "feet": 3018.3728,
            "miles": 0.57166149664
        },
        "formatted": {
            "kilometers": "0.920",
            "meters": "920",
            "feet": "3,018.37",
            "miles": "0.57"
        }
    },
    "direction_to_coast": "920 meters to the east-southeast",
    "bearing_degrees": "101.8°",
    "compass_point": "east-southeast"
}

Example calls

Last updated