How can I search products by their names in the API?

How can I search products by their names in the API?

zhagan
Shopify Partner
22 1 2

How to search products by product name please ?

 

I don't find the api in the following webpage.

https://shopify.dev/docs/admin-api/rest/reference/products/product

Replies 4 (4)

Morek
Shopify Partner
835 73 180

Hi @zhagan 

Resource: https://shopify.dev/docs/admin-api/rest/reference/products/product#index-2021-04

scrnli_30_05_2021_17-44-55.png

Replace ids by title:

GET /admin/api/2021-04/products.json?title='your-product-name'

If you have any further questions, please do reach out either here on the forum, or via a private message/email.

If you're looking for a Shopify developer or just want to connect, don't hesitate to reach out!
Portfolio: https://mmorek.com/
LinkedIn: https://www.linkedin.com/in/mmorek
WhatsApp: Whatsapp me!
zhagan
Shopify Partner
22 1 2

Thank you for your answer. it works. 

but how to search a product with part of words of its title ?

for example,  a product‘s whole title: Triflora Hanging Planter.   How to search this product with word:Triflora  or words:Hanging Planter ?

ejb503
Shopify Partner
19 3 3

Hi Zhagan,

The API will allow you to query products (by id or title), however if you are looking for a full search solution, autocomplete, semantic lookup, suggestions, boolean search etc you will need to find a search plugin from the app store. 

(We have integrated elasticsearch into our marketplace to achieve this functionality), you would need to do something similar or find an existing plugin...

YownIt: Welcome to the eCommerce marketplace with one click install, integrated video, audio and chat. Engage with your customers online and offline with multi-channel conversion tools. Available in the App store: https://apps.shopify.com/the-shop-front
ravi_suthar
Visitor
1 0 0

Hi Zhagan & Ejb503,
If you find any solution to search products using just some part of search query please let me know, I'm also stucking here, The queryparams of title is only works when we pass full title name.
Thanks & Regards
Ravi Suthar

Ravi Suthar