# Google Search Console Query & Intent Classifier (`capyduck/gsc-data-mining`) Actor

Extracts Google Search Console queries and enriches them with search intent (Transactional, Commercial, Informational), question detection, AI/GEO tracking candidates, and performance opportunity bucketing (Striking Distance, CTR optimization).

- **URL**: https://apify.com/capyduck/gsc-data-mining.md
- **Developed by:** [Rahul V J](https://apify.com/capyduck) (community)
- **Categories:**
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Google Search Console Intent & Opportunity Classifier

Extract Google Search Console performance data and automatically enrich search queries with intent categorization, question tagging, LLM/GEO prompt tracking candidates, and actionable opportunity bucketing.

***

### 🎯 What This Actor Does

Standard GSC exports only give raw performance metrics. This Actor enriches every query across four automated intelligence layers:

- **Intent Classification:** Identifies `Transactional`, `Commercial`, or `Informational` intent.
- **Question Detection:** Flags question queries and identifies the question modifier (`how`, `what`, `why`, `where`, `can`, etc.).
- **AI & GEO Prompt Tracking:** Flags conversational long-tail queries and formats them into ready-to-test prompts for LLM visibility tracking (ChatGPT, Perplexity, Gemini, AI Overviews).
- **Opportunity Bucketing:** Surfaces high-impact SEO targets:
  - **Striking Distance:** Positions 4–15 with high impressions.
  - **CTR Optimization:** Top 5 rankings suffering from low click-through rates.
  - **High-Value Commercial:** Commercial/transactional terms with active search volume.

***

### ⚙️ Setup & Prerequisites (3-Minute Guide)

This Actor connects directly to the official Google Search Console API via a **Google Service Account**.

#### 1. Enable the Search Console API

1. Open the [Google Cloud Console](https://console.cloud.google.com/).
2. Select or create a project.
3. Enable the **Google Search Console API**.

#### 2. Create a Service Account Key

1. In Google Cloud Console, navigate to **IAM & Admin > Service Accounts**.
2. Click **Create Service Account**, give it a name, and complete creation.
3. Click the newly created service account > **Keys** tab > **Add Key > Create new key > JSON**.
4. Download the generated `.json` key file to your computer.

#### 3. Grant Access in Google Search Console

1. Copy the `client_email` address from your downloaded JSON key file (e.g., `account@project.iam.gserviceaccount.com`).
2. Go to [Google Search Console](https://search.google.com/search-console).
3. Select your property > **Settings > Users and permissions**.
4. Click **Add user**, paste the service account email, set permission to **Full** or **Restricted**, and click **Add**.

***

### 📥 Inputs

| Field | Type | Description | Example |
|---|---|---|---|
| `serviceAccountKey` | String (JSON) | Full contents of your downloaded Google Service Account JSON key. | `{"type": "service_account", ...}` |
| `siteUrl` | String | Domain Property (`sc-domain:example.com`) or URL-prefix (`https://example.com/`). | `sc-domain:example.com` |
| `startDate` | String | Start date in `YYYY-MM-DD` format. | `2026-06-01` |
| `endDate` | String | End date in `YYYY-MM-DD` format. | `2026-08-25` |
| `rowLimit` | Integer | Max rows to extract (default: `25000`). | `25000` |
| `filterOnlyQuestions` | Boolean | Filter output to only queries flagged as questions. | `false` |
| `filterOnlyPrompts` | Boolean | Filter output to only long-tail conversational prompt candidates. | `false` |

***

### 📤 Sample Output

| Query | Intent | Opportunity Bucket | Clicks | Impressions | CTR | Position | Prompt / GEO Candidate |
|---|---|---|---|---|---|---|---|
| `best b2b seafood marketplace` | Commercial | Striking Distance (Page 1-2) | 18 | 1,420 | 1.27% | 7.4 | Provide recommendations, key steps, and actionable guidance for: best b2b seafood marketplace |
| `how to source vannamei shrimp` | Informational | Standard | 42 | 890 | 4.72% | 3.1 | how to source vannamei shrimp |
| `wholesale seafood suppliers` | Transactional | High-Value Commercial | 5 | 320 | 1.56% | 12.8 | Provide recommendations, key steps, and actionable guidance for: wholesale seafood suppliers |

***

### 💡 Use Cases

- **Programmatic Content Strategy:** Extract all question queries to build targeted FAQ hubs and supporting cluster pages.
- **LLM Engine Optimization (GEO):** Export the `promptCandidate` column directly into LLM tracking suites to monitor brand citations.
- **Metadata & CTR Fixes:** Filter by `CTR Optimization Target` to spot title/meta tag rewrites that yield immediate traffic gains.

# Actor input Schema

## `serviceAccountKey` (type: `string`):

Paste the complete JSON key content of your Google Cloud Service Account.

## `siteUrl` (type: `string`):

e.g., sc-domain:example.com or https://www.example.com/

## `startDate` (type: `string`):

Format: YYYY-MM-DD

## `endDate` (type: `string`):

Format: YYYY-MM-DD

## `rowLimit` (type: `integer`):

Maximum number of rows to retrieve from GSC (API max per request is 25,000).

## `filterOnlyQuestions` (type: `boolean`):

Check to only return queries identified as questions (how, what, why, etc.).

## `filterOnlyPrompts` (type: `boolean`):

Check to only return long-tail, conversational query candidates.

## Actor input object example

```json
{
  "rowLimit": 25000,
  "filterOnlyQuestions": false,
  "filterOnlyPrompts": false
}
```

# Actor output Schema

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

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("capyduck/gsc-data-mining").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("capyduck/gsc-data-mining").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 '{}' |
apify call capyduck/gsc-data-mining --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,capyduck/gsc-data-mining"
        }
    }
}

```

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/N4sxnWnKtQmcHLPFL/builds/eCwEpqtzlL55PM1D1/openapi.json
