Skip to main content
POST
/
api
/
linkedin
/
ad_library
/
ads
/
search
/linkedin/ad_library/ads/search
curl --request POST \
  --url https://api.anysite.io/api/linkedin/ad_library/ads/search \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "count": 2,
  "timeout": 300,
  "keyword": "cloud",
  "company_ids": [
    1441
  ],
  "payer": "<string>",
  "countries": [
    "US"
  ],
  "impressions_min": 1,
  "impressions_max": 1,
  "impressions_unit": "Thousand",
  "targeting_included": [
    "LANGUAGE"
  ],
  "targeting_excluded": [
    "COMPANY"
  ],
  "sort": "newest"
}
'
[
  {
    "id": "<string>",
    "url": "<string>",
    "@type": "@linkedin_ad",
    "advertiser": {
      "@type": "@linkedin_advertiser",
      "id": "<string>",
      "name": "<string>",
      "image": "<string>",
      "company_url": "<string>"
    },
    "is_promoted": false,
    "ad_format": "<string>",
    "creative_type": "<string>",
    "text": "<string>",
    "headline": "<string>",
    "cta_text": "<string>",
    "image": "<string>",
    "video": "<string>",
    "video_preview": "<string>",
    "payer": "<string>",
    "ran_from": "<string>",
    "ran_to": "<string>",
    "impressions": "<string>",
    "impressions_by_country": [],
    "targeting": {
      "@type": "@linkedin_ad_targeting",
      "segments": [],
      "parameters": []
    },
    "creatives": []
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
count
integer
required

Max result count

Required range: x >= 1
Example:

20

timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
keyword
string | null

Word or phrase in the ad text

Minimum string length: 1
Example:

"cloud"

company_ids
integer[] | null

Numeric LinkedIn company id(s) of the advertiser

Example:
[1441]
payer
string | null

Name of the entity that paid for the ad

Minimum string length: 1
countries
string[] | null

ISO-3166 alpha-2 country codes, uppercase

Example:
["US"]
date_option
enum<string> | null

Time window of when the ads ran

Available options:
last-30-days,
current-month,
current-year,
last-year
impressions_min
integer | null

Lower bound of the ad impressions range; requires impressions_max

Required range: x >= 0
impressions_max
integer | null

Upper bound of the ad impressions range; requires impressions_min

Required range: x >= 0
impressions_unit
enum<string>
default:Thousand

Unit applied to impressions_min / impressions_max

Available options:
Thousand,
Million
targeting_included
enum<string>[] | null

Only ads that targeted these audience parameter categories

Available options:
LANGUAGE,
LOCATION,
AUDIENCE,
DEMOGRAPHIC,
COMPANY,
EDUCATION,
JOB,
INTERESTS_AND_TRAITS
Example:
["LANGUAGE"]
targeting_excluded
enum<string>[] | null

Only ads that excluded these audience parameter categories

Available options:
LANGUAGE,
LOCATION,
AUDIENCE,
DEMOGRAPHIC,
COMPANY,
EDUCATION,
JOB,
INTERESTS_AND_TRAITS
Example:
["COMPANY"]
sort
enum<string>
default:newest

Result ordering by ad date

Available options:
newest,
oldest

Response

Successful Response

id
string
required
url
string
required
@type
string
default:@linkedin_ad
advertiser
LinkedinAdvertiser · object
is_promoted
boolean
default:false
ad_format
string | null
creative_type
string | null
text
string | null
headline
string | null
cta_text
string | null
image
string | null
video
string | null
video_preview
string | null
payer
string | null
ran_from
string | null
ran_to
string | null
impressions
string | null
impressions_by_country
LinkedinAdCountryImpressions · object[]
targeting
LinkedinAdTargeting · object
creatives
LinkedinAdCreative · object[]