Search
PA’s Search API provides near real-time (less than 100ms) search results for your website. Before you get started, please check with your PA Account Manager that search is approved for your account.
New features will be introduced to the latest API version as we upgrade our Search API. Currently, the latest version is v1.4. You can also find the previous API versions listed below.

Search v1.4

post
https://search.api.similarinc.com
/v1.4/search

Example Request

As PA does all the complex computation in the background, the API interface for receiving search results is simple.
curl --request POST 'https://search.api.similarinc.com/1.4/Search' \
--header 'Content-Type: application/json' \
--data-raw '{
"customerId": "CUSTOMER_ID",
"websieId": "WEBSITE_ID",
"q": "chair",
"client": "xyz",
"personalise": false,
"search_fields": {
"title": {},
"brand": {
"fuzziness": "auto"
},
"brand.text_keyword": {
"fuzziness": "auto"
},
"product_category": {},
"description": {}
},
"fuzzy": false,
"null_checks":["title"],
"start": 0,
"image_link": "",
"scope": {"sale_price":{"min": 10}},
"sort_fields": [
{"org_price": "ASC"},
{"sale_price": "ASC"}
],
"aggregations": [
"product_type",
"brand"
],
"rules": [
{
"name": "sale_price",
"values": {
"gte": 250,
"lte": 300
},
"boost": 3
}
],
"range_fields": ["sale_price"],
"size": 1,
"weights": {"image": 10, "text": 5},
"exclude_ids":[],
"availability": "in stock"
}'

Example Response

For all our search APIs, the output is standardised to ensure that our clients have the smoothest experience in integrating different algorithms for different use cases.
{
"payload": {
"total_results": 1,
"next_cursor": null,
"aggregations": {
"product_type": [
{
"key": "Furniture > Dining Room > Dining tables",
"doc_count": 173
},
"brand": [
{
"key": "HAY",
"doc_count": 20
},
]
}
"results": [
{
"attributes": {
"colour": "Walnut",
"price": 1200.0,
"sale_price": 1100.0,
"size": ["8 Seater"],
"product_type": "Furniture > Dining Room > Dining tables",
"product_category": "Furniture",
"brand": "HAY"
},
"image_url": "https://XXXX.jpg",
"link": "https://XXXX.uk",
"item_group_id": 21260,
"sku_id": 268262,
"title": "8 Seater Oval Walnut Dining Table",
"product_type": "Furniture > Dining Room > Dining tables",
"score": 0.9670957669803361,
"product_category_id": 677,
"object_types": [
"tableware"
],
"personalized": false,
"availability": "in stock"
}
],
"website_id": "D6EB943D-CCCCCCXXXXXX-A093EF"
},
"type": 1,
"code": 0
}

Search v1.3

post
https://search.api.similarinc.com
/v1.3/search

Example Request

curl --request POST 'https://search.api.similarinc.com/1.3/Search' \
--header 'Content-Type: application/json' \
--data-raw '{
"customerId": "CUSTOMER_ID",
"websiteId": "WEBSITE_ID",
"q": "chair",
"client": "xyz",
"personalise": false,
"search_fields": {
"title": {},
"brand": {
"fuzziness": "auto"
},
"brand.text_keyword": {
"fuzziness": "auto"
},
"product_category": {},
"description": {}
},
"fuzzy": false,
"null_checks":["title"],
"start": 0,
"image_link": "",
"scope": {"sale_price":{"min": 10}},
"sort_fields": [
{"org_price": "ASC"},
{"sale_price": "ASC"}
],
"aggregations": [
"product_type",
"brand"
],
"range_fields": ["sale_price"],
"size": 1,
"weights": {"image": 10, "text": 5},
"exclude_ids":[],
"availability": "in stock"
}'

Example Response

{
"payload": {
"total_results": 1,
"next_cursor": null,
"aggregations": {
"product_type": [
{
"key": "Furniture > Dining Room > Dining tables",
"doc_count": 173
},
"brand": [
{
"key": "HAY",
"doc_count": 20
},
]
}
"results": [
{
"attributes": {
"colour": "Walnut",
"price": 1200.0,
"sale_price": 1100.0,
"size": ["8 Seater"],
"product_type": "Furniture > Dining Room > Dining tables",
"product_category": "Furniture",
"brand": "HAY"
},
"image_url": "https://XXXX.jpg",
"link": "https://XXXX.uk",
"item_group_id": 21260,
"sku_id": 268262,
"title": "8 Seater Oval Walnut Dining Table",
"product_type": "Furniture > Dining Room > Dining tables",
"score": 0.9670957669803361,
"product_category_id": 677,
"object_types": [
"tableware"
],
"personalized": false,
"availability": "in stock"
}
],
"website_id": "D6EB943D-CCCCCCXXXXXX-A093EF"
},
"type": 1,
"code": 0
}

Search v1.2

post
https://search.api.similarinc.com
/v1.2/search

Example Request

curl --request POST 'https://search.api.similarinc.com/1.2/Search' \
--header 'Content-Type: application/json' \
--data-raw '{
"customerId": "CUSTOMER_ID",
"websiteId": "WEBSITE_ID",
"q": "chair",
"client": "xyz",
"personalise": false,
"search_fields": {
"title": {},
"brand": {
"fuzziness": "auto"
},
"brand.text_keyword": {
"fuzziness": "auto"
},
"product_category": {},
"description": {}
},
"fuzzy": false,
"null_checks":["title"],
"start": 0,
"image_link": "",
"scope": {"sale_price":{"min": 10}},
"aggregations": [
"product_type",
"brand"
],
"range_fields": ["sale_price"],
"size": 1,
"weights": {"image": 10, "text": 5},
"exclude_ids":[],
"availability": "in stock"
}'

