LinkedIn Ad Library API
API Parameters
Search Params
-
- Name
-
q
- Required
- Optional
- Description
-
Defines the keyword for your search. Use this parameter to search for ads containing specific keywords or phrases.
-
- Name
-
advertiser
- Required
- Optional
- Description
-
Specifies the advertiser name or company to search for. This will return ads from that specific advertiser.
-
- Name
-
country
- Required
- Optional
- Description
-
Specifies the country to filter ads by. Use comma-separated values for multiple countries (e.g., 'US,CA,GB'). Check the full list of supported LinkedIn Ad Library countries.
-
- Name
-
time_period
- Required
- Optional
- Description
-
Specifies the date range for ads. You can use predefined values like
last_year
,this_year
,this_month
,last_30_days
, or custom date range in formatYYYY-MM-DD..YYYY-MM-DD
.
Pagination
-
- Name
-
next_page_token
- Required
- Optional
- Description
-
A token for fetching the next set of results. You can obtain this token from the
next_page_token
field in the previous response.
Engine
-
- Name
-
engine
- Required
- Required
- Description
-
Specifies the search engine. Must be set to
linkedin_ad_library
.
API Key
-
- Name
-
api_key
- Required
- Required
- Description
-
Your API key for authentication. Include it as a query parameter (
https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY
) or in the Authorization header (Bearer YOUR_API_KEY
).
Zero Data Retention
-
- Name
-
zero_retention
- Enterprise Only
- Enterprise Only
- Required
- Optional
- Description
-
Set this parameter to
true
to disable all logging and persistent storage. No request parameters, HTML, or JSON responses are stored or logged. Suitable for high-compliance use cases. Debugging and support may be limited while enabled.
API Examples
Full response

https://www.searchapi.io/api/v1/search?advertiser=google&engine=linkedin_ad_library
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "linkedin_ad_library",
"advertiser": "google"
}
response = requests.get(url, params=params)
print(response.text)
{
"search_metadata": {
"id": "search_lLDb6vP7p7aJuRQRoA5jqWZw",
"status": "Success",
"created_at": "2025-07-16T17:10:30Z",
"request_time_taken": 2,
"parsing_time_taken": 0.02,
"total_time_taken": 2.02,
"request_url": "https://www.linkedin.com/ad-library/search?accountOwner=google",
"html_url": "https://www.searchapi.io/api/v1/searches/search_lLDb6vP7p7aJuRQRoA5jqWZw.html",
"json_url": "https://www.searchapi.io/api/v1/searches/search_lLDb6vP7p7aJuRQRoA5jqWZw"
},
"search_parameters": {
"engine": "linkedin_ad_library",
"advertiser": "google"
},
"search_information": {
"total_results": 13954
},
"ads": [
{
"position": 1,
"advertiser": {
"name": "Google Cloud",
"thumbnail": "https://media.licdn.com/dms/image/v2/C560BAQFIFLR7jxm2lg/company-logo_100_100/company-logo_100_100/0/1630644546845/google_cloud_logo?e=2147483647&v=beta&t=FpMRLreuFcvQOPJBLlMIBA4jPlhb8lLtofTvwbzW_i4"
},
"ad_type": "image",
"content": {
"headline": "Powered by Gemini 2.5 and Google-quality search, Google Agentspace is the only hyperscaler platform that offers interopeโฆ",
"image": "https://media.licdn.com/dms/image/v2/D4D10AQFF9jwZm0HzFg/image-shrink_1280/B4DZf1aOTdGsAU-/0/1752168985006/Phase1_AIthatplaysnicewithothers?e=2147483647&v=beta&t=-I6VzLbZQoiJXVOB3hE3uI3dSRnk8UbfJANNJkIlw_k",
"cta": "Make it happen with Google AI"
},
"link": "https://www.linkedin.com/ad-library/detail/728824033?trk=ad_library_ad_preview_content_image",
"id": "728824033"
},
{
"position": 2,
"advertiser": {
"name": "Google Cloud",
"thumbnail": "https://media.licdn.com/dms/image/v2/C560BAQFIFLR7jxm2lg/company-logo_100_100/company-logo_100_100/0/1630644546845/google_cloud_logo?e=2147483647&v=beta&t=FpMRLreuFcvQOPJBLlMIBA4jPlhb8lLtofTvwbzW_i4"
},
"ad_type": "image",
"content": {
"headline": "Help your customers by linking up agents. With Agent2Agent (A2A) protocol announced at #GoogleCloudNext, weโre building โฆ",
"headline_links": [
"https://www.linkedin.com/feed/hashtag/googlecloudnext"
],
"image": "https://media.licdn.com/dms/image/v2/D4D10AQEyxXE-iuHrPQ/image-shrink_1280/B4DZf1cvxHGYAM-/0/1752169644143/Phase1_Haveyouragentscallours?e=2147483647&v=beta&t=oJpUweTacvyCg2mQd36iEKomsVB52U80ImKL07Ni-2E",
"cta": "Make it happen with Google AI."
},
"link": "https://www.linkedin.com/ad-library/detail/728873973?trk=ad_library_ad_preview_content_image",
"id": "728873973"
},
...
],
"pagination": {
"next_page_token": "NzI4ODkyODUzLTE3NTIxNjk3NjY0NzU="
}
}
event
ad_type
Response with

