Appearance
Ad Details
GET /v1/linkedin/ad
Retrieves detailed information about a specific LinkedIn ad by URL. Returns id, description, headline, adType, advertiser, and targeting with language, location, and audience criteria. Also includes totalImpressions, impressionsByCountry, adDuration, startDate, and endDate.
Authentication
All requests require the x-api-key header. Get your key at scrapecreators.com.
Query Parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
url | string | yes | The url of the ad | https://www.linkedin.com/ad-library/detail/666281156 |
Example Request
curl
bash
curl 'https://api.scrapecreators.com/v1/linkedin/ad?url=https://www.linkedin.com/ad-library/detail/666281156' \
-H 'x-api-key: $SCRAPECREATORS_API_KEY'Node / TypeScript
js
const params = new URLSearchParams({ url: 'https://www.linkedin.com/ad-library/detail/666281156' });
const res = await fetch(`https://api.scrapecreators.com/v1/linkedin/ad?${params}`, {
headers: { 'x-api-key': process.env.SCRAPECREATORS_API_KEY }
});
const data = await res.json();
console.log(data);Python
python
import os, requests
r = requests.get(
'https://api.scrapecreators.com/v1/linkedin/ad',
headers={'x-api-key': os.environ['SCRAPECREATORS_API_KEY']},
params={'url': 'https://www.linkedin.com/ad-library/detail/666281156'},
)
r.raise_for_status()
print(r.json())CLI
bash
scrapecreators linkedin-ads ad --helpExample Response
json
{
"success": true,
"id": "664291126",
"description": "Learn to start building an AI strategy that helps your small business automate routine tasks and keep teams focused on high-value activities.",
"headline": "Read “The Guide to AI for Small Businesses”",
"poster": "Salesforce",
"posterTitle": "Promoted",
"promotedBy": null,
"targeting": {
"language": "Targeting includes English",
"location": "Targeting includes Portugal",
"audience": "Inclusion and exclusion targeting applied"
},
"image": "https://media.licdn.com/dms/image/v2/D5610AQHEjQAydHWLaw/image-shrink_1280/image-shrink_1280/0/1736950502005/Ai-guide-for-smbs?e=2147483647&v=beta&t=dC-iPz1fr8piN6YutdDgKIOmRPJvFaj4Hr0g_raHZ70",
"adType": "Single Image Ad",
"advertiser": "Salesforce",
"advertiserLinkedinPage": "https://www.linkedin.com/company/3185",
"cta": null,
"destinationUrl": "https://www.salesforce.com/eu/form/small-business/ai-guide-for-smbs/?d=701ed00000CX0GfAAL&nc=701ed000007UYTMAA4&utm_source=linkedin&utm_medium=paid_social&utm_campaign=emea_pt_einsteinai_allindustries&utm_content=enterprisesmallbusiness_pp-dm-all-crx-multi-tal-linkedin-prospect-tals-esmb_701ed00000CX0GfAAL_english_ai-guide-for-smbs&trk=ad_library_ad_preview_headline_content",
"adDuration": "Ran from Apr 1, 2025 to Apr 3, 2025",
"startDate": "2025-04-01T00:00:00.000Z",
"endDate": "2025-04-03T00:00:00.000Z",
"totalImpressions": "5k-10k",
"impressionsByCountry": [
{
"country": "Portugal",
"impressions": "100%"
}
]
}Credits
Most ScrapeCreators endpoints consume 1 credit per successful response. Some heavier endpoints (transcripts, AI-driven enrichment, ad detail lookups) may cost more. Check GET /v1/credit-balance for your remaining balance.
Errors
| Status | Meaning | Action |
|---|---|---|
| 200 | Success. | Use the JSON payload. |
| 400 | Invalid or missing parameter. | Verify required parameters and value format. |
| 401 | Missing or invalid x-api-key. | Pass a valid API key in the header. |
| 402 | Out of credits. | Top up at scrapecreators.com or wait for plan reset. |
| 404 | Resource not found or private. | Confirm the handle, URL, or id and that the resource is public. |
| 429 | Rate limited. | Backoff and retry with exponential delay. |
| 500 | Server error or upstream platform failure. | Retry with backoff; report persistent errors to support. |