GET /v1/linkedin/ad
LinkedIn ad API: one Ad Library ad with impressions and targeting
Returns one ad from the LinkedIn Ad Library: advertiser, payer, format, ad copy, media and destination URLs, run dates, impression range and targeting. Send ad as the numeric ad id or its Ad Library detail URL.
- Price
- $0.0025 per call
- Batch
- Yes, through /v1/batch
- Failed calls
- Not charged
Example request
curl 'https://api.virev.ai/v1/linkedin/ad?ad=1498307266' \
-H "Authorization: Bearer $VIREV_API_KEY"import os
import requests
response = requests.request(
"GET",
"https://api.virev.ai/v1/linkedin/ad",
params={
"ad": "1498307266",
},
headers={"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"},
timeout=60,
)
response.raise_for_status()
print(response.json())Parameters
| Name | In | Type | Description |
|---|---|---|---|
ad required | query | string | The numeric Ad Library ad id, or its ad-library detail URL. |
cached | query | auto | cache_only | live | auto (default) serves a read saved within the last 24 hours for these exact arguments, otherwise fetches. cache_only never contacts LinkedIn (404 not_cached when nothing is saved, whatever its age). live always fetches. Anything else is a 400. |
get_raw | query | boolean | Not available on this operation: the upstream document is an HTML page, and true answers 400. The default false returns the normalized type. |
Example response
The example response of the API reference, with lists cut to their first 3 items and long text shortened.
{
"data": {
"id": "1498307266",
"advertiser": null,
"advertiser_type": "member",
"payer": "KLK Consulting",
"format": "Single Image Ad",
"ad_copy": "Two AI Stumbles in One Week: Why Values-Based Leadership Must Be Distributed\n\nIn the space of just three days this month, two major AI companies highlighted a critical weakness in how leadership is practiced today.\n\nOn July 10, Apple filed …",
"media_urls": [
"https://media.licdn.com/dms/image/v2/D5622AQHBziNgyJBv3g/feedshare-image-high-res/B56Z9THumEGUAU-/0/1783805962934?e=2147483647&v=beta&t=9FRvZ2QyiNGOqxpEoef85QqhwgJ5NoHDVXvMcMP_now"
],
"destination_urls": [
"https://radi8.it/nqanzN8"
],
"impression_start": null,
"impression_end": null,
"impressions_exact": null,
"impressions_min": null,
"impressions_max": null,
"targeting": {},
"restricted": false,
"url": "https://www.linkedin.com/ad-library/detail/1498307266",
"extra": {
"advertiser_url": "https://www.linkedin.com/in/kent-kaufman-b475552",
"partial": false,
"creative_type": "SPONSORED_STATUS_UPDATE",
"advertiser_logo_url": "https://media.licdn.com/dms/image/v2/C5603AQHwWB-2oxc3OQ/profile-displayphoto-shrink_100_100/profile-displayphoto-shrink_100_100/0/1516271492041?e=1794441600&v=beta&t=z0k8gBUVO4Ksog1yUmV5jVTJJ1kJOIKRSyIlu7bUt9A"
}
},
"meta": {
"source": "live",
"fetched_at": "2026-10-27T20:40:21.268630+00:00",
"cost": "$0.0025",
"balance": "$0.9875",
"request_id": "req_cbbb1feb8c5b5caa7e3ac95f4f183b9c"
}
}How it works
One Ad Library ad: advertiser, payer, format, copy, run dates, impressions and targeting. Returns LinkedInAd under data. LinkedIn is read as a signed-out guest and every upstream document is an HTML page, so get_raw is not available.
A field LinkedIn does not carry is null, a list it does not carry is [], and LinkedIn-only facts sit under extra. Unknown, unsupported, and repeated query parameters return 400 before acquisition or billing.
Errors
| Status | When |
|---|---|
400 | The request parameters are invalid. |
401 | Missing, malformed, or revoked API key. |
402 | Balance is too low for this request. |
404 | cached=cache_only found nothing saved for these arguments (not_cached; call again with cached=auto to fetch it), or the LinkedIn account or item does not exist (not_found). You are not charged. |
429 | Over the per-minute limit. The limit belongs to your organization and all its API keys share it: 100 requests per minute unless an increase was granted. Wait for the Retry-After seconds, then retry. On a live read, code rate_limited means the platform itself rate-limited this read; retry after the Retry-After seconds. You are not charged. |
502 | The upstream fetch failed. You are not charged. |
503 | Billing could not be confirmed, so no upstream data was returned. |
504 | The upstream request timed out. You are not charged. |