# Find local businesses from Google Maps with Local Business Data API

OpenWeb Ninja's Local Business Data API finds businesses on Google Maps from a text query and returns each one with a `business_id`, which opens the business's opening hours, rating breakdown and reviews. Each call is one request at $0.03 per 10 requests, drawn from a plan your credential holds, so a search plus one business's details and reviews is three requests, or $0.009. Send `GET https://agents.openwebninja.com/zcj/6ogqjyi7141s/local-business-data/search` with `Authorization: Bearer <token>`.

## At a glance

- **Endpoints:** `GET https://agents.openwebninja.com/zcj/6ogqjyi7141s/local-business-data/search`, `/local-business-data/business-details` and `/local-business-data/business-reviews-v2`
- **Request:** query parameters only. `query` is required on search, and `business_id` is required on details and reviews. `fields` narrows the response.
- **Price:** $0.03 per 10 requests. Each call is one request.
- **Payment:** each call draws on a plan your credential holds, Credits or Free. There is no per-call payment.
- **Credential:** `Authorization: Bearer <token>`, an agent identity the storefront issues for free. No upstream API key is needed.
- **Response:** JSON with `status`, `request_id`, `parameters` and `data`.
- **Limits:** search takes `limit` from 1 to 500, with a default of 20. Reviews take `limit` from 1 to 100, with a default of 20, and page with `cursor`.
- **Full purchase flow:** [the buyer skill](https://agents.openwebninja.com/zcj/6ogqjyi7141s/SKILL.md)

## Find a business, then read its hours and reviews

1. Search by query. Use `fields` to keep only what you read:

   ```bash
   curl -sG "https://agents.openwebninja.com/zcj/6ogqjyi7141s/local-business-data/search" \
     -H "Authorization: Bearer $ACCESS_TOKEN" \
     --data-urlencode "query=coffee shops in Austin, TX" \
     --data-urlencode "limit=3" \
     --data-urlencode "fields=business_id,name,full_address,rating,review_count"
   ```

   The response is a JSON object whose `data` lists the businesses, each with `business_id`, `name`, `full_address`, `rating` and `review_count`. This request drew $0.003 from credit. The first result:

   ```json
   {
     "status": "OK",
     "data": [
       {
         "business_id": "<business_id>",
         "name": "Epoch Coffee",
         "full_address": "Epoch Coffee, 221 W N Loop Blvd, Austin, TX 78751",
         "rating": 4.5,
         "review_count": 2536
       }
     ]
   }
   ```

2. Pass a `business_id` to business-details for its hours and how its ratings break down:

   ```bash
   curl -sG "https://agents.openwebninja.com/zcj/6ogqjyi7141s/local-business-data/business-details" \
     -H "Authorization: Bearer $ACCESS_TOKEN" \
     --data-urlencode "business_id=$BUSINESS_ID" \
     --data-urlencode "fields=business_id,name,working_hours,reviews_per_rating,subtypes,price_level"
   ```

   `working_hours` is keyed by weekday, and `reviews_per_rating` gives the number of reviews for each star from 1 to 5. This request drew $0.003 from credit. An excerpt:

   ```json
   {
     "working_hours": {"Monday": ["12 AM-11:30 PM"], "Tuesday": ["Open 24 hours"]},
     "reviews_per_rating": {"1": 84, "2": 60, "3": 150, "4": 462, "5": 1780},
     "subtypes": ["Coffee shop"]
   }
   ```

3. Pass the same `business_id` to business-reviews-v2 for its reviews:

   ```bash
   curl -sG "https://agents.openwebninja.com/zcj/6ogqjyi7141s/local-business-data/business-reviews-v2" \
     -H "Authorization: Bearer $ACCESS_TOKEN" \
     --data-urlencode "business_id=$BUSINESS_ID" \
     --data-urlencode "limit=3"
   ```

   The example returned `data.reviews`, a list of three reviews, and a `data.cursor` string, and drew $0.003 from credit. Each review carries fields such as `review_id`, `rating`, `review_text`, `review_language`, `review_datetime_utc`, `review_time`, `review_link`, `review_photos`, `like_count`, `review_source` and `review_form`.

4. Fetch the next page by sending the same request with `cursor` set to the previous `data.cursor`. Each page is one more request. When `data.cursor` is `null`, there are no more reviews.

## Choose the parameters for the job

| You want | Send |
| --- | --- |
| Results biased toward a point | `lat`, `lng` and `zoom` on search |
| Only certain categories | `subtypes`, a comma-separated list such as `Plumber,Electrician` |
| Only open or verified businesses | `business_status=OPEN`, `verified=true` |
| Hours and rating breakdown | `fields=working_hours,reviews_per_rating` on business-details |
| Newest or lowest-rated reviews first | `sort_by=newest` or `sort_by=lowest_ranking` |
| Reviews that mention a term | `query` on business-reviews-v2 |

Both business-details and business-reviews-v2 accept a `google_id`, `business_id` or `place_id` as `business_id`.

## Search from coordinates or an area

The service also finds businesses inside an area, a bounding box or a radius, or near a point. Each of these is its own route at the same price per request: `/local-business-data/search-in-area`, `/local-business-data/search-nearby`, `/local-business-data/area-search-by-radius` and `/local-business-data/area-search-by-bounding-box`. Their parameters are in the service's API reference, `https://agents.openwebninja.com/zcj/6ogqjyi7141s/services/local-business-data/openapi.json`, which needs no credential to read.

## What is charged, and when

- Every call needs a credential that holds a plan. Without a bearer token, a call answers `401`. With a token but no covering plan, it answers `403`. Neither of these draws any credit.
- Reading the manifest and the API reference costs nothing. Buying Credits answers with a 402 price quote, and nothing is charged until you pay it; [the buyer skill](https://agents.openwebninja.com/zcj/6ogqjyi7141s/SKILL.md) has the steps.
- Each paid response carries a `zc-billing` header, and its `chargedUsd` field shows what that request debited.

## Errors

| Response | Meaning | Action |
| --- | --- | --- |
| `401 bearer_required` | No agent credential was sent | Register at [auth.md](https://agents.openwebninja.com/zcj/6ogqjyi7141s/auth.md), then retry with the bearer token |
| `401 invalid_token` | The token expired or did not verify | Exchange your stored assertion for a fresh token |
| `403 plan_required` | No plan you hold covers the call | Buy one of the plans listed in the body, then retry |
| `403 verified_email_required` | The Free plan needs a claimed credential | Have your human claim the credential, or buy Credits |
| `usage_exhausted` | Your credit is used up | Top up with `POST https://agents.openwebninja.com/zcj/6ogqjyi7141s/extend` and `{"amountUsd": "..."}` |
| `503` | A temporary error. It is not billed. | Retry with bounded backoff |

## Frequently asked questions

### Does the Local Business Data API need an API key?

No upstream API key is needed. You call the storefront with a bearer token for the agent identity it issues, and registering that identity is free. The token must belong to a credential that holds the Free plan or Credits.

### How much does a Google Maps business search cost?

Each call is one request at $0.03 per 10 requests. A search, one business's details and one page of its reviews add up to three requests, or $0.009.

### How do I get every review for a business?

Call business-reviews-v2 with `limit` up to 100. Then repeat the call with `cursor` set to the last `data.cursor` until it comes back `null`. Each page is a separate request.

### Can I pay for a single call without a plan?

No. This storefront has no per-call payment, so every call draws on a plan held by your credential. To get a plan, buy Credits or claim the Free plan.

### Can I find businesses near a set of coordinates?

Yes. Search accepts `lat`, `lng` and `zoom` to bias results toward a point. The service also has dedicated area, bounding-box, radius and nearby searches, which are listed in its API reference.

## Keep reading

- [Buyer skill](https://agents.openwebninja.com/zcj/6ogqjyi7141s/SKILL.md): the full purchase flow
- [Identity](https://agents.openwebninja.com/zcj/6ogqjyi7141s/auth.md): register and exchange a credential
- [How to pay](https://agents.openwebninja.com/zcj/6ogqjyi7141s/payment.md): plans, rails and top-ups
- [Local Business Data service page](https://agents.openwebninja.com/zcj/6ogqjyi7141s/services/local-business-data): price and plans
- [Error reference](https://agents.openwebninja.com/zcj/6ogqjyi7141s/errors.md): every error code

---

Updated 2026-11-05. All OpenWeb Ninja guides: https://agents.openwebninja.com/guides.md. Storefront: https://agents.openwebninja.com/zcj/6ogqjyi7141s/llms.txt.
