External API docs

Search businesses

Search and retrieve Openmart business records, page through large result sets, and hydrate selected records into richer detail.

Overview

Use this endpoint to find businesses in the Openmart database.

You can search by:

  • keyword
  • location
  • business attributes, such as whether a business has a website or contact info

Use this endpoint when you want to build lead lists, find target businesses, or pull business data into your own workflow.

Before you start

Make sure you have:

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

Example 1: Search hair salons in San Francisco, CA

Use this example to find businesses by keyword and location, and limit results to businesses with a website and contact info.

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

Parameters

Parameter
query
Type
string
Required
Yes
Example
"hair salons"
Description
The type of business you want to find.
Parameter
location
Type
array
Required
No
Example
[{"country":"USA","state":"CA","city":"San Francisco"}]
Description
The location to search in.
Parameter
has_website
Type
boolean
Required
No
Example
true
Description
Only return businesses that have a website.
Parameter
has_valid_website
Type
boolean
Required
No
Example
true
Description
Only return businesses with a valid website.
Parameter
has_contact_info
Type
boolean
Required
No
Example
true
Description
Only return businesses that have contact information.

cURL request

cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "query": "hair salons",
    "location": [
      {
        "country": "USA",
        "state": "CA",
        "city": "San Francisco"
      }
    ],
    "has_website": true,
    "has_valid_website": true,
    "has_contact_info": true
  }'

Response details

This request returns hair salons in San Francisco that:

  • have a website
  • have a valid website
  • have contact information

Response example

JSON
[
  {
    "id": "54ff8cd5-7497-4f46-9c0c-c6b8c0d10d04",
    "content": {
      "business_keywords": [
        "curly hair",
        "stylist",
        "educator",
        "hair and makeup",
        "curly hair specialist",
        "curly hair guru",
        "botanically-infused products",
        "moisture-rich products"
      ],
      "product_services_offered": [
        "curly hair styling",
        "cut and curl services",
        "wedding hair services",
        "curly hair education and care",
        "sale of botanically-infused and moisture-rich hair products"
      ],
      "ownership_type": "",
      "store_phones": ["+14156264782"],
      "tags": [
        "beauty salon",
        "hair salon",
        "hair care service",
        "make-up artist",
        "hairdresser"
      ],
      "website_url": "http://www.antonioberducci.com/?y_source=1_NTI1MjY4NTUtNzE1LWxvY2F0aW9uLndlYnNpdGU%3D",
      "google_reviews_count": 1,
      "street_address": "300 Divisadero St",
      "brand_description": "Curls are Fun is a hair salon brand specializing in curly hair care and styling, led by Antonio Berducci, a stylist and educator with 20 years of hair",
      "business_emails": null,
      "staffs": [
        {
          "name": "Antonio Berducci",
          "role": "Curly Hair Stylist & Specialist",
          "source_urls": ["http://www.curlsarefun.com/antonioberducci"]
        }
      ],
      "store_description": null,
      "google_rating": 5,
      "place_key": "@300.DIVISADERO.@94117.LOWER_HAIGHT.SAN_FRANCISCO.CALIFORNIA@@8a283082d6d7fff",
      "city": "San Francisco",
      "num_stores": 4,
      "yelp_reviews_count": null,
      "state": "California",
      "business_phones": null,
      "root_domain": "antonioberducci.com",
      "store_id": "54ff8cd5-7497-4f46-9c0c-c6b8c0d10d04",
      "yelp_rating": null,
      "zipcode": "94117",
      "brand_id": "cc7eb8ef-8a51-4a53-a1ab-d2a39c163952",
      "business_type": "Curly Hair Stylist & Specialist",
      "source_id": "GOOGLE_MAP@ChIJfeiVPq-AhYARoD84VjA_-Tg",
      "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"
        }
      },
      "country": "US",
      "business_name": "Curls are Fun",
      "store_name": "Curls Are Fun",
      "price_tier": null,
      "open_date": null,
      "business_categories": ["BEAUTY_PERSONAL_CARE"],
      "social_media_links": {
        "FACEBOOK": null,
        "LINKEDIN": null,
        "INSTAGRAM": null,
        "TWITTER": null,
        "X": null,
        "PINTEREST": null,
        "TIKTOK": null,
        "YOUTUBE": null
      },
      "business_specialty": "Recognized specialist in curly hair with 20 years of experience as both stylist and educator, offering education and care focused on curly hair using botanically-infused and moisture-rich products.",
      "store_emails": null,
      "latitude": 37.7723988,
      "longitude": -122.4370998,
      "order_platforms": null,
      "info_refreshed_at": "2026-01-14T21:03:41.721668Z"
    },
    "match_score": 24.264505,
    "match_highlights": ["hair salon", "hair care service", "hairdresser"],
    "cursor": [24.264505, "54ff8cd5-7497-4f46-9c0c-c6b8c0d10d04"]
  }
]

