Facebookget/fetch_search_ads_pages

Fetch Search Ads Pages (GET)

Meta Ads Library Search
Cost / request

$0.01

Response format

JSON

Protocol

REST

About this endpoint

Access Facebook data through agntdata: Fetch Search Ads Pages (GET). 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

AI agents that need Facebook data in structured form
Analytics and monitoring pipelines for Facebook content
Research and GTM workflows that combine Facebook signals with other data

Parameters

NameInTypeRequiredDescription
countryquerystringoptional
after_timequerystringoptional
before_timequerystringoptional
ad_page_idquerystringoptionalFacebook AD Page ID. Used only if `query` is not provided.
activeStatusquerystringoptional
end_cursorquerystringoptional
queryquerystringoptionalDefault: for kids

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__GET",
  "method": "get",
  "path": "/fetch_search_ads_pages",
  "summary": "Fetch Search Ads Pages (GET)",
  "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": [
    {
      "name": "country",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "after_time",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "before_time",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "ad_page_id",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string"
      },
      "description": "Facebook AD Page ID. Used only if `query` is not provided."
    },
    {
      "name": "activeStatus",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "end_cursor",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "query",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string",
        "default": "for kids"
      }
    }
  ],
  "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

$0.01per successful request

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.

Facebook APIFacebook data APIfetch search ads pages (get) APIAI agents data APIFacebook APIFacebook data APIFacebook for AI agents