curl --request POST \
--url https://search.glood.ai/api/storefront/v1/headless/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-shop: <x-shop>' \
--data '
{
"locale": "en-US",
"market": 123,
"theme": 123,
"target_page": "search",
"target_id": 123,
"skip_cache": false,
"visitor_id": "<string>",
"client_id": "<string>",
"customer_id": "<string>"
}
'import requests
url = "https://search.glood.ai/api/storefront/v1/headless/config"
payload = {
"locale": "en-US",
"market": 123,
"theme": 123,
"target_page": "search",
"target_id": 123,
"skip_cache": False,
"visitor_id": "<string>",
"client_id": "<string>",
"customer_id": "<string>"
}
headers = {
"x-shop": "<x-shop>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-shop': '<x-shop>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
locale: 'en-US',
market: 123,
theme: 123,
target_page: 'search',
target_id: 123,
skip_cache: false,
visitor_id: '<string>',
client_id: '<string>',
customer_id: '<string>'
})
};
fetch('https://search.glood.ai/api/storefront/v1/headless/config', 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://search.glood.ai/api/storefront/v1/headless/config",
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([
'locale' => 'en-US',
'market' => 123,
'theme' => 123,
'target_page' => 'search',
'target_id' => 123,
'skip_cache' => false,
'visitor_id' => '<string>',
'client_id' => '<string>',
'customer_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-shop: <x-shop>"
],
]);
$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://search.glood.ai/api/storefront/v1/headless/config"
payload := strings.NewReader("{\n \"locale\": \"en-US\",\n \"market\": 123,\n \"theme\": 123,\n \"target_page\": \"search\",\n \"target_id\": 123,\n \"skip_cache\": false,\n \"visitor_id\": \"<string>\",\n \"client_id\": \"<string>\",\n \"customer_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-shop", "<x-shop>")
req.Header.Add("Authorization", "Bearer <token>")
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://search.glood.ai/api/storefront/v1/headless/config")
.header("x-shop", "<x-shop>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"locale\": \"en-US\",\n \"market\": 123,\n \"theme\": 123,\n \"target_page\": \"search\",\n \"target_id\": 123,\n \"skip_cache\": false,\n \"visitor_id\": \"<string>\",\n \"client_id\": \"<string>\",\n \"customer_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://search.glood.ai/api/storefront/v1/headless/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-shop"] = '<x-shop>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"locale\": \"en-US\",\n \"market\": 123,\n \"theme\": 123,\n \"target_page\": \"search\",\n \"target_id\": 123,\n \"skip_cache\": false,\n \"visitor_id\": \"<string>\",\n \"client_id\": \"<string>\",\n \"customer_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"config": {
"instant_search_enabled": true,
"search_result_page_enabled": true,
"image_search_enabled": true,
"personalization_enabled": false,
"personalization_config": null,
"auto_spell_correct_enabled": true,
"instant_search_objects": ["product", "collection", "page", "auto_suggestion"],
"exclude_out_of_stock": false,
"move_out_of_stock_at_end": true,
"site_wide_search": {},
"search_result_count": 10,
"default_ordering": "relevance",
"minimum_type_ahead_input_count": 2,
"default_search_result_page_size": 20,
"search_page_autocomplete_enabled": true,
"search_page_handle": "search",
"image_search_pages": null,
"settings": {}
},
"filters": [
{
"id": 1,
"key": "color",
"title": "Color",
"type": "color",
"attribute_type": "option",
"position": 1,
"expanded": true,
"visible": true,
"operator": "or",
"settings": { "multi_select": true, "show_count": true, "collapsible": true, "searchable": false, "show_more": true, "max_display": 10 },
"min": null, "max": null, "step": null, "unit": null, "suffix": null,
"values": [
{ "value": "red", "label": "Red", "count": null, "position": 1, "hex": "#ff0000", "image": null, "order": null }
]
}
],
"filter_tree": {
"id": 1,
"target_page": "search",
"target_ids": [],
"is_default": true,
"title": "Search filters",
"settings": {},
"data": [],
"translations": {}
},
"shop": { "currency_format": "${{amount}}", "primary_locale": "en", "currency": "USD" },
"analytics": { "enabled": true, "tracking_id": null },
"translations": {},
"token": "shpat_xxx",
"metadata": { "region": "toronto", "locale": "en-US", "market": null }
}
{
"error": [
{
"message": "\"target_page\" must be one of [search, collection]",
"path": ["target_page"],
"type": "any.only",
"context": { "label": "target_page", "key": "target_page" }
}
],
"ok": false
}
Search Config
Config for all three search features (instant, results page, image) plus filter definitions, filter tree, shop, analytics, translations and the Shopify storefront token. No Liquid templates and no widget css/js. Auth: Authorization: Bearer <gl_sf_...> + x-shop.
curl --request POST \
--url https://search.glood.ai/api/storefront/v1/headless/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-shop: <x-shop>' \
--data '
{
"locale": "en-US",
"market": 123,
"theme": 123,
"target_page": "search",
"target_id": 123,
"skip_cache": false,
"visitor_id": "<string>",
"client_id": "<string>",
"customer_id": "<string>"
}
'import requests
url = "https://search.glood.ai/api/storefront/v1/headless/config"
payload = {
"locale": "en-US",
"market": 123,
"theme": 123,
"target_page": "search",
"target_id": 123,
"skip_cache": False,
"visitor_id": "<string>",
"client_id": "<string>",
"customer_id": "<string>"
}
headers = {
"x-shop": "<x-shop>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-shop': '<x-shop>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
locale: 'en-US',
market: 123,
theme: 123,
target_page: 'search',
target_id: 123,
skip_cache: false,
visitor_id: '<string>',
client_id: '<string>',
customer_id: '<string>'
})
};
fetch('https://search.glood.ai/api/storefront/v1/headless/config', 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://search.glood.ai/api/storefront/v1/headless/config",
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([
'locale' => 'en-US',
'market' => 123,
'theme' => 123,
'target_page' => 'search',
'target_id' => 123,
'skip_cache' => false,
'visitor_id' => '<string>',
'client_id' => '<string>',
'customer_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-shop: <x-shop>"
],
]);
$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://search.glood.ai/api/storefront/v1/headless/config"
payload := strings.NewReader("{\n \"locale\": \"en-US\",\n \"market\": 123,\n \"theme\": 123,\n \"target_page\": \"search\",\n \"target_id\": 123,\n \"skip_cache\": false,\n \"visitor_id\": \"<string>\",\n \"client_id\": \"<string>\",\n \"customer_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-shop", "<x-shop>")
req.Header.Add("Authorization", "Bearer <token>")
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://search.glood.ai/api/storefront/v1/headless/config")
.header("x-shop", "<x-shop>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"locale\": \"en-US\",\n \"market\": 123,\n \"theme\": 123,\n \"target_page\": \"search\",\n \"target_id\": 123,\n \"skip_cache\": false,\n \"visitor_id\": \"<string>\",\n \"client_id\": \"<string>\",\n \"customer_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://search.glood.ai/api/storefront/v1/headless/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-shop"] = '<x-shop>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"locale\": \"en-US\",\n \"market\": 123,\n \"theme\": 123,\n \"target_page\": \"search\",\n \"target_id\": 123,\n \"skip_cache\": false,\n \"visitor_id\": \"<string>\",\n \"client_id\": \"<string>\",\n \"customer_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"config": {
"instant_search_enabled": true,
"search_result_page_enabled": true,
"image_search_enabled": true,
"personalization_enabled": false,
"personalization_config": null,
"auto_spell_correct_enabled": true,
"instant_search_objects": ["product", "collection", "page", "auto_suggestion"],
"exclude_out_of_stock": false,
"move_out_of_stock_at_end": true,
"site_wide_search": {},
"search_result_count": 10,
"default_ordering": "relevance",
"minimum_type_ahead_input_count": 2,
"default_search_result_page_size": 20,
"search_page_autocomplete_enabled": true,
"search_page_handle": "search",
"image_search_pages": null,
"settings": {}
},
"filters": [
{
"id": 1,
"key": "color",
"title": "Color",
"type": "color",
"attribute_type": "option",
"position": 1,
"expanded": true,
"visible": true,
"operator": "or",
"settings": { "multi_select": true, "show_count": true, "collapsible": true, "searchable": false, "show_more": true, "max_display": 10 },
"min": null, "max": null, "step": null, "unit": null, "suffix": null,
"values": [
{ "value": "red", "label": "Red", "count": null, "position": 1, "hex": "#ff0000", "image": null, "order": null }
]
}
],
"filter_tree": {
"id": 1,
"target_page": "search",
"target_ids": [],
"is_default": true,
"title": "Search filters",
"settings": {},
"data": [],
"translations": {}
},
"shop": { "currency_format": "${{amount}}", "primary_locale": "en", "currency": "USD" },
"analytics": { "enabled": true, "tracking_id": null },
"translations": {},
"token": "shpat_xxx",
"metadata": { "region": "toronto", "locale": "en-US", "market": null }
}
{
"error": [
{
"message": "\"target_page\" must be one of [search, collection]",
"path": ["target_page"],
"type": "any.only",
"context": { "label": "target_page", "key": "target_page" }
}
],
"ok": false
}
{
"config": {
"instant_search_enabled": true,
"search_result_page_enabled": true,
"image_search_enabled": true,
"personalization_enabled": false,
"personalization_config": null,
"auto_spell_correct_enabled": true,
"instant_search_objects": ["product", "collection", "page", "auto_suggestion"],
"exclude_out_of_stock": false,
"move_out_of_stock_at_end": true,
"site_wide_search": {},
"search_result_count": 10,
"default_ordering": "relevance",
"minimum_type_ahead_input_count": 2,
"default_search_result_page_size": 20,
"search_page_autocomplete_enabled": true,
"search_page_handle": "search",
"image_search_pages": null,
"settings": {}
},
"filters": [
{
"id": 1,
"key": "color",
"title": "Color",
"type": "color",
"attribute_type": "option",
"position": 1,
"expanded": true,
"visible": true,
"operator": "or",
"settings": { "multi_select": true, "show_count": true, "collapsible": true, "searchable": false, "show_more": true, "max_display": 10 },
"min": null, "max": null, "step": null, "unit": null, "suffix": null,
"values": [
{ "value": "red", "label": "Red", "count": null, "position": 1, "hex": "#ff0000", "image": null, "order": null }
]
}
],
"filter_tree": {
"id": 1,
"target_page": "search",
"target_ids": [],
"is_default": true,
"title": "Search filters",
"settings": {},
"data": [],
"translations": {}
},
"shop": { "currency_format": "${{amount}}", "primary_locale": "en", "currency": "USD" },
"analytics": { "enabled": true, "tracking_id": null },
"translations": {},
"token": "shpat_xxx",
"metadata": { "region": "toronto", "locale": "en-US", "market": null }
}
{
"error": [
{
"message": "\"target_page\" must be one of [search, collection]",
"path": ["target_page"],
"type": "any.only",
"context": { "label": "target_page", "key": "target_page" }
}
],
"ok": false
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Shopify store URL. Resolves the shop for the request (headless does not accept ?shop=).
"shop.myshopify.com"
Body
Request body
Config request. Union of the legacy instant-config and search-config inputs.
BCP-47 locale for translations and locale-aware indexes.
"en-US"
Shopify market id for market-aware pricing / catalog.
Theme id. Accepted for parity with the storefront config API; NOT used to render templates (headless responses carry no templates).
Which page's filter tree to resolve.
search, collection Target object id (e.g. collection id) when target_page is collection.
Bypass the cached config and recompute.
Anonymous device/browser UID (the gl_s_uid cookie). The primary personalization key; stays stable when a customer logs in.
Per-session / per-device identifier.
Shopify customer id. Present only when the shopper is logged in; enables customer-level personalization.
Response
Search configuration
Config for all three features plus filter definitions, tree, shop, analytics, translations and token.
Merged instant / search / image feature config. No Liquid templates, no widget css/js.
Show child attributes
Show child attributes
Facet (filter) definitions for the resolved tree.
Show child attributes
Show child attributes
Resolved filter tree, or null when none exists.
Show child attributes
Show child attributes
Minimal shop context.
Show child attributes
Show child attributes
Analytics configuration.
Show child attributes
Show child attributes
Translation bundle for the requested locale.
Shopify storefront access token for direct Storefront API calls.
Response metadata.
Show child attributes
Show child attributes
Was this page helpful?