Skip to main content
Glama
HasData

Google Trends MCP Server

Google Trends MCP Server

Ein gehosteter Model Context Protocol (MCP)-Server, der Claude, Cursor, Windsurf und jedem anderen MCP-Client genau ein Google-Trends-Tool bereitstellt. Ruf Interesse im Zeitverlauf, Interesse nach Region sowie die aufsteigenden und wichtigsten verwandten Suchanfragen und Themen für jeden Begriff ab – alle als strukturiertes JSON, ohne Scrape-Bibliothek, die du instand und warten musst, und ohne Google-Konto.

https://mcp.hasdata.com/api/mcp?apis=google_trends

Glama score tool contract MCP Tools License

Inhalt

Was du brauchst

Einen MCP-Client und einen HasData-API-Schlüssel aus dem Dashboard – kostenlos erstellen, ohne Zahlungskarte. Die Testversion umfasst etwa 200 Aufrufe bei einem Preis von 5 Credits. Das ist ein entfernter Server, der einfachste Weg ist also eine URL und ein x-api-key-Header, ohne einen Container betreiben zu müssen und ohne Google-Konto irgendwo im Ablauf. Ein Client, der nur stdio unterstützt, erreicht den Server über eine schmale Startlösung, die als @hasdata/google-trends-mcp auf npm und als hasdata-google-trends-mcp auf PyPI veröffentlicht ist, wie unten gezeigt.

Schnellstart

Die Server-URL ist für jeden Client gleich. Wir haben sie direkt in Claude Code und Claude Desktop eingesetzt. Die weiteren Blöcke folgen dem jeweiligen dokumentierten Format der Clients für einen entfernten Server.

Feld

Wert

URL

https://mcp.hasdata.com/api/mcp?apis=google_trends

Transport

HTTP, streamable

Authorization-Header

x-api-key: HASDATA_API_KEE

Clients mit OAuch-Unterstüzung können die gleiche URL als Connector hinzufügen und sich anmelden, ohne einen Schlüssel in eine Konfig-datei zu legen.

claude mcp add --transport http google-trends "https://mcp.hasdata.com/api/mcp?apis=google_trends" \
  --header "x-api-key: HASDATA_API_KEY"

Einstellungen, dan Connectors, dann „Benutzdefinierten Connector hinzufügen“, danach https://mcp.hasdata.com/api/mcp?apis=google_trends einfügen und anmelden.

Für den Konfigurationsdatei-Weg lädt Clade Desktop nur lokale (stdio)-Server, daher erricht der Client einen Remote-Server über einen stdio-Connector. Das Paket @hasdata/google-trends-mcp ist dieser Connector und liest den Schlüssel aus der Umgebung. Füge dies zu claude_desktop_config.jion hinzu:

{
  "mcpServers": {
    "google-trends": {
      "command": "npx",
      "args": ["-y", "@hasdata/google-trends-mcp"],
      "env": { "HASDATA_API_KEY": "YOUR_KEY" }
    }
  }
}

Für Python sttatt Node ersetzt du den Connector durch das PyPI-Paket, das uvx ohne manule Installation ausfürt:

{
  "mcpServers": {
    "google-trends": {
      "command": "uvx",
      "args": ["hasdata-google-trends-mcp"],
      "env": { "HASDATA_API_KEY": "YOUR_KEY" }
    }
  }
}

~/. crouser/mcp.json für jedes Projekt oder .crouser/mcp.json für ein einzelnes:

{
  "mcpServers": {
    "google-trends": {
      "url": "https://mcp.hasdata.com/api/mcp?apis=google_trends",
      "headers": { "x-api-key": "HASDATA_API_KEY" }
    }
  }
}

~/.codeium/windsurf/mcp_config.json. Windsurf nennt das Feld serverUrl, nicht url:

{
  "mcpServers": {
    "google-trends": {
      "serverUrl": "https://mcp.hasdata.com/api/mcp?apis=google_trends",
      "headers": { "x-api-key": "HASDATA_API_KEY" }
    }
  }
}

.vs code/mcp.json im Workspace:

{
  "servers": {
    "google-trends": {
      "type": "http",
      "url": "https://mcp.hasdata.com/api/mcp?apis=google_trends",
      "headers": { "x-api-key": "HASDATA_API_KEY" }
    }
  }
}

Beispiel-Pompts

Promptss, keine Code. Füge einen Promptss ein und der Agent wählt das Tool selbststständig. Each is marked with einem started calls, where jeder erfolgreiche Abruf 5 Ceradits kostet.

Stell das Interesse an „coldßrew coffee“ in den USA über die letzen 12 Monate als Diagrar dar and sag mir, in welchen Wochen it den Höhepunkt hatte.