Key elements of the API response

Response element
results
Description
The list of matching businesses.
Response element
Business record
Description
One matching business in the results list.
Response element
openmart_id
Description
The unique ID for a business. Use it to fetch more details later.
Response element
Business fields
Description
May include fields such as name, website, location, and contact data.
2

Example 2: Search restaurants in California with at least 3 locations

Use this example to find restaurants in California and limit results to businesses with at least 3 locations.

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

Parameters

Parameter
query
Type
string
Required
Yes
Example
"restaurants"
Description
The type of business you want to find.
Parameter
location
Type
array
Required
No
Example
[{"country":"USA","state":"CA"}]
Description
The location to search in.
Parameter
min_locations
Type
integer
Required
No
Example
3
Description
Only return businesses with at least this many locations.

cURL request

cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "query": "restaurants",
    "location": [
      {
        "country": "USA",
        "state": "CA"
      }
    ],
    "min_locations": 3
  }'

Response details

This request returns restaurants in California with at least 3 locations.

Response example

JSON
[
  {
    "id": "3f77d0ec-15c3-40d4-8a48-b74d7c009822",
    "content": {
      "business_keywords": [
        "Italian Restaurant",
        "Italian Cuisine",
        "Central Valley",
        "Fresno"
      ],
      "product_services_offered": [
        "Authentic Italian dishes",
        "Pasta",
        "Pizza",
        "Desserts"
      ],
      "ownership_type": "",
      "store_phones": [
        "+15593210544"
      ],
      "tags": [
        "italian restaurant",
        "american restaurant",
        "caterer",
        "family restaurant",
        "pasta shop",
        "pizza restaurant",
        "restaurant",
        "sandwich shop",
        "seafood restaurant",
        "vegetarian restaurant"
      ],
      "website_url": "https://www.diciccos.com/",
      "google_reviews_count": 865,
      "street_address": "1530 E Nees Ave",
      "brand_description": "Diciccos Italian Restaurant is a well-established Italian restaurant chain located in Fresno and the Central Valley. They specialize in serving authentic Italian dishes such as pasta, pizza, and desserts.",
      "business_emails": null,
      "staffs": null,
      "store_description": "Family-owned eatery serving simple Italian fare like pizza, pasta & calzones in basic surrounds.",
      "google_rating": 4.2,
      "place_key": "@1530.NEES.@93720..FRESNO.CALIFORNIA@@8a29ab8a5d0ffff",
      "city": "Fresno",
      "num_stores": 3,
      "yelp_reviews_count": null,
      "state": "California",
      "business_phones": [
        "+15592920544",
        "+15596742435",
        "+15592669893",
        "+15594199198",
        "+15593210544",
        "+15594361650"
      ],
      "root_domain": "diciccos.com",
      "store_id": "3f77d0ec-15c3-40d4-8a48-b74d7c009822",
      "yelp_rating": null,
      "zipcode": "93720",
      "brand_id": "107953e8-4378-48c8-8745-c7039f6d7b3c",
      "business_type": "Italian Restaurant",
      "source_id": "GOOGLE_MAP@ChIJ7SF2wM9ClIARkhJ9AwW5vd8",
      "from_sources": {
        "GOOGLE_MAP": {
          "id": "ChIJ7SF2wM9ClIARkhJ9AwW5vd8",
          "ref_url": "https://www.google.com/maps/place/?q=place_id:ChIJ7SF2wM9ClIARkhJ9AwW5vd8",
          "raw_associated_website": "https://www.diciccos.com/?utm_source=google"
        }
      },
      "country": "US",
      "business_name": "Diciccos Italian Restaurant",
      "store_name": "DiCicco's Italian Restaurant",
      "price_tier": 2,
      "open_date": null,
      "business_categories": [
        "RESTAURANTS_DINING"
      ],
      "social_media_links": {
        "FACEBOOK": null,
        "LINKEDIN": null,
        "INSTAGRAM": null,
        "TWITTER": null,
        "X": null,
        "PINTEREST": null,
        "TIKTOK": null,
        "YOUTUBE": null
      },
      "business_specialty": "Italian Cuisine",
      "store_emails": null,
      "latitude": 36.8522324,
      "longitude": -119.7555683,
      "order_platforms": [
        {
          "id": "85baf4a3-09d0-4aff-b483-d355f697e983",
          "platform_ident": "diciccos.com",
          "store_source_id": "GOOGLE_MAP@ChIJ7SF2wM9ClIARkhJ9AwW5vd8",
          "order_platform_link": "https://www.diciccos.com/",
          "platform_name": "diciccos.com"
        },
        {
          "id": "74fa582d-43ee-4a45-8a14-3f0781c00c51",
          "platform_ident": "doordash.com",
          "store_source_id": "GOOGLE_MAP@ChIJ7SF2wM9ClIARkhJ9AwW5vd8",
          "order_platform_link": "https://www.doordash.com/store/dicicco%27s-italian-restaurant-cedar/nees-fresno-259996/?utm_campaign=gpa&pickup=true",
          "platform_name": "DoorDash"
        },
        {
          "id": "7de1b072-66ee-4dd7-a0e9-d3c12716c7c8",
          "platform_ident": "order.online",
          "store_source_id": "GOOGLE_MAP@ChIJ7SF2wM9ClIARkhJ9AwW5vd8",
          "order_platform_link": "https://order.online/store/-259996/?pickup=true&hideModal=true&utm_source=gfo&rwg_token=AJKvS9V1MVpByBr6RnWn_GD_FRbdX40_fp1purCWkKz298vXWIj9AOb9HaaRhnVEHJTfqIVPtIOsdOYM9oAGUmcTHHmnHTMuDQ%3D%3D",
          "platform_name": "Order Online"
        },
        {
          "id": "fc3d9dc9-9197-4746-a941-6f4edce25c1a",
          "platform_ident": "trycaviar.com",
          "store_source_id": "GOOGLE_MAP@ChIJ7SF2wM9ClIARkhJ9AwW5vd8",
          "order_platform_link": "https://www.trycaviar.com/store/dicicco%27s-italian-restaurant-cedar/nees-fresno-259996/?utm_campaign=gpa&pickup=true",
          "platform_name": "trycaviar.com"
        }
      ],
      "info_refreshed_at": "2026-03-26T18:00:32.802181Z"
    },
    "match_score": 60780515000000,
    "match_highlights": [
      "restaurants",
      "american restaurant",
      "italian restaurant",
      "family restaurant",
      "pizza restaurant",
      "restaurant"
    ],
    "cursor": [
      60780515000000,
      "3f77d0ec-15c3-40d4-8a48-b74d7c009822"
    ]
  }
]

