# Google Forums API (`johnvc/google-forums-search-api`) Actor

Extract forum threads, Q\&A, and community discussions from Google Search’s "Forums" tab. Supports 40+ countries, custom localization (GL/HL), and pagination. Get structured JSON data from Reddit, LinkedIn, Quora, and niche forums for sentiment analysis, market research, or AI training.

- **URL**: https://apify.com/johnvc/google-forums-search-api.md
- **Developed by:** [John](https://apify.com/johnvc) (community)
- **Categories:** SEO tools, Social media, AI
- **Features:** Limited permissions
- **Stats:** 83 total users, 9 monthly users, 100.0% runs succeeded, 5 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $19.40 / 1,000 search page processeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Google Forums API - Forum Threads, Q\&A and Discussion Scraper

Extract forum threads, Q\&A, and community discussions from Google Search's "Forums" tab. Supports 40+ countries, custom localization (GL/HL), and pagination. Get structured JSON from Reddit, LinkedIn, Quora, and niche forums for sentiment analysis, market research, AI training, and SEO research.

This Apify Actor wraps the Google Forums search experience as a clean JSON API. One dataset item is returned per page of results, with stable field names, deterministic pagination, and pay-per-event pricing.

**Python + MCP example:** [Apify-Google-Forums-Scraper on GitHub](https://github.com/johnisanerd/Apify-Google-Forums-Scraper)

***

### What this Actor returns

Each dataset item is one page of Google Forums results and contains:

- `search_parameters` - the effective query, location, country (`gl`), language (`hl`), filters, device, and `max_pages` used.
- `search_metadata` - `total_results`, `forums_count`, `pages_processed`, `max_pages_set`, `pagination_limit_reached`.
- `search_information` - the displayed query and the organic-results state from Google.
- `search_timestamp` - ISO-8601 timestamp of the extraction.
- `page_number` - 1-based page index.
- `forum_results` - an array of forum entries with `position`, `title`, `link`, `displayed_meta` (comments and recency), `source` (site or subreddit), `snippet`, and `date`.

What sets it apart:

- One stable JSON contract for every supported country and language.
- Localization with both `gl` (country) and `hl` (language); regional language variants like `en-gb` are normalized to base codes automatically.
- Filters for auto-corrected queries (`nfpr`) and duplicate content (`filter`).
- Device emulation (desktop, mobile, tablet).
- Honest, transparent pay-per-event pricing - setup plus one charge per page actually pushed.

***

### Use cases

- Monitor brand or product sentiment across Reddit, Quora, LinkedIn, and niche forums for a given keyword.
- Build training data or RAG corpora from real-world discussions about a topic.
- Track localized community conversations by country and language (e.g. coffee brewing discussions in Austin, US; AI jobs discussions in Tokyo, JP).
- Compare technology, product, or career questions across regions (e.g. "python vs java" in US vs IN vs DE).
- Extract thread metadata for indexing, NLP pipelines, competitive intelligence, and editorial research.

***

### 🔌 Integrations: Automate Google Forums Monitoring

A single run answers one question ("what are people saying about my brand on Reddit today?"). The real value comes from running this Google Forums API on a schedule, so new forum threads, Q\&A posts, and community discussions land in your stack as the conversation moves. See the full list of [Apify platform integrations](https://docs.apify.com/platform/integrations).

**Tasks and Schedules (the core recipe).** Save one [task](https://docs.apify.com/platform/actors/running/tasks) per thing you monitor (a brand name, a product, a competitor, or a topic like "best coffee brewing methods"), then attach a [schedule](https://docs.apify.com/platform/schedules) from the Actor's Actions, then Schedule menu. Useful cron strings: `0 7 * * *` (daily at 7 AM), `0 */6 * * *` (every 6 hours), `0 9 * * 1` (Mondays). One schedule can trigger many saved tasks at once, so a single daily job can sweep every keyword you track. The [Find Reddit threads mentioning your brand](https://apify.com/johnvc/google-forums-search-api/examples/find-reddit-threads-mentioning-your-brand?fpr=9n7kx3) task is a ready-made starting point.

**Store the history (Supabase).** Send each run's forum results into a table so a discussion history accumulates over time. No-code: the n8n Actor node, then a Supabase node. Or in Python, flatten `forum_results` and bulk-insert the rows (each carries `position`, `title`, `link`, `source`, `snippet`, and `date`, alongside the page's `page_number` and `search_timestamp`):

```python
from apify_client import ApifyClient
from supabase import create_client

apify = ApifyClient("YOUR_APIFY_TOKEN")
supabase = create_client("YOUR_SUPABASE_URL", "YOUR_SUPABASE_KEY")

run = apify.actor("johnvc/google-forums-search-api").call(run_input={
    "q": "best coffee brewing methods",
    "gl": "us",
    "hl": "en",
    "max_pages": 3,
})

rows = []
for page in apify.dataset(run["defaultDatasetId"]).iterate_items():
    for entry in page.get("forum_results", []):
        rows.append({
            "query": page["search_parameters"]["q"],
            "page_number": page["page_number"],
            "position": entry["position"],
            "title": entry["title"],
            "link": entry["link"],
            "source": entry["source"],
            "snippet": entry["snippet"],
            "posted": entry["date"],
            "captured_at": page["search_timestamp"],
        })

supabase.table("forum_mentions").insert(rows).execute()
```

**n8n.** This API ships an n8n community node (see the n8n integration section below). A four-step monitor: Schedule Trigger, then the Google Forums API node, then a Filter on `source` containing `Reddit`, then Slack or email.

**Make and Zapier.** The same pattern works no-code with [Make](https://docs.apify.com/platform/integrations/make) and [Zapier](https://docs.apify.com/platform/integrations/zapier): trigger on a schedule, run the Actor, then route the new threads to wherever your team will see them.

**MCP and AI agents.** Add this API as a tool in [Claude](https://claude.ai/referral/uIlpa7nPLg) (free trial available) or Cursor through the [Apify MCP server](https://mcp.apify.com/) so an agent can pull live forum discussions while it reasons. The Actor-specific endpoint is `https://mcp.apify.com/?tools=actors,docs,johnvc/google-forums-search-api`. See the [Search Reddit and Quora from Claude via MCP](https://apify.com/johnvc/google-forums-search-api/examples/search-reddit-and-quora-from-claude-via-mcp?fpr=9n7kx3) task for a working setup.

**Webhooks.** For anything custom, fire an [Apify webhook](https://docs.apify.com/platform/integrations/webhooks) on `ACTOR.RUN.SUCCEEDED` to push each run's dataset into your own service.

***

### Input parameters

The full input schema lives in [`input_schema.json`](.actor/input_schema.json) and renders automatically in the Apify UI. Key fields:

| Field | Type | Required | Default | What it does |
|---|---|---|---|---|
| `q` | string | **yes** | - | Forum search query (e.g. `python vs java`, `best coffee brewing methods`). |
| `location` | string | no | - | Human-readable location string for localized results (e.g. `Austin, TX, Texas, United States`). |
| `gl` | string (enum) | no | - | Country code (ISO 3166-1 alpha-2, lowercase). Top 40 high-traffic markets exposed in the UI. |
| `hl` | string (enum) | no | - | Interface language code (ISO 639-1, lowercase). Regional variants like `en-gb` normalize to `en`. |
| `lr` | string | no | - | Result-language restriction (e.g. `lang_en`, `lang_es`). |
| `safe` | string (enum) | no | `off` | `active` to filter explicit results, `off` to disable filtering. |
| `nfpr` | string (enum) | no | `0` | `0` includes auto-corrected results, `1` excludes them. |
| `filter` | string (enum) | no | `0` | `0` includes duplicates, `1` filters them. |
| `device` | string (enum) | no | `desktop` | `desktop`, `mobile`, or `tablet`. |
| `max_pages` | integer | no | `1` | Number of pages to fetch. `0` means no limit. Each processed page is one billable event. |
| `output_file` | string | no | auto | Optional filename for the combined JSON in the default key-value store. |

***

### Example inputs

#### 1. Basic forums search

```json
{
  "q": "what is the best programming language",
  "max_pages": 1
}
```

#### 2. Localized forums search

```json
{
  "q": "best coffee brewing methods forum",
  "location": "Austin, TX, Texas, United States",
  "gl": "us",
  "hl": "en",
  "max_pages": 1
}
```

#### 3. Multi-page search with filters

```json
{
  "q": "technology trends 2026",
  "gl": "us",
  "hl": "en",
  "nfpr": "1",
  "filter": "1",
  "device": "desktop",
  "max_pages": 2
}
```

#### 4. All available pages

```json
{
  "q": "python vs java web development",
  "gl": "us",
  "hl": "en",
  "max_pages": 0
}
```

***

### Example output

```json
{
  "search_parameters": {
    "q": "what is the best programming language",
    "location": null,
    "gl": "us",
    "hl": "en",
    "lr": null,
    "nfpr": 1,
    "filter": 1,
    "device": "desktop",
    "max_pages": 2
  },
  "search_metadata": {
    "total_results": 42,
    "forums_count": 20,
    "pages_processed": 2,
    "max_pages_set": 2,
    "pagination_limit_reached": true
  },
  "search_information": {
    "query_displayed": "what is the best programming language",
    "organic_results_state": "Results for exact spelling"
  },
  "search_timestamp": "2026-05-11T10:30:00.123456",
  "page_number": 1,
  "forum_results": [
    {
      "position": 1,
      "title": "For you what is the best programming language?",
      "link": "https://www.reddit.com/r/learnprogramming/comments/14o4uqz/for_you_what_is_the_best_programming_language_w/",
      "displayed_meta": "70+ comments . 2 years ago",
      "source": "Reddit . r/learnprogramming",
      "snippet": "C++ It's the biggest language in the world until now...",
      "date": "2 years ago"
    }
  ]
}
```

See [`dataset_schema.json`](.actor/dataset_schema.json) for the full schema.

***

### Pricing

Pay-per-event:

- **Setup** - one-time fee per Actor run. Covers initialization.
- **Page Processed** - one event per successfully pushed page of forum results (about 10 results per page).

At the start of each run, the Actor estimates the maximum possible cost (`setup + page_price * pages_to_check`) and aborts with a friendly `InsufficientFunds` dataset entry if the projected cost exceeds your remaining budget. No partial charges. If a page fails to push, it is not charged.

When the `PRODUCTION` environment variable is not set to `true`, the Actor runs in local-testing mode and only logs what it would charge.

***

### How to get started

1. Open the Actor in the Apify Store: https://apify.com/johnvc/google-forums-search-api?fpr=9n7kx3
2. Click "Try for free", paste an input like the examples above, and run it.
3. Read results from the default dataset (table, JSON, or CSV export).
4. To run from the API, copy the run-via-API snippet in the Apify console.

For agents, this Actor is also discoverable through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp) - search for "google forums" and call it as a tool.

To run locally:

```bash
cd ApifyGoogleForums
apify run --input '{
  "q": "what is the best programming language",
  "gl": "us",
  "hl": "en",
  "max_pages": 1
}'
```

For production charging, set `PRODUCTION=true` in the Actor's environment.

***

### 🔌 Use this API from Claude (MCP)

Add this Actor as a tool in [Claude Code](https://claude.ai/referral/uIlpa7nPLg) (free trial), [Claude Cowork](https://claude.ai/referral/uIlpa7nPLg) (free trial), Cursor, or any other MCP client, via the hosted Apify MCP server. Use this Actor-specific URL:

https://mcp.apify.com/?tools=actors,docs,johnvc/google-forums-search-api

Setup walkthrough (Apify Console auto-embeds a YouTube URL placed on its own line):

https://www.youtube.com/watch?v=jREWahDGhJM

Apify MCP integration docs: https://docs.apify.com/platform/integrations/mcp

With the server connected, your agent can search forum threads and Q\&A discussions for a topic, read what people are actually saying about a product or problem, and summarize the recurring complaints in one pass.

### 💸 Pay per run with crypto (x402)

The Google Forums API supports agentic payments via the [x402 protocol](https://docs.apify.com/platform/integrations/x402).
AI agents and MCP clients can pay for runs in USDC (on Base) with no Apify account or API token needed:
point your agent at the [Apify MCP server](https://mcp.apify.com/?tools=actors,docs,johnvc/google-forums-search-api) and it can
discover, pay for, and run this Actor autonomously. Read the
[Apify x402 announcement](https://apify.com/change-log/pay-for-apify-actors-with-x402?fpr=9n7kx3) for details.

***

### 🔗 Related Tools

Track a topic across more than one surface. These Actors pair naturally with the Google Forums API for full-picture research and monitoring:

- **[Google News API](https://apify.com/johnvc/GoogleNewsAPI?fpr=9n7kx3)** - follow how the press covers the same topic you watch in forums, so you can line up community reaction against the news cycle.
- **[Google AI Overview API](https://apify.com/johnvc/Google-AI-Overview-API?fpr=9n7kx3)** - capture the AI-generated summary Google shows for a query and compare it to what real people say in the discussions this Actor collects.
- **[YouTube Transcript and Subtitles Scraper API](https://apify.com/johnvc/YoutubeTranscripts?fpr=9n7kx3)** - pull spoken content from videos as another user-generated source for the same sentiment, research, or AI-training corpus.
- **[YouTube Download API](https://apify.com/johnvc/youtube-download-api?fpr=9n7kx3)** - forum threads often cite YouTube videos; download the audio to add what was said to your corpus.

For contrast, an older [browser-based Google Forums scraper](https://apify.com/codingfrontend/google-forums-scraper?fpr=9n7kx3) also exists, but it drives a headless browser with captcha bypass, carries no user reviews, and shows little ongoing usage. This API returns the same forum data as clean structured JSON over plain HTTP, with deterministic pagination and no browser to babysit.

***

### 🤖 Ask an AI assistant about this API

Open a ready-to-send prompt about the Google Forums API in the AI of your choice:

- 💬 [ChatGPT](https://chatgpt.com/?q=Using%20the%20Google%20Forums%20API%20on%20Apify%20%28https://apify.com/johnvc/google-forums-search-api?fpr=9n7kx3%29%2C%20walk%20me%20through%20this%20use%20case:%20%22Find%20Reddit%20threads%20mentioning%20your%20brand%22.%20Show%20me%20the%20input%20JSON%2C%20the%20output%20fields%2C%20and%20how%20to%20automate%20it%20with%20the%20API%20or%20MCP.)
- 🧠 [Claude](https://claude.ai/new?q=Using%20the%20Google%20Forums%20API%20on%20Apify%20%28https://apify.com/johnvc/google-forums-search-api?fpr=9n7kx3%29%2C%20walk%20me%20through%20this%20use%20case:%20%22Find%20Reddit%20threads%20mentioning%20your%20brand%22.%20Show%20me%20the%20input%20JSON%2C%20the%20output%20fields%2C%20and%20how%20to%20automate%20it%20with%20the%20API%20or%20MCP.)
- 🔍 [Perplexity](https://www.perplexity.ai/search?q=Using%20the%20Google%20Forums%20API%20on%20Apify%20%28https://apify.com/johnvc/google-forums-search-api?fpr=9n7kx3%29%2C%20walk%20me%20through%20this%20use%20case:%20%22Find%20Reddit%20threads%20mentioning%20your%20brand%22.%20Show%20me%20the%20input%20JSON%2C%20the%20output%20fields%2C%20and%20how%20to%20automate%20it%20with%20the%20API%20or%20MCP.)
- 🅒 [Copilot](https://copilot.microsoft.com/?q=Using%20the%20Google%20Forums%20API%20on%20Apify%20%28https://apify.com/johnvc/google-forums-search-api?fpr=9n7kx3%29%2C%20walk%20me%20through%20this%20use%20case:%20%22Find%20Reddit%20threads%20mentioning%20your%20brand%22.%20Show%20me%20the%20input%20JSON%2C%20the%20output%20fields%2C%20and%20how%20to%20automate%20it%20with%20the%20API%20or%20MCP.)

### FAQ and troubleshooting

#### Can I schedule the Google Forums API to run automatically?

Yes. Save a [task](https://docs.apify.com/platform/actors/running/tasks) with your query and localization, then attach a [schedule](https://docs.apify.com/platform/schedules) from the Actor's Actions, then Schedule menu. Concrete cron strings: `0 7 * * *` runs it daily at 7 AM, `0 */6 * * *` every six hours, `0 9 * * 1` every Monday. One schedule can trigger many saved tasks at once, so a single job can sweep every brand or topic you track. See the Integrations section above for the full monitoring recipe, and the [Apify schedules docs](https://docs.apify.com/platform/schedules) for the details.

#### Should I use an API or a web scraper for forum data?

Both, and this Actor is both. An official platform API is usually rate limited, quota bound, and often missing the fields you actually want. This Actor gives you the same public forum data either as a no-code web scraper you run from the Apify console or as a clean [API](https://en.wikipedia.org/wiki/API) endpoint you call yourself, with no per-platform quota. If you have not done [web scraping](https://en.wikipedia.org/wiki/Web_scraping) before, start from the console and move to the API once you automate.

#### Can I integrate this Google Forums scraper with other apps?

Yes. It connects to almost any cloud service through [Apify integrations](https://docs.apify.com/platform/integrations): [Make](https://docs.apify.com/platform/integrations/make), [Zapier](https://docs.apify.com/platform/integrations/zapier), [Slack](https://docs.apify.com/platform/integrations/slack), the n8n community node, and [webhooks](https://docs.apify.com/platform/integrations/webhooks) on `ACTOR.RUN.SUCCEEDED` for custom actions. See the Integrations section above for full recipes.

#### Can I use the Google Forums API with the Apify API?

Yes. The Apify API gives you programmatic access to run this Actor, schedule it, and fetch datasets, and the `apify-client` package exists for both Node.js and Python. Copy your ready-made snippet from the Actor's [API tab](https://apify.com/johnvc/google-forums-search-api/api?fpr=9n7kx3).

#### Can I use this Actor through an MCP server?

Yes. Add it as a tool to any MCP client, including [Claude](https://claude.ai/referral/uIlpa7nPLg) (free trial available) and Cursor, through the hosted [Apify MCP server](https://mcp.apify.com/). The Actor-specific URL is `https://mcp.apify.com/?tools=actors,docs,johnvc/google-forums-search-api`. See the [Apify MCP docs](https://docs.apify.com/platform/integrations/mcp) for client setup.

#### How can I track other community and discussion sources?

Forums are one signal. To watch the same topic elsewhere, pair this Actor with the [Google News API](https://apify.com/johnvc/GoogleNewsAPI?fpr=9n7kx3) for press coverage, the [Google AI Overview API](https://apify.com/johnvc/Google-AI-Overview-API?fpr=9n7kx3) for what Google's AI says about the query, and the [YouTube Transcript and Subtitles Scraper API](https://apify.com/johnvc/YoutubeTranscripts?fpr=9n7kx3) for spoken video content. Together they cover forums, news, AI answers, and video for one topic.

#### Is it legal to scrape Google forum results?

This Actor collects publicly available forum and discussion links that Google Search already surfaces in its Forums tab, and it does not log in or bypass paywalls. Apify has a plain-language overview of [the legality of web scraping](https://blog.apify.com/is-web-scraping-legal/). As always, review the terms of the sites you target and your local rules before you run at scale.

#### Where does this forum data come from?

The results come from the Forums and Discussions tab of [Google Search](https://www.google.com/), which aggregates threads from communities like Reddit, Quora, and niche boards. An [internet forum](https://en.wikipedia.org/wiki/Internet_forum) is an online discussion board, and this Actor returns the threads Google ranks for your query.

#### I got an empty `forum_results` array. Why?

The query may be too niche, or Google Forums had nothing to return for that location and language combination. The `search_metadata.forums_count` will be `0` and the run still completes cleanly. The setup fee is charged once; no page events are billed.

#### My country code is not in the dropdown.

Only the top 40 highest-traffic markets are exposed in the UI for clarity and MCP-compatibility. To use any other ISO 3166-1 alpha-2 code, omit `gl` and pass a more specific `location` string instead - Google Forums localizes well from a city or region name.

#### I want regional English (en-gb, en-us, en-au).

The underlying API supports base language codes reliably. The Actor automatically normalizes regional variants to their base code (e.g. `en-gb` becomes `en`) and logs a warning when it does so. For region targeting, combine the base `hl` with a `gl` country code or a `location` string.

#### My run aborted with "Insufficient funds".

The Actor pre-checks the maximum projected cost (`setup + page_price * max_pages`) against your account's remaining charge limit. Either raise the account or run-level charge limit, or lower `max_pages`.

#### Charging seems off.

In local testing mode (no `PRODUCTION=true`), nothing is charged - the log lines describe what *would* be charged in production. In production, only successfully pushed pages count toward `page_processed`; failed pages do not bill.

#### The actor returned "Error" but I still got some data.

Google Forums occasionally stops returning further results during pagination. The Actor pushes the partial results it did get, logs the error, and writes a structured error entry to the dataset so downstream consumers can see what happened.

***

### Links

- Apify Store page: https://apify.com/johnvc/google-forums-search-api?fpr=9n7kx3
- Apify MCP integration: https://docs.apify.com/platform/integrations/mcp
- Apify Actor definition reference: https://docs.apify.com/platform/actors/development/actor-definition/actor-json
- Quality Score and pricing transparency: https://docs.apify.com/platform/actors/publishing/quality-score

***

### n8n integration

Available as an n8n community node, **[n8n-nodes-google-forums-api](https://www.npmjs.com/package/n8n-nodes-google-forums-api)**. In n8n: Settings, Community Nodes, install `n8n-nodes-google-forums-api`, then use it in any workflow (it also works as an AI Agent tool).

***

### Featured Tasks

Ready-to-run examples that show this API solving a specific problem. Each opens its own setup so you can
run it on your account in one click.

- [Find Reddit threads mentioning your brand](https://apify.com/johnvc/google-forums-search-api/examples/find-reddit-threads-mentioning-your-brand?fpr=9n7kx3) - Reddit threads about any brand with title, link, and snippet, no Reddit API.
- [Scrape Google forums and discussions results](https://apify.com/johnvc/google-forums-search-api/examples/scrape-google-forums-and-discussions-results?fpr=9n7kx3) - Discussions and Forums tab results with thread title, source, and snippet.
- [Search Reddit and Quora from Claude via MCP](https://apify.com/johnvc/google-forums-search-api/examples/search-reddit-and-quora-from-claude-via-mcp?fpr=9n7kx3) - Reddit and Quora thread search inside [Claude](https://claude.ai/referral/uIlpa7nPLg) (free trial available) chat via MCP.
- [Collect Reddit discussions for market research](https://apify.com/johnvc/google-forums-search-api/examples/reddit-discussions-for-market-research?fpr=9n7kx3) - Reddit threads on any topic with title, link, source, snippet, and date to surface pain points and demand.
- [Collect Reddit discussions for competitor analysis](https://apify.com/johnvc/google-forums-search-api/examples/reddit-competitor-analysis?fpr=9n7kx3) - Reddit and forum threads about your competitors with title, link, source, snippet, and date.

***

### 🌐 About Alpha OSINT

This Actor is part of [Alpha OSINT](https://www.alphaosint.com), toolset of financial and operations data sources and APIs.
See the [Google Forums API source page](https://www.alphaosint.com/sources/google-forums-api/) for related tools and use cases.
For support or requests for this actor, please start a ticket [directly on our support page](https://apify.com/johnvc/google-forums-search-api/issues/open?fpr=9n7kx3).

Last Updated: 2026.10.27

# Actor input Schema

## `q` (type: `string`):

Provide the search query for forum discussions (e.g. 'what is the best programming language', 'python vs java', 'best coffee brewing methods'). This field is required.

## `location` (type: `string`):

Set a geographic location string for localized forum results (e.g. 'Austin, TX, Texas, United States', 'New York, NY'). Optional. Helps narrow results to a specific area.

## `device` (type: `string`):

Choose the device type to emulate for the Google Forums search. Defaults to desktop.

## `gl` (type: `string`):

Set the country code for localization (ISO 3166-1 alpha-2, lowercase). Optional. Top 40 highest-traffic markets are exposed; for any other country, omit this field and pass the location string instead.

## `hl` (type: `string`):

Set the interface language code for localization (ISO 639-1 base codes, lowercase). Optional. The Actor normalizes regional variants like 'en-gb' to base codes like 'en'.

## `lr` (type: `string`):

Restrict results to a specific language (e.g. 'lang_en', 'lang_es', 'lang_fr'). Optional. Different from the 'hl' interface language - this filters the result language itself.

## `safe` (type: `string`):

Toggle safe search to filter explicit content. Choose 'active' to filter explicit results, or 'off' to disable filtering. Optional, defaults to 'off'.

## `nfpr` (type: `string`):

Exclude results from auto-corrected queries when the original query is misspelled. Choose '0' to include auto-corrected results, '1' to exclude them. Optional, defaults to '0'.

## `filter` (type: `string`):

Toggle duplicate content filtering. Choose '0' to include duplicates, '1' to filter them out. Optional, defaults to '0'.

## `max_pages` (type: `integer`):

Set the maximum number of result pages to fetch. Use 0 for no limit (fetch all available pages). Default is 1. Each processed page is charged separately. Google Forums typically returns about 10 forum results per page.

## `output_file` (type: `string`):

Provide an optional filename to save the combined results JSON into the default key-value store. If omitted, a filename is generated from the query and timestamp.

## Actor input object example

```json
{
  "q": "what is the best programming language",
  "location": "Austin, TX, Texas, United States",
  "device": "desktop",
  "safe": "off",
  "nfpr": "0",
  "filter": "0",
  "max_pages": 1
}
```

# Actor output Schema

## `results` (type: `string`):

Open the default dataset to view or download all forum results.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "q": "what is the best programming language",
    "location": "Austin, TX, Texas, United States"
};

// Run the Actor and wait for it to finish
const run = await client.actor("johnvc/google-forums-search-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "q": "what is the best programming language",
    "location": "Austin, TX, Texas, United States",
}

# Run the Actor and wait for it to finish
run = client.actor("johnvc/google-forums-search-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "q": "what is the best programming language",
  "location": "Austin, TX, Texas, United States"
}' |
apify call johnvc/google-forums-search-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,johnvc/google-forums-search-api"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ftKm2bcovx3Np2xmY/builds/XRhZ3r7iwghTnYeKs/openapi.json
