Skip to content New SourceLoop MCP: chat with your attribution data in Claude, ChatGPT & Cursor
SourceLoop
API reference

Ads

Spend, impressions and clicks from the connected ad platforms, joined to the conversions they produced.

Endpoint Method Path Permission
Get ad performance Ad platform spend and delivery GET /v1/ads/performance metrics:read

Base URL https://app.sourceloop.ai/api/v1

Get ad performance

Ad platform spend and delivery

GET /v1/ads/performance

Requires metrics:read

`level` is REQUIRED. Spend is stored once per breakdown grain, so a query that does not pin one, or that mixes two, multiplies it.

Metrics named `platform_*` are what the ad platform reports under its own attribution window and view-through rules. They will not match Sourceloop attributed conversions, and that difference is expected.

Amounts are in the AD ACCOUNT currency, which may differ from the workspace currency; `meta.currency_source` says which you got.

curl -s -X GET "https://app.sourceloop.ai/api/v1/ads/performance?website=acme.com&period=last%2030%20days" \
  -H "Authorization: Bearer $SOURCELOOP_API_KEY"
const res = await fetch(
  "https://app.sourceloop.ai/api/v1/ads/performance?website=acme.com&period=last%2030%20days",
  {
    method: "GET",
    headers: {
      Authorization: `Bearer ${process.env.SOURCELOOP_API_KEY}`,
    },
  },
);

const data = await res.json();
import os, requests

res = requests.get(
    "https://app.sourceloop.ai/api/v1/ads/performance?website=acme.com&period=last%2030%20days",
    headers={"Authorization": f"Bearer {os.environ['SOURCELOOP_API_KEY']}"},
)
data = res.json()

Query parameters

websitestring

Website domain, e.g. acme.com. Required only when the key covers more than one.

periodstring

Plain-language period: "last 30 days", "yesterday", "July 2026", or "2026-07-01..2026-07-31". Ignored when from/to are given.

Example last 30 days

levelstringrequired

Grain to report at. "campaign" is the usual view.

Allowed values 16

  • account
  • campaign
  • ad_set
  • ad
  • keyword
  • search_term
  • placement
  • audience
  • age_gender
  • geo
  • device
  • asset
  • asset_group
  • product
  • listing_group
  • network

metricsstring

Comma-separated.

Allowed values10

  • spend
  • impressions
  • clicks
  • platform_conversions
  • platform_revenue
  • ctr
  • cpc
  • cpm
  • platform_roas
  • platform_conversion_rate

breakdownboolean

One row per item at that level.

platformstring

Example google_ads

Responses

  • 200 Ad rows
  • 400 Something was wrong with the request or the credential.
  • 429 Too many requests for this workspace in the current minute. Wait Retry-After seconds and repeat the request unchanged.

Track every conversion to its true source

Capture and send full attribution data from every signup, lead, booking, and sale to your CRM and ad platforms, so you know exactly what's driving revenue.

Without SourceLoop

Untagged

Kayden Floyd

kayden@abc.com

  • SourceUnknown
  • MediumUnknown
  • CampaignUnknown
  • Landing pageUnknown
Journey
No touchpoints captured

With SourceLoop

Auto-tagged

Kayden Floyd

kayden@abc.com · Acme Co.

  • Channel Paid Social
  • CampaignFree_demo
  • Landing page/pricing
Journey
Synced to HubSpot Google Ads Meta