OnWater API

Beginner's Pick Geocoding / No Auth Required Beginner HTTPS
Free to Use Varies (check documentation)

Overview

OnWater is a simple free API that tells you whether a given latitude and longitude coordinate is on water or on land. You pass coordinates and get back a boolean answer — perfect for validating location data or building map-based games. No API key is needed, making it extremely easy to use right away.

Beginner Tip

This API answers one simple question: is this point on water? Use it to validate that users are not accidentally placing markers in the ocean. Latitude ranges from -90 to 90 and longitude from -180 to 180.

Available Data

OnWater data via REST API

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from OnWater",
    "description": "Determine if a lat/lon is on water or land",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

lat The latitude value you submitted in the request
lon The longitude value you submitted in the request
water True if the coordinate is on water; false if it is on land

Implementation Example

Request
const url = "https://onwater.io/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

400 Bad Request Coordinates are out of valid range or malformed
Ensure latitude is between -90 and 90 and longitude is between -180 and 180, formatted as decimal numbers
Unexpected water result for a city The coordinate may be slightly off, landing in a river or bay
Snap your coordinates to a known land point; small offsets near coastlines or rivers can return water=true
Slow response Free tier has no SLA guarantee
Cache results locally for coordinates you check repeatedly; the water/land classification for a given point never changes

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Geocoding
Difficulty Beginner
Verified: 2026-04-07

Related Tags

Similar APIs

View All →