Geocode Addresses
geocode_addressGeocode-only pass: turns staged customer addresses into coordinates with match confidence, without loading a map layer. The rows are staged with request_account_upload (file, csv_text, or rows; up to 10,000 rows here) and passed as its upload_handle; the handle is not claimed, so ingest_accounts can load the same rows afterward. Accepts address/address_line1/street, city, state, and postal columns (common source headers are mapped). accept_suboptimal_geocodes=true accepts ZIP-centroid matches. Each address is billed once: cached no-match and suboptimal verdicts return free (failed_rows cached_verdict); a corrected address is a new lookup. Billable lookups count against an annual per-key quota, and past it the result is PROVIDER_QUOTA_EXCEEDED with limit, used, remaining, and period_resets_at. Returns a task; the result has summary, sample_rows (10), failed_rows (first 50), a geocoded_rows_artifact with share_url for every row, and suggested_ingest. ingest_accounts alone also geocodes while it loads the map layer.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"upload_handle": "<upload_handle>"
},
"name": "geocode_address"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| use_cache | No | Admin keys only (debug/testing); a customer key gets ADMIN_REQUIRED. Leave true. False skips both geocode caches and bills a provider lookup for every address. | |
| region_hint | No | ||
| country_hint | No | ||
| upload_handle | Yes | upload_handle (aup_...) from request_account_upload holding the address rows. Not claimed: ingest_accounts can reuse it. | |
| map_session_id | No | Open map session (msess_...) from get_map_visualization. Its Territory Solution is the input; omit ts_handle when set. | |
| min_confidence | No | ||
| force_regeocode | No | Admin keys only (debug/testing); a customer key gets ADMIN_REQUIRED. Leave false. True geocodes rows that already have coordinates, billing each one. | |
| retry_bad_geocodes | No | Admin keys only (debug/testing); a customer key gets ADMIN_REQUIRED. Leave false. True re-asks the provider, billed, for the same address text whose cached verdict is no-match or suboptimal. A corrected address needs no flag: it is a new lookup. | |
| accept_suboptimal_geocodes | No | When true, accept suboptimal geocodes (e.g. ZIP centroids). Default false so geocode-only workflows surface NO_OPTIMAL_GEOCODE for human review. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | No | Present when ok is false. | |
| result | No | Present when ok is true. A submission returns the task reference (task_id, next_action, sleep_ms); the completed task result carries the remaining fields. | |
| warnings | No |