Key elements of the API response

Response element
results
Description
The list of matching businesses.
Response element
Business record
Description
One matching business in the results list.
Response element
openmart_id
Description
The unique ID for a business. Use it to fetch more details later.
Response element
Business fields
Description
May include fields such as name, website, location, and number of locations.

All request parameters

Request body for POST /api/v1/search and POST /api/v1/search/only_ids. All fields are optional. Order below follows typical usage: query and limit first, then geography and filters, then pagination and the rest.

Most common parameters

Start here for most integrations. These are the fields teams adjust first when building lists and running day-to-day searches.

querystringRequired: No
Example: "hair salons"

Primary free-text search (1–500 characters). Configure this first unless you use tags instead. Ignored for matching when tags is non-empty.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"hair salons"}'
limitintegerRequired: No
Example: 100

Page size: number of records to return per request (1–1000). Recommended: 100 for typical integrations. Preview API keys must be 100 or less.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","limit":100}'
locationarray[object]Required: No
Example: [{"country":"USA","state":"CA","city":"San Francisco"}]

Geographic filters. Pass a single Location object or an array of them.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"hair salons","location":[{"country":"USA","state":"CA","city":"San Francisco"}]}'
has_websitebooleanRequired: No
Example: true

If true, only businesses that have any website URL.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"hair salons","has_website":true}'
has_valid_websitebooleanRequired: No
Example: true

