---
title: "Search public ads by keyword or advertiser"
method: GET
path: "/facebook-ad-library/search"
tags: ["Facebook Ad Library API"]
---

# Search public ads by keyword or advertiser

`GET /facebook-ad-library/search`

## Request

- Base URL: `https://scrappa.co/api`
- URL: `https://scrappa.co/api/facebook-ad-library/search`
- Auth: API key in header `X-API-KEY`

## Query parameters

- `query` string, nullable
- `page_id` string, nullable
- `country` string, nullable
- `ad_type` 'ALL' | 'POLITICAL_AND_ISSUE_ADS' | 'CREDIT_ADS' | 'FINANCIAL_PRODUCTS_AND_SERVICES_ADS' | 'EMPLOYMENT_ADS' | 'HOUSING_ADS' | 'UNCATEGORIZED_ADS' | 'null', nullable
- `media_type` 'ALL' | 'IMAGE' | 'MEME' | 'IMAGE_AND_MEME' | 'VIDEO' | 'NONE' | 'null', nullable
- `active_status` 'ALL' | 'ACTIVE' | 'INACTIVE' | 'null', nullable
- `publisher_platforms[]` string[]
- `start_date` integer, nullable
- `cursor` string, nullable

## Response `200`

- object
  - `search_parameters` object, required
  - `ads` object[], required
  - `ads_count` integer, required
  - `pagination` object, required
    - `next_cursor` string, nullable, required
    - `has_more` boolean, required
  - `response_time_ms` integer, nullable, required

## Other responses

- `401`: Unauthorized - API key is missing or invalid
- `422`: One of the filter values is outside the published set. No upstream request is made and no credits are charged.
- `503`: The public ad library could not be reached. The request is not billed.

## Changes

- **2026-10-20** `bd13167f3f89`: 1 info
  - for the `query` request parameter `cursor`, the maxLength was increased from `500` to `4096`

[Operation history](https://skmtc.dev/scrappa/apis/scrappa-api-documentation/changes/facebook-ad-library/search/get.md)

---

[API](https://skmtc.dev/scrappa/apis/scrappa-api-documentation.md) · [All operations](https://skmtc.dev/scrappa/apis/scrappa-api-documentation/llms.txt) · [OpenAPI document](https://skmtc.dev/scrappa/apis/scrappa-api-documentation/revisions/2f4af6143d10?raw)
