[{"data":1,"prerenderedAt":1635},["ShallowReactive",2],{"docs-navigation":3,"docs-\u002Fdocs\u002Fgetting-started\u002Fstorefront":313,"docs-\u002Fdocs\u002Fgetting-started\u002Fstorefront-surround":1632},[4],{"title":5,"path":6,"stem":7,"children":8,"page":34},"Docs","\u002Fdocs","docs",[9,35,60,78,120,186,223,234,258,283],{"title":10,"description":11,"icon":12,"path":13,"stem":14,"children":15,"page":34},"Getting started","What Zaproo Search is, a quickstart, and wiring search into a storefront.","i-lucide-rocket","\u002Fdocs\u002Fgetting-started","docs\u002F1.getting-started",[16,22,28],{"title":17,"path":18,"stem":19,"description":20,"icon":21},"Introduction","\u002Fdocs\u002Fgetting-started\u002Fintroduction","docs\u002F1.getting-started\u002F1.introduction","What Zaproo Search is, the five things you work with, and how a product catalog becomes a search box on your shop.","i-lucide-book-open-text",{"title":23,"path":24,"stem":25,"description":26,"icon":27},"Quickstart","\u002Fdocs\u002Fgetting-started\u002Fquickstart","docs\u002F1.getting-started\u002F2.quickstart","From a new account to a first search request in six steps, with curl or from your AI agent.","i-lucide-zap",{"title":29,"path":30,"stem":31,"description":32,"icon":33},"Integrate a storefront","\u002Fdocs\u002Fgetting-started\u002Fstorefront","docs\u002F1.getting-started\u002F3.storefront","Build a search results page with facets and an autocomplete box on top of the search and suggest routes.","i-lucide-store",false,{"title":36,"description":37,"icon":38,"path":39,"stem":40,"children":41,"page":34},"Account and team","Sign-in, sessions, organizations, members, roles and projects.","i-lucide-users","\u002Fdocs\u002Faccount","docs\u002F2.account",[42,48,54],{"title":43,"path":44,"stem":45,"description":46,"icon":47},"Account and sign-in","\u002Fdocs\u002Faccount\u002Fsign-in","docs\u002F2.account\u002F1.sign-in","Create an account, verify your email, stay signed in, manage signed-in devices and change or reset your password.","i-lucide-log-in",{"title":49,"path":50,"stem":51,"description":52,"icon":53},"Organizations, members and roles","\u002Fdocs\u002Faccount\u002Forganizations","docs\u002F2.account\u002F2.organizations","What an organization holds, how to add members, and what owners, admins and members may do.","i-lucide-building-2",{"title":55,"path":56,"stem":57,"description":58,"icon":59},"Projects","\u002Fdocs\u002Faccount\u002Fprojects","docs\u002F2.account\u002F3.projects","Group the indices and API keys of one shop or one environment, and keep staging apart from production.","i-lucide-folder-kanban",{"title":61,"description":62,"icon":63,"path":64,"stem":65,"children":66,"page":34},"API keys and security","Secret and public keys, scopes, allowed origins, rate limits and errors.","i-lucide-key-round","\u002Fdocs\u002Fkeys","docs\u002F3.keys",[67,72],{"title":68,"path":69,"stem":70,"description":71,"icon":63},"API keys","\u002Fdocs\u002Fkeys\u002Fapi-keys","docs\u002F3.keys\u002F1.api-keys","Secret and public keys, full and read access, index scope, allowed origins, expiry, and how to revoke a key.",{"title":73,"path":74,"stem":75,"description":76,"icon":77},"Rate limits and errors","\u002Fdocs\u002Fkeys\u002Frate-limits","docs\u002F3.keys\u002F2.rate-limits","How many requests each route accepts per minute, what a 429 looks like, the error format and every error code with its HTTP status.","i-lucide-gauge",{"title":79,"description":80,"icon":81,"path":82,"stem":83,"children":84,"page":34},"Indexing","Indices, languages, mappings, documents, tasks, full catalog sync and reindexing.","i-lucide-database","\u002Fdocs\u002Findexing","docs\u002F4.indexing",[85,90,96,102,108,114],{"title":86,"path":87,"stem":88,"description":89,"icon":81},"Indices and languages","\u002Fdocs\u002Findexing\u002Findices","docs\u002F4.indexing\u002F1.indices","Create an index, pick its language, read its status, and change the language later with a reindex.",{"title":91,"path":92,"stem":93,"description":94,"icon":95},"Mapping and fields","\u002Fdocs\u002Findexing\u002Fmapping","docs\u002F4.indexing\u002F2.mapping","Field types, the five flags that decide what a field is used for, text analysis options, unmapped fields, and which changes need a reindex.","i-lucide-table-properties",{"title":97,"path":98,"stem":99,"description":100,"icon":101},"Documents and tasks","\u002Fdocs\u002Findexing\u002Fdocuments","docs\u002F4.indexing\u002F3.documents","Upload and delete documents in batches, follow each write as a task, retry safely with Idempotency-Key, and browse what the index holds.","i-lucide-file-json",{"title":103,"path":104,"stem":105,"description":106,"icon":107},"Full catalog sync","\u002Fdocs\u002Findexing\u002Ffull-sync","docs\u002F4.indexing\u002F4.full-sync","Replace the whole catalog with a replace session, so products missing from your export disappear from search, without downtime.","i-lucide-refresh-cw",{"title":109,"path":110,"stem":111,"description":112,"icon":113},"Reindex and versions","\u002Fdocs\u002Findexing\u002Fversions","docs\u002F4.indexing\u002F5.versions","Rebuild an index with its saved mapping and swap it in without downtime, follow or cancel the rebuild, and read activeVersion and buildingVersion.","i-lucide-git-compare-arrows",{"title":115,"path":116,"stem":117,"description":118,"icon":119},"Data source","\u002Fdocs\u002Findexing\u002Fdata-source","docs\u002F4.indexing\u002F6.data-source","Let Zaproo download your product feed on a schedule, map it to documents, write only what changed and delete what left the feed.","i-lucide-rss",{"title":121,"description":122,"icon":123,"path":124,"stem":125,"children":126,"page":34},"Integrations","Connect your shop. Magento 2, product feeds and the API work today; more platforms are coming.","i-lucide-plug-zap","\u002Fdocs\u002Fintegrations","docs\u002F4.integrations",[127,133,139,144,150,156,161,166,171,176,181],{"title":128,"path":129,"stem":130,"description":131,"icon":132},"Integrations overview","\u002Fdocs\u002Fintegrations\u002Foverview","docs\u002F4.integrations\u002F01.overview","The ways to get your catalog into Zaproo Search, which one to pick, and how an integration shows up in the cabinet.","i-lucide-layout-grid",{"title":134,"path":135,"stem":136,"description":137,"icon":138},"Magento 2","\u002Fdocs\u002Fintegrations\u002Fmagento","docs\u002F4.integrations\u002F02.magento","Install the Zaproo Search module for Magento 2, connect each store view to its own index, and keep the catalog in sync.","i-lucide-shopping-cart",{"title":140,"path":141,"stem":142,"description":143,"icon":119},"Product feed","\u002Fdocs\u002Fintegrations\u002Fproduct-feed","docs\u002F4.integrations\u002F03.product-feed","Connect any shop that can publish its catalog as a feed. Zaproo downloads it on a schedule and writes only what changed.",{"title":145,"path":146,"stem":147,"description":148,"icon":149},"REST API and MCP","\u002Fdocs\u002Fintegrations\u002Frest-api-and-mcp","docs\u002F4.integrations\u002F04.rest-api-and-mcp","Send documents from your own code with the REST API, or let an AI agent manage the index over MCP.","i-lucide-code",{"title":151,"path":152,"stem":153,"description":154,"icon":155},"Shopify","\u002Fdocs\u002Fintegrations\u002Fshopify","docs\u002F4.integrations\u002F05.shopify","A Zaproo Search integration for Shopify is coming soon. Until then, connect the shop through a product feed or the REST API.","i-lucide-shopping-bag",{"title":157,"path":158,"stem":159,"description":160,"icon":155},"WooCommerce","\u002Fdocs\u002Fintegrations\u002Fwoocommerce","docs\u002F4.integrations\u002F06.woocommerce","A Zaproo Search integration for WooCommerce is coming soon. Until then, connect the shop through a product feed or the REST API.",{"title":162,"path":163,"stem":164,"description":165,"icon":155},"Shopware","\u002Fdocs\u002Fintegrations\u002Fshopware","docs\u002F4.integrations\u002F07.shopware","A Zaproo Search integration for Shopware is coming soon. Until then, connect the shop through a product feed or the REST API.",{"title":167,"path":168,"stem":169,"description":170,"icon":155},"BigCommerce","\u002Fdocs\u002Fintegrations\u002Fbigcommerce","docs\u002F4.integrations\u002F08.bigcommerce","A Zaproo Search integration for BigCommerce is coming soon. Until then, connect the shop through a product feed or the REST API.",{"title":172,"path":173,"stem":174,"description":175,"icon":155},"PrestaShop","\u002Fdocs\u002Fintegrations\u002Fprestashop","docs\u002F4.integrations\u002F09.prestashop","A Zaproo Search integration for PrestaShop is coming soon. Until then, connect the shop through a product feed or the REST API.",{"title":177,"path":178,"stem":179,"description":180,"icon":155},"commercetools","\u002Fdocs\u002Fintegrations\u002Fcommercetools","docs\u002F4.integrations\u002F10.commercetools","A Zaproo Search integration for commercetools is coming soon. Until then, connect the shop through a product feed or the REST API.",{"title":182,"path":183,"stem":184,"description":185,"icon":155},"Salesforce Commerce Cloud","\u002Fdocs\u002Fintegrations\u002Fsalesforce-commerce-cloud","docs\u002F4.integrations\u002F11.salesforce-commerce-cloud","A Zaproo Search integration for Salesforce Commerce Cloud is coming soon. Until then, connect the shop through a product feed or the REST API.",{"title":187,"description":188,"icon":189,"path":190,"stem":191,"children":192,"page":34},"Search and relevance","The search API, search profiles, facets, synonyms and ranking rules.","i-lucide-search","\u002Fdocs\u002Fsearch","docs\u002F5.search",[193,199,205,211,217],{"title":194,"path":195,"stem":196,"description":197,"icon":198},"Search API","\u002Fdocs\u002Fsearch\u002Fsearch-api","docs\u002F5.search\u002F1.search-api","The search request and response, every filter form, sorting, paging, highlighting and the inline profile for previews.","i-lucide-search-code",{"title":200,"path":201,"stem":202,"description":203,"icon":204},"Search profiles","\u002Fdocs\u002Fsearch\u002Fprofiles","docs\u002F5.search\u002F2.profiles","Every setting of a search profile, what it does to results, and the mistakes to avoid.","i-lucide-sliders-horizontal",{"title":206,"path":207,"stem":208,"description":209,"icon":210},"Facets","\u002Fdocs\u002Fsearch\u002Ffacets","docs\u002F5.search\u002F3.facets","The filter panels next to the results, the four facet types, index facets and profile facets, and how a shopper's clicks change the counts.","i-lucide-list-filter",{"title":212,"path":213,"stem":214,"description":215,"icon":216},"Synonyms","\u002Fdocs\u002Fsearch\u002Fsynonyms","docs\u002F5.search\u002F4.synonyms","Let different words find the same products, with equivalent and one-way rules, bulk import and export in the Solr format, and no reindex.","i-lucide-arrow-left-right",{"title":218,"path":219,"stem":220,"description":221,"icon":222},"Ranking rules","\u002Fdocs\u002Fsearch\u002Frules","docs\u002F5.search\u002F5.rules","Change the results for chosen searches. Put products first, hide them, lift or lower a brand, narrow the results or weigh fields differently, on a schedule and per profile.","i-lucide-list-ordered",{"title":224,"description":225,"icon":226,"path":227,"stem":228,"children":229,"page":34},"Autocomplete","Query suggestions as the shopper types.","i-lucide-text-cursor-input","\u002Fdocs\u002Fautocomplete","docs\u002F6.autocomplete",[230],{"title":224,"path":231,"stem":232,"description":233,"icon":226},"\u002Fdocs\u002Fautocomplete\u002Fsuggestions","docs\u002F6.autocomplete\u002F1.suggestions","Query suggestions as the shopper types, built every hour from your own searches, field values and custom entries.",{"title":235,"description":236,"icon":237,"path":238,"stem":239,"children":240,"page":34},"Analytics","Searches, zero-result queries and latency.","i-lucide-chart-line","\u002Fdocs\u002Fanalytics","docs\u002F7.analytics",[241,246,252],{"title":242,"path":243,"stem":244,"description":245,"icon":237},"Search analytics","\u002Fdocs\u002Fanalytics\u002Fsearch-analytics","docs\u002F7.analytics\u002F1.search-analytics","What the analytics page counts, which traffic it leaves out, how the headline numbers are defined, how comparisons and retention work, and how to get the weekly digest.",{"title":247,"path":248,"stem":249,"description":250,"icon":251},"Reports","\u002Fdocs\u002Fanalytics\u002Freports","docs\u002F7.analytics\u002F2.reports","Every analytics report with the definition of each column, the opportunities list and its fix buttons, the per-query view with before and after, and the CSV download.","i-lucide-table",{"title":253,"path":254,"stem":255,"description":256,"icon":257},"Event tracking","\u002Fdocs\u002Fanalytics\u002Fevent-tracking","docs\u002F7.analytics\u002F3.event-tracking","Send clicks, add-to-cart, purchases and suggestion clicks from your storefront, tie them to the search with searchId, and a copy-paste script that does it.","i-lucide-mouse-pointer-click",{"title":259,"description":260,"icon":261,"path":262,"stem":263,"children":264,"page":34},"AI agents (MCP)","Connect Claude Code or any MCP client and manage search from an agent.","i-lucide-bot","\u002Fdocs\u002Fmcp","docs\u002F8.mcp",[265,271,277],{"title":266,"path":267,"stem":268,"description":269,"icon":270},"MCP setup","\u002Fdocs\u002Fmcp\u002Fsetup","docs\u002F8.mcp\u002F1.setup","Connect Claude Code or any MCP client to Zaproo Search and manage indices, documents, profiles, synonyms and ranking rules from your agent.","i-lucide-plug",{"title":272,"path":273,"stem":274,"description":275,"icon":276},"MCP tools","\u002Fdocs\u002Fmcp\u002Ftools","docs\u002F8.mcp\u002F2.tools","Every tool the Zaproo Search MCP server offers, what an agent can do with each group, and prompts to start from.","i-lucide-wrench",{"title":278,"path":279,"stem":280,"description":281,"icon":282},"Resources and prompts","\u002Fdocs\u002Fmcp\u002Fresources","docs\u002F8.mcp\u002F3.resources","The index resources an MCP client can read, the tune_relevance prompt, and the errors the MCP server answers.","i-lucide-library",{"title":284,"description":285,"icon":286,"path":287,"stem":288,"children":289,"page":34},"Reference","Every REST route, every limit, plans and billing, and status.","i-lucide-book-open","\u002Fdocs\u002Freference","docs\u002F9.reference",[290,296,301,307],{"title":291,"path":292,"stem":293,"description":294,"icon":295},"REST API","\u002Fdocs\u002Freference\u002Frest-api","docs\u002F9.reference\u002F1.rest-api","The routes of the Zaproo Search REST API, grouped by area, with who may call it.","i-lucide-list-tree",{"title":297,"path":298,"stem":299,"description":300,"icon":77},"Limits","\u002Fdocs\u002Freference\u002Flimits","docs\u002F9.reference\u002F2.limits","Every size limit, cap and default of the Zaproo Search API in one place, with what happens when you reach it.",{"title":302,"path":303,"stem":304,"description":305,"icon":306},"Plans and billing","\u002Fdocs\u002Freference\u002Fbilling","docs\u002F9.reference\u002F3.billing","The plans, how usage is measured, what happens near a quota, and how plan changes and invoices work.","i-lucide-credit-card",{"title":308,"path":309,"stem":310,"description":311,"icon":312},"Status","\u002Fdocs\u002Freference\u002Fstatus","docs\u002F9.reference\u002F4.status","The status page and the status route, what each service covers and how to use them in your own monitoring.","i-lucide-activity",{"id":314,"title":29,"body":315,"description":32,"extension":1627,"meta":1628,"navigation":1629,"path":30,"seo":1630,"stem":31,"__hash__":1631},"docs\u002Fdocs\u002F1.getting-started\u002F3.storefront.md",{"type":316,"value":317,"toc":1616},"minimark",[318,323,327,359,381,385,423,686,691,704,762,770,774,780,783,949,952,1156,1203,1205,1218,1313,1334,1338,1341,1344,1388,1512,1541,1545,1594,1598,1612],[319,320,322],"h2",{"id":321},"what-you-build","What you build",[324,325,326],"p",{},"A shop search has three parts, and each one is a single API call:",[328,329,330,344,350],"ul",{},[331,332,333,334,338,339,343],"li",{},"The ",[335,336,337],"strong",{},"search results page"," calls ",[340,341,342],"code",{},"POST \u002Fv1\u002Fsearch\u002F\u003CprofileKey>"," with the query, the selected filters, the sort and the page.",[331,345,333,346,349],{},[335,347,348],{},"facets"," next to the results come back in the same answer. A click on a facet value adds a filter and searches again.",[331,351,333,352,338,355,358],{},[335,353,354],{},"autocomplete box",[340,356,357],{},"POST \u002Fv1\u002Fsuggest\u002F\u003CsuggestKey>"," on every keystroke and shows the suggestions.",[324,360,361,362,366,367,370,371,374,375,377,378,380],{},"Before you start, you need an index with documents, a ",[363,364,365],"a",{"href":201},"search profile"," with its ",[340,368,369],{},"profileKey",", and the index's ",[340,372,373],{},"suggestKey",", which the cabinet shows on the index's ",[335,376,224],{}," page. ",[363,379,23],{"href":24}," covers the first two.",[319,382,384],{"id":383},"call-the-api-from-the-browser","Call the API from the browser",[324,386,387,388,391,392,395,396,398,399,402,403,406,407,410,411,414,415,418,419,422],{},"Create a ",[335,389,390],{},"public"," key (",[340,393,394],{},"zs_pk_…",") on the project's ",[335,397,68],{}," page and list your shop's domains under ",[335,400,401],{},"Allowed origins",", for example ",[340,404,405],{},"shop.example.com"," and ",[340,408,409],{},"*.shop.example.com",". A public key can only search and suggest, so it is safe in frontend code. The browser sends the page's ",[340,412,413],{},"Origin"," header with every call, and the API answers only the origins on the key's list; any other site gets ",[340,416,417],{},"403 ORIGIN_NOT_ALLOWED",". See ",[363,420,68],{"href":421},"\u002Fdocs\u002Fkeys\u002Fapi-keys#allowed-origins",".",[424,425,430],"pre",{"className":426,"code":427,"language":428,"meta":429,"style":429},"language-js shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark-high-contrast","const API = 'https:\u002F\u002Fapi.zaproo-search.com\u002Fv1';\nconst KEY = 'zs_pk_...'; \u002F\u002F public key, allowed on https:\u002F\u002Fshop.example.com\nconst PROFILE_KEY = '...'; \u002F\u002F the search profile's profileKey\n\nexport async function search(body) {\n  const res = await fetch(`${API}\u002Fsearch\u002F${PROFILE_KEY}`, {\n    method: 'POST',\n    headers: { Authorization: `Bearer ${KEY}`, 'Content-Type': 'application\u002Fjson' },\n    body: JSON.stringify(body),\n  });\n  if (!res.ok) throw new Error((await res.json()).error.code);\n  return res.json();\n}\n","js","",[340,431,432,456,476,494,501,527,564,576,605,622,628,667,680],{"__ignoreMap":429},[433,434,437,441,445,448,452],"span",{"class":435,"line":436},"line",1,[433,438,440],{"class":439},"sklAV","const",[433,442,444],{"class":443},"ssYy9"," API",[433,446,447],{"class":439}," =",[433,449,451],{"class":450},"semJd"," 'https:\u002F\u002Fapi.zaproo-search.com\u002Fv1'",[433,453,455],{"class":454},"s7iLA",";\n",[433,457,459,461,464,466,469,472],{"class":435,"line":458},2,[433,460,440],{"class":439},[433,462,463],{"class":443}," KEY",[433,465,447],{"class":439},[433,467,468],{"class":450}," 'zs_pk_...'",[433,470,471],{"class":454},"; ",[433,473,475],{"class":474},"sq92B","\u002F\u002F public key, allowed on https:\u002F\u002Fshop.example.com\n",[433,477,479,481,484,486,489,491],{"class":435,"line":478},3,[433,480,440],{"class":439},[433,482,483],{"class":443}," PROFILE_KEY",[433,485,447],{"class":439},[433,487,488],{"class":450}," '...'",[433,490,471],{"class":454},[433,492,493],{"class":474},"\u002F\u002F the search profile's profileKey\n",[433,495,497],{"class":435,"line":496},4,[433,498,500],{"emptyLinePlaceholder":499},true,"\n",[433,502,504,507,510,513,517,520,524],{"class":435,"line":503},5,[433,505,506],{"class":439},"export",[433,508,509],{"class":439}," async",[433,511,512],{"class":439}," function",[433,514,516],{"class":515},"s6m-Y"," search",[433,518,519],{"class":454},"(",[433,521,523],{"class":522},"szw1H","body",[433,525,526],{"class":454},") {\n",[433,528,530,533,536,538,541,544,546,549,552,555,558,561],{"class":435,"line":529},6,[433,531,532],{"class":439},"  const",[433,534,535],{"class":443}," res",[433,537,447],{"class":439},[433,539,540],{"class":439}," await",[433,542,543],{"class":515}," fetch",[433,545,519],{"class":454},[433,547,548],{"class":450},"`${",[433,550,551],{"class":443},"API",[433,553,554],{"class":450},"}\u002Fsearch\u002F${",[433,556,557],{"class":443},"PROFILE_KEY",[433,559,560],{"class":450},"}`",[433,562,563],{"class":454},", {\n",[433,565,567,570,573],{"class":435,"line":566},7,[433,568,569],{"class":454},"    method: ",[433,571,572],{"class":450},"'POST'",[433,574,575],{"class":454},",\n",[433,577,579,582,585,588,590,593,596,599,602],{"class":435,"line":578},8,[433,580,581],{"class":454},"    headers: { Authorization: ",[433,583,584],{"class":450},"`Bearer ${",[433,586,587],{"class":443},"KEY",[433,589,560],{"class":450},[433,591,592],{"class":454},", ",[433,594,595],{"class":450},"'Content-Type'",[433,597,598],{"class":454},": ",[433,600,601],{"class":450},"'application\u002Fjson'",[433,603,604],{"class":454}," },\n",[433,606,608,611,614,616,619],{"class":435,"line":607},9,[433,609,610],{"class":454},"    body: ",[433,612,613],{"class":443},"JSON",[433,615,422],{"class":454},[433,617,618],{"class":515},"stringify",[433,620,621],{"class":454},"(body),\n",[433,623,625],{"class":435,"line":624},10,[433,626,627],{"class":454},"  });\n",[433,629,631,634,637,640,643,646,649,652,655,658,661,664],{"class":435,"line":630},11,[433,632,633],{"class":439},"  if",[433,635,636],{"class":454}," (",[433,638,639],{"class":439},"!",[433,641,642],{"class":454},"res.ok) ",[433,644,645],{"class":439},"throw",[433,647,648],{"class":439}," new",[433,650,651],{"class":515}," Error",[433,653,654],{"class":454},"((",[433,656,657],{"class":439},"await",[433,659,660],{"class":454}," res.",[433,662,663],{"class":515},"json",[433,665,666],{"class":454},"()).error.code);\n",[433,668,670,673,675,677],{"class":435,"line":669},12,[433,671,672],{"class":439},"  return",[433,674,660],{"class":454},[433,676,663],{"class":515},[433,678,679],{"class":454},"();\n",[433,681,683],{"class":435,"line":682},13,[433,684,685],{"class":454},"}\n",[687,688,690],"h3",{"id":689},"or-from-your-server","Or from your server",[324,692,693,694,697,698,700,701,703],{},"Server-rendered pages can call the same routes from the shop's server. Use a secret key with read access, limited to the index the shop searches (see ",[363,695,68],{"href":696},"\u002Fdocs\u002Fkeys\u002Fapi-keys#index-scope","): a server call sends no ",[340,699,413],{}," header, so a public key answers ",[340,702,417],{}," there.",[424,705,709],{"className":706,"code":707,"language":708,"meta":429,"style":429},"language-bash shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark-high-contrast","curl -X POST https:\u002F\u002Fapi.zaproo-search.com\u002Fv1\u002Fsearch\u002F$PROFILE_KEY \\\n  -H \"Authorization: Bearer $ZS_KEY\" -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"q\": \"oled tv\", \"filters\": {\"brand\": [\"Samsung\", \"LG\"]}, \"sort\": \"price:asc\", \"page\": 1}'\n","bash",[340,710,711,731,754],{"__ignoreMap":429},[433,712,713,716,719,722,725,728],{"class":435,"line":436},[433,714,715],{"class":522},"curl",[433,717,718],{"class":443}," -X",[433,720,721],{"class":450}," POST",[433,723,724],{"class":450}," https:\u002F\u002Fapi.zaproo-search.com\u002Fv1\u002Fsearch\u002F",[433,726,727],{"class":454},"$PROFILE_KEY ",[433,729,730],{"class":439},"\\\n",[433,732,733,736,739,742,745,748,751],{"class":435,"line":458},[433,734,735],{"class":443},"  -H",[433,737,738],{"class":450}," \"Authorization: Bearer ",[433,740,741],{"class":454},"$ZS_KEY",[433,743,744],{"class":450},"\"",[433,746,747],{"class":443}," -H",[433,749,750],{"class":450}," \"Content-Type: application\u002Fjson\"",[433,752,753],{"class":439}," \\\n",[433,755,756,759],{"class":435,"line":478},[433,757,758],{"class":443},"  -d",[433,760,761],{"class":450}," '{\"q\": \"oled tv\", \"filters\": {\"brand\": [\"Samsung\", \"LG\"]}, \"sort\": \"price:asc\", \"page\": 1}'\n",[763,764,765],"note",{},[324,766,767,768,422],{},"Rate limits count per key and per client IP: 600 searches and 1200 suggest requests per minute per key. Every shopper shares that key budget, from the browser too. From the browser each shopper has their own IP, while through your server they also share one IP. See ",[363,769,73],{"href":74},[319,771,773],{"id":772},"search-results-page","Search results page",[775,776],"api-route",{"auth":777,"method":778,"path":779},"Public key from an allowed origin, or any secret key of the project","POST","\u002Fv1\u002Fsearch\u002F:profileKey",[324,781,782],{},"The request body holds only what the shopper chose. Everything else, such as the fields to search and the facets to show, comes from the profile.",[784,785,786,805],"table",{},[787,788,789],"thead",{},[790,791,792,796,799,802],"tr",{},[793,794,795],"th",{},"Field",[793,797,798],{},"Type",[793,800,801],{},"Default",[793,803,804],{},"What it does",[806,807,808,827,845,864,882,904,926],"tbody",{},[790,809,810,816,819,824],{},[811,812,813],"td",{},[340,814,815],{},"q",[811,817,818],{},"string, up to 500 characters",[811,820,821],{},[340,822,823],{},"\"\"",[811,825,826],{},"The query. An empty query returns every product, which is how a category page works.",[790,828,829,834,837,842],{},[811,830,831],{},[340,832,833],{},"filters",[811,835,836],{},"field → filter",[811,838,839],{},[340,840,841],{},"{}",[811,843,844],{},"The facet values and other filters the shopper selected.",[790,846,847,852,855,858],{},[811,848,849],{},[340,850,851],{},"sort",[811,853,854],{},"string",[811,856,857],{},"the profile's default sort",[811,859,860,861,422],{},"One of the profile's sort options, for example ",[340,862,863],{},"price:asc",[790,865,866,871,874,879],{},[811,867,868],{},[340,869,870],{},"page",[811,872,873],{},"integer from 1",[811,875,876],{},[340,877,878],{},"1",[811,880,881],{},"The page of results.",[790,883,884,889,892,898],{},[811,885,886],{},[340,887,888],{},"perPage",[811,890,891],{},"integer",[811,893,894,895],{},"the profile's ",[340,896,897],{},"perPage.default",[811,899,900,901,422],{},"Results per page, up to the profile's ",[340,902,903],{},"perPage.max",[790,905,906,911,914,919],{},[811,907,908],{},[340,909,910],{},"highlight",[811,912,913],{},"boolean",[811,915,916],{},[340,917,918],{},"false",[811,920,921,922,925],{},"Adds ",[340,923,924],{},"_highlight"," to every hit with the matched words marked.",[790,927,928,933,943,946],{},[811,929,930],{},[340,931,932],{},"sessionId",[811,934,935,936,939,940],{},"string, 1 to 100 letters, digits, ",[340,937,938],{},"-"," or ",[340,941,942],{},"_",[811,944,945],{},"none",[811,947,948],{},"One id per visitor, so paging through results stays stable.",[324,950,951],{},"The answer:",[424,953,956],{"className":954,"code":955,"language":663,"meta":429,"style":429},"language-json shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark-high-contrast","{\n  \"items\": [{ \"id\": \"tv-1\", \"title\": \"55 inch OLED TV\", \"brand\": \"Samsung\", \"price\": 899 }],\n  \"total\": 42,\n  \"page\": 1,\n  \"perPage\": 24,\n  \"facets\": [\n    { \"type\": \"terms\", \"field\": \"brand\", \"label\": \"Brand\", \"items\": [{ \"key\": \"Samsung\", \"count\": 18, \"selected\": true }] }\n  ],\n  \"correctedQuery\": null,\n  \"tookMs\": 12\n}\n",[340,957,958,963,1013,1025,1036,1048,1056,1125,1130,1142,1152],{"__ignoreMap":429},[433,959,960],{"class":435,"line":436},[433,961,962],{"class":454},"{\n",[433,964,965,969,972,975,977,980,982,985,987,990,992,995,997,1000,1002,1005,1007,1010],{"class":435,"line":458},[433,966,968],{"class":967},"sb7M8","  \"items\"",[433,970,971],{"class":454},": [{ ",[433,973,974],{"class":967},"\"id\"",[433,976,598],{"class":454},[433,978,979],{"class":450},"\"tv-1\"",[433,981,592],{"class":454},[433,983,984],{"class":967},"\"title\"",[433,986,598],{"class":454},[433,988,989],{"class":450},"\"55 inch OLED TV\"",[433,991,592],{"class":454},[433,993,994],{"class":967},"\"brand\"",[433,996,598],{"class":454},[433,998,999],{"class":450},"\"Samsung\"",[433,1001,592],{"class":454},[433,1003,1004],{"class":967},"\"price\"",[433,1006,598],{"class":454},[433,1008,1009],{"class":443},"899",[433,1011,1012],{"class":454}," }],\n",[433,1014,1015,1018,1020,1023],{"class":435,"line":478},[433,1016,1017],{"class":967},"  \"total\"",[433,1019,598],{"class":454},[433,1021,1022],{"class":443},"42",[433,1024,575],{"class":454},[433,1026,1027,1030,1032,1034],{"class":435,"line":496},[433,1028,1029],{"class":967},"  \"page\"",[433,1031,598],{"class":454},[433,1033,878],{"class":443},[433,1035,575],{"class":454},[433,1037,1038,1041,1043,1046],{"class":435,"line":503},[433,1039,1040],{"class":967},"  \"perPage\"",[433,1042,598],{"class":454},[433,1044,1045],{"class":443},"24",[433,1047,575],{"class":454},[433,1049,1050,1053],{"class":435,"line":529},[433,1051,1052],{"class":967},"  \"facets\"",[433,1054,1055],{"class":454},": [\n",[433,1057,1058,1061,1064,1066,1069,1071,1074,1076,1078,1080,1083,1085,1088,1090,1093,1095,1098,1100,1102,1104,1107,1109,1112,1114,1117,1119,1122],{"class":435,"line":566},[433,1059,1060],{"class":454},"    { ",[433,1062,1063],{"class":967},"\"type\"",[433,1065,598],{"class":454},[433,1067,1068],{"class":450},"\"terms\"",[433,1070,592],{"class":454},[433,1072,1073],{"class":967},"\"field\"",[433,1075,598],{"class":454},[433,1077,994],{"class":450},[433,1079,592],{"class":454},[433,1081,1082],{"class":967},"\"label\"",[433,1084,598],{"class":454},[433,1086,1087],{"class":450},"\"Brand\"",[433,1089,592],{"class":454},[433,1091,1092],{"class":967},"\"items\"",[433,1094,971],{"class":454},[433,1096,1097],{"class":967},"\"key\"",[433,1099,598],{"class":454},[433,1101,999],{"class":450},[433,1103,592],{"class":454},[433,1105,1106],{"class":967},"\"count\"",[433,1108,598],{"class":454},[433,1110,1111],{"class":443},"18",[433,1113,592],{"class":454},[433,1115,1116],{"class":967},"\"selected\"",[433,1118,598],{"class":454},[433,1120,1121],{"class":443},"true",[433,1123,1124],{"class":454}," }] }\n",[433,1126,1127],{"class":435,"line":578},[433,1128,1129],{"class":454},"  ],\n",[433,1131,1132,1135,1137,1140],{"class":435,"line":607},[433,1133,1134],{"class":967},"  \"correctedQuery\"",[433,1136,598],{"class":454},[433,1138,1139],{"class":443},"null",[433,1141,575],{"class":454},[433,1143,1144,1147,1149],{"class":435,"line":624},[433,1145,1146],{"class":967},"  \"tookMs\"",[433,1148,598],{"class":454},[433,1150,1151],{"class":443},"12\n",[433,1153,1154],{"class":435,"line":630},[433,1155,685],{"class":454},[328,1157,1158,1176,1197],{},[331,1159,1160,1161,1164,1165,406,1167,1169,1170,1172,1173,1175],{},"Show ",[340,1162,1163],{},"total"," as the result count and build the pager from ",[340,1166,1163],{},[340,1168,888],{},". ",[340,1171,870],{}," times ",[340,1174,888],{}," cannot go past 10000, so offer filters rather than page 500.",[331,1177,1178,1179,1182,1183,1186,1187,1190,1191,1193,1194,1196],{},"When ",[340,1180,1181],{},"correctedQuery"," is set, the query found nothing and did-you-mean found a better spelling. If ",[340,1184,1185],{},"items"," is not empty, the results come from that spelling: show \"Showing results for ",[1188,1189,1181],"em",{},"\". If ",[340,1192,1185],{}," is empty, the profile only suggests it: show \"Did you mean ",[1188,1195,1181],{},"?\" as a link.",[331,1198,1199,1200,422],{},"A hit carries the fields the profile returns. A hit placed by a ranking rule also has ",[340,1201,1202],{},"\"_pinned\": true",[319,1204,206],{"id":348},[324,1206,1207,1208,1210,1211,1213,1214,1217],{},"Each entry in ",[340,1209,348],{}," describes one facet to draw. Its ",[340,1212,1185],{}," are the values with their product counts, and ",[340,1215,1216],{},"selected"," marks the values the current filters picked.",[784,1219,1220,1235],{},[787,1221,1222],{},[790,1223,1224,1229,1232],{},[793,1225,1226],{},[340,1227,1228],{},"type",[793,1230,1231],{},"Draw it as",[793,1233,1234],{},"Filter to send when the shopper picks a value",[806,1236,1237,1253,1275,1297],{},[790,1238,1239,1244,1247],{},[811,1240,1241],{},[340,1242,1243],{},"terms",[811,1245,1246],{},"A list of checkboxes",[811,1248,1249,1252],{},[340,1250,1251],{},"{\"brand\": [\"Samsung\", \"LG\"]}",". Several values match any of them.",[790,1254,1255,1260,1263],{},[811,1256,1257],{},[340,1258,1259],{},"range",[811,1261,1262],{},"A list of price bands",[811,1264,1265,1268,1269,406,1272,422],{},[340,1266,1267],{},"{\"price\": {\"gte\": 100, \"lt\": 500}}",", using the item's ",[340,1270,1271],{},"from",[340,1273,1274],{},"to",[790,1276,1277,1282,1292],{},[811,1278,1279],{},[340,1280,1281],{},"stats",[811,1283,1284,1285,1288,1289],{},"A slider from ",[340,1286,1287],{},"min"," to ",[340,1290,1291],{},"max",[811,1293,1294],{},[340,1295,1296],{},"{\"price\": {\"gte\": 150, \"lte\": 400}}",[790,1298,1299,1304,1307],{},[811,1300,1301],{},[340,1302,1303],{},"hierarchy",[811,1305,1306],{},"A category tree, one level at a time",[811,1308,1309,1312],{},[340,1310,1311],{},"{\"category\": [\"TV>OLED\"]}",". The facet then lists the children of the deepest selected node.",[324,1314,1315,1316,1319,1320,1323,1324,1327,1328,1169,1331,1333],{},"Filters on different fields must all match. A request may filter only on fields the profile has as facets or lists under ",[340,1317,1318],{},"filterFields",". Any other field answers ",[340,1321,1322],{},"400 FILTER_NOT_ALLOWED",". A filter also accepts a single value, ",[340,1325,1326],{},"{\"inStock\": true}",", and ",[340,1329,1330],{},"{\"exists\": true}",[363,1332,200],{"href":201}," explains how to set up facets and filter fields.",[319,1335,1337],{"id":1336},"autocomplete-box","Autocomplete box",[775,1339],{"auth":777,"method":778,"path":1340},"\u002Fv1\u002Fsuggest\u002F:suggestKey",[324,1342,1343],{},"Send what the shopper has typed so far, up to 100 characters:",[424,1345,1347],{"className":706,"code":1346,"language":708,"meta":429,"style":429},"curl -X POST https:\u002F\u002Fapi.zaproo-search.com\u002Fv1\u002Fsuggest\u002F$SUGGEST_KEY \\\n  -H \"Authorization: Bearer $ZS_KEY\" -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"q\": \"sams\"}'\n",[340,1348,1349,1365,1381],{"__ignoreMap":429},[433,1350,1351,1353,1355,1357,1360,1363],{"class":435,"line":436},[433,1352,715],{"class":522},[433,1354,718],{"class":443},[433,1356,721],{"class":450},[433,1358,1359],{"class":450}," https:\u002F\u002Fapi.zaproo-search.com\u002Fv1\u002Fsuggest\u002F",[433,1361,1362],{"class":454},"$SUGGEST_KEY ",[433,1364,730],{"class":439},[433,1366,1367,1369,1371,1373,1375,1377,1379],{"class":435,"line":458},[433,1368,735],{"class":443},[433,1370,738],{"class":450},[433,1372,741],{"class":454},[433,1374,744],{"class":450},[433,1376,747],{"class":443},[433,1378,750],{"class":450},[433,1380,753],{"class":439},[433,1382,1383,1385],{"class":435,"line":478},[433,1384,758],{"class":443},[433,1386,1387],{"class":450}," '{\"q\": \"sams\"}'\n",[424,1389,1391],{"className":954,"code":1390,"language":663,"meta":429,"style":429},"{\n  \"suggestions\": [\n    { \"text\": \"samsung tv\", \"kind\": \"query\", \"facetHint\": { \"key\": \"category\", \"value\": \"TV\" } },\n    { \"text\": \"Samsung\", \"kind\": \"field\", \"facetHint\": null }\n  ],\n  \"searchProfileKey\": \"Ab3dE9xQk2LmP0sT\",\n  \"tookMs\": 3\n}\n",[340,1392,1393,1397,1404,1454,1483,1487,1499,1508],{"__ignoreMap":429},[433,1394,1395],{"class":435,"line":436},[433,1396,962],{"class":454},[433,1398,1399,1402],{"class":435,"line":458},[433,1400,1401],{"class":967},"  \"suggestions\"",[433,1403,1055],{"class":454},[433,1405,1406,1408,1411,1413,1416,1418,1421,1423,1426,1428,1431,1434,1436,1438,1441,1443,1446,1448,1451],{"class":435,"line":478},[433,1407,1060],{"class":454},[433,1409,1410],{"class":967},"\"text\"",[433,1412,598],{"class":454},[433,1414,1415],{"class":450},"\"samsung tv\"",[433,1417,592],{"class":454},[433,1419,1420],{"class":967},"\"kind\"",[433,1422,598],{"class":454},[433,1424,1425],{"class":450},"\"query\"",[433,1427,592],{"class":454},[433,1429,1430],{"class":967},"\"facetHint\"",[433,1432,1433],{"class":454},": { ",[433,1435,1097],{"class":967},[433,1437,598],{"class":454},[433,1439,1440],{"class":450},"\"category\"",[433,1442,592],{"class":454},[433,1444,1445],{"class":967},"\"value\"",[433,1447,598],{"class":454},[433,1449,1450],{"class":450},"\"TV\"",[433,1452,1453],{"class":454}," } },\n",[433,1455,1456,1458,1460,1462,1464,1466,1468,1470,1472,1474,1476,1478,1480],{"class":435,"line":496},[433,1457,1060],{"class":454},[433,1459,1410],{"class":967},[433,1461,598],{"class":454},[433,1463,999],{"class":450},[433,1465,592],{"class":454},[433,1467,1420],{"class":967},[433,1469,598],{"class":454},[433,1471,1073],{"class":450},[433,1473,592],{"class":454},[433,1475,1430],{"class":967},[433,1477,598],{"class":454},[433,1479,1139],{"class":443},[433,1481,1482],{"class":454}," }\n",[433,1484,1485],{"class":435,"line":503},[433,1486,1129],{"class":454},[433,1488,1489,1492,1494,1497],{"class":435,"line":529},[433,1490,1491],{"class":967},"  \"searchProfileKey\"",[433,1493,598],{"class":454},[433,1495,1496],{"class":450},"\"Ab3dE9xQk2LmP0sT\"",[433,1498,575],{"class":454},[433,1500,1501,1503,1505],{"class":435,"line":566},[433,1502,1146],{"class":967},[433,1504,598],{"class":454},[433,1506,1507],{"class":443},"3\n",[433,1509,1510],{"class":435,"line":578},[433,1511,685],{"class":454},[328,1513,1514,1520,1538],{},[331,1515,1516,1517,1519],{},"With an empty ",[340,1518,815],{},", the answer lists the most searched queries, if autocomplete is set to show them. Ask for them when the search box gets focus.",[331,1521,1522,1523,1526,1527,1530,1531,1534,1535,422],{},"When the shopper picks a suggestion, search for its ",[340,1524,1525],{},"text"," with the profile in ",[340,1528,1529],{},"searchProfileKey",". If the suggestion has a ",[340,1532,1533],{},"facetHint",", add it as a filter: ",[340,1536,1537],{},"{\"category\": [\"TV\"]}",[331,1539,1540],{},"Wait until the shopper pauses typing, about 150 ms, before you send the request. Drop answers that arrive after a newer request went out.",[319,1542,1544],{"id":1543},"common-mistakes","Common mistakes",[328,1546,1547,1567,1573,1583],{},[331,1548,1549,1552,1553,1556,1557,939,1559,1561,1562,1564,1565,422],{},[335,1550,1551],{},"Forgetting a domain on the public key."," A page on ",[340,1554,1555],{},"www.shop.example.com"," needs ",[340,1558,1555],{},[340,1560,409],{}," on the key's allowed origins, not only ",[340,1563,405],{},". Otherwise the API answers ",[340,1566,417],{},[331,1568,1569,1572],{},[335,1570,1571],{},"Putting a full-access secret key into frontend code."," Anyone can read it and delete your indices. Keep secret keys on the server, and use read access for search.",[331,1574,1575,1578,1579,1582],{},[335,1576,1577],{},"Sending a sort the profile does not offer."," The API answers ",[340,1580,1581],{},"400 SORT_NOT_ALLOWED",". Show only the profile's sort options.",[331,1584,1585,1588,1589,1591,1592,422],{},[335,1586,1587],{},"Filtering on a field that is not a facet."," Add the field to the profile's ",[340,1590,1318],{}," first, or the API answers ",[340,1593,1322],{},[319,1595,1597],{"id":1596},"related","Related",[328,1599,1600,1604,1608],{},[331,1601,1602],{},[363,1603,200],{"href":201},[331,1605,1606],{},[363,1607,68],{"href":69},[331,1609,1610],{},[363,1611,73],{"href":74},[1613,1614,1615],"style",{},"html pre.shiki code .szw1H, html code.shiki .szw1H{--shiki-light:#702C00;--shiki-default:#702C00;--shiki-dark:#FFB757}html pre.shiki code .ssYy9, html code.shiki .ssYy9{--shiki-light:#023B95;--shiki-default:#023B95;--shiki-dark:#91CBFF}html pre.shiki code .semJd, html code.shiki .semJd{--shiki-light:#032563;--shiki-default:#032563;--shiki-dark:#ADDCFF}html pre.shiki code .s7iLA, html code.shiki .s7iLA{--shiki-light:#0E1116;--shiki-default:#0E1116;--shiki-dark:#F0F3F6}html pre.shiki code .sklAV, html code.shiki .sklAV{--shiki-light:#A0111F;--shiki-default:#A0111F;--shiki-dark:#FF9492}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sq92B, html code.shiki .sq92B{--shiki-light:#66707B;--shiki-default:#66707B;--shiki-dark:#BDC4CC}html pre.shiki code .s6m-Y, html code.shiki .s6m-Y{--shiki-light:#622CBC;--shiki-default:#622CBC;--shiki-dark:#DBB7FF}html pre.shiki code .sb7M8, html code.shiki .sb7M8{--shiki-light:#024C1A;--shiki-default:#024C1A;--shiki-dark:#72F088}",{"title":429,"searchDepth":458,"depth":458,"links":1617},[1618,1619,1622,1623,1624,1625,1626],{"id":321,"depth":458,"text":322},{"id":383,"depth":458,"text":384,"children":1620},[1621],{"id":689,"depth":478,"text":690},{"id":772,"depth":458,"text":773},{"id":348,"depth":458,"text":206},{"id":1336,"depth":458,"text":1337},{"id":1543,"depth":458,"text":1544},{"id":1596,"depth":458,"text":1597},"md",{},{"icon":33},{"title":29,"description":32},"6n9PO_l4eVpDbZrlvEfRmUjIxDvOa31GwPGH8RGwwzo",[1633,1634],{"title":23,"path":24,"stem":25,"description":26,"icon":27,"children":-1},{"title":43,"path":44,"stem":45,"description":46,"icon":47,"children":-1},1792679791156]