82trust / 100

Geocode

by geocode in Weather & location

x402 APIPassing, checked 5 h ago

Forward-geocode a street address or place name (WORLDWIDE) to coordinates + parsed address components via OpenStreetMap Nominatim (public, keyless).

GET https://api.agentstools.dev/geocode

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
26 ms typical, 26 ms slowest 5%
Last check
5 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://api.agentstools.dev/geocode?address=1600+Pennsylvania+Ave+NW%2C+Washington%2C+DC"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.agentstools.dev%2Fgeocode
const res = await pay("https://api.agentstools.dev/geocode?address=1600+Pennsylvania+Ave+NW%2C+Washington%2C+DC");
console.log(await res.json());

Example input

{
  "address": "1600 Pennsylvania Ave NW, Washington, DC"
}

Example output

{
  "components": {
    "city": "Washington",
    "country": "United States",
    "country_code": "us",
    "house_number": "1600",
    "postcode": "20500",
    "road": "Pennsylvania Avenue NW",
    "state": "District of Columbia"
  },
  "country": "United States",
  "country_code": "us",
  "lat": 38.8977,
  "lon": -77.0365,
  "matched_address": "White House, 1600, Pennsylvania Avenue NW, Washington, District of Columbia, 20500, USA",
  "source": "osm_nominatim"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
5 h agoPassed40226 ms$0.002