Authentication
Authorization: Bearer YOUR_API_KEY
Base URL https://api.capduck.com/v2 — Topic: iran
1 · Overview
GET
/v2/event/{topic}
AI multi-perspective situation briefing, updated hourly. 4 perspectives + watch items.
2 · Events
GET
/v2/event/{topic}/events
Structured event timeline with impact scores, categories, and source attribution.
Parameters
| Param | Type | Default | Description |
since | string | 48h ago | Unix timestamp (s/ms) or ISO 8601 |
limit | int | 50 | Max 200 |
impact | int | 0 | Min impact score (1-10) |
category | string | all | CONFLICT / DIPLOMACY / POLITICS / ECONOMY / PROTESTS |
lang | string | all | translated = only translated items |
Response Fields
| Field | Type | Description |
id | string | UUID, dedup key |
impact | int | 1-10, ≥7 = high impact |
confidence | int | 1-10, source confidence score |
category | string | Event classification |
sentiment | string | NEGATIVE / POSITIVE / NEUTRAL / MIXED |
title | string | English title |
title_zh | string? | Chinese title (impact≥7) |
summary | string | English summary |
summary_zh | string? | Chinese summary |
source_details[] | array | Source attributions (see below) |
published_at | ISO 8601 | Event timestamp |
source_details[] Fields
| Field | Type | Description |
display_name | string | Source name |
category | string | Source category |
platform | string | telegram / tweet / news |
lang | string | Source language (en / fa) |
url | string | Original source URL |
logo_url | string | Source logo |
Cross-reference: To get posts/news linked to an event, use /posts?event={id} or /news?event={id}. This matches event source URLs against post/news items in the 48h window.
3 · Posts
GET
/v2/event/{topic}/posts
Unified Twitter + Telegram social feed. Author classification, engagement metrics.
Parameters
| Param | Type | Default | Description |
event | string | — | Event UUID — returns only posts linked to this event (ignores since) |
since | string | 48h ago | Unix timestamp (s/ms) or ISO 8601 |
limit | int | 50 | Max 200 |
category | string | all | Author category filter |
platform | string | all | twitter or telegram |
lang | string | all | translated = only translated |
Response Fields
| Field | Type | Description |
id | string | Dedup key |
author_name | string | Author or channel name |
author_handle | string? | @handle (Twitter only) |
author_avatar | string | Avatar URL |
source_type | string | Simplified type (see dictionary below) |
content | string | Post body |
content_zh | string? | Chinese translation |
media_url | string? | Image/video attachment |
source_url | string | Original link (Twitter/Telegram) |
platform | string | twitter or telegram |
retweets | int? | Retweet count (Twitter only) |
likes | int? | Like count (Twitter only) |
translated | bool | Whether content_zh is available |
published_at | ISO 8601 | Publish time |
fetched_at | ISO 8601 | When our system captured it |
source_type Dictionary
| source_type | Description | Label (ZH) |
news_agency | News Agencies | 新闻机构 |
state_media | Iranian State/Government | 官方媒体 |
osint | OSINT Accounts | 开源情报 |
gov_military | Government & Military, Political Figures | 政军人物 |
journalist | Journalists | 独立记者 |
think_tank | Think Tanks / Policy Organizations | 智库 |
other | Unmatched / empty | 其他 |
Example Response
{
"success": true,
"data": [{
"id": "683514831161",
"author_name": "Commentary: Trump Truth Social Posts On X",
"author_handle": "@TrumpTruthOnX",
"author_avatar": "https://iran-monitor.okfrontier.com/img?url=...",
"source_type": "gov_military",
"content": "Trump to address the nation on #Iran tomorrow\n\n'Important Update' — WH\n\n#IranWar",
"content_zh": "特朗普将于明天就#伊朗问题发表全国讲话\n\n“重要进展”——白宫\n\n#伊朗战争",
"source_url": "https://x.com/TrumpTruthOnX/status/2039129683514831161",
"platform": "twitter",
"retweets": 5,
"likes": 35,
"translated": true,
"published_at": "2026-03-31T23:56:16+00:00",
"fetched_at": "2026-04-01T07:06:59.454Z"
}],
"meta": { "topic": "iran", "total": 285, "returned": 50, "limit": 50, "since": "2026-03-30T07:06:59Z" }
}
4 · News
GET
/v2/event/{topic}/news
18 major outlets: Reuters, AP, CNN, NYT, WaPo, Fox, Bloomberg, Guardian, BBC, Al Jazeera, and more.
Parameters
| Param | Type | Default | Description |
event | string | — | Event UUID — returns only news linked to this event (ignores since) |
since | string | 48h ago | Unix timestamp (s/ms) or ISO 8601 |
limit | int | 50 | Max 200 |
language | string | all | en / fa |
region | string | all | intl / us / mideast / israel / persian |
lang | string | all | translated = only translated |
Response Fields
| Field | Type | Description |
id | string | Content hash, dedup key |
title | string | Article headline |
title_zh | string? | Chinese headline (non-EN auto-translated) |
url | string | Article URL |
author_name | string | Outlet name |
author_avatar | string | Outlet logo |
media_region | string | Media region (see dictionary below) |
language | string | en / fa |
published_at | ISO 8601 | Publish time |
media_region Dictionary
| media_region | Description |
intl | International (Reuters, AP, BBC, Al Jazeera) |
us | US media (CNN, NYT, WaPo, Fox, Bloomberg) |
mideast | Middle East media |
israel | Israeli media |
persian | Persian-language media |
asia | Asian media |
russia | Russian media |
china | Chinese media |
other | Other |
Example Response
{
"success": true,
"data": [{
"id": "a7c3e1f29b04",
"title": "U.S. deploys additional carrier strike group to Middle East amid Iran tensions",
"title_zh": "美国在伊朗紧张局势加剧之际向中东增派航母打击群",
"url": "https://www.reuters.com/world/middle-east/us-deploys-additional-carrier-2026-03-31/",
"author_name": "Reuters",
"author_avatar": "https://iran-monitor.okfrontier.com/img?url=...",
"media_region": "intl",
"sentiment": "NEGATIVE",
"language": "en",
"translated": true,
"published_at": "2026-03-31T18:42:00+00:00",
"fetched_at": "2026-04-01T07:06:59.454Z"
}],
"meta": { "topic": "iran", "total": 143, "returned": 50, "limit": 50, "since": "2026-03-30T07:06:59Z" }
}
5 · Polymarket
GET
/v2/event/{topic}/polymarket
Prediction market data with current probabilities and price history series.
Response Fields
| Field | Type | Description |
event | string | Event title (EN) |
event_zh | string | Event title (ZH) |
url | string | Polymarket page |
conditions[].label | string | Condition label |
conditions[].yes_price | float | Current probability (0-1) |
conditions[].history | array | {t: unix, p: price} |
Incremental Polling
# 1. Initial fetch
GET /v2/event/iran/events?limit=100
# 2. Record latest published_at
last = response.data[0].published_at
# 3. Next fetch — Unix timestamp or ISO 8601
GET /v2/event/iran/events?since=1743321600 # Unix seconds
GET /v2/event/iran/events?since=1743321600000 # Unix milliseconds
GET /v2/event/iran/events?since=2026-03-30T00:00:00Z # ISO 8601
# 4. Dedup by id (edge overlap)
Window: 48h rolling. Data beyond 48h is automatically purged. Use lang=translated to filter translated-only items.
Errors
| Status | Code | Description |
| 401 | UNAUTHORIZED | Invalid or missing API key |
| 403 | FORBIDDEN | Key not authorized for this topic |
| 404 | NOT_FOUND | Unknown endpoint or topic |
| 429 | RATE_LIMITED | Rate limit exceeded |
| 500 | INTERNAL_ERROR | Server error |
{
"success": false,
"error": { "code": "UNAUTHORIZED", "message": "Invalid or missing API key" }
}
SDK Examples
cURL
# Overview briefing
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.capduck.com/v2/event/iran"
# High-impact events (translated only)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.capduck.com/v2/event/iran/events?impact=8&lang=translated"
# Political figure posts (e.g. Trump Truth Social)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.capduck.com/v2/event/iran/posts?source_type=gov_military&limit=20"
# US media news
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.capduck.com/v2/event/iran/news?region=us&limit=50"
# Posts linked to a specific event
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.capduck.com/v2/event/iran/posts?event=77a29138-954f-4767-9246-493f7bcc34aa"
TypeScript
const BASE = 'https://api.capduck.com/v2/event/iran';
const headers = { Authorization: 'Bearer YOUR_KEY' };
interface ApiResponse<T> {
success: boolean;
data: T;
meta: { topic: string; total: number; returned: number; limit: number; since?: string };
}
interface Post {
id: string;
author_name: string;
author_handle?: string;
author_avatar: string;
source_type: 'news_agency' | 'state_media' | 'osint' | 'gov_military' | 'journalist' | 'think_tank' | 'other';
content: string;
content_zh?: string;
source_url: string;
platform: 'twitter' | 'telegram';
retweets?: number;
likes?: number;
translated: boolean;
published_at: string;
fetched_at: string;
}
async function fetchPosts(params?: Record<string, string>): Promise<ApiResponse<Post[]>> {
const qs = params ? '?' + new URLSearchParams(params).toString() : '';
const res = await fetch(`${BASE}/posts${qs}`, { headers });
return res.json();
}
// Usage
const { data: posts } = await fetchPosts({ source_type: 'gov_military', limit: '20' });
posts.forEach(p => console.log(`[${p.source_type}] ${p.author_name}: ${p.content.slice(0, 80)}`));
Python
import requests
BASE = "https://api.capduck.com/v2/event/iran"
H = {"Authorization": "Bearer YOUR_KEY"}
briefing = requests.get(BASE, headers=H).json()
events = requests.get(f"{BASE}/events", headers=H, params={"impact": 8}).json()
posts = requests.get(f"{BASE}/posts", headers=H, params={"source_type": "gov_military"}).json()
news = requests.get(f"{BASE}/news", headers=H, params={"region": "us", "limit": 50}).json()
JavaScript
const BASE = 'https://api.capduck.com/v2/event/iran';
const h = { 'Authorization': 'Bearer YOUR_KEY' };
const briefing = await fetch(BASE, {headers: h}).then(r => r.json());
const events = await fetch(`${BASE}/events?impact=8`, {headers: h}).then(r => r.json());
const posts = await fetch(`${BASE}/posts?platform=telegram`, {headers: h}).then(r => r.json());
const news = await fetch(`${BASE}/news?region=us&limit=50`, {headers: h}).then(r => r.json());