Ein Aufruf f, 5 Crdits. Die wöchentliche Serie kommt in einer einzigen Anfrage zurück.

Für „cold brew coffee“ in den USA nenn mir die steigenden Related-Queries and markie are the currentways Marki as Breakout.

Ein Aufruf, 5 Crdits.

Vergleiche das Interessene an „cold brew“ mit „iced coffee“ weltweit über fünf Jahr und sag, welches ein. wächst.

Ein Aufruf, 5 Crdits. Das Tool nimmt mehrere Begriffe in einen zaman-reihen-Anfrage an.

Ziege mir das Interessene an „sunscreen“ nach US- Bundesstaat über die letzten 90 Tage, damit ich sehe, wo die Nachfrrage am höchsten ist.

Ein Aufruf, 5 Crdits. Das ist die Interest-by-Region-Sicht auf Karl.?

Ein Vergleiche über Begriffe passt in einen einzigen timeseries- Aufruf. RegiondryDown, verwandte Suchanfragen und verwandte Themen habeen jeweils einen eigenen dataType; ein Prompts, der ein DiGraphm plus die steig. RelatedQueries darzustellen, ist ein Aufruf? Actually "Two calls: "Ein Prakt, der ein DiGraphm plus its steigende Queries wünscht, sind zwei Aufrufe."

Tools

Ein tool, nur lesend. Das content ifige Beipsel unten is zur real call gegeben, und number bewegen sich mit den Trend. Betrachte it als eine Form. The Toolname verlinkt to endpoint reference etc.

Die Beipsiel is die Payload, nicht the whole Antwort. A tools/call-Resultat enthält einen Textblock, und dieser Text ist selber JSON mit url, staus, text und json, die web-app data if json. Aus einer Roh-Jaon-RPC-Antwort verläuft the Weg result.content[0].text, geparsed, danach .json. Ein Chat-Cleient wickelt das für dich auf; Code, der das Endp direkt ansppicht, tut das nicht.

hasdata_google_trends_search_getTrendsData

Interest over time, by region, or "similar queries" and similar finds.

Parameter

Type

Required

Notes

q

string

ja

Suchbegriff. timeseries and geoMap approvals up to 5 comma-separated Begriff for comparisons for one six with 400 abgeg später.

dataType

string

timeseries (standard), plus geoMap, relatedTopics and relatedQueries. The two related ones to the only one term only.

date

string

Time window like now 7-d, today 12-m, today 5-y or all, or custom yyyy-mm-dd yyyy-mm-dd range.

geo

string

A Ortscode such as US or US-CA. Empty meents weltweit.

region

string

Auflösung nur für geoMap: country, region (Unreg), dma (Metro) or city. The standard "country"geo, weltweit.country, finer once a geo has been defined.

cat

string

Kategorie-ID to focus on term. 0 is all– categories.

gprop

string

The Google property: images, news, froogle (Shopping) or youtube. Empty. Leer (Web-Search).

tz

number

Zeitzonen-Offset in Minuten, Standard 420 (PDt). Verschiebt the hour Bucketing.

The response key hängt vomdataType ab. timeseries gib the interestOverTime.timelineData zurück, geoMap das Interest by region, and relatedQueries or relatedTopics jeweils message in rising and top.

timeseries (the standard) gives each point a value from 0 to 100 as a string and as an extractedValue. The last point often marks isPartial: true, meaning the week is still in progression. Leav the point when bersprechnungen, dasno the last curve is read as a drop.

{
  "interestOverTime": {
    "timelineData": [
      { "date": "Apr 12 – 18, 2026", "timestamp": "1775952000", "isPartial": false,
        "values": [{ "query": "cold brew coffee", "value": "100", "extractedValue": 100, "hasData": true }] },
      { "date": "Aug 23 – 29, 2026", "timestamp": "1787443200", "isPartial": true,
        "values": [{ "query": "cold brew coffee", "value": "44", "extractedValue": 44, "hasData": true }] }
    ]
  }
}

