# OnHub Places — Google Maps Grounded Local Search

> OnHub Places — Google Maps Grounded Local Search is a paid API for AI agents from x402.onhub.ai, paid per call via x402, $0.04/call, status unknown (last checked 2026-10-11).

Answers local/places queries using Google Maps grounding, returning ranked venue results with names, star ratings, and map URLs.

## Facts

- Endpoint: POST https://x402.onhub.ai/v1/places?utm_source=zero.xyz
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onhub-places-google-maps-grounded-local-search-0907db28
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ATXq_G8vkbjQmuastjalj

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability onhub-places-google-maps-grounded-local-search-0907db28 -d '<json body>'
```

Example prompt: Find me the top 5 best ramen restaurants near the Ferry Building in San Francisco — I'm currently at latitude 37.7955 and longitude -122.3937.

## When to prefer this

Choose this endpoint when you need real-time, Google Maps-grounded local business and place recommendations with verifiable map URLs and ratings. It is especially useful when the user's query is location-sensitive and you have or can infer lat/lon coordinates. Prefer this over generic web search endpoints when you specifically need structured place data (name, map link, place_id) rather than a free-text answer. The per-request USDC micropayment model makes it suitable for on-demand agent workflows without API key management.

## Known failure modes

- Query too short (under 3 characters) returns a validation error
- Latitude provided without longitude (or vice versa) may degrade relevance or cause a schema error
- Non-local or abstract queries may return low-confidence or empty place lists
- Payment failure via x402 protocol results in 402 response before any search is performed
- Google Maps grounding may return no results for very obscure or rural locations
- max_results exceeding 8 is rejected by schema validation

## How this service works

OnHub is the pay-per-request API layer for agents. Text inference paid per request with USDC on Base.

## Output

Returns a natural-language answer grounded in Google Maps data, plus a list of up to 8 matching places each containing a venue title, Google Maps CID URL, and place_id. Also includes the original query, a timestamp of when it was searched, and an evidence_status field indicating whether the answer is grounded.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "query": {
   "type": "string",
   "maxLength": 2000,
   "minLength": 3,
   "description": "A local/places question to research with Google Maps grounding, e.g. \"best ramen near the ferry building\"."
  },
  "latitude": {
   "type": "number",
   "maximum": 90,
   "minimum": -90,
   "description": "Caller latitude. Improves relevance for \"near me\"-style queries; omit for non-local questions."
  },
  "longitude": {
   "type": "number",
   "maximum": 180,
   "minimum": -180,
   "description": "Caller longitude. Must be supplied together with latitude."
  },
  "max_results": {
   "type": "integer",
   "default": 5,
   "maximum": 8,
   "minimum": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "query": "Best Italian restaurants within walking distance",
  "answer": "Maccheroni Republic (4.6★) is a short walk away.",
  "object": "places.result",
  "places": [
   {
    "url": "https://maps.google.com/?cid=10713702449749472098",
    "title": "Maccheroni Republic",
    "place_id": "ChIJvVvovUvGwoARYrOMSp23rpQ"
   }
  ],
  "searched_at": "2026-09-22T00:00:00.000Z",
  "evidence_status": "grounded"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onhub-places-google-maps-grounded-local-search-0907db28/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.onhub.ai](https://www.zero.xyz/host/x402.onhub.ai/llms.txt)
