External API docs

Enrich company

Resolve a website URL or social media URL into matching Openmart business records, with optional location narrowing.

Overview

Use this endpoint when you start from a website or a social media profile and want the matching Openmart business records. It is a thin wrapper over the main search backend with only the website, social, and location filters wired up.

The response shape follows Search businesses rows. When estimate_total is true, the response is wrapped as { data, total_count }; otherwise the top-level value is a raw array.

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 row costs 1 credit.

No filter = no filter. If you omit both website and social_media_link, the endpoint still returns 200 — but the result is an unfiltered top-N slice of the index. Always pass at least one.

1

Example: Resolve a website to a brand in the US, with total count

Endpoint
POST https://api.openmart.ai/api/v1/enrich_company

Parameters

Parameter
website
Type
string
Required
No*
Example
"https://bluebottlecoffee.com"
Description
Website URL to resolve. Accepted with or without scheme. *Supply at least one of website or social_media_link for meaningful results — otherwise you get an unfiltered top-N slice.
Parameter
location
Type
object | array[object]
Required
No
Example
[{"country":"US"}]
Description
Geographic narrowing. Accepts either a single Location object or an array; both are normalized server-side.
Parameter
limit
Type
integer
Required
No
Example
2
Description
Page size. Validator range [1, 50]; >50 returns 422. Default 50.
Parameter
estimate_total
Type
boolean
Required
No
Example
true
Description
When true, the response is wrapped as { data, total_count }. When false/omitted, the response is a raw array.

cURL request

cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/enrich_company \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "website": "https://bluebottlecoffee.com",
    "location": [{ "country": "US" }],
    "limit": 2,
    "estimate_total": true
  }'

Response example (estimate_total=true)

JSON
{
  "data": [
    {
      "id": "0044652b-7dea-4196-a4be-1b580c72fefe",
      "content": {
        "brand_id": "b0c1f9e2-1234-4a2b-8c9d-556677889900",
        "store_id": "0044652b-7dea-4196-a4be-1b580c72fefe",
        "business_name": "Blue Bottle Coffee",
        "root_domain": "bluebottlecoffee.com",
        "website_url": "https://bluebottlecoffee.com/us/eng",
        "city": "Oakland",
        "state": "California",
        "country": "US",
        "num_stores": 82,
        "ownership_type": "CHAIN",
        "business_categories": ["RESTAURANTS_DINING"]
      },
      "match_score": 24.2,
      "match_highlights": ["bluebottlecoffee.com"],
      "cursor": [24.2, "0044652b-7dea-4196-a4be-1b580c72fefe"]
    }
  ],
  "total_count": 1
}

Response example (estimate_total=false / omitted)

JSON
[
  {
    "id": "0044652b-7dea-4196-a4be-1b580c72fefe",
    "content": {
      "business_name": "Blue Bottle Coffee",
      "root_domain": "bluebottlecoffee.com"
    },
    "match_score": 24.2
  }
]

Key elements of the API response

Response element
data[]
Description
Array of matches. Present only when estimate_total=true; otherwise the top-level value IS this array.
Response element
total_count
Description
Approximate hit count. Present only when estimate_total=true.
Response element
data[].id
Description
Openmart store ID (UUID).
Response element
data[].content
Description
Full business record, same shape as POST /api/v1/search content (business_name, root_domain, brand_id, location fields, social_media_links, etc.).
Response element
data[].match_score / match_highlights
Description
Relevance signals from the underlying search index.
Response element
data[].cursor
Description
[match_score, store_id] — reusable as a pagination cursor against POST /api/v1/search.

All request parameters

Request body for POST /api/v1/enrich_company. All fields are optional, but supply at least one of website or social_media_link.

Request body

Top-level fields of the POST /api/v1/enrich_company body.

websitestringRequired: No
Example: "https://bluebottlecoffee.com"

Website URL to resolve to Openmart records. Matched by root domain internally. Accepted with or without scheme.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/enrich_company \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"website":"https://bluebottlecoffee.com","limit":2}'
social_media_linkstringRequired: No
Example: "https://www.instagram.com/bluebottle/"

Social media URL to resolve. Instagram / LinkedIn / etc. At least one of website or social_media_link should be provided for meaningful results.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/enrich_company \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"social_media_link":"https://www.instagram.com/bluebottle/","limit":2}'
locationobject | array[object]Required: No
Example: [{"country":"US","state":"CA"}]

Optional geographic narrowing. Accepts either a single Location object or an array of them (see Location object fields below). The server normalizes a single object into a 1-element array.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/enrich_company \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"website":"https://bluebottlecoffee.com","location":[{"country":"US","state":"CA"}],"limit":2}'
limitintegerRequired: No
Example: 10

