Skip to main content

Search parameters

This is the main request of the service, and it returns a list of complex products (with images, offers, etc.) matching a search string. The arguments are passed as query parameters.

HTTP format​

GET https://api.theca.com/v1/search

Query parameters​

ParameterTypeDescription
qTextUsers’ search string. The maximum length is 2,048 characters, the remainder will be discarded. The parameter needs to be URL encoded. Quote operator and negated terms are supported.
kInteger?Number of results to return (default 10) between 1-100.
filterSkuTextRemove products from the result that matches the given stock keeping unit (SKU). Multiple SKUs can be delimited with |. For example, filterSku=52293|182491 ensure that no product with SKU 52293 or 182491 are included in the results. A match is counted if the SKU starts with the given filter, so in the previous example the SKU 52293-v2 would also get removed.
filterMpnTextSee filterSku.
filterGtinTextSee filterSku.

Pagination​

More results for a given query can be retrieved by using the next link of the ResultList. This is an absolute URL to the API that includes the state needed to generate more results. As such, pagination does not support a deep link that users can copy/paste. The query parameters used in the original request will be copied to the next link. The included q-parameter cannot be changed (it would give incorrect results), but filter (e.g. filterSku) and k query parameters may be changed.

Note that, there is no guarantee that you will get exactly the same results if you do a request with a large k and compare those with sequential paginated results with a smaller k.

Sorting results​

Affecting the search results by business rules is possible but is not yet part of the public API. This includes prioritizing, e.g., new products, cheap or expensive items, products with many clicks, adding randomness to the results, ratings, etc.