Meta Ad Library Ad Details API Documentation
This API allows you to search for ads in Meta Ad Library on a given ad archive ID. It returns European Union Transparency insights, including detailed information about political ads segmented by region.
It is accessible via the /api/v1/search?engine=meta_ad_library_ad_details
endpoint.
API Parameters
Search Params
-
- Name
-
ad_archive_id
- Required
- Required
- Description
-
Specifies the ad's unique ID. You can obtain it in two ways:
-
Use our Meta Ad Library API.
The
ad_archive_id
is included as a key for each ad object returned by the API. -
Visit the Meta Ad Library website. On each ad card in the UI, you'll find a “Library ID” — this is the
ad_archive_id
.
-
Use our Meta Ad Library API.
The
-
- Name
-
is_political
- Required
- Optional
- Description
-
Specifies whether the ad is political. The default value is
false
Engine
-
- Name
-
engine
- Required
- Required
- Description
-
Specifies the search engine. Must be set to
meta_ad_library_ad_details
.
Api Key
-
- Name
-
api_key
- Required
- Required
- Description
-
Your API key for authentication. Include it as a query parameter (
?api_key=YOUR_API_KEY
) or in the Authorization header (Bearer YOUR_API_KEY
).
API Examples
Response with EU Transparency data

GET
https://www.searchapi.io/api/v1/search?ad_archive_id=477570185419072&engine=meta_ad_library_ad_details
Request
- 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": "meta_ad_library_ad_details",
"ad_archive_id": "477570185419072"
}
response = requests.get(url, params=params)
print(response.text)
Response
{
"aaa_info": {
"targets_eu": true,
"location_audience": [
{
"name": "Italy",
"num_obfuscated": 0,
"type": "countries"
},
...
],
"gender_audience": "All",
"age_audience": {
"min": 18,
"max": 65
},
"eu_total_reach": 1613,
"age_country_gender_reach_breakdown": [
{
"country": "IT",
"age_gender_breakdowns": [
{
"age_range": "45-54",
"male": 99,
"female": 3,
"unknown": 1
},
...
]
},
...
],
"payer_beneficiary_data": [
{
"payer": "MEDIAPLUS ENGINE GMBH & CO. KG",
"beneficiary": "BMW AG"
}
]
}
}
Response with political ad

GET
https://www.searchapi.io/api/v1/search?ad_archive_id=958587666227752&engine=meta_ad_library_ad_details&is_political=true
Request
- 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": "meta_ad_library_ad_details",
"ad_archive_id": "958587666227752",
"is_political": "true"
}
response = requests.get(url, params=params)
print(response.text)
Response
{
"insights": {
"age_gender_data": [
{
"age_range": "18-24",
"female": 0.02
},
{
"age_range": "25-34",
"female": 0.09
},
...
],
"currency_matched": true,
"location_data": [
{
"reach": 0,
"region": "Alabama"
},
{
"reach": 0,
"region": "Nevada"
},
...
],
"single_country": "US"
},
"verified_voice_context": {
"types": [
"POLITICAL"
]
}
}