Skip to main content
POST
/
api
/
facebook
/
ads
/
search
/facebook/ads/search
curl --request POST \
  --url https://api.anysite.io/api/facebook/ads/search \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "query": "<string>",
  "count": 2,
  "timeout": 300,
  "country": "US",
  "ad_type": "all",
  "active_status": "active",
  "media_type": "all"
}
'
[
  {
    "id": "<string>",
    "url": "<string>",
    "@type": "@facebook_ad",
    "is_active": false,
    "started_at": 123,
    "ended_at": 123,
    "platforms": [],
    "country": "<string>",
    "categories": [],
    "collation_count": 123,
    "advertiser": {
      "id": "<string>",
      "@type": "@facebook_advertiser",
      "name": "<string>",
      "alias": "<string>",
      "image": "<string>",
      "categories": [],
      "like_count": 123,
      "byline": "<string>",
      "is_deleted": false
    },
    "creatives": [],
    "text": "<string>",
    "title": "<string>",
    "caption": "<string>",
    "cta_text": "<string>",
    "cta_type": "<string>",
    "link_url": "<string>",
    "link_description": "<string>",
    "display_format": "<string>",
    "is_reshared": false,
    "contains_sensitive_content": false,
    "total_active_time": 123,
    "branded_content": {},
    "additional_info": {},
    "currency": "<string>",
    "spend_range": "<string>",
    "reach_estimate": "<string>",
    "impressions_range": "<string>",
    "disclaimer_label": "<string>",
    "fev_info": {
      "@type": "@facebook_ad_fev_info",
      "authorized_entity_text": "<string>",
      "submitted_on": "<string>",
      "phone": "<string>",
      "email": "<string>",
      "website": "<string>",
      "address": "<string>",
      "additional_info": {}
    }
  }
]

Documentation Index

Fetch the complete documentation index at: https://docs.anysite.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
query
string
required

Search keyword (advertiser name or text in ads)

Minimum string length: 1
Examples:

"nike"

"biden"

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
country
string
default:US

ISO-3166 alpha-2 country code, uppercase (e.g. US, GB, DE)

Pattern: ^[A-Z]{2}$
Examples:

"US"

"GB"

ad_type
enum<string>
default:all

Ad category: 'all' for commercial, 'political_and_issue_ads' for political/issue

Available options:
all,
political_and_issue_ads
active_status
enum<string>
default:active

Filter by ad activity status

Available options:
active,
inactive,
all
media_type
enum<string>
default:all

Filter by media type of the ad creative

Available options:
all,
image,
video,
meme,
none

Response

Successful Response

id
string
required
url
string
required
@type
string
default:@facebook_ad
is_active
boolean
default:false
started_at
integer | null
ended_at
integer | null
platforms
string[]
country
string | null
categories
string[]
collation_count
integer | null
advertiser
FacebookAdvertiser · object
creatives
FacebookAdCreative · object[]
text
string | null
title
string | null
caption
string | null
cta_text
string | null
cta_type
string | null
display_format
string | null
is_reshared
boolean
default:false
contains_sensitive_content
boolean
default:false
total_active_time
integer | null
branded_content
Branded Content · object
additional_info
Additional Info · object
currency
string | null
spend_range
string | null
reach_estimate
string | null
impressions_range
string | null
disclaimer_label
string | null
fev_info
FacebookAdFevInfo · object