Endpoints
Six endpoints, five that read and one that queues a capture. The read examples are real responses from a test account, cut down to fit.
GET /competitors
Every competitor your company tracks, oldest first. accounts lists each account Radar has registered for it (linkedin, facebook, instagram, tiktok, youtube, pinterest, blog), with null where none is on file, and gaps names those missing ones. ad_library holds the Meta page id and Pinterest advertiser name Radar finds by itself from its captures, null until found; nobody fills these in, so they are never gaps. Call this first: the other endpoints take a competitor id from here.
| Parameter | In | Type | Notes |
|---|
| external_ref | query | string | Optional. Returns only the competitor you created with this id of your own. |
|---|
Request
curl https://radar.impactgain.agency/api/v1/competitors \
-H "Authorization: Bearer $RADAR_API_KEY"
Response
{
"data": [
{
"id": "d1c40048-ab04-4f7e-…",
"name": "Clogau",
"website": "https://www.clogau.co.uk",
"external_ref": null,
"status": "ready",
"accounts": {
"linkedin": "https://www.linkedin.com/company/clogau-gold",
"facebook": "https://www.facebook.com/clogaugold",
"instagram": "https://www.instagram.com/clogaujewellery",
"tiktok": null,
"youtube": null,
"pinterest": null,
"blog": "https://www.clogau.co.uk/blogs/news"
},
"gaps": ["tiktok", "youtube", "pinterest"],
"ad_library": { "meta_page_id": null, "pinterest_advertiser_name": null },
"company_id": "8778e855-0cbb-48eb-…",
"linkedin_url": "https://www.linkedin.com/company/clogau-gold",
"facebook_url": "https://www.facebook.com/clogaugold",
"instagram_url": "https://www.instagram.com/clogaujewellery",
"blog_url": "https://www.clogau.co.uk/blogs/news",
"created_at": "2026-08-15T18:30:06.252648+00:00"
}
]
}
GET /competitors/{id}/ads
A competitor's ads from the Meta, TikTok, Pinterest and LinkedIn ad libraries, newest start date first, with the re-hosted creative URL.
LinkedIn publishes no launch date, so a LinkedIn ad's start date is the day Radar first recorded it.
| Parameter | In | Type | Notes |
|---|
| id | path | uuid | A competitor id from /competitors. |
|---|
| limit | query | integer, 1 to 100 | Defaults to 20. |
|---|
| offset | query | integer, 0 or more | Defaults to 0. |
|---|
| platform | query | meta, tiktok, pinterest or linkedin | Omit for every platform. |
|---|
| from, to | query | ISO 8601 datetime with offset | Filters on the ad's start date. Defaults to the last 30 days. The range can be up to 90 days. |
|---|
| topicLens | query | yes, true or 1 | Keeps only ads whose copy or call to action matches the competitor's saved topic lens, by whole word. Does nothing if no lens is set. |
|---|
Request
curl "https://radar.impactgain.agency/api/v1/competitors/{id}/ads?platform=meta&limit=20" \
-H "Authorization: Bearer $RADAR_API_KEY"
Response
{
"data": [
{
"id": "3f9b1871-471d-4b23-…",
"competitor_id": "d1c40048-ab04-4f7e-…",
"platform": "meta",
"ad_id": "2917310598639097",
"ad_creative_url": "https://…supabase.co/storage/v1/object/public/ad-creatives/meta/…/main.jpg",
"ad_copy": "Be first to shop the new lines added to our Summer Sale!…",
"cta_text": "SHOP_NOW",
"landing_page_url": "https://www.clogauoutlet.co.uk/collections/new-in",
"start_date": "2026-08-16T07:00:00+00:00",
"end_date": "2026-08-16T07:00:00+00:00",
"platform_metadata": {
"format": "VIDEO",
"headline": "MORE TO LOVE, LESS TO SPEND",
"is_active": true,
"page_name": "Clogau",
"snapshot_url": "https://www.facebook.com/ads/library?id=2917310598639097",
"publisher_platforms": ["FACEBOOK", "INSTAGRAM", "…"],
"cards": []
},
"scraped_at": "2026-08-16T20:27:10.165+00:00"
}
],
"meta": {
"total": 141,
"limit": 2,
"offset": 0,
"has_more": true,
"next_cursor": null
}
}
GET /competitors/{id}/posts
A competitor's organic posts and blog articles, newest first.
| Parameter | In | Type | Notes |
|---|
| id | path | uuid | A competitor id from /competitors. |
|---|
| limit | query | integer, 1 to 100 | Defaults to 20. |
|---|
| offset | query | integer, 0 or more | Defaults to 0. |
|---|
| platform | query | linkedin_post, facebook_post, instagram_post or blog_post | Omit for every source. |
|---|
| from, to | query | ISO 8601 datetime with offset | Filters on the publish date. Defaults to the last 30 days. The range can be up to 90 days. |
|---|
| topicLens | query | yes, true or 1 | Keeps only posts whose title or text matches the competitor's saved topic lens, by whole word. Does nothing if no lens is set. |
|---|
Request
curl "https://radar.impactgain.agency/api/v1/competitors/{id}/posts?platform=linkedin_post&topicLens=yes" \
-H "Authorization: Bearer $RADAR_API_KEY"
Response
{
"data": [
{
"id": "b169e34a-fbe8-47af-…",
"competitor_id": "f941a78c-18bb-40df-…",
"content_type": "facebook_post",
"title": null,
"content_text": "Claire Foy and Rooney Mara wore Swarovski at the 83rd Venice…",
"url": "https://www.facebook.com/SWAROVSKI.global/posts/…",
"published_date": "2026-09-06T21:45:04+00:00",
"platform_metadata": {
"media": [
{ "type": "photo", "uri": null, "thumbnail": "https://…/1-thumbnail.jpg" }
],
"metrics": { "likes": 144, "shares": 11, "total_reactions": 4, "views": null },
"page_name": "SWAROVSKI.global",
"post_type": "post"
},
"scraped_at": "2026-09-07T06:23:15.24+00:00",
"created_at": "2026-09-07T06:23:17.36588+00:00"
}
],
"meta": {
"total": 152,
"limit": 2,
"offset": 0,
"has_more": true,
"next_cursor": null
}
}
GET /competitors/{id}/analysis
The latest AI analysis of one competitor: a summary, strengths, weaknesses, recommendations and trend, with the period it covers and how many posts and ads it read.
Returns 404 until the competitor's first analysis has run.
| Parameter | In | Type | Notes |
|---|
| id | path | uuid | A competitor id from /competitors. |
|---|
Request
curl https://radar.impactgain.agency/api/v1/competitors/{id}/analysis \
-H "Authorization: Bearer $RADAR_API_KEY"
Response
{
"data": {
"competitor_id": "d1c40048-ab04-4f7e-…",
"analysis": {
"summary": "Clogau focused on promoting its fine jewellery collection from July 17, 2026, to August 16, 2026, primarily through Instagram posts…",
"strengths": [
"Strong brand storytelling connecting product designs with Welsh culture and heritage.",
"…"
],
"weaknesses": [
"Minimal engagement in comments, suggesting a need for improved interaction…",
"…"
],
"recommendations": [
"Increase interactive content such as polls or questions…",
"…"
],
"trend": "stable",
"analysis_period_start": "2026-07-17T22:33:36.417+00:00",
"analysis_period_end": "2026-08-16T22:33:36.417+00:00",
"total_posts_analyzed": 45,
"total_ads_analyzed": 30
},
"generated_at": "2026-08-16T22:37:09.124535+00:00"
}
}
GET /companies/{id}/digest
Your company's latest weekly digest, the same brief the Monday email is built from, as structured JSON.
Returns 404 until your first digest has been generated.
| Parameter | In | Type | Notes |
|---|
| id | path | uuid | Your company id, the company_id on any competitor. Another company's id returns 403. |
|---|
Request
curl https://radar.impactgain.agency/api/v1/companies/{id}/digest \
-H "Authorization: Bearer $RADAR_API_KEY"
Response
{
"data": {
"company_id": "8778e855-0cbb-48eb-…",
"digest_content": {
"subject_finding": "Swarovski launches Classica collection with Ariana Grande.",
"threat_level": "High",
"prediction": "Competitors are expected to continue leveraging celebrity endorsements and themed collections…",
"per_competitor": [
{
"name": "Astrid & Miyu",
"summary": "Astrid & Miyu is engaging customers with personalized milestone rings…",
"threat_level": "Medium"
}
],
"action_plan": [
{
"action": "Initiate a collaboration with a celebrity influencer to enhance brand visibility.",
"channel": "Instagram",
"priority": "High"
}
],
"channel_intel": { "ads": "…", "linkedin": "…" },
"threat_summary": "…"
},
"week_start": "2026-09-07",
"generated_at": "2026-09-07T09:17:24.138738+00:00"
}
}
POST /competitors/{id}/refresh
Queues a fresh capture of one competitor and returns the job id straight away. The new ads and posts arrive through the endpoints above once the job finishes.
Once per competitor every 30 minutes. A second call inside that window returns 429 with REFRESH_COOLDOWN and a Retry-After header. The body can be up to 4 KB.
| Parameter | In | Type | Notes |
|---|
| id | path | uuid | A competitor id from /competitors. |
|---|
| limit | body | integer, 1 to 100 | Optional JSON body. How many items to fetch per source. Defaults to 50. |
|---|
Request
curl -X POST https://radar.impactgain.agency/api/v1/competitors/{id}/refresh \
-H "Authorization: Bearer $RADAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"limit": 50}'
Response shape, from the route code
{
"data": {
"job_id": "run_…",
"status": "queued",
"competitor_id": "d1c40048-ab04-4f7e-…"
}
}
POST /competitors
Starts tracking a competitor from its domain. Radar finds its social profiles, blog and ad accounts from the website and queues the first capture. Keyed on your own id for the competitor, so a repeated call returns the same competitor instead of adding a second one.
Returns 201 when it creates a competitor, and 200 when the external_ref already exists. outcome says which: created, existing, retracked (it was untracked and is tracked again) or adopted (you already added that domain in the app, and it now carries your id). status is backfilling until the first capture finishes, then ready, or untracked. The response carries the same accounts and gaps as the list: Radar finds the accounts from the website, and any it could not find are listed in gaps. A new competitor counts against your plan's competitor limit.
| Parameter | In | Type | Notes |
|---|
| domain | body | string | The competitor's public website, such as rival.io. IP addresses and internal hostnames are refused. |
|---|
| external_ref | body | string, up to 128 characters | Your id for this competitor, unique within your account. Letters, digits and . _ : - only. |
|---|
| name | body | string | Optional. Defaults to the name found on the website. |
|---|
| urls | body | object | Optional. Any of linkedin_url, facebook_url, instagram_url, tiktok_url, youtube_url, pinterest_url, blog_url. Each one you send replaces what Radar would find. |
|---|
Request
curl -X POST https://radar.impactgain.agency/api/v1/competitors \
-H "Authorization: Bearer $RADAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain": "rival.io", "external_ref": "media-42"}'
Response shape, from the route code
{
"data": {
"id": "5b2e7c10-91aa-4c3d-…",
"name": "Rival",
"website": "https://rival.io",
"external_ref": "media-42",
"status": "backfilling",
"accounts": {
"linkedin": "https://www.linkedin.com/company/rival",
"facebook": null,
"instagram": "https://www.instagram.com/rival",
"tiktok": null,
"youtube": null,
"pinterest": null,
"blog": "https://rival.io/blog"
},
"gaps": ["facebook", "tiktok", "youtube", "pinterest"],
"ad_library": { "meta_page_id": null, "pinterest_advertiser_name": null },
"created_at": "2026-10-22T10:00:00.000000+00:00",
"outcome": "created"
}
}
DELETE /competitors/{id}
Stops tracking a competitor. Radar stops capturing it and keeps everything already on file. Track it again by sending the same create call.
Untracking a competitor that is already untracked succeeds and changes nothing.
| Parameter | In | Type | Notes |
|---|
| id | path | uuid | A competitor id from /competitors. |
|---|
| external_ref | query | string | Or call DELETE /competitors?external_ref=… to untrack by your own id. |
|---|
Request
curl -X DELETE "https://radar.impactgain.agency/api/v1/competitors?external_ref=media-42" \
-H "Authorization: Bearer $RADAR_API_KEY"
Response shape, from the route code
{
"data": {
"id": "5b2e7c10-91aa-4c3d-…",
"name": "Rival",
"website": "https://rival.io",
"external_ref": "media-42",
"status": "untracked",
"accounts": { "linkedin": "https://www.linkedin.com/company/rival", "…": "…" },
"gaps": ["facebook", "tiktok", "youtube", "pinterest"],
"ad_library": { "meta_page_id": null, "pinterest_advertiser_name": null },
"created_at": "2026-10-22T10:00:00.000000+00:00"
}
}
Errors
| Status | Code | Meaning |
|---|
| 400 | VALIDATION_ERROR | A bad id, query parameter, date range or body. |
|---|
| 401 | UNAUTHORIZED | The key is missing, malformed or revoked. |
|---|
| 403 | FORBIDDEN | The competitor or company belongs to another account, or the plan has no API access. |
|---|
| 403 | INSUFFICIENT_SCOPE | A create or untrack with a key whose write access has been removed. Every key can write unless it has been taken away. |
|---|
| 403 | PLAN_LIMIT | A new competitor would go over the plan's competitor limit. |
|---|
| 404 | NOT_FOUND | No such competitor, or no analysis or digest yet. |
|---|
| 409 | DUPLICATE_COMPETITOR | The domain is already tracked under another external_ref. existing_id names it. |
|---|
| 413 | VALIDATION_ERROR | The refresh or create body is over 4 KB. |
|---|
| 422 | INVALID_DOMAIN | The domain is not a public website. The error says why. |
|---|
| 429 | RATE_LIMITED | The key's hourly limit is used up. |
|---|
| 429 | IP_RATE_LIMITED | Too many requests from one IP address. |
|---|
| 429 | CONCURRENCY_LIMIT | More than five requests in flight on one key. |
|---|
| 429 | REFRESH_COOLDOWN | The competitor was refreshed in the last 30 minutes. |
|---|
| 500 | INTERNAL_ERROR | Something failed on our side. Retry with backoff. |
|---|
Response, 400
{
"error": "Invalid competitor id",
"code": "VALIDATION_ERROR"
}