If true, only businesses with a validated website URL.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"hair salons","has_valid_website":true}'
has_contact_infobooleanRequired: No
Example: true

If true, only businesses that have contact-related signals in the index.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"hair salons","has_contact_info":true}'
tagsarray[string]Required: No
Example: ["restaurants","pizza"]

Search by tag labels (up to 100). If this array is non-empty, tag-based matching is used and query is ignored.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"tags":["restaurants","pizza"],"limit":50}'
store_namestringRequired: No
Example: "Blue Bottle Coffee"

Filter or boost by store or listing name in addition to query when applicable.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"coffee","store_name":"Blue Bottle Coffee"}'
min_locationsintegerRequired: No
Example: 3

Minimum number of locations or stores for the brand.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","min_locations":3}'

Location object fields

Use these inside the `location` array when you want to narrow a search by city, ZIP code, or radius.

countrystringRequired: No
Example: "USA"

Country code or name. Defaults to US in backend geo resolution when omitted.

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

State or region name.

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

City name filter.

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

One or more postal or ZIP codes. A single string is also accepted and coerced server-side.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","location":[{"zip_code":["94107","94110"]}]}'
latnumberRequired: No
Example: 37.7749

Latitude (WGS84), paired with long for radius search.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","location":[{"lat":37.7749,"long":-122.4194,"geo_radius":5000}]}'
longnumberRequired: No
Example: -122.4194

Longitude (WGS84), paired with lat for radius search.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","location":[{"lat":37.7749,"long":-122.4194,"geo_radius":5000}]}'
geo_radiusintegerRequired: No
Example: 5000

Radius in meters around lat/long. Used only when both coordinates are set.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","location":[{"lat":37.7749,"long":-122.4194,"geo_radius":5000}]}'
use_geo_fuzzbooleanRequired: No
Example: true

If true, prefer radius/geo behavior over city/state/zip. If false, city/zip filters apply without geo fuzz.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","location":[{"lat":37.7749,"long":-122.4194,"geo_radius":5000,"use_geo_fuzz":true}]}'
normalize_fieldsarray[string]Required: No
Example: ["city","state"]

Optional fields to normalize in geocoding (advanced).

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","location":[{"country":"USA","normalize_fields":["city","state"]}]}'

Business quality and scale filters

These filters are useful when you want better-fit businesses by rating, review volume, price point, ownership type, or location count.

min_overall_ratingnumberRequired: No
Example: 4.2

Minimum Google-style overall rating (0–5).

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"coffee shops","min_overall_rating":4.2}'
max_overall_ratingnumberRequired: No
Example: 4.8

