# Google Trends Content Calendar - Trending Topic Planner (`sonic_scraper/trendpulse-content-calendar`) Actor

Turn keywords into a Google Trends content calendar: dated publishing slots with headline ideas, content angles, formats, and priority (urgent, high, evergreen, refresh) based on breakout, rising and declining trends. Works with a free SerpApi key.

- **URL**: https://apify.com/sonic_scraper/trendpulse-content-calendar.md
- **Developed by:** [Sonic Scraper](https://apify.com/sonic_scraper) (community)
- **Categories:** SEO tools, Marketing, For creators
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 results

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 Trends Content Calendar - Trending Topic Planner

Turn a list of keywords into a **dated content calendar driven by Google Trends**. The Actor checks each keyword's trend (breakout, rising, stable, declining), then schedules it into publishing slots with a headline idea, content angle, format, priority, and the reason it was picked.

### What can this content calendar generator do?

- **Analyze keywords with Google Trends** - interest over time, top and rising related queries, related topics.
- **Classify every keyword** - `breakout`, `rising`, `stable`, `declining`, `volatile`, or `insufficient_data`, with a 0-100 trend score.
- **Schedule dated slots** - choose posts per week and number of weeks; urgent (breakout) topics go first, evergreen topics fill the rest.
- **Refresh tasks** - declining keywords can be scheduled as "refresh existing content" instead of being dropped.
- **Rotate formats** - blog, video, social, and newsletter.
- **Headline ideas and angles** - deterministic headline and angle suggestions built from rising and top related queries (no AI API needed).
- **Ready-made views** - `CALENDAR`, `URGENT_NOW`, and `THIS_WEEK` records in the key-value store.

### What data does each calendar slot contain?

| Field | Description |
|---|---|
| `publishDate`, `weekNumber`, `slotInWeek` | When to publish |
| `keyword` | The Google Trends keyword behind the slot |
| `contentFormat`, `contentType` | blog / video / social / newsletter and the content type |
| `headlineIdea`, `contentAngle` | What to write |
| `priority` | urgent / high / medium / evergreen / refresh |
| `rationale` | Why this keyword was scheduled here |
| `trendStatus`, `trendPulseScore`, `growthPercentage`, `currentAverageInterest` | Trend evidence |
| `relatedQueries[]`, `risingQueries[]` | Supporting search terms |
| `geo`, `timeRange`, `source`, `generatedAt` | Context |

### How much does it cost?

Pay-per-event: **$0.001 per calendar slot** written to the dataset (an 8-week plan at 3 posts per week = 24 slots = $0.024), plus a tiny Actor-start fee. Check the Pricing tab for current rates.

### How to build a content calendar from Google Trends

1. Enter 5-50 keywords that matter to your site.
2. **Add your SerpApi key** (free tier: 100 searches/month at serpapi.com) for live Google Trends data. `http` mode needs no key but Google Trends often rate-limits it.
3. Set `postsPerWeek`, `calendarWeeks`, `contentFormats`, and an optional `calendarStartDate`.
4. Click **Start**. Export the dataset to CSV or Google Sheets, or read `URGENT_NOW` for the topics to publish first.

**Important:** without a SerpApi key the run returns one clearly labeled **sample** calendar built from your first keyword, not live trends. Add a key for real data.

### Input example

```json
{
  "keywords": ["ai agents", "vibe coding", "claude ai", "seo for ai search"],
  "geo": "US",
  "timeRange": "today 3-m",
  "fetchMode": "serpapi",
  "serpApiKey": "YOUR_SERPAPI_KEY",
  "postsPerWeek": 3,
  "calendarWeeks": 8,
  "contentFormats": ["blog", "video"],
  "includeDecliningAsRefresh": true
}
```

### Output example

```json
{
  "publishDate": "2026-10-27",
  "weekNumber": 1,
  "slotInWeek": 1,
  "keyword": "ai agents",
  "contentFormat": "blog",
  "headlineIdea": "AI Agents Course: What Beginners Should Know",
  "contentAngle": "Ride the breakout: ai agents course",
  "priority": "urgent",
  "rationale": "Breakout keyword with rising related queries.",
  "trendStatus": "breakout",
  "trendPulseScore": 84.1,
  "growthPercentage": 61.5,
  "risingQueries": ["ai agents course"]
}
```

Values are illustrative of the output shape.

### Use cases

- Editorial calendars for blogs and newsletters
- YouTube and social posting plans based on rising searches
- Agency client content plans backed by trend evidence
- Quarterly refresh lists for declining evergreen content

### API example

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("sonic_scraper/trendpulse-content-calendar").call(run_input={
    "keywords": ["ai agents", "vibe coding"],
    "fetchMode": "serpapi",
    "postsPerWeek": 2,
    "calendarWeeks": 4,
})
for slot in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(slot["publishDate"], slot["keyword"], slot["headlineIdea"])
```

### Use with AI agents (MCP)

Connect the Apify MCP server at `https://mcp.apify.com?tools=sonic_scraper/trendpulse-content-calendar` in Claude Desktop, Cursor, VS Code or any MCP client, and your AI assistant can call this actor as a tool. Example prompt: *"Build an 8-week content calendar from these 10 keywords and tell me what to publish this week."*

### FAQ

**Is this AI-generated content?** No. Headlines and angles are built with deterministic templates from Google Trends data. Use them as briefs, not finished copy.

**Are Google Trends values search volumes?** No. They are relative 0-100 indices; the calendar uses them to rank direction and momentum.

**Can I get the raw trend data instead?** Yes - use the [Google Trends Scraper](https://apify.com/sonic_scraper/trendpulse-keyword-monitor), which returns the full timeline, regions, and related queries per keyword.

### Related Actors

- [Google Trends Scraper](https://apify.com/sonic_scraper/trendpulse-keyword-monitor)
- [Google Autocomplete Scraper](https://apify.com/sonic_scraper/google-autocomplete-scraper)

# Changelog

This Actor's version history is a separate document: https://apify.com/sonic_scraper/trendpulse-content-calendar/changelog.md

# Actor input Schema

## `keywords` (type: `array`):

List of keywords to analyze. You can also paste keywords as text in the next field.

## `keywordsText` (type: `string`):

Paste one keyword per line, or comma-separated. Useful for bulk uploads (hundreds to thousands).

## `geo` (type: `string`):

Google Trends geo code (e.g. US, GB, CA, AU, MA, FR, DE). Use an empty string for Worldwide.

## `language` (type: `string`):

Language code (e.g. en, fr, es, de).

## `timeRange` (type: `string`):

Google Trends time window.

## `category` (type: `string`):

Google Trends category ID (default '0' = all categories).

## `includeRelatedQueries` (type: `boolean`):

Fetch top + rising related queries for each keyword.

## `includeRelatedTopics` (type: `boolean`):

Fetch related topics (entities) for each keyword.

## `includeContentAngles` (type: `boolean`):

Generate deterministic content angle suggestions based on trend status and related queries.

## `maxKeywords` (type: `integer`):

Maximum number of keywords to process. Excess keywords are truncated with a warning.

## `requestDelayMs` (type: `integer`):

Delay between requests to avoid rate limiting. Recommended: 800–2000ms.

## `maxConcurrency` (type: `integer`):

Number of keywords processed in parallel. Keep low (1–4) to avoid 429 errors.

## `fetchMode` (type: `string`):

How to fetch Google Trends data. 'serpapi' (recommended): bring your own free SerpApi key — works on any Apify plan, no proxy fight. 'apify-scraper': calls Apify's official google-trends-scraper Actor (requires Apify Starter+ plan). Other modes scrape directly and require working proxy access.

## `serpApiKey` (type: `string`):

Required when fetchMode is 'serpapi'. Get a free key (100 searches/month) at https://serpapi.com. Your key is never logged.

## `browserNavigationTimeoutMs` (type: `integer`):

Per-keyword navigation timeout in browser mode. Increase for slow proxies.

## `browserWarmupMs` (type: `integer`):

Extra dwell time after page load to let late XHRs fire. Increase if related-queries are missed.

## `proxyConfiguration` (type: `object`):

Use Apify Proxy (recommended: residential or Google SERP groups for best reliability).

## `calendarStartDate` (type: `string`):

First publish date (YYYY-MM-DD). Defaults to tomorrow.

## `postsPerWeek` (type: `integer`):

How many content slots to schedule each week.

## `calendarWeeks` (type: `integer`):

How many weeks to plan ahead. Total slots = postsPerWeek × calendarWeeks.

## `contentFormats` (type: `array`):

Formats to rotate through across slots (blog, video, social, newsletter).

## `includeDecliningAsRefresh` (type: `boolean`):

If true, declining keywords are scheduled as 'refresh existing content' tasks instead of being dropped.

## `useMockData` (type: `boolean`):

If true AND debugMode is true, use synthetic data instead of fetching Google Trends. Useful for testing the pipeline.

## `debugMode` (type: `boolean`):

Enable verbose logging.

## Actor input object example

```json
{
  "keywords": [
    "chatgpt",
    "claude ai",
    "ai agents",
    "vibe coding"
  ],
  "geo": "US",
  "language": "en",
  "timeRange": "today 12-m",
  "category": "0",
  "includeRelatedQueries": true,
  "includeRelatedTopics": true,
  "includeContentAngles": true,
  "maxKeywords": 500,
  "requestDelayMs": 1000,
  "maxConcurrency": 3,
  "fetchMode": "serpapi",
  "browserNavigationTimeoutMs": 60000,
  "browserWarmupMs": 2000,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "postsPerWeek": 3,
  "calendarWeeks": 8,
  "contentFormats": [
    "blog"
  ],
  "includeDecliningAsRefresh": true,
  "useMockData": false,
  "debugMode": false
}
```

# Actor output Schema

## `calendar` (type: `string`):

One row per scheduled content slot: publish date, keyword, format, headline idea, priority, rationale.

## `summary` (type: `string`):

Totals, slots by priority and format, and what's urgent this week.

## `urgentNow` (type: `string`):

Breakout slots to publish first.

## `thisWeek` (type: `string`):

All slots scheduled in week 1.

## `errors` (type: `string`):

Keywords that failed to fetch, with error messages.

# 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 = {
    "keywords": [
        "chatgpt",
        "claude ai",
        "ai agents",
        "vibe coding"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("sonic_scraper/trendpulse-content-calendar").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 = {
    "keywords": [
        "chatgpt",
        "claude ai",
        "ai agents",
        "vibe coding",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("sonic_scraper/trendpulse-content-calendar").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 '{
  "keywords": [
    "chatgpt",
    "claude ai",
    "ai agents",
    "vibe coding"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call sonic_scraper/trendpulse-content-calendar --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sonic_scraper/trendpulse-content-calendar"
        }
    }
}
```

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/LamVHd3M3iXVkSEZ1/builds/USTGHXFxV8XJfh8WH/openapi.json
