Search for Products
You can search for products by sending a request to the Catalog using the following code:
Python
try:
catalog_search_fetch_data = catalog.search(catalog_object)
print("catalog_fetch_data----", catalog_search_fetch_data)
except Exception as e:
print(f"Error performing search: {e}")
Example Catalog Object
catalog_object = {
"query":"Belt",
"search_type": "semantic",
"image_url": "https://cdnaz.plotch.io/image.png",
"price": 599.0,
"image_bytes": "898988CVFIFASS",
"cataloglake_id": "groclake_products_81skstvyw3"
}
Example App code
catalog_object = {
"query":"Belt",
"search_type": "semantic",
"image_url": "https://cdnaz.plotch.io/image.png",
"price": 599.0,
"image_bytes": "898988CVFIFASS",
"cataloglake_id": "groclake_products_81skstvyw3"
}
catalog_search_fetch_data = catalog.search(catalog_object)
print("catalog_fetch_data----", catalog_search_fetch_data)
#RESPONSE FROM CATALOG SEARCH FETCH
# {
#
# "items": [
# {
# "product_name": "Loopa - Black PU Men's Casual Belt ( Pack of 1 ) -",
# "product_id": 1851175867,
# "provider_id": "",
# "provider_url": "",
# "image_link1": "https://cdnaz.plotch.io/image/upload/C/V/PLOc0HAn3P1732004167_6d102fa9d8c248c694b99bb33223f074848766330b21b5c189f48d1aadff62d6.png",
# "image_link2": "https://cdnaz.plotch.io/image/upload/C/V/PLOhVIHomh1732004169_8e170aa06a1aaeda0e6ff066c00fba14032e6825e7f89dc78d3716254c6215e3.png",
# "image_link3": "https://cdnaz.plotch.io/image/upload/C/V/PLOW3Pp0B81732004172_ef9c65e70824487cadae221e2225ae79fc70b7acbc0a04ce4c8e3c94ec637a21.png",
# "product_url": "",
# "brand": "",
# "category_name": "Belts",
# "price": 599.0,
# "sale_price": 599.0,
# "rating": "",
# "weight": "0",
# "score": 1.4819418
# },
# {
# "product_name": "Loopa - Black PU Men's Casual Belt ( Pack of 1 ) -",
# "product_id": 1169020518,
# "provider_id": "",
# "provider_url": "",
# "image_link1": "https://cdnaz.plotch.io/image/upload/C/V/PLOWysQaul1732007566_6d102fa9d8c248c694b99bb33223f074848766330b21b5c189f48d1aadff62d6.png",
# "image_link2": "https://cdnaz.plotch.io/image/upload/C/V/PLOYnjqZrk1732007566_8e170aa06a1aaeda0e6ff066c00fba14032e6825e7f89dc78d3716254c6215e3.png",
# "image_link3": "https://cdnaz.plotch.io/image/upload/C/V/PLOqbI8GBo1732007567_ef9c65e70824487cadae221e2225ae79fc70b7acbc0a04ce4c8e3c94ec637a21.png",
# "product_url": "",
# "brand": "",
# "category_name": "Belts",
# "price": 599.0,
# "sale_price": 599.0,
# "rating": "",
# "weight": "0",
# "score": 1.4819418
# },
# {
# "product_name": "SILKSHOPPING - Black Synthetic Men's Casual Belt (",
# "product_id": 2131791766,
# "provider_id": "",
# "provider_url": "",
# "image_link1": "https://cdnaz.plotch.io/image/upload/C/V/PLODg8I4RQ1732004177_d1861c3c0b0470290a162d547e1f915c3ee50117d22bcd919f32bc866aaa4f13.png",
# "image_link2": "https://cdnaz.plotch.io/image/upload/C/V/PLO9gr0bmU1732004178_2f1ae7d12dc6b4036de63cbcf5ccf052e0ac1b0044c22382e7f5b23b5874f78f.png",
# "image_link3": "https://cdnaz.plotch.io/image/upload/C/V/PLOSTCdoda1732004180_d9d457100f6f3a90d63f2dab1205fdba2f7caed695f65afd57aff6cf27b72323.png",
# "product_url": "",
# "brand": "",
# "category_name": "Belts",
# "price": 599.0,
# "sale_price": 599.0,
# "rating": "",
# "weight": "0",
# "score": 1.4800572
# },
# {
# "product_name": "EMPERO - Black PU Analog Mens Watch",
# "product_id": 2324575804,
# "provider_id": "",
# "provider_url": "",
# "image_link1": "",
# "image_link2": "",
# "image_link3": "",
# "product_url": "",
# "brand": "",
# "category_name": "Watches",
# "price": 599.0,
# "sale_price": 599.0,
# "rating": "",
# "weight": "0",
# "score": 1.3512266
# },
# {
# "product_name": "Sambhav Deals - Tan PU Mens Regular Wallet ( Pack ",
# "product_id": 2531836235,
# "provider_id": "",
# "provider_url": "",
# "image_link1": "",
# "image_link2": "",
# "image_link3": "",
# "product_url": "",
# "brand": "",
# "category_name": "Handbags",
# "price": 1299.0,
# "sale_price": 1299.0,
# "rating": "",
# "weight": "0",
# "score": 1.3334281
# },
# {
# "product_name": "Saleh Silicone Shower Bath Belt Back Scrubber Brus",
# "product_id": 1440714048,
# "provider_id": "",
# "provider_url": "",
# "image_link1": "",
# "image_link2": "",
# "image_link3": "",
# "product_url": "",
# "brand": "",
# "category_name": "Body Care - Bath Salt and Additives",
# "price": 799.0,
# "sale_price": 799.0,
# "rating": "",
# "weight": "0",
# "score": 1.3296758
# },
# {
# "product_name": "Fitmonkey - Best Sports Biker Face Cover Balaclava",
# "product_id": 2092570718,
# "provider_id": "",
# "provider_url": "",
# "image_link1": "https://cdnaz.plotch.io/image/upload/C/V/PLO77Cq8Al1732004200_94eef0f8765f1bbb188610ab1a2852f2bf8dfc243efaa0aadfe2fe1983888b56.png",
# "image_link2": "https://cdnaz.plotch.io/image/upload/C/V/PLOvgiFTkO1732004201_c5124874f0354ec91995bf65eba476c58907a845eb404232feb42bcab0c9f1d2.png",
# "image_link3": "https://cdnaz.plotch.io/image/upload/C/V/PLOMmezVly1732004202_3396a074569bf55e01066eb0fd4241c65b12503c7e6835d81b0e5409ecf0f178.png",
# "product_url": "",
# "brand": "",
# "category_name": "Home Decor",
# "price": 499.0,
# "sale_price": 499.0,
# "rating": "",
# "weight": "0",
# "score": 1.3133097
# },
# {
# "product_name": "Fitmonkey - Best Sports Biker Face Cover Balaclava",
# "product_id": 2553890008,
# "provider_id": "",
# "provider_url": "",
# "image_link1": "",
# "image_link2": "",
# "image_link3": "",
# "product_url": "",
# "brand": "",
# "category_name": "Home Improvement",
# "price": 699.0,
# "sale_price": 699.0,
# "rating": "",
# "weight": "0",
# "score": 1.2975796
# },
# {
# "product_name": "PrettyKrafts Shirt Stacker Closet Organizer - Shir",
# "product_id": 1598314842,
# "provider_id": "",
# "provider_url": "",
# "image_link1": "",
# "image_link2": "",
# "image_link3": "",
# "product_url": "",
# "brand": "",
# "category_name": "Closet/Laundry/Shoe Organization",
# "price": 599.0,
# "sale_price": 599.0,
# "rating": "",
# "weight": "0",
# "score": 1.2704629
# },
# {
# "product_name": "Hauser Aerox Ball Pen Blue Pack Of 10",
# "product_id": 2237403527,
# "provider_id": "",
# "provider_url": "",
# "image_link1": "https://cdnaz.plotch.io/image/upload/C/V/PLOSvSir6p1732004215_d8bed3aa82dc495c5a7e6be66ca162e31535b843be99eba2d199999e17844f2d.png",
# "image_link2": "https://cdnaz.plotch.io/image/upload/C/V/PLOaoRPuAz1732004217_cd54112879bb8c27a947b3a30f63c1eff068bf0e7f1960c78e7ebed6d4e6435f.png",
# "image_link3": "https://cdnaz.plotch.io/image/upload/C/V/PLOYD7OzL91732004218_04385520a918d24296d13f9585f2a8af11595f236ca870d077b2da65e7de0b02.png",
# "product_url": "",
# "brand": "",
# "category_name": "Stationery",
# "price": 100.0,
# "sale_price": 100.0,
# "rating": "",
# "weight": "0",
# "score": 1.2699537
# }
# ],
# "app_action": {
# "action_intent": "search",
# "items": []
# },
# "search_id": "365914f1-afe9-4d09-8526-2e4e3df82a14"
# }
Last updated