{"uid":"cap_rZYaMSBxRqs6pHdqWR20w","slug":"facebook-ads-library-scraper-7b268e21","name":"Facebook Ads Library Scraper","description":"Pay-per-call structured web data. Failed or empty runs are not charged.","url":"https://api.scrapeforagents.tech/v1/facebook-ads?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"country":{"type":"string","default":"ALL","description":"Country code such as US or GB, or ALL. Used only when the URL has no country parameter."},"maxItems":{"type":"integer","default":0,"minimum":0,"description":"Maximum ads across every URL. Set 0 for no overall cap."},"startUrls":{"type":"array","description":"Public Facebook page URLs, Ad Library search URLs, page-filter URLs, or individual ad URLs. Search URLs preserve their country, media, platform, and other URL filters."},"activeStatus":{"enum":["all","active","inactive"],"type":"string","default":"all","description":"Used when the URL has no active_status parameter. An existing URL setting takes priority."},"resultsLimit":{"type":"integer","default":30,"maximum":30,"minimum":1,"description":"Maximum ads to save for each URL. The public page currently exposes at most 30 without authenticated pagination."}}},"responseSchema":{"type":"json","example":{"count":1,"items":[{"adUrl":null,"pageId":null,"pageUrl":null,"inputUrl":null,"pageName":null,"adArchiveId":null,"pageCategories":null,"pageProfilePictureUrl":null}],"product":"facebook-ads"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.025","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.025/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.025","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.025","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_U10VuR6i_pTbra3M7rZXy","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.025","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Scrapes structured ad data from Facebook's public Ad Library given page URLs, search URLs, or individual ad URLs","exampleAgentPrompt":"Pull up to 30 active Facebook ads from Nike's public page at https://www.facebook.com/nike — filter for US only and return the structured ad data including page name, archive IDs, and ad URLs.","exampleUseCases":[{"title":"Competitor ad campaign research","prompt":"Scrape all active Facebook ads from Apple's page at https://www.facebook.com/apple — I want to see what creatives and ad archive IDs they're currently running, limit to 30 results for the US."},{"title":"Ad Library keyword search extraction","prompt":"Extract structured data from this Facebook Ad Library search URL https://www.facebook.com/ads/library/?q=insurance&country=US&active_status=active — get me up to 30 results with page names and ad URLs."},{"title":"Monitoring inactive brand ads","prompt":"Fetch both active and inactive Facebook ads from https://www.facebook.com/coca-cola — I need the page ID, ad archive IDs, and page categories for all ads, max 30 items, country set to ALL."}],"resultDescription":"A JSON object with a count of returned ads and an items array, where each item contains adUrl, pageId, pageUrl, inputUrl, pageName, adArchiveId, pageCategories, and pageProfilePictureUrl for each matched Facebook ad.","failureModes":["Empty result if the Facebook page has no ads or the URL is invalid","HTTP 402 if payment is not provided","Rate limiting or blocking if Facebook throttles public Ad Library access","Schema mismatch if Facebook changes its Ad Library page structure","Country filter may be ignored if the input URL already contains a country parameter"],"whenToPreferThis":"Use this endpoint when you need structured JSON data from the Facebook Ad Library without managing browser automation or authentication. It is pay-per-call with no charge for failed or empty runs, making it cost-effective for ad intelligence tasks. Prefer it over manual scraping or browser-based tools when you need clean, schema-consistent output for competitive ad research.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T00:47:32.535Z","isFirstParty":false,"canonicalSlug":"facebook-ads-library-scraper-7b268e21"}