Maximum Google-style overall rating (0–5).

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"coffee shops","max_overall_rating":4.8}'
min_total_reviewsintegerRequired: No
Example: 100

Minimum total review count.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","min_total_reviews":100}'
max_total_reviewsintegerRequired: No
Example: 500

Maximum total review count.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","max_total_reviews":500}'
min_price_tierintegerRequired: No
Example: 2

Minimum price tier filter (provider-specific scale).

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","min_price_tier":2}'
max_price_tierintegerRequired: No
Example: 4

Maximum price tier filter (provider-specific scale).

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","max_price_tier":4}'
max_locationsintegerRequired: No
Example: 20

Maximum number of locations or stores for the brand, paired with min_locations.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","max_locations":20}'
ownership_typestringRequired: No
Example: "franchise"

Filter by ownership classification when indexed. Exact meaning depends on the data pipeline.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","ownership_type":"franchise"}'

Pagination and response shape

Use these when you need to page through large result sets or estimate the size of a result set before processing it.

cursorarrayRequired: No
Example: [0.93,"f7f7f5b7-1111-2222-3333-123456789abc"]

Opaque pagination token: a two-element array [match_score, store_id]. Omit it for the first page and reuse the last result cursor for the next page.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","limit":100,"cursor":[0.93,"f7f7f5b7-1111-2222-3333-123456789abc"]}'
estimate_totalbooleanRequired: No
Example: true

If true, the response is wrapped as {data, total_count} and includes an estimated hit count.

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

Keyword and domain filters

These are stronger content filters for inclusion, exclusion, and domain cleanup when your workflow needs tighter control.

include_keywordsarray[string]Required: No
Example: ["organic","vegan"]

Businesses whose text should mention these terms (up to 64 strings).

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","include_keywords":["organic","vegan"]}'
exclude_keywordsarray[string]Required: No
Example: ["hotel","resort"]

Businesses whose text must not mention these terms (up to 64 strings).

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","exclude_keywords":["hotel","resort"]}'
exclude_root_domainsarray[string]Required: No
Example: ["yelp.com","facebook.com"]

Exclude businesses whose website root domain matches any of these.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","exclude_root_domains":["yelp.com","facebook.com"]}'

Time-based filters

Use these when freshness matters, such as recently opened businesses or recently refreshed records.

open_date_afterstringRequired: No
Example: "2023-01-01T00:00:00Z"

Only businesses opened on or after this instant (ISO 8601 or parseable string).

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","open_date_after":"2023-01-01T00:00:00Z"}'
open_date_beforestringRequired: No
Example: "2024-12-31T23:59:59Z"

Only businesses opened on or before this instant (ISO 8601 or parseable string).

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","open_date_before":"2024-12-31T23:59:59Z"}'
info_updated_afterstringRequired: No
Example: "2025-01-01T00:00:00Z"

Lower bound on last info refresh time. Accepts ISO datetime strings and some millisecond timestamps.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","info_updated_after":"2025-01-01T00:00:00Z"}'
info_updated_beforestringRequired: No
Example: "2025-12-31T23:59:59Z"

Upper bound on last info refresh time, with the same accepted formats as info_updated_after.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/search \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"query":"restaurants","info_updated_before":"2025-12-31T23:59:59Z"}'
# Search Businesses

## Endpoint

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

## Description

Search and retrieve Openmart business records by keyword, location, and business attributes. Use this endpoint to build lead lists, find target businesses, or pull business data into your own workflow.

## Authentication

Header: `X-API-Key: <your_api_key>`

## Example Request

```bash
curl -X POST "https://api.openmart.ai/api/v1/search" \
  -H "Accept: application/json" \
  -H "X-API-Key: <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "hair salons",
    "location": [{"country": "USA", "state": "CA", "city": "San Francisco"}],
    "has_website": true,
    "has_valid_website": true,
    "has_contact_info": true
  }'
```

