Search
The Search API enables you to search for products in your published catalogs. Search provides powerful capabilities including full-text search, filtering, faceting, and sorting to help shoppers find products quickly and efficiently.
How Search Works
When you publish a catalog with search enabled, the catalog's products are automatically indexed for search. The search index contains product data optimized for fast querying, including product names, descriptions, SKUs, categories, prices, and any custom fields you've configured.
There are two types of search operations:
- Search: Execute a single search query against a catalog. Use the GET endpoint for simple searches with query parameters.
- Multi-search: Execute multiple search queries in a single request. Use the POST endpoint to batch searches together for improved performance.
Search Features
- Full-text search: Search across product names, descriptions, SKUs, and custom fields with typo tolerance and relevance ranking
- Filtering: Narrow results using conditions on product attributes, categories, prices, and custom fields
- Faceting: Get aggregated counts for attribute values to build dynamic navigation and refinement options
- Sorting: Order results by price, name, custom fields, or relevance score
- Highlighting: Get highlighted snippets showing where search terms match in product fields
- Autocomplete: Get search suggestions as shoppers type their queries
Shopper Context
Search results are personalized based on the shopper's context. The system automatically determines which catalog and prices to use based on:
- Channel: The shopping experience (web, mobile, B2B portal)
- Account: For B2B scenarios, the account and parent accounts
- Customer: The logged-in customer's segment
- Tags: Custom context tags for advanced segmentation
This context is provided via request headers and is used to resolve the appropriate catalog rules and price books.
Admin vs Shopper Endpoints
- Shopper endpoints (
/pcm/catalog/search,/pcm/catalog/multi-search): Use shopper context headers to automatically resolve the correct catalog and prices. - Admin endpoints (
/pcm/catalogs/{catalog_id}/releases/{release_id}/search): Directly specify the catalog and release to search, useful for previewing releases or testing.
📄️ Multi-search
Execute one or more searches in a single request.
📄️ Admin Multi-search
Execute one or more searches in a single request.
📄️ Search
Execute search.
📄️ Admin Search
Execute search as an admin.