Integration recipes
Copy-paste recipes for the Trends API and the MCP server — a morning Slack digest, alerts on new emerging trends in a category, and a briefing from your AI agent.
These recipes use only the free Pulse mirror of the Trends API, so they work on every plan, including Free. Each one needs an API key from Settings → API Keys in the console.
Post a country's top trends to Slack every morning
Send the day's top trends for one country to a Slack channel. You need a Slack incoming webhook URL.
Install the Python SDK:
pip install earlyforge requestsSave this script as pulse_to_slack.py:
import os
import requests
from earlyforge import PulseClient
client = PulseClient(api_key=os.environ["EARLYFORGE_API_KEY"])
snapshot = client.trends_by_region("FR")
lines = [
f"• *{t['display_name']}* ({t['lifecycle_stage']}, score {t['global_score']:.0f})"
for t in snapshot["trends"]
]
text = "Today's top trends in France\n" + "\n".join(lines)
requests.post(os.environ["SLACK_WEBHOOK_URL"], json={"text": text}, timeout=10)The script reads the latest daily snapshot for France and posts one line per trend: its name, its lifecycle stage and its score.
Run it once a day, for example with cron at 07:30:
30 7 * * * EARLYFORGE_API_KEY=ef_live_xxxxxxxxxxxxxxxx SLACK_WEBHOOK_URL=https://hooks.slack.com/services/... python3 /path/to/pulse_to_slack.pyThe daily snapshot is refreshed at 00:01 UTC, so any time in the morning reads the new one.
Replace trends_by_region("FR") with trends_by_category("tech") to follow a category instead of a country.
Get alerted only on new emerging trends in a category
Check a category several times a day and notify only for trends you haven't seen, still at the emerging stage.
import { readFileSync, writeFileSync, existsSync } from "node:fs"
import { PulseClient } from "earlyforge-sdk"
const SEEN_FILE = "./seen-trends.json"
const client = new PulseClient(process.env.EARLYFORGE_API_KEY!)
const seen: string[] = existsSync(SEEN_FILE) ? JSON.parse(readFileSync(SEEN_FILE, "utf8")) : []
const { trends } = await client.trendsByCategory("business")
const fresh = trends.filter((t) => t.lifecycle_stage === "emerging" && !seen.includes(String(t.trend_id)))
for (const t of fresh) {
console.log(`New emerging trend: ${String(t.display_name)} — ${String(t.description ?? "")}`)
}
writeFileSync(SEEN_FILE, JSON.stringify([...seen, ...fresh.map((t) => String(t.trend_id))]))
The script keeps the IDs it has already reported in seen-trends.json, so each trend is reported once. Swap console.log for your own notifier: email, Slack, Discord or a webhook.
For alerts sent by EarlyForge itself, with score thresholds and keywords, use trend alerts in the console instead.
Ask your AI agent for a morning briefing
Let Claude, ChatGPT or Gemini answer "what is moving in my beat today" from live EarlyForge data.
Add https://api.earlyforge.ai/mcp as a custom connector in your assistant's settings, and sign in with your EarlyForge account when asked. See MCP server.
Ask in plain language, for example:
Using EarlyForge, list today's top trends in Germany in the business category.
For each one, tell me its lifecycle stage and what sources it comes from.With the local server (Claude Code, Claude Desktop, Cursor), you can also run the editorial_watch prompt, which builds a trend-watch briefing for a country or sector.
Next steps
- Trends API reference: every endpoint and field
- Examples: the same call in curl, Python, JavaScript and PHP
- Webhooks: receive events from EarlyForge in your own systems