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.
When true, the response is wrapped as { data, total_count }. When false/omitted, the response is a raw array.
Parameter
Type
Required
Example
Description
website
string
No*
"https://bluebottlecoffee.com"
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.
location
object | array[object]
No
[{"country":"US"}]
Geographic narrowing. Accepts either a single Location object or an array; both are normalized server-side.
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.
# 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