The LinkedIn Ads API on AdScrape gives you the same data the dashboard renders, exposed as a small REST surface. Every call returns JSON with consistent envelopes — there are no XML or form-encoded responses. LinkedIn Ad Library API reference.
- REST + JSONUTF-8 JSON in/out. Errors share the success envelope.
- Company + keywordSearch by LinkedIn company URL, payer name, or free-text keyword.
- All B2B formatsSponsored content, message, document, and dynamic ads in one schema.
- Pay per ad returned1 credit / ad delivered. Empty pages cost 0.
- Per-ad detail recordsFull payer, duration, impressions, and targeting on the single-ad endpoint.
- Soft launchLinkedIn routes are preview today — billing flips on at GA.
- 1. Create a key. Settings → API Keys → Create. Copy the
sk_live_…once. - 2. Search by company or keyword. Hit
/linkedin/searchwith a company name, payer, or keyword. - 3. Drill into a single ad.
GET /linkedin/ads/{ad_id}returns the full payer + targeting record.
curl -X POST https://api.adscrape.in/api/v1/linkedin/search \
-H "X-API-Key: sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"query":"salesforce","max_results":25}'Every call requires a key in the X-API-Key header (or a Bearer JWT from a dashboard session). Manage keys at Settings → API Keys. Keys are scoped per user — never embed them in client-side bundles.
curl -X POST https://api.adscrape.in/api/v1/linkedin/search \
-H "X-API-Key: sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-d '{"query":"hubspot"}'One wallet across AdScrape platforms — credits earned on Meta, YouTube, or Google work here too. Per-ad rates match Meta's tier discounts. Single-ad GETs against your own cache are free.
POST /api/v1/linkedin/searchper ad returned$0.05 / adCharged only for delivered ads. Empty pages cost 0.
GET /api/v1/linkedin/ads/{id}free—Reads from your scraped cache. Always free.
Per-key, per-minute caps. 429s carry a Retry-After header. LinkedIn's upstream throttles aggressively — keep concurrent jobs to ≤ 2 even at higher RPM.
- Free
30Ad-hoc B2B research.
- Starter
60Solo SDR / outbound research.
- Growth
120Agencies and small RevOps teams.
- Scale
600Enterprise CI pipelines.
Errors share one shape. A 5xx mid-scrape never debits credits — only successful streams are billed.
400validation_errorBad body. Detail names the field.
401missing_keyNo X-API-Key header and no valid JWT cookie.
402insufficient_creditsWallet would go negative — top up or upgrade.
404ad_not_foundNo ad with that ad_id in your cache. Run a search first.
429rate_limitedPer-minute cap exceeded. Honour Retry-After.
502upstream_errorLinkedIn returned a transient error. Retry with backoff.
/api/v1/linkedin/search 1 credit / adSearch LinkedIn's Ad Library by free-text keyword, company URL, or payer name. Returns sponsored content, message ads, document ads, and dynamic ads in one schema.
queryoptionalstringFree-text keyword. One of query, company_url, or payer required.company_urloptionalstringFull LinkedIn company URL (e.g. linkedin.com/company/salesforce).payeroptionalstringExact payer/legal entity name. Useful for parent–subsidiary research.formatoptionalstring"sponsored_content" | "message" | "document" | "dynamic" | "all".Defaults to"all".max_resultsoptionalintegerMax ads returned (1–100). Playground clamps to 5.Defaults to25.session_tokenoptionalstringCursor from the previous response.
curl -X POST https://api.adscrape.in/api/v1/linkedin/search \
-H "X-API-Key: sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"query":"salesforce","format":"sponsored_content","max_results":25}'{
"summary": { "count": 18, "query": "salesforce" },
"ads": [
{
"ad_id": "li_103928",
"payer": "Salesforce, Inc.",
"company_name": "Salesforce",
"company_url": "https://www.linkedin.com/company/salesforce",
"format": "sponsored_content",
"headline": "AI for every CRM team — meet Einstein 1",
"body": "See how Einstein 1 ties data, AI and CRM into one platform.",
"cta": "Learn more",
"destination_url": "https://www.salesforce.com/einstein-1/",
"first_seen": "2026-04-02T10:00:00Z",
"last_seen": "2026-05-15T12:30:00Z"
}
],
"session_token": "li_sess_a1b2c3",
"has_more": true
}/api/v1/linkedin/ads/{ad_id} freeFull single-ad record — payer, duration, impressions buckets, country targeting, and creative URLs. Reads from your cache after a search has surfaced the ad.
includeoptionalstringComma-separated extras: "targeting,impressions,creatives".
curl https://api.adscrape.in/api/v1/linkedin/ads/li_103928 \
-H "X-API-Key: sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"{
"ad_id": "li_103928",
"payer": "Salesforce, Inc.",
"company": { "name": "Salesforce", "url": "https://linkedin.com/company/salesforce", "industry": "Software" },
"format": "sponsored_content",
"creative": {
"headline": "AI for every CRM team — meet Einstein 1",
"body": "See how Einstein 1 ties data, AI and CRM into one platform.",
"cta": "Learn more",
"destination_url": "https://www.salesforce.com/einstein-1/",
"media_url": "https://api.adscrape.in/m/li_103928"
},
"duration_days": 43,
"impressions": "10K–50K",
"targeting": { "countries": ["US", "GB", "CA"], "languages": ["en"] },
"first_seen": "2026-04-02T10:00:00Z",
"last_seen": "2026-05-15T12:30:00Z"
}Next steps
The dashboard, your keys, and your billing live one tab away.