Skip to main content
GET
/
linkedin
/
ad-search
Search LinkedIn Ad Library
curl --request GET \
  --url https://api.harvest-api.com/linkedin/ad-search \
  --header 'X-API-Key: <api-key>'
{
  "elements": [
    "<unknown>"
  ],
  "pagination": {
    "totalPages": 123,
    "totalElements": 123,
    "pageNumber": 123,
    "previousElements": 123,
    "pageSize": 123,
    "paginationToken": "<string>"
  },
  "status": "<string>",
  "error": "<string>",
  "query": {
    "search": "<string>"
  }
}
Scrape LinkedIn Ad Library Search to find ads based on various criteria such as keywords, account owners, countries, and date ranges.
const params = new URLSearchParams({
  keyword: 'sales',
  accountOwner: 'ai',
  countries: 'US,CA,FR',
  dateOption: 'custom-date-range',
  startdate: '2025-01-01',
  enddate: '2025-12-31',
});

fetch(`https://api.harvest-api.com/linkedin/ad-library?${params.toString()}`, {
  headers: { 'X-API-Key': '<api-key>' },
})
  .then((response) => response.json())
  .then((data) => console.log(data));

Authorizations

X-API-Key
string
header
required

Query Parameters

keyword
string

Search by keyword

accountOwner
string

Search by company or advertiser name

countries
string

One or comma separated list of country codes to filter ads by country. Eg. 'US,GB,FR'. Supports "ALL" value to search in all countries.

dateOption
string

One of the following options to filter ads by date: 'last-30-days', 'current-month', 'current-year', 'last-year', 'custom-date-range'

startdate
string

Start date for 'custom-date-range' filter in 'YYYY-MM-DD' format

enddate
string

End date for 'custom-date-range' filter in 'YYYY-MM-DD' format

paginationToken
string<nullable>

Pagination token from the previous response for fetching the next page

Response

A list of ads matching the search criteria.

elements
any[]
pagination
object
status
string

Status of the response.

error
string

Error message, if any.

query
object