Search Instagram Hashtags

Get popular hashtags matching a search query

[{"id":"bef2a8fc.1651e","type":"tab","label":"instagram hashtags","disabled":false,"info":""},{"id":"94db45bd.bd52d","type":"template","z":"bef2a8fc.1651e","name":"construct instagram serch URL","field":"url","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"https://www.instagram.com/web/search/topsearch/?query={{payload}}&count=1","output":"str","x":650,"y":180,"wires":[["d48c704d.82b058"]]},{"id":"2d19f0cd.917738","type":"function","z":"bef2a8fc.1651e","name":"URI encode search","func":"msg.payload = encodeURIComponent(msg.payload)\nreturn msg;","outputs":1,"noerr":0,"x":370,"y":180,"wires":[["94db45bd.bd52d"]]},{"id":"77468bc5.edf044","type":"inject","z":"bef2a8fc.1651e","name":"search: selfie","topic":"","payload":"selfie","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":180,"wires":[["2d19f0cd.917738"]]},{"id":"d48c704d.82b058","type":"http request","z":"bef2a8fc.1651e","name":"download JSON from URL","method":"GET","ret":"obj","paytoqs":false,"url":"","tls":"","persist":false,"proxy":"","authType":"","x":920,"y":180,"wires":[["165fe141.511197"]]},{"id":"bf0c45db.70779","type":"debug","z":"bef2a8fc.1651e","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":2130,"y":140,"wires":[]},{"id":"c3b3cad6.7e6dc8","type":"comment","z":"bef2a8fc.1651e","name":"find popular hashtags for a search term","info":"","x":210,"y":120,"wires":[]},{"id":"165fe141.511197","type":"change","z":"bef2a8fc.1651e","name":"extract hashtags","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.hashtags","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":180,"wires":[["cceb85b6.4b7118"]]},{"id":"cceb85b6.4b7118","type":"split","z":"bef2a8fc.1651e","name":"split array","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":1360,"y":180,"wires":[["18673cb7.8fa153"]]},{"id":"18673cb7.8fa153","type":"change","z":"bef2a8fc.1651e","name":"extract hashtag","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.hashtag","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1540,"y":180,"wires":[["3023311f.7312ee","39751c3b.14c644"]]},{"id":"3023311f.7312ee","type":"sort","z":"bef2a8fc.1651e","name":"sort by alphabet","order":"ascending","as_num":false,"target":"","targetType":"seq","msgKey":"","msgKeyType":"elem","seqKey":"payload.name","seqKeyType":"msg","x":1760,"y":140,"wires":[["7acd9fe8.438b1"]]},{"id":"39751c3b.14c644","type":"sort","z":"bef2a8fc.1651e","name":"sort by popularity","order":"descending","as_num":false,"target":"","targetType":"seq","msgKey":"","msgKeyType":"elem","seqKey":"payload.media_count","seqKeyType":"msg","x":1780,"y":240,"wires":[["af6da31c.3ad17"]]},{"id":"7acd9fe8.438b1","type":"change","z":"bef2a8fc.1651e","name":"extract name","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.name","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1950,"y":140,"wires":[["bf0c45db.70779"]]},{"id":"1fcac146.9c91bf","type":"debug","z":"bef2a8fc.1651e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":2130,"y":240,"wires":[]},{"id":"af6da31c.3ad17","type":"change","z":"bef2a8fc.1651e","name":"extract name","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.name","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1970,"y":240,"wires":[["1fcac146.9c91bf"]]}]

Flow Info

Created 5 years, 4 months ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Core
  • change (x4)
  • comment (x1)
  • debug (x2)
  • function (x1)
  • http request (x1)
  • inject (x1)
  • sort (x2)
  • split (x1)
  • template (x1)
Other
  • tab (x1)

Tags

  • #insta
  • #instagram
  • #hashtag
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option