Look for products on Amazon or Ebay

Hi all!

Is there is any possibility to make a search on amazon for a certain product?

I can't imagine a basic flow for doing this, but i think it can be useful using the Amazon Api maybe.

Any clues?

Thanks a lot!

There are 2 basic approaches (maybe some more):

  1. Find a REST API. This lets you potentially use the http-request node to get some data back into Node-RED. Don't forget that even if Amazon/eBay doesn't provide what you want, some other web site might act as an intermediary.

  2. Find a contributed node that someone has written already. Search the Flows section of this site.

  3. (kind of a bonus) Find a Node.js module that someone has written that does the job and then use that in Node-RED. Search on the npmjs.org site. Many Node.js modules can be made to work with Node-RED fairly easily.

Cool, thanks for the quick response.

I mean using the API because my idea is to check if my printer has the black ink at 10% (that is happening by now), when the black ink reach that % then lookfor some HP black ink on Amazon.

The complicated thing here is how the response arrives to my Telegram (Json or the Amazon link)

Regards.

OK, so you can already get the data from Amazon/eBay?

Next step is to make sense of the response. I assume that you want to get a list of possible along with the price and maybe a URL link so that you could click on it in your mobile Telegram client which you would want to take you to your Amazon app?

The telegram bit isn't too hard with a telegram node.

Thanks for the response.

Instead of Amazon i will use another ecommerce that is ok for my home location.

This is the api that im requesting to https://api.mercadolibre.com/sites/MLA/search?q=cartuchos-tinta

And the request brings a huge json that later on i need to parse so i can only have the item that i need (HP 664)

So to simplify this:

  1. Call the api to get the information i need
  2. Parse the Json by title and only have the titles called HP 664
  3. Bring the url of the product so i can access via Telegram

I have several ideas but this could be an initial approach.

Thanks a lot!

1 Like

I have this so far...

How can i get a specific element of the json object?

[{"id":"9adcce24.65233","type":"inject","z":"ee706196.8a02b","name":"","repeat":"","crontab":"","once":false,"topic":"","payload":"","payloadType":"date","x":240,"y":220,"wires":[["e1b33f63.1e4cc"]]},{"id":"e1b33f63.1e4cc","type":"function","z":"ee706196.8a02b","name":"","func":"msg.payload = {\n    \"jsonrpc\": \"2.0\",\n    \"method\":\n    \"astro.get\",\n    \"id\": 1\n};\n\nmsg.headers = {\n    Accept: \"application/json\"\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":385,"y":238,"wires":[["178423e4.e87bdc"]]},{"id":"178423e4.e87bdc","type":"http request","z":"ee706196.8a02b","name":"","method":"POST","ret":"obj","paytoqs":"ignore","url":"https://api.mercadolibre.com/sites/MLA/search?q=cartuchos-tinta","tls":"","persist":false,"proxy":"","authType":"","x":560,"y":244,"wires":[["70d01c46.8f2fe4"]]},{"id":"70d01c46.8f2fe4","type":"debug","z":"ee706196.8a02b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":757,"y":234,"wires":[]}]

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.