Skip to content

Instantly share code, notes, and snippets.

@pbamotra
Last active January 23, 2018 00:30
Show Gist options
  • Save pbamotra/25142cf4e19a8362d5e0952c6fe0ce2c to your computer and use it in GitHub Desktop.
Save pbamotra/25142cf4e19a8362d5e0952c6fe0ce2c to your computer and use it in GitHub Desktop.
Find Google trends business entities from command line
brew install jq && curl -sS 'https://trends.google.com/trends/api/stories/latest?hl=en-US&tz=480&cat=b&fi=15&fs=15&geo=US&ri=300&rs=15&sort=0' -H 'dnt: 1' -H 'accept-encoding: gzip, deflate, br' -H 'accept-language: en-US,en;q=0.9' -H 'accept: application/json, text/plain, */*' -H 'referer: https://trends.google.com/trends/home/b/US' -H 'authority: trends.google.com' --compressed > out.json && sed '1d' out.json > out2.json && jq '.storySummaries.trendingStories[].entityNames | join(", ")' out2.json | grep 'NYSE\|NASDAQ' | jq "."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment