Skip to main content
POST
/
api
/
commerce
/
catalog
/
search
Search catalog products
curl --request POST \
  --url https://app.vaultgraph.com/api/commerce/catalog/search \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "query": "<string>",
  "filters": {
    "categories": [
      "<string>"
    ],
    "price": {
      "min": 123,
      "max": 123
    }
  },
  "pagination": {
    "cursor": "<string>",
    "limit": 50
  }
}
'
import requests

url = "https://app.vaultgraph.com/api/commerce/catalog/search"

payload = {
"query": "<string>",
"filters": {
"categories": ["<string>"],
"price": {
"min": 123,
"max": 123
}
},
"pagination": {
"cursor": "<string>",
"limit": 50
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
filters: {categories: ['<string>'], price: {min: 123, max: 123}},
pagination: {cursor: '<string>', limit: 50}
})
};

fetch('https://app.vaultgraph.com/api/commerce/catalog/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://app.vaultgraph.com/api/commerce/catalog/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => '<string>',
'filters' => [
'categories' => [
'<string>'
],
'price' => [
'min' => 123,
'max' => 123
]
],
'pagination' => [
'cursor' => '<string>',
'limit' => 50
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://app.vaultgraph.com/api/commerce/catalog/search"

payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"filters\": {\n \"categories\": [\n \"<string>\"\n ],\n \"price\": {\n \"min\": 123,\n \"max\": 123\n }\n },\n \"pagination\": {\n \"cursor\": \"<string>\",\n \"limit\": 50\n }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://app.vaultgraph.com/api/commerce/catalog/search")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"filters\": {\n \"categories\": [\n \"<string>\"\n ],\n \"price\": {\n \"min\": 123,\n \"max\": 123\n }\n },\n \"pagination\": {\n \"cursor\": \"<string>\",\n \"limit\": 50\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.vaultgraph.com/api/commerce/catalog/search")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"filters\": {\n \"categories\": [\n \"<string>\"\n ],\n \"price\": {\n \"min\": 123,\n \"max\": 123\n }\n },\n \"pagination\": {\n \"cursor\": \"<string>\",\n \"limit\": 50\n }\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "products": [
      {
        "id": "<string>",
        "title": "<string>",
        "categories": [
          "<string>"
        ],
        "price_range": {
          "min": {
            "amount": 123,
            "currency": "<string>"
          },
          "max": {
            "amount": 123,
            "currency": "<string>"
          }
        },
        "variants": [
          {
            "id": "<string>",
            "product_id": "<string>",
            "title": "<string>",
            "price": {
              "amount": 123,
              "currency": "<string>"
            },
            "availability": {
              "available": true
            },
            "sku": "<string>",
            "list_price": {
              "amount": 123,
              "currency": "<string>"
            },
            "media": [
              {
                "type": "<string>",
                "url": "<string>",
                "alt_text": "<string>",
                "width": 123,
                "height": 123
              }
            ],
            "image_url": "<string>",
            "url": "<string>"
          }
        ],
        "brand": "<string>",
        "description": "<string>",
        "media": [
          {
            "type": "<string>",
            "url": "<string>",
            "alt_text": "<string>",
            "width": 123,
            "height": 123
          }
        ],
        "image_url": "<string>",
        "list_price_range": {
          "min": {
            "amount": 123,
            "currency": "<string>"
          },
          "max": {
            "amount": 123,
            "currency": "<string>"
          }
        },
        "url": "<string>"
      }
    ],
    "pagination": {
      "has_next_page": true,
      "cursor": "<string>",
      "total_count": 123
    }
  }
}
{
"error": "<string>",
"detail": "<string>"
}
{
"error": "<string>",
"detail": "<string>"
}

Authorizations

x-api-key
string
header
required

Body

application/json

Search criteria. Every field is optional — an empty body returns the first page of the whole catalog.

Catalog search criteria. Every field is optional.

query
string

Free-text search query.

filters
object
pagination
object

Response

One page of products, with optional next-page pagination

data
object