External API docs

Quickstart

Make your first Openmart API call. Create an API key, send a business search, and learn how to fetch full business details.

Prerequisites

Before you begin, make sure you have:

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

Create an API key

To use the Openmart API, you'll first need an API key.

  1. Sign in to your Openmart account
  2. Go to the API management page
  3. Create a new API token
  4. Copy and save the key somewhere secure

You'll use this key to authenticate every API request.

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.

Keep your API key private. Do not share it in client-side code or public repos.

2

Call the API

Use the search endpoint to find businesses.

Replace <your_api_key> with your own API token before sending the request. query is your main search input. location and limit are optional starter fields you can safely change first.
cURL
<replace this> keys example values
curl -X POST "https://api.openmart.ai/api/v1/search" \
  -H "Authorization: Bearer <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "dentists in San Jose",
    "location": [{ "city": "San Jose", "state": "CA", "country": "US" }],
    "limit": 10
  }'
3

Inspect the response

JSON
[
  {
    "id": "54ff8cd5-7497-4f46-9c0c-c6b8c0d10d04",
    "content": {
      "business_name": "Bright Smile Dental",
      "store_name": "Bright Smile Dental",
      "root_domain": "brightsmiledental.com",
      "website_url": "https://brightsmiledental.com",
      "city": "San Jose",
      "state": "California",
      "country": "US",
      "business_categories": ["HEALTH_WELLNESS"]
    },
    "match_score": 24.26,
    "match_highlights": ["dentist"],
    "cursor": [24.26, "54ff8cd5-7497-4f46-9c0c-c6b8c0d10d04"]
  }
]
4

Understand the retrieval flow

You asked Openmart to find businesses matching dentists in San Jose.

Openmart returned a top-level array of matching businesses. Each item includes an id (the Openmart ID) and a nested content object with the business fields. You can use the ID later to fetch full business details. Openmart's current API docs describe search and detail retrieval as a two-step flow using /api/v1/search or /api/v1/search/only_ids first, then /api/v1/business_records/list/openmart_id.

Required steps to handle asynchronous tasks

Understand how async tasks work, from task creation to status checks and result retrieval.

  1. 1

    Submit a task

    Start an async task and store the returned task ID.

    Open async enrichment endpoints
  2. 2

    Check batch status

    Poll the batch status endpoint until the task reaches a terminal state.

    Read check batch status
  3. 3

    Get task IDs in a batch

    Once the batch is ready, fetch task IDs so you can retrieve final results.

    Read get task IDs in a batch
  4. 4

    Get task results

    When the task is complete, call the results endpoint to fetch the final output.

    Read get task results

Next steps

You made your first API call.

Next, you can: