Skip to content
ProspectAPIs

API reference / Ads

Search a company's ads

Written and maintained by The ProspectAPIs team

GET/v1/ads

GET /v1/ads is the ProspectAPIs operation searchAds, in the Ads group of the REST API. Whether a company runs ads now on the public Meta, Google, LinkedIn and TikTok ad libraries, by domain: a summary, a status per library (ok, no_ads, not_resolved, not_covered, unreadable) with the advertiser and how it was resolved, and the live ads, newest last seen first. Each library is read logged out and cached for a few hours. Costs $0.006 per library whose status is ok, on the first page; everything else is free. One unreadable library never fails the call; 503 SOURCE_UNAVAILABLE only when every library asked for is unreadable. Coverage: Meta worldwide (active ads; inactive ones only when they reached the EU); Google worldwide (the last 30 days); LinkedIn ads run since 2023-06-01, with run dates and reach only for ads shown in the EU; TikTok only ads shown in the EEA, Switzerland and the UK. Cost: Launching soon. Send your API key as a Bearer token in the Authorization header.

How this fits with the rest of the ads API, with worked examples, is in the ads library guide.

Parameters

Parameters of GET /v1/ads
NameInTypeDescription
domain requiredquerystringThe company's bare domain.
platformquerystringOne or more of meta, google, linkedin, tiktok, comma separated. Omit for all four.
google_advertiser_idquerystringPin the Google advertiser (AR followed by digits).
meta_page_idquerystringPin the Facebook page by its numeric id.
linkedin_company_idquerystringPin the LinkedIn company by its numeric id.
tiktok_advertiserquerystringPin the TikTok advertiser by its name as the library shows it.
limitqueryintegerAds per page, 1 to 100 (default 25).
cursorquerystringnext_cursor from the previous page. Later pages are free and come from the same read, never from a library the first page reported unreadable; a cursor works only with the key that made the first call and expires after 6 hours, and INVALID_CURSOR or STALE_CURSOR means repeat the call without it. A lookup that pins an advertiser id is one page (next_cursor null).

An unknown query parameter is refused with a 400 rather than ignored, so a typo never widens a search you pay for.

Responses

Response codes of GET /v1/ads
StatusMeaning
200Each library's status and the live ads (possibly none).
400The request was invalid (e.g. a bad filter or input); nothing was charged.
401The API key is missing or invalid.
402Out of credits. The body carries top_up_url; nothing was charged.
429Too many requests; retry after the window.
503Every library asked for is unreadable right now. No list is returned and nothing is charged. Retry after Retry-After seconds.

Every error answers with the same JSON body, an error string and sometimes a code; the errors page lists each status and when it happens. A per-key 429 carries Retry-After; see rate limits.

200 response fields

Each library's status and the live ads (possibly none). The body is a AdsList.

Fields of the 200 response
FieldTypeDescription
domain requiredstring
company_idstring (uuid) or nullThe company record's id, when we hold one for the domain.
summary requiredAdsSummary
summary.running_nowboolean
summary.platforms_runninginteger
summary.ads_live_totalinteger
summary.ads_live_is_lower_boundboolean
summary.first_seen_anystring (date) or null
summary.newest_creative_atstring (date) or null
summary.sentencestring
platforms requiredarray of AdsPlatformReadOne library's answer. status ok, no_ads, not_resolved, not_covered or unreadable; only no_ads is an authoritative empty, and only ok is charged.
platforms[].platform requiredstring: meta, google, linkedin, tiktok
platforms[].status requiredstring: ok, no_ads, not_resolved, not_covered, unreadable
platforms[].reasonstringunreadable only: rate_limited, blocked, timeout, parse, platform_off, no_egress, reader_unavailable.
platforms[].advertiserobject or null
platforms[].resolutionobject or nullHow the advertiser was tied to the company.
platforms[].ads_liveinteger
platforms[].ads_total_bandstring or nullThe library's own count or band, where it gives one.
platforms[].completeboolean
platforms[].truncatedbooleanMore ads than one read takes: ads_live is a lower bound.
platforms[].read_atstring (date-time)
platforms[].cachedboolean
platforms[].heldbooleanA read that disagreed sharply with the last one is held until a second read agrees; the last applied read is shown.
platforms[].coveragestring or null
data requiredarray of AdOne ad as its library shows it. A field the library does not show is null, never filled in.
data[].id requiredstringOur id: the platform, a dot, and the library's own id.
data[].platform requiredstring: meta, google, linkedin, tiktok
data[].advertiser_name requiredstring or null
data[].advertiser_id requiredstring or nullThe library's id for the advertiser (a page id, an advertiser id, a company id). TikTok shows none.
data[].advertiser_url requiredstring (uri) or null
data[].creative_text requiredstring or nullThe ad's text. Google and TikTok list views show none.
data[].media_urls requiredarray of string (uri)Image and video URLs as the library serves them; some expire.
data[].first_seen requiredstring (date-time) or nullWhen the library says the ad started.
data[].last_seen requiredstring (date-time) or nullWhen the library says the ad was last shown.
data[].countries requiredarray of string or nullISO 3166-1 alpha-2 codes, where the library names them (often only on GET /v1/ads/{id}).
data[].landing_url requiredstring (uri) or null
data[].status requiredstring or null: active, inactive, Meta states it; for Google it is active when last shown within 2 days of the read; LinkedIn and TikTok state none.
data[].format requiredstring or null
data[].source_url requiredstring (uri)The ad on its public library page.
data[].read_at requiredstring (date-time) or nullWhen we read it from the library.
count requiredinteger
total requiredinteger
next_cursor requiredstring or null
charged_usd requirednumberWhat this call cost.
Response headers
HeaderMeaning
X-Credits-RemainingUSD credits left after this call settles.
RateLimit-LimitRequests this API key may make per minute.
RateLimit-RemainingRequests left in the current one-minute window.
RateLimit-ResetSeconds until the current window resets.

Code samples

Each sample sends the same request. Set PROSPECTAPIS_KEY in your environment first. Values come from the spec's examples; replace them with your own.

curl
curl -G https://api.prospectapis.com/v1/ads \
  -H "Authorization: Bearer $PROSPECTAPIS_KEY" \
  --data-urlencode "domain=acme.com" \
  --data-urlencode "platform=meta,google"
JavaScript (fetch)
const params = new URLSearchParams({ domain: "acme.com", platform: "meta,google" });
const res = await fetch(`https://api.prospectapis.com/v1/ads?${params}`, {
  headers: { Authorization: `Bearer ${process.env.PROSPECTAPIS_KEY}` },
});
if (!res.ok) throw new Error(`${res.status}: ${(await res.json().catch(() => ({}))).error ?? res.statusText}`);
const data = await res.json();
console.log(data);
Python (requests)
import os, requests

res = requests.get(
    "https://api.prospectapis.com/v1/ads",
    headers={"Authorization": f"Bearer {os.environ['PROSPECTAPIS_KEY']}"},
    params={"domain": "acme.com", "platform": "meta,google"},
    timeout=30,
)
res.raise_for_status()
data = res.json()
print(data)

Billing

Billing reserves before it serves: the call holds what it may cost, serves at most what that hold covers, and refunds the rest when the response closes. Any non-2xx answer refunds the whole hold, so a failed call costs nothing. The response reports your balance in X-Credits-Remaining.

The ads library guide covers this area end to end. Previous operation: Get one launch event. Next operation: Get one ad. Every operation, grouped by area, is on the API reference index.

Create a free account to get a key, then run the samples above with your own values.

Was this page helpful?