External API docs

Get business by Google Place ID

Resolve Google Place IDs into Openmart business records in a single call.

Overview

Use this endpoint when you have a Google Place ID (for example, from Google Maps) and want the matching Openmart business record. The response shape matches POST /api/v1/search content.

The response is keyed by google_place_id, not by Openmart ID. IDs that do not match any record are silently omitted. Accepts 1 to 100 IDs per call.

Before you start

Make sure you have:

  • an Openmart account
  • an API key
  • a tool to send API requests, such as Postman or curl

Authentication: send your key in the X-API-Key header. Authorization: Bearer <key> is also accepted. Each returned record costs 1 credit.

GET with a body. This endpoint uses the HTTP GET method but requires the JSON array in the request body. Some HTTP clients, proxies, and CDNs silently drop bodies on GETs. If you see an empty-body 422, confirm your client is actually sending the body.

1

Example: Fetch a business by Google Place ID

Endpoint
GET https://api.openmart.ai/api/v1/business_records/list/google_place_id

cURL request

cURL
curl --request GET \
  --url https://api.openmart.ai/api/v1/business_records/list/google_place_id \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '["ChIJfeiVPq-AhYARoD84VjA_-Tg"]'

Response example

JSON
{
  "ChIJfeiVPq-AhYARoD84VjA_-Tg": {
    "brand_id": "cc7eb8ef-8a51-4a53-a1ab-d2a39c163952",
    "store_id": "54ff8cd5-7497-4f46-9c0c-c6b8c0d10d04",
    "business_name": "Curls are Fun",
    "root_domain": "antonioberducci.com",
    "city": "San Francisco",
    "state": "California",
    "country": "US",
    "from_sources": {
      "GOOGLE_MAP": {
        "id": "ChIJfeiVPq-AhYARoD84VjA_-Tg",
        "ref_url": "https://www.google.com/maps/place/?q=place_id:ChIJfeiVPq-AhYARoD84VjA_-Tg",
        "raw_associated_website": "http://www.antonioberducci.com/",
        "name": "Curls Are Fun"
      }
    }
  }
}

Key elements of the API response

Response element
object keyed by google_place_id
Description
Map from each input ID to its business record. IDs that do not match any record are OMITTED. The key is the place_id, not the Openmart ID — the server derives it by stripping the "GOOGLE_MAP@" prefix from the source_id.
Response element
<place_id>.from_sources.GOOGLE_MAP.id
Description
Echoes the Google place_id you supplied (useful for cross-checking the returned key).
Response element
<place_id>.business_name / root_domain / etc.
Description
Same shape as POST /api/v1/search results — see that page for the full field list.

All request parameters

Request body for GET /api/v1/business_records/list/google_place_id.

Request body

This endpoint takes a raw JSON array as the request body (no wrapper object).

body (raw JSON array)array[string]Required: Yes
Example: ["ChIJfeiVPq-AhYARoD84VjA_-Tg"]

Array of 1–100 Google Place IDs. The size must be in [1, 100] — outside that returns 422 "the number of ids should be between 1 and 100". Unlike the openmart_id variant, entries are not validated client-side; every string is forwarded to the datacenter. IDs without a matching record are silently omitted from the response.

cURL example
cURL
curl --request GET \
  --url https://api.openmart.ai/api/v1/business_records/list/google_place_id \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '["ChIJfeiVPq-AhYARoD84VjA_-Tg","ChIJN1t_tDeuEmsRUsoyG83frY4"]'
# Get Business by Google Place ID

## Endpoint

GET https://api.openmart.ai/api/v1/business_records/list/google_place_id

## Description

Resolve 1–100 Google Place IDs to Openmart business records. Response
is keyed by the place_id (the server strips the "GOOGLE_MAP@" prefix
from each source_id). IDs with no matching record are silently
omitted.

HTTP GET with a JSON body — same client-compatibility caveat as the
openmart_id variant.

## Authentication

- `X-API-Key: <your_api_key>` (recommended)
- `Authorization: Bearer <your_api_key>` (also accepted)

## Request body

Raw JSON array of 1–100 Google place_id strings:

```json
["ChIJfeiVPq-AhYARoD84VjA_-Tg","ChIJN1t_tDeuEmsRUsoyG83frY4"]
```

- Size outside [1, 100] → 422 `{"error":"the number of ids should be between 1 and 100"}`.
- Unlike the openmart_id variant, entries are not validated
  client-side; every string is forwarded to the datacenter.

## Billing

1 credit per returned row.

## Example Request

```bash
curl -X GET "https://api.openmart.ai/api/v1/business_records/list/google_place_id" \
  -H "Accept: application/json" \
  -H "X-API-Key: <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '["ChIJfeiVPq-AhYARoD84VjA_-Tg"]'
```

## Example Response

```json
{
  "ChIJfeiVPq-AhYARoD84VjA_-Tg": {
    "brand_id": "cc7eb8ef-8a51-4a53-a1ab-d2a39c163952",
    "store_id": "54ff8cd5-7497-4f46-9c0c-c6b8c0d10d04",
    "business_name": "Curls are Fun",
    "root_domain": "antonioberducci.com",
    "city": "San Francisco",
    "state": "California",
    "country": "US",
    "from_sources": {
      "GOOGLE_MAP": {
        "id": "ChIJfeiVPq-AhYARoD84VjA_-Tg",
        "ref_url": "https://www.google.com/maps/place/?q=place_id:ChIJfeiVPq-AhYARoD84VjA_-Tg",
        "raw_associated_website": "http://www.antonioberducci.com/",
        "name": "Curls Are Fun"
      }
    }
  }
}
```

Value shape matches `content` objects from POST /api/v1/search.

## Errors

- 401 — missing or invalid API key
- 402 — credit limit reached
- 403 — preview token (not allowed on this route) or banned user
- 422 — size out of range / JSON bind failure
- 400 — datacenter downstream error