Meta Ads API
Search Meta's Facebook and Instagram Ad Library by keyword or advertiser. Retrieve ad details, advertiser pages, filter options, and API parameters from public Ad Library URLs.
8 endpoints
Endpoints
Each endpoint links to its request parameters, response schema, and code examples.
- Get Meta ad details (v1)GETReturns public metadata for one Meta ad, including its advertiser. Requires ad_archive_id and the advertiser page_id, both from a search or page-ads result. Optional country sets the region; raw returns the unprocessed payload.
/v1/meta/ad-details1 cr - List Meta ad filter options (v1)GETReturns the languages, advertiser pages, and regions that match required query_string in the Meta Ad Library. Optional ad_type, country, and search_type set the context; raw returns the unprocessed payload.
/v1/meta/filter-options1 cr - List Meta ads by page ID (v1)GETLists ads from the public Meta Ad Library for one advertiser, identified by required page_id. Filter by country, status, media type, dates, language, and platform. Use cursor to page; page_size is 1-10.
/v1/meta/page1 cr - List Meta ads by page URL (v1)GETLists Meta Ad Library ads for a Facebook Page given its url (page URL or username), with no numeric page_id needed. Filters and cursor pagination match Get Page Ads.
/v1/meta/page-by-url1 cr - Resolve a Facebook Page ID (v1)GETConverts a Facebook Page url (page URL or username) to the numeric Ad Library page_id used by the page endpoints. A bare numeric id or a profile.php?id= URL is returned as-is.
/v1/meta/page-id1 cr - Resolve a Meta Ad Library URL (v1)GETParses a public Facebook Ad Library search or page-browse url and returns the matching operation (search or page) with its parameters. It returns resolution data only, not ads.
/v1/meta/resolve-url1 cr - Search Meta ads by keyword (v1)GETSearches the public Meta Ad Library (Facebook and Instagram ads) for required q. Filter by country, delivery status, ad type, media type, dates, language, platform, advertiser page, and reach. Use cursor to page; page_size is 1-10.
/v1/meta/search1 cr - Search Meta advertisers (v1)GETSearches the Meta Ad Library for advertiser pages matching required q. Returns page IDs and verification details to use with the page endpoints. Optional country and ad_type narrow results; raw returns the unprocessed payload.
/v1/meta/search-pages1 cr
What you can build
- Compare ad copy and creative across advertisers.
- Track changes in a brand's publicly listed campaigns.
Make your first request
Replace the placeholders with your input values. The endpoint reference explains each input and the returned fields.
curl -X GET "https://api.toolzerhub.com/v1/meta/search?q=<q>" -H "x-api-key: $TOOLZERHUB_API_KEY"Need a key? Create an account, then review credits and responses and errors.