How to fetch
- If a HasData tool is connected whose name contains
google_trends, call it. Read its schema. Pass the term inq. Do not run a shell command when the tool exists. - If no HasData tool is connected, ask the user to press Connect on the HasData connector for this chat. Do not install software and do not ask them to paste an API key.
- Use the
hasdatacommand only when the connector cannot be connected and the binary is already on PATH:
hasdata google-trends --q "TERM" --pretty -o .hasdata/trends.json
geo is the region (for example US). date is the time window the schema allows. gprop limits the property (web, youtube, news, images, shopping) when the schema lists it.
Compare terms by following the schema for multiple queries. Report the interest values the tool returned. Do not describe a trend the tool did not return.
News headlines are hasdata-news. A normal Google results page is hasdata-search.