Place search
GET /api/place-search · Cached 1hSearch OpenStreetMap for places by keyword, optionally restricted to a bounding box or country. Send GET /api/place-search with the required field q and pay $0.001 per call over x402 or MPP (there is no free tier). It returns a JSON object with query, count, results and source.
Returns ranked hits with coordinates and place type - e.g. coffee shops in a city, airports in a region. ?q=coffee&viewbox=-122.52,37.81,-122.35,37.70&bounded=1.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
q | string | yes | Free-form place query Also accepted as query, search, term, keyword. |
limit | number | no | Results to return, 1-20 (default 5) |
countryCodes | string | no | Comma-separated ISO-3166-1 alpha-2 codes (optional) |
viewbox | string | no | Bounding box as 'west,north,east,south' (lon/lat). Optional. |
bounded | string | no | If '1' and viewbox set, restrict strictly to box (default 0) |
Example request
curl -i "https://agent402.tools/api/place-search?q=Eiffel+Tower&limit=3"
Without payment this returns HTTP 402 Payment Required with the exact price for place-search; any x402 v2 or MPP client pays it and retries.
Example response
{
"query": "Eiffel Tower",
"count": 1,
"results": [
{
"displayName": "Eiffel Tower, 5, Avenue Anatole France, Quartier du Gros-Caillou, Paris 7e Arrondissement, Paris, …, France",
"lat": 48.8582599,
"lon": 2.2945006,
"type": "attraction",
"class": "tourism",
"importance": 0.84,
"osm": "way/5013364",
"boundingBox": {
"south": 48.8574753,
"north": 48.8590453,
"west": 2.2933342,
"east": 2.2956671
}
}
],
"source": "nominatim.openstreetmap.org (ODbL)"
}
| Field | Type | Always present | In the example |
|---|---|---|---|
query | string | yes | Eiffel Tower |
count | number | yes | 1 |
results | array of objects | yes | 1 item in the example |
source | string | yes | nominatim.openstreetmap.org (ODbL) |
From an MCP client
catalog.call {
"slug": "place-search",
"params": {
"q": "Eiffel Tower",
"limit": 3
}
}
The hosted connector at https://agent402.tools/mcp needs a payment for place-search; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.
Errors and behavior
qis required. An input the tool rejects returns an HTTP 4xx whose body carrieserror,tool,expected,requiredandexample, so the caller can correct it.- A paid call that ends in any status of 400 or above is not charged over x402, MPP or a prepaid credits key: settlement is cancelled when the tool fails. The exception is a Tempo push credential, a transfer the buyer sent before the call: it settles before the tool runs, so if the tool then fails the payment is recorded as a refund owed to the paying wallet.
- Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier. A prepaid card-credits key issued earlier (
Authorization: Bearer a402_...) also pays it. - Cached: an identical request within 1h is answered from cache with
X-Cache: hit. - A
POSTwith a JSON body to /api/place-search is served as this GET, with the body as the input. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB is not replayed).
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/place-search?q=Eiffel+Tower&limit=3");
Part of these workflows
Place search is one step in this skill pack, each sold as a single call:
- Location intel - Point at an address (or even a rough place name) and assemble the situational brief: precise coordinates, the canonical postal address, what's within walking distance, the live weather forecast, active NWS hazard alerts, and recent seismic activity. The deterministic 'what should I know about this place right now?' workup.
Related tools
Geocode address
GET /api/geocodeResolve a free-form address or place name to coordinates: lat/lon, display name, bounding box, place type. OpenStreetMap…
Reverse geocode
GET /api/reverse-geocodeResolve a lat/lon to a structured postal address: road, house number, city, state, postcode, country (with ISO code). Op…
EDGAR full-text search
GET /api/edgar-searchGeneral-purpose full-text search across every SEC filing since 2001. Find any phrase in any filing - material-weakness l…
FRED catalog search
GET /api/fred-searchFull-text search across FRED's ~800,000 economic time series. Returns series IDs (use with /api/fred-series), titles, fr…
Search World Bank indicators
GET /api/world-bank-searchSearch the World Bank indicator catalog (1,400+ indicators across GDP, demographics, health, environment, education, etc…
A2A Agent Card validate
POST /api/a2a-card-validateValidate an A2A (Agent2Agent protocol) Agent Card: required fields, skill shape, transport names, capability flags - spe…