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 detailsReturns 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 crGET - List Meta ad filter optionsReturns 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 crGET - List Meta ads by page IDLists 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-50.
/v1/meta/page1 crGET - List Meta ads by page URLLists 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 crGET - Resolve a Facebook Page IDConverts 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 crGET - Resolve a Meta Ad Library URLParses 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 crGET - Search Meta ads by keywordSearches 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-50.
/v1/meta/search1 crGET - Search Meta advertisersSearches 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 crGET
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.