Example Response

{
"payload": {
"total_results": 1,
"next_cursor": null,
"aggregations": {
"product_type": [
{
"key": "Furniture > Dining Room > Dining tables",
"doc_count": 173
},
"brand": [
{
"key": "HAY",
"doc_count": 20
},
]
}
"results": [
{
"attributes": {
"colour": "Walnut",
"price": 1200.0,
"sale_price": 1100.0,
"size": ["8 Seater"],
"product_type": "Furniture > Dining Room > Dining tables",
"product_category": "Furniture",
"brand": "HAY"
},
"image_url": "https://XXXX.jpg",
"link": "https://XXXX.uk",
"item_group_id": 21260,
"sku_id": 268262,
"title": "8 Seater Oval Walnut Dining Table",
"product_type": "Furniture > Dining Room > Dining tables",
"score": 0.9670957669803361,
"product_category_id": 677,
"object_types": [
"tableware"
],
"personalized": false,
"availability": "in stock"
}
],
"website_id": "D6EB943D-CCCCCCXXXXXX-A093EF"
},
"type": 1,
"code": 0
}

Search v1.1

post
https://search.api.similarinc.com
/v1.1/search

Example Request

curl --request POST 'https://search.api.similarinc.com/1.1/Search' \
--header 'Content-Type: application/json' \
--data-raw '{
"customerId": "CUSTOMER_ID",
"websiteId": "WEBSITE_ID",
"q": "chair",
"client": "xyz",
"personalise": false,
"search_fields": ["title", "brand"]
"fuzzy": false,
"null_checks":["title"],
"start": 0,
"image_link": "",
"scope": {"sale_price":{"min": 10}},
"aggregations": [
"product_type",
"brand"
],
"range_fields": ["sale_price"],
"size": 1,
"weights": {"image": 10, "text": 5},
"exclude_ids":[],
"availability": "in stock"
}'

Example Response

{
"payload": {
"total_results": 1,
"next_cursor": null,
"aggregations": {
"product_type": [
{
"key": "Furniture > Dining Room > Dining tables",
"doc_count": 173
},
"brand": [
{
"key": "HAY",
"doc_count": 20
},
]
}
"results": [
{
"attributes": {
"colour": "Walnut",
"price": 1200.0,
"sale_price": 1100.0,
"size": ["8 Seater"],
"product_type": "Furniture > Dining Room > Dining tables",
"product_category": "Furniture",
"brand": "HAY"
},
"image_url": "https://XXXX.jpg",
"link": "https://XXXX.uk",
"item_group_id": 21260,
"sku_id": 268262,
"title": "8 Seater Oval Walnut Dining Table",
"product_type": "Furniture > Dining Room > Dining tables",
"score": 0.9670957669803361,
"product_category_id": 677,
"object_types": [
"tableware"
],
"personalized": false,
"availability": "in stock"
}
],
"website_id": "D6EB943D-CCCCCCXXXXXX-A093EF"
},
"type": 1,
"code": 0
}

Search v1.0

post
https://search.api.similarinc.com
/v1.0/search

Example Request

curl --request POST 'https://search.api.similarinc.com/1.0/Search' \
--header 'Content-Type: application/json' \
--data-raw '{
"customerId": "CUSTOMER_ID",
"websiteId": "WEBSITE_ID",
"q": "chair",
"client": "xyz",
"personalise": false,
"search_fields": ["title", "brand"]
"fuzzy": false,
"null_checks":["title"],
"start": 0,
"image_link": "",
"scope": {"sale_price":{"min": 10}},
"aggregations": [
"product_type",
"brand"
],
"size": 1,
"weights": {"image": 10, "text": 5},
"exclude_ids":[],
"availability": "in stock"
}'

Example Response

{
"payload": {
"total_results": 1,
"next_cursor": null,
"aggregations": {
"product_type": [
{
"key": "Furniture > Dining Room > Dining tables",
"doc_count": 173
},
"brand": [
{
"key": "HAY",
"doc_count": 20
},
]
}
"results": [
{
"attributes": {
"colour": "Walnut",
"price": 1200.0,
"sale_price": 1100.0,
"size": ["8 Seater"],
"product_type": "Furniture > Dining Room > Dining tables",
"product_category": "Furniture",
"brand": "HAY"
},
"image_url": "https://XXXX.jpg",
"link": "https://XXXX.uk",
"item_group_id": 21260,
"sku_id": 268262,
"title": "8 Seater Oval Walnut Dining Table",
"product_type": "Furniture > Dining Room > Dining tables",
"score": 0.9670957669803361,
"product_category_id": 677,
"object_types": [
"tableware"
],
"personalized": false,
"availability": "in stock"
}
],
"website_id": "D6EB943D-CCCCCCXXXXXX-A093EF"
},
"type": 1,
"code": 0
}
Copy link
Outline
Search v1.4
post
Example Request
Example Response
Search v1.3
post
Example Request
Example Response
Search v1.2
post
Example Request
Example Response
Search v1.1
post
Example Request
Example Response
Search v1.0
post
Example Request
Example Response