/fetch_search_ads_pagesFetch Search Ads Pages (POST)
$0.01
JSON
REST
About this endpoint
Access Facebook data through agntdata: Fetch Search Ads Pages (POST). This endpoint retrieves detailed information about ad pages based on a search query, returning up to 26 ads per request. Use the end_cursor parameter to retrieve additional ads if needed. Responses are structured JSON for AI agents, analytics, and automation — one API key instead of juggling upstream accounts. Ideal when you need page and group posts, marketplace listings, video content, and ad discovery programmatically.
Use cases
Parameters
Content type: application/json
{
"type": "object",
"properties": {
"query": {
"type": "string",
"default": "",
"description": "Search query string"
},
"ad_page_id": {
"type": "string",
"default": "1633779800049051",
"description": "Facebook Ad Page ID. Used only if query is not provided."
},
"country": {
"type": "string",
"default": "ALL",
"description": "Country filter (e.g. ALL, US, GB)"
},
"activeStatus": {
"type": "string",
"default": "ALL",
"description": "Filter by active status (e.g. ALL, ACTIVE, INACTIVE)"
},
"end_cursor": {
"type": "string",
"default": "",
"description": "Pagination cursor for next page of results"
},
"after_time": {
"type": "string",
"default": "",
"description": "Filter ads created after this time"
},
"before_time": {
"type": "string",
"default": "",
"description": "Filter ads created before this time"
},
"sort_data": {
"type": "string",
"default": "",
"description": "Sort order for results"
}
}
}Responses
Successful response
{
"type": "object"
}Agent / Developer Schema
Machine-readable formats for integrating this endpoint into AI agents and toolchains.
{
"operationId": "Fetch_Search_Ads_Pages__POST",
"method": "post",
"path": "/fetch_search_ads_pages",
"summary": "Fetch Search Ads Pages (POST)",
"description": "This endpoint retrieves detailed information about ad pages based on a search query, returning up to 26 ads per request. Use the end_cursor parameter to retrieve additional ads if needed.",
"parameters": [],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"default": "",
"description": "Search query string"
},
"ad_page_id": {
"type": "string",
"default": "1633779800049051",
"description": "Facebook Ad Page ID. Used only if query is not provided."
},
"country": {
"type": "string",
"default": "ALL",
"description": "Country filter (e.g. ALL, US, GB)"
},
"activeStatus": {
"type": "string",
"default": "ALL",
"description": "Filter by active status (e.g. ALL, ACTIVE, INACTIVE)"
},
"end_cursor": {
"type": "string",
"default": "",
"description": "Pagination cursor for next page of results"
},
"after_time": {
"type": "string",
"default": "",
"description": "Filter ads created after this time"
},
"before_time": {
"type": "string",
"default": "",
"description": "Filter ads created before this time"
},
"sort_data": {
"type": "string",
"default": "",
"description": "Sort order for results"
}
}
},
"example": {
"query": "",
"ad_page_id": "1633779800049051",
"country": "ALL",
"activeStatus": "ALL",
"end_cursor": "",
"after_time": "",
"before_time": "",
"sort_data": ""
}
}
}
},
"responses": [
{
"statusCode": "200",
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
{
"statusCode": "400",
"description": "Bad request"
},
{
"statusCode": "401",
"description": "Unauthorized - invalid API key"
},
{
"statusCode": "429",
"description": "Rate limit exceeded"
}
]
}Pricing
Credits are deducted from your agntdata balance on each successful API call. Failed requests (4xx/5xx) are not charged.
Related endpoints
Start using this endpoint
Generate your API key and make your first call in under a minute. Free tier available with transparent pricing.