Page size. Validator range [1, 50] — values >50 return HTTP 422 {"error":"Limit maximum value is 50"}. Values <=0 or omitted fall back to 50.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/enrich_company \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"website":"https://bluebottlecoffee.com","limit":10}'
estimate_totalbooleanRequired: No
Example: true

Toggles the response envelope. When true, the response is { "data": […], "total_count": N }. When false or omitted, the response is a raw array.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/enrich_company \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"website":"https://bluebottlecoffee.com","limit":2,"estimate_total":true}'

Location object fields

Use these inside each entry of the location array (or inline as a single object).

countrystringRequired: No
Example: "US"

Country code. Defaults to US if omitted or empty (the service always forwards a country to the datacenter).

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/enrich_company \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"website":"https://milvali.com","location":[{"country":"US"}]}'
statestringRequired: No
Example: "CA"

State or region filter.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/enrich_company \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"website":"https://milvali.com","location":[{"country":"US","state":"CA"}]}'
citystringRequired: No
Example: "San Francisco"

City filter.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/enrich_company \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"website":"https://milvali.com","location":[{"country":"US","state":"CA","city":"San Francisco"}]}'
zip_codearray[string]Required: No
Example: ["94107","94110"]

One or more postal codes. Note: this endpoint uses zip_code (with underscore), unlike /api/v2/brands/search which uses zipcode.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/enrich_company \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"website":"https://milvali.com","location":[{"country":"US","zip_code":["94107"]}]}'
lat / long / geo_radiusnumber / number / integerRequired: No
Example: 37.7749 / -122.4194 / 5000

Radius search around a lat/long pair. geo_radius is in meters; lat/long use WGS84. Note: this endpoint uses long (with g), not lon.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/enrich_company \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"website":"https://milvali.com","location":[{"country":"US","lat":37.7749,"long":-122.4194,"geo_radius":5000}]}'
# Enrich Company

## Endpoint

POST https://api.openmart.ai/api/v1/enrich_company

## Description

Resolve a website URL or a social-media URL into matching Openmart
business records. Thin wrapper over the main search backend, returning
the same row shape as POST /api/v1/search.

## Authentication

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

## Request body

```json
{
  "website":           "https://bluebottlecoffee.com",
  "social_media_link": "https://www.instagram.com/bluebottle/",
  "limit":             50,
  "estimate_total":    false,
  "location":          [{ "country": "US", "state": "CA" }]
}
```

- `website`, `social_media_link` — both optional, but you should
  supply at least one. If both are empty you get an unfiltered top-N
  slice of the index (the server does NOT enforce "at least one").
- `limit` — validator range [1, 50]. Values >50 return HTTP 422
  `{"error":"Limit maximum value is 50"}`. Default 50.
- `estimate_total` — toggles the response envelope shape (see below).
- `location` — accepts EITHER a single Location object OR an array of
  them (normalized to []Location server-side). Location fields:
  `country`, `state`, `city`, `zip_code` (array), `lat`, `long`,
  `geo_radius` (meters). Note the spelling: `zip_code` with
  underscore and `long` with "g" — different from
  /api/v2/brands/search.

## Billing

1 credit per returned row.

## Response shape

- `estimate_total=false` or omitted → response is a raw array:
  `[{id, content, match_score, match_highlights, cursor}, …]`
- `estimate_total=true` → response is wrapped:
  `{"data": [<same rows>], "total_count": 123}`

`content` mirrors POST /api/v1/search row content.

## Example Request

```bash
curl -X POST "https://api.openmart.ai/api/v1/enrich_company" \
  -H "Accept: application/json" \
  -H "X-API-Key: <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "website": "https://bluebottlecoffee.com",
    "location": [{"country": "US"}],
    "limit": 2,
    "estimate_total": true
  }'
```

## Example Response

```json
{
  "data": [
    {
      "id": "0044652b-7dea-4196-a4be-1b580c72fefe",
      "content": {
        "business_name": "Blue Bottle Coffee",
        "root_domain": "bluebottlecoffee.com",
        "num_stores": 82,
        "ownership_type": "CHAIN"
      },
      "match_score": 24.2,
      "cursor": [24.2, "0044652b-7dea-4196-a4be-1b580c72fefe"]
    }
  ],
  "total_count": 1
}
```

## Errors

- 401 — missing or invalid API key
- 402 — credit limit reached
- 403 — preview token or banned user
- 422 — validator failure (e.g. `limit > 50`)
- 400 — datacenter downstream error