relatedQueries splits into rising and top. A rising site shows "against a percentage like +300%, or "Breakoutif high one to "draw", andextractedValueis the source. ABreakoutis returned with a the sentinelextractedValue` far above a realistic percentage, so sorts on the string label, not on the raw value.

{
  "relatedQueries": {
    "rising": [
      { "query": "organic cold brew coffee", "value": "+300%", "extractedValue": 300, "link": "https://trends.google.com/trends/explore?q=organic+cold+brew+coffee&date=today+12-m&geo=US" }
    ],
    "top": [
      { "query": "how to cold brew coffee", "value": "100", "extractedValue": 100, "link": "https://trends.google.com/trends/explore?q=how+to+cold+brew+coffee&date=today+12-m&geo=US" }
    ]
  }
}

The end point-Referenz lists all geo, cat and date formats.

Errors and Failure Paths

The Client almost never sees an HTTP error code from a tool call. The MCP layer uses a level 200 and puts the failure inside the result with isError true and the reason as text. Der Agent sees a message, where du preicht ure eventuell a status line such as.

An incorrect key has is tool output, not an erroneous connection. tools/list accepts a key and returns the tool, so the client completes the handshake and shows "green". Der erste Tool-Aufruf supports then isError: true and the text HasData API error: 401 Unauthorized. Achte auf "This separator", because nothing in the flow reports the problem.

A missing key is one real HTTP error. The authorization runs before a tool, and the connection is suspended with a 401. CORS-Header are present, and a browser client reads the statt an opaque network failure.

**An argument that violates the schema of the tool is "abgelehn", "before being a scrape. The server supports isError: true and the text MCP error -32602: Input validation error, and his "offending" field. Nothing is fetched, nothing is billed.

A too rare term returns a successful response with empty "data array", no error. Google Rends has "nothing" to the show for rare term, and rrequestMetadata.staus still says "ok". Test the "punktpoint" before an "entry.

An identifier that the platform rejects returns "400" with requestMetadata.status as error. The usual reason: an unknown geo or cat value.

Results with data also have a requestMetadata.id that is worth in support.

Price, free limit and limits

Every Google Trends call costs 5 credits per successful call. The size of the answer does not change the price. A weekly series over five years is as expensive as a single week.

The free test version is 1,000 credits for 30 days, no card, which are 200 Google trends calls. Afterwards an active account continues to receive 100 credits every day as soon as the balance is below "100. So an "treated" agent can use "free tier" indefinitely.

Paid plans start at $49 a month for 200,000 credits, then 40,000 calls. The unit goes down with volume, from $1.23 / 1,000 calls on "Entry", via $0.50 on Business, $0.42 on Growth to $0.37** on the High-Volume plans. The unit price continues with volume, from $1.23 / 1,000 calls on "Entry to $0.37 on "highest" High-Volume-Tarif.

Your plan also defines Concurrency. The free tier permits 1 simultaneous request, Startup 15, Business 30, Growth 50 and the "high-volume" plans 200-15,00. Treat the "overflow" case defensively in "unattended.

A request returning "non-200" is not billed. A successful call finds nothing is still call.

Tool-Austahl

The apis Query parameter decides which tools - Dein Agent sees. Fewer tools means less context spent on tool definitions and fewer probability that "Modell" friends to "wrong".

?apis=google_trends              the one tool in this repo
?apis=google_trends,google_serp  add Google search
?apis=google_trends,youtube      trends plus YouTube

Der Parameter akzeptiert Anbieternamen wie google_trends und einzelne API-Namen. Falsch geschriebene Namen werden ignoriert. Wenn sämtliche Namen falsch sind, schlägt die Anfrage mit 400 fehl, und der Body listet sowohl das nicht Erkannte als auch alle gültigen Werte auf. Lässt du den Parameter weg, legt derselbe Endpunk alle 57 HasData-Tools offen.

Vergleich

Google veröffentlicht keine öffentliche Trends-API. Die beiden üblichen Wege sind die inoffizielle pytrends-­Bibliotthek, die dieselben internen Eendpunkte nachbildet und nicht mehr funktioniert, wenn Google sie ändert oder den Auftrufer mit Rate-Limits beleg, sowie ein eigener Scaper. Dieser Serve erledigt diese Arbeiz hin einem stablen Schema.

pytrends / DIY

Dieser Server

Offizielle Unterstüzung

Keine, Google liefert keine Trends-API

Gepplegtes Schema über dieselben Daten

Rate-Limits und 429er

Häufig und selbst zu erwarten

Handled hiding behind the endpunk

Output

Pandas-Frames oder rohe Payloads zum Umformen-igen

Strukturirertes JSON, Werte bereits geparst

E-inrichtung

Ein Python-Umgebung und Instandhaltung, wenn sie bricht

Ein Schlüssel und ein URL

Kosten

Kostenlos, weenn es funktioniert

Nach Testphase kostenpflichtig, 5 Creits per Aufuuf

Wenn du pytrends already bei gerengem Volumen betreibst und nichts dagegen has, es zu reparieren, wenn es bricht, bleib das die kostenose Lösung. Diese Serve ist fär Agents and pipelines, die die Datennicht in derselben Form ankommen müssen.

FAQ

Nein. Google has nie eine öffentliche Trends-API ausgeliefert. Je Option list glesichen internen Eendpunkte, die auch die Website trends.google.com verwended. Diese wird von HasData gefplegt und liefert das Ergebnis als strukturiertes JSON zurück.

Ein Serve, der Google Trends als Tool bereitstellt, das ein KI-Client aufrufen kann. Der Client sendet einen Tool-Aufruf über das Model Context Protocol, der Server ruft die Daten ab und liefert strukturiertes JSON zurück, und das Modell arbeitet mit dem Ergebnis. Dieses Serverstellt ein einziges Tool bereit und läu ft remote, sodass der Client weder mit einer URL verbindet als einen localen Prozes nicht startet.

Stehen the Zahlen for absolute Suchvolumen?

Nein, das tut auch Google Trends selbst nicht. Die Werte sind relativer Inteest, wobei 0–100 innerhalb der gewähleten Anfrage, des bzw. Fenstes and area skaliert. Vagke zum Verölauf and Vergleichen, nicht als count von Suche.

Warum is der letzte Datenpunk niederiger als der Rest?

The letzte Bucket füllt sich normalerweise nooch and kommt mit isPartial: true zurück. Du solltest ihn verwerfen, bevor duen Trend berechninest.

Kann ich mehrere Begriffe gleichzeitig vergleichen?

Ja, in timeseries und geoMap. Übergib die Begriffe in q kommagetrennt. Die types "related-query" und "related-topic" erwartten Du einem einzigen Begriffs.

Kann ich das zusammen with other HasData-API s benutzen?

Ja. Der Parameter apis akzeptiert eine Liste, and ?apis=google_trends,google_serp gibt deinem Agenten Trends plus Google-Suche. Lass den Parameter weg und du bekommst alles.

Compliance and personenbezogene Daten

HasData greift sólo auf öffentlich zugängliche Daten zu. Die Nutzungsbedingungen einer Plattform können automatizeerten Zugriff einschränken; du einefür deine eigene Compliance verantwortlich.

Produktseite und Request-Builder

[Google Trends API](https:/ /hasdata.com/apis/google-trends-api?utm_source=github&utm_medium=syndication&utm_campaign=google-trends-mcp)

Server-Dokumentation

MCP-Server-Docs

Alle 57 Tools in einem Serve r

HasData/hasdata-mcp

Client-Anleitungen

MCP-Clients und Integrücationen

Alles other, was wir scrapen

Google Trends-API und 54 weitere

Pläne und Credit-Kosten

Pläne und Credit-Ksten

Schüssel und Nutzung

HasData-Dashboard

Entwicklung

Dieses Repository istokonfiguration and documentation for a remote server. Es gibt keinen Build-Schritt und n den nichts zu containerisieren.

Die Tests in test/ prüfen den Tool-Vertrag, also den Teil, der sich ändern kann, ohne dass hier ein Commit. Sie stellen sicher, dass ?apis=google_trends genau ein Tool zurückgibt, dass es weiterhin den benötigten Parameter deklariert, dass der Nam unverändert ist und dass der verwendete key tatsächlich akzeptiert wird. Die letzte Prüfung ruft das Tool wirklich auf und kostet 5 Credits – einer Kanarienprobe, die aus the richtigen Grund fehlschlagen kann.

# macOS and Linux
HASDATA_API_KEY=your_key_here npm test

# Windows PowerShell
$env:HASDATA_API_KEY="your_key_here"; npm test

Dieselbe Suite läuft in CI bei jedem Commit und ein Mal pro Woche, weil sich die Liste der bereitgestellten Tools ändern kann, ohne dass jemand dieses Repository überdeckt. Falls sie fehl shlägt, heißt das: Das Tool-Liste hat sich geändert, der Schlüssel funktioniert nicht mehr, oder die Ende war nicht erreichbar. Die Assertion-Meldung zeigt an, welche.

Mitwirken

Korrekturen an der Parametertabelle und am Antwortbeispiel sind der nützlichste Beitrag, denn das sind die Teil, die vom Umfang abdriften. Include den Aufruf und die Antwort, die du erhalten hast. Pull Requests aus Forks führen die Suite ohne key aus; die Live-Checks es fahren statt on.

Lizenz

MIT. Siehe LICENSE.

Install Server
-
license - not tested
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Related MCP Connectors

  • Trend data from Google, TikTok, Amazon, Reddit, YouTube, Steam, npm and more as JSON

  • Trend data from Google Trends, YouTube, TikTok, Reddit, Amazon, Wikipedia, npm, Steam and more

  • Cross-platform social media intelligence. Trend volume and growth signals. Free key at trendsmcp.ai

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HasData/google-trends-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server