List the ads behind a LinkedIn Ad Library search URL: advertiser, ad text, headline, format, image and ad URL for each ad, with pagination.
3 credits/ call
Never more than 98 credits a call.
You only pay when data comes back.
curl -X POST "https://api.primaryapi.com/v1/run/linkedin.ads" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://www.linkedin.com/ad-library/search?accountOwner=apify","limit":25}'{
"output": {
"found": true,
"data": {
"nextCursor": "<string | null>",
"items": [
{
"advertiser": "<string | null>",
"advertiserLogo": "<string | null>",
"format": "<string | null>",
"headline": "<string | null>", …
}
]
}
},
"credits": 3
}Input and output
3 fields
https://www.linkedin.com/ad-library/sea….25.9 fields
Good to know
Copy the URL from the Ad Library search page after setting your filters.
One call returns one page of ads. Pass nextCursor for the next.
A search with no ads is not charged.
Unknown URL? It comes back as not found, not as an error.
Terms of use. Public LinkedIn data only. LinkedIn’s User Agreement restricts automated collection and LinkedIn enforces it; use the data for lawful purposes, keep copies only as long as you need them, and treat post and article text as the author’s content (analysis, not republication).
The same key and credits work for every API.