External API docs

Enrich company

Find matching Openmart business records from a website or social media URL, with an optional location filter.

Overview

Use this endpoint when you start from a website or a social media profile and want the matching Openmart business records. Use the website, social profile, and optional location to identify the matching company records.

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. We recommend sending your API key as Authorization: Bearer <your_api_key>. If your current integration already uses X-API-Key: <your_api_key>, it will continue to work.

Add a company identifier. Include at least one of website and social_media_link. A request without either value is invalid and should be fixed before retrying.

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 look up. Accepted with or without https://. *Supply at least one of website or social_media_link; a request without either identifier is invalid.
Parameter
location
Type
object | array[object]
Required
No
Example
[{"country":"US"}]
Description
Optional location filter. Accepts either one location object or a list of location objects.
Parameter
limit
Type
integer
Required
No
Example
2
Description
Number of results to return. Use a value from 1 to 50. Values above 50 return error 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 'Authorization: Bearer <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. Include 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 'Authorization: Bearer <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 'Authorization: Bearer <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 'Authorization: Bearer <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 'Authorization: Bearer <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 'Authorization: Bearer <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 when omitted or empty.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/enrich_company \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <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 'Authorization: Bearer <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 'Authorization: Bearer <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 'Authorization: Bearer <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 'Authorization: Bearer <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}]}'

If this request fails

Match the error number or message in the response, then use the action below.

Error 400 / 422“... is required” or another field error
Read the error or detail field, then fix the named input.
Error 401“Invalid API Key”
Check the complete key and authentication header.
Error 402“Credit limit reached”
Check the team balance before trying again.
Error 403“Forbidden” or “not allowed”
Check whether this key and account can use the action.
Error 404“Not Found”
Check the API address, version, and GET, POST, or DELETE method.
Error 429“Too many requests”
Wait, then retry with fewer requests running at once.
Error 500–504Server error or timeout
Wait briefly and retry. Avoid duplicating an async job.

See Troubleshooting & FAQ for step-by-step help and the information to include when asking for support.