{"uid":"cap_KBs_b4HxFlmgNsBSsjbxS","slug":"geocoding-api-forward-reverse-via-x402-2507272a","name":"Geocoding API (Forward & Reverse) via x402","description":"Invoice-to-JSON, on-chain tools (transaction explainer + payment check, wallet profile, contract ABI, ERC-20 token risk), company contacts and web-to-RAG for AI agents. Pay per call with x402 (USDC on Base). No signup, no API key.","url":"https://freetier-agent-api.pages.dev/api/geocode?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":[],"properties":{"q":{"type":"string","description":"address or place name (forward geocoding)"},"lat":{"type":"string","description":"latitude for reverse geocoding (with lon)"},"lon":{"type":"string","description":"longitude for reverse geocoding (with lat)"},"lang":{"type":"string","description":"result language, default en"},"limit":{"type":"string","description":"1-5 matches, default 1"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 filter, e.g. dk or us,ca"}}}}},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"mode":{"type":["string","null"]},"count":{"type":["number","null"]},"query":{"type":"object","properties":{"q":{"type":["string","null"]},"limit":{"type":["number","null"]},"country":{}}},"results":{"type":"array","items":{"type":["object","null"]}},"sources":{"type":"array","items":{"type":["object","null"]}},"attribution":{"type":["string","null"]}}}}}}},"responseSchema":{"type":"json","example":{"mode":"forward","count":1,"query":{"q":"Eiffel Tower, Paris","limit":1,"country":null},"results":[{"lat":48.8582599,"lon":2.2945006,"osm":{"id":5013364,"type":"way"},"bbox":[48.8574753,48.8590453],"name":"Eiffel Tower","type":"tower","address":{"city":"Paris","road":"Avenue Anatole France","state":"Ile-de-France","county":null,"country":"France","postcode":"75007","country_code":"FR","house_number":"5"},"category":"man_made","importance":0.621,"display_name":"Eiffel Tower, 5, Avenue Anatole France, Quartier du Gros-Caillou, 7th Arrondissement, Paris, Ile-de-France, Metropolitan France, 75007, France"}],"sources":[{"url":"https://nominatim.org/","name":"OpenStreetMap Nominatim","license":"ODbL 1.0"}],"attribution":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0015","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.0015/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0015","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0015","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_xoRwTkqCiWi1zJyvvXkVz","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0015","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts addresses or place names to geographic coordinates (forward geocoding) or coordinates to addresses (reverse geocoding), returning structured location data powered by OpenStreetMap Nominatim, with per-call USDC micropayment via x402.","exampleAgentPrompt":"Can you find the latitude and longitude for 'Eiffel Tower, Paris' and give me the full structured address — limit results to 1 and return in English?","exampleUseCases":[{"title":"Geocode delivery address for routing","prompt":"I need the exact coordinates for '221B Baker Street, London, UK' so I can plug them into a routing service — just return the lat/lon and a clean address breakdown."},{"title":"Reverse geocode GPS coordinates","prompt":"I have coordinates lat 48.8582599, lon 2.2945006 — can you tell me what address or place that corresponds to?"},{"title":"Find location of a landmark by name","prompt":"Look up 'Colosseum, Rome' and give me its latitude, longitude, and full address details — limit to 1 result and filter to Italy (IT)."}],"resultDescription":"Returns a JSON object with the geocoding mode (forward/reverse), result count, the original query, and an array of result objects each containing lat/lon coordinates, OSM ID and type, bounding box, place name, place type, category, importance score, and a fully structured address (road, city, state, postcode, country, country code). Also includes attribution and source information (OpenStreetMap Nominatim, ODbL 1.0 license).","failureModes":["Ambiguous or misspelled address returns zero results or a low-confidence match","Missing required query parameter (q for forward, lat+lon for reverse) returns a 400 error","Country code filter too restrictive — place exists but not in specified country, returning empty results","Rate limit or payment failure via x402 returns a 402 Payment Required response","Very remote or unofficial place names not indexed in OSM return no results","Language code not supported defaults silently to English"],"whenToPreferThis":"Choose this endpoint when you need geocoding without an API key or signup, want pay-per-call pricing (no subscription), or are building an agent pipeline that already uses x402/USDC micropayments on Base. It's backed by OpenStreetMap Nominatim so it has excellent global coverage for landmarks, addresses, and named places. Prefer alternatives (Google Maps Geocoding, HERE) if you need very high accuracy for ambiguous addresses, real-time POI updates, or SLA guarantees.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T19:05:23.740Z","isFirstParty":false,"canonicalSlug":"geocoding-api-forward-reverse-via-x402-2507272a"}