## Parameters

### Most common parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| query | string | No | Primary free-text search (1–500 chars). Ignored when tags is non-empty. |
| limit | integer | No | Page size: 1–1000. Recommended 100. Preview keys must be ≤100. |
| location | array[object] | No | Geographic filters. Array of Location objects. |
| has_website | boolean | No | Only businesses that have any website URL. |
| has_valid_website | boolean | No | Only businesses with a validated website URL. |
| has_contact_info | boolean | No | Only businesses that have contact-related signals. |
| tags | array[string] | No | Search by tag labels (up to 100). If non-empty, tag-based matching replaces query. |
| store_name | string | No | Filter or boost by store name. |
| min_locations | integer | No | Minimum number of locations for the brand. |

### Location object fields

| Name | Type | Required | Description |
|------|------|----------|-------------|
| country | string | No | Country code or name. Defaults to US. |
| state | string | No | State or region name. |
| city | string | No | City name filter. |
| zip_code | array[string] | No | One or more postal/ZIP codes. |
| lat | number | No | Latitude (WGS84), paired with long for radius search. |
| long | number | No | Longitude (WGS84), paired with lat for radius search. |
| geo_radius | integer | No | Radius in meters around lat/long. |
| use_geo_fuzz | boolean | No | If true, prefer radius/geo behavior over city/state/zip. |

### Business quality and scale filters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| min_overall_rating | number | No | Minimum Google-style overall rating (0–5). |
| max_overall_rating | number | No | Maximum Google-style overall rating (0–5). |
| min_total_reviews | integer | No | Minimum total review count. |
| max_total_reviews | integer | No | Maximum total review count. |
| min_price_tier | integer | No | Minimum price tier. |
| max_price_tier | integer | No | Maximum price tier. |
| max_locations | integer | No | Maximum number of locations for the brand. |
| ownership_type | string | No | Filter by ownership classification. |

### Keyword and domain filters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| include_keywords | array[string] | No | Businesses whose text should mention these terms (up to 64). |
| exclude_keywords | array[string] | No | Businesses whose text must not mention these terms (up to 64). |
| exclude_root_domains | array[string] | No | Exclude businesses with these root domains. |

### Time-based filters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| open_date_after | string | No | Only businesses opened on or after this ISO 8601 date. |
| open_date_before | string | No | Only businesses opened on or before this ISO 8601 date. |
| info_updated_after | string | No | Lower bound on last info refresh time. |
| info_updated_before | string | No | Upper bound on last info refresh time. |

### Pagination and response shape

| Name | Type | Required | Description |
|------|------|----------|-------------|
| cursor | array | No | Opaque pagination token: [match_score, store_id]. Omit for first page, reuse last result's cursor for next page. |
| estimate_total | boolean | No | If true, response wraps as {data, total_count}. |

## Example Response

```json
[
  {
    "id": "54ff8cd5-7497-4f46-9c0c-c6b8c0d10d04",
    "content": {
      "business_name": "Curls are Fun",
      "store_name": "Curls Are Fun",
      "root_domain": "antonioberducci.com",
      "website_url": "http://www.antonioberducci.com/",
      "city": "San Francisco",
      "state": "California",
      "country": "US",
      "street_address": "300 Divisadero St",
      "zipcode": "94117",
      "store_phones": ["+14156264782"],
      "google_rating": 5,
      "google_reviews_count": 1,
      "tags": ["beauty salon", "hair salon", "hair care service"],
      "business_categories": ["BEAUTY_PERSONAL_CARE"],
      "num_stores": 4,
      "latitude": 37.7723988,
      "longitude": -122.4370998
    },
    "match_score": 24.264505,
    "match_highlights": ["hair salon", "hair care service", "hairdresser"],
    "cursor": [24.264505, "54ff8cd5-7497-4f46-9c0c-c6b8c0d10d04"]
  }
]
```