https://www.searchapi.io/api/v1/search?engine=linkedin_ad_library&q=tesla
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "linkedin_ad_library",
"q": "tesla"
}
response = requests.get(url, params=params)
print(response.text)
{
"ads": [
{
"position": 2,
"headline": "๐
Save the Date: ๐ช๐ถ๐ฟ๐๐๐ฐ๐ต๐ฎ๐ณ๐๐๐ธ๐ผ๐ป๐ณ๐ฒ๐ฟ๐ฒ๐ป๐ ๐ฑ๐ฒ๐ฟ ๐๐ฎ๐๐ฝ๐๐๐๐ฎ๐ฑ๐๐ฟ๐ฒ๐ด๐ถ๐ผ๐ป ๐ฎ๐ฌ๐ฎ๐ฑ am Montag, 3โฆ",
"image": "https://media.licdn.com/dms/image/v2/D4E1EAQGfFaufgTPyow/event-background-image-crop_720_1280/B4EZcgtereHkAc-/0/1748600483692?e=2147483647&v=beta&t=y4DmseKzECe-1Zb23y9fJffJMQ1TKJdXiuQvw5E1k0g",
"time": "June 30, 2025, 8:00 AM - June 30, 2025, 12:30 PM UTC",
"name": "Wirtschaftskonferenz der Hauptstadtregion 2025",
"organizer": "Event by IHK Berlin",
"location": "Berlin, DE"
},
...
]
}
document
ad_type
Response with

https://www.searchapi.io/api/v1/search?country=us&engine=linkedin_ad_library
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "linkedin_ad_library",
"country": "us"
}
response = requests.get(url, params=params)
print(response.text)
{
"ads": [
{
"position": 5,
"advertiser": {
"name": "The Fletcher School at Tufts University",
"thumbnail": "https://media.licdn.com/dms/image/v2/D560BAQFI_6U7LE2I6A/company-logo_100_100/company-logo_100_100/0/1731943029946/fletcherschool_logo?e=2147483647&v=beta&t=5rBlF5dYSO3XJEGHlnHimMtIYMt-9zbAdTzBTfwTGuk"
},
"ad_type": "document",
"content": {
"headline": "Itโs not every day that graduate students are tasked with designing a strategy to deter China from engaging in large-scaโฆ",
"title": "A Powerful Civil-Military Dialogue",
"pages": [
"https://media.licdn.com/dms/image/v2/D4E1FAQHw-OSaGsX18A/feedshare-document-cover-images_480/B4EZd_oh8eHIBM-/0/1750193022821?e=2147483647&v=beta&t=PzcDfDCfARr80-4zH5DTci7fx4ReR288gMwhJpKeq2g",
"https://media.licdn.com/dms/image/v2/D4E1FAQHw-OSaGsX18A/feedshare-document-cover-images_480/B4EZd_oh8eHIBM-/1/1750193022821?e=2147483647&v=beta&t=eTX0ghInBf_rU96whddddtgzixYJDhrb1n_VitE6Ohg"
]
},
"link": "https://www.linkedin.com/ad-library/detail/706869704",
"id": "706869704"
},
...
]
}
carousel
ad_type
Response with

https://www.searchapi.io/api/v1/search?advertiser=sonar&engine=linkedin_ad_library
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "linkedin_ad_library",
"advertiser": "sonar"
}
response = requests.get(url, params=params)
print(response.text)
{
"ads": [
{
"position": 4,
"advertiser": {
"name": "Sonar",
"thumbnail": "https://media.licdn.com/dms/image/v2/D560BAQG_QwUlAFA75g/company-logo_100_100/company-logo_100_100/0/1730931205846/sonarsource_logo?e=2147483647&v=beta&t=Ass5aGHgwmjhG6QEwsMK7u7u3oyXakI9tr_F7N48f8g"
},
"ad_type": "carousel",
"content": {
"headline": "Building resilient code in 2025: the code issues you'll face.",
"items": [
{
"image": "https://media.licdn.com/dms/image/v2/D4D10AQEe-9ePPZLaxw/image-pad_1200_1200/B56Zfm1P.yHEAQ-/0/1751924408540?e=2147483647&v=beta&t=ZIVNTA5YLv3QVdKTujrZIAcLWPyu4aGDBTQwdJi7ryU",
"cta": "Brought to you by Sonar"
},
{
"image": "https://media.licdn.com/dms/image/v2/D4D10AQFaJNJi8lO8HQ/image-pad_1200_1200/B56Zfm1P_bG0AM-/0/1751924408603?e=2147483647&v=beta&t=PyhL0590FIMcKaGozdXCZpva8XkESWI_mY_wMPomvq8",
"cta": "The State of Code"
},
...
]
},
"link": "https://www.linkedin.com/ad-library/detail/723061923",
"id": "723061923"
},
...
]
}