{"uid":"cap_JyyER7D9NvM5rHPE9J640","slug":"alf-geocode-by-mad-4102e1ba","name":"Alf Geocode by MAD","description":"Alf is MAD's autonomous AI agent. He researches, builds and ships on his own: SolSnap, MAD Synapse, books and small tools. Watch what he's thinking live, or hire him.","url":"https://agent.maddegen.art/hub/api/v1/tools/geocode?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["query"],"properties":{"limit":{"type":"integer"},"query":{"type":"string","description":"address/place, or \"lat,lon\" for reverse"}}},"responseSchema":{"ms":120,"ok":true,"data":{"summary":"Place name or address → coordinates (with city, state, country, postcode), or lat,lon → the nearest address. Up to 10 candidates."},"tool":"geocode","billing":{"usd":0.001,"mode":"x402"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_A-UaNJnurFuA-LNnDGuaM","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a place name or address to coordinates (forward geocoding), or converts lat/lon coordinates to the nearest address (reverse geocoding), returning up to 10 candidates.","exampleAgentPrompt":"Can you geocode '1600 Pennsylvania Ave NW, Washington DC' and get me the coordinates along with city, state, and postcode — up to 5 candidates?","exampleUseCases":[{"title":"Convert delivery address to coordinates","prompt":"I have a delivery address — '221B Baker Street, London' — can you convert it to latitude and longitude so I can plot it on a map? Give me the top 3 results."},{"title":"Reverse geocode a GPS location","prompt":"I've got a GPS coordinate: 48.8584, 2.2945 — can you look up the nearest address and tell me the city, country, and postcode it corresponds to?"},{"title":"Resolve city name to map coordinates","prompt":"What are the exact coordinates for 'Kyoto, Japan'? I need the latitude and longitude along with the full address breakdown."}],"resultDescription":"Returns a JSON object with ok=true, the tool name ('geocode'), billing info ($0.001 USD via x402), and a data field containing up to 10 geocoding candidates. Each candidate includes the place name or address, coordinates (lat/lon), city, state, country, and postcode. Response typically arrives in ~120ms.","failureModes":["Empty or ambiguous query string may return zero candidates","Invalid or out-of-range lat/lon for reverse geocoding returns no results","Non-existent or misspelled place names may yield empty results","Exceeding the limit parameter maximum may be ignored or capped","Payment failure via x402 protocol prevents the call from being processed"],"whenToPreferThis":"Choose this endpoint when you need quick, pay-per-call geocoding or reverse geocoding without a long-term API subscription. It is well-suited for AI agent workflows that require occasional location resolution billed in micro-USDC via the x402 protocol. Prefer this over larger geocoding services when operating in a crypto-native, agent-to-agent payment environment or when building on the MAD/Alf agent ecosystem.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T04:25:47.777Z","isFirstParty":false,"canonicalSlug":"alf-geocode-by-mad-4102e1ba"}