Social Media Scraper

Public Ad Library API

Social Media Ads API for Public Ad Research

Social Media Scraper lets you query public advertising libraries to collect available ad text, advertiser details, and source links as JSON for competitor research. Run a quick lookup in our browser tool, or pass your API key to fetch structured ad records over REST.

Technical editorial illustration showing a grid of public ad creative cards, a magnifying glass, and a structured record notebook
Editorial technical illustration of public ad-library creative inspection and structured record fields.

What Can You Get from a Public Ads API?

Use the Facebook Ad Library API operation facebook.adlibrary_search_ads to search public ads by keyword. This public ads API returns available titles, text, advertiser details, and source URLs for your research notes.

Advertiser Context and Links

Check returned public author names or identifiers where available, and open the source link to confirm the advertiser and ad context.

Ad Copy and Source URLs

Read available title and text fields, then save each source URL so teammates can inspect the original public record.

Record IDs and Lookup Time

Save returned IDs with your query and collection timestamp to separate repeat runs, leaving missing fields blank or null.

Normalized Public Ad Record Schema
{
  "items": [
    {
      "id": "string",
      "title": "string | null",
      "text": "string | null",
      "url": "string | null"
    }
  ],
  "cursor": "string | null"
}
Example field schema showing expected field names and data types rather than live captured ad results.

What Ad Libraries Can You Search with Our Ads API?

Social Media Scraper provides public ad transparency endpoints across four networks, using each library's supported query, advertiser, date, or region parameters.

PlatformRequest inputAvailable dataAPI docs
FacebookQuery with optional sort_by, search_type, ad_type, country, language, status, media_type, start_date, end_date, trim, and cursorAvailable public Facebook ad search results and optional metadataFacebook Ad Library API docsfacebook.adlibrary_search_ads
TikTokQuery, advertiser_name, or adv_biz_ids with optional start_time, end_time, region, and cursorAvailable public TikTok ad search results and optional metadataTikTok Ad Library API docstiktok.ad_library_search
GoogleDomain, advertiser_id, or topic with optional region, start_date, end_date, platform, format, get_ad_details, and cursorAvailable public Google company ad collection records and optional detailsGoogle company ads API docsgoogle.company_ads
LinkedInCompany, keyword, or companyId with optional countries, startDate, endDate, and paginationTokenAvailable public LinkedIn ad search results and optional metadataLinkedIn ads search API docslinkedin.ads_search

Why Keep Ad Research Separate from Campaign Tools?

Campaign management tools handle ad accounts, bidding, and publishing, whereas public ad research reads disclosed library records. Separating search and JSON export lets teams inspect market messaging without touching live ad accounts.

No Ad Account Setup Needed

Query public ad records with a search term and x-api-key header instead of managing ad-account publishing permissions.

Clean Read-Only Research

Keep competitive ad lookups isolated from live ad budgets and campaign edits so research scripts stay simple and safe.

Ready-to-Use JSON Output

Get structured JSON fields directly for scripts, spreadsheets, or downstream tagging without manual copy-paste.

How Do You Search Public Ads and Save JSON?

Start with a free browser lookup to test keywords, then call facebook.adlibrary_search_ads via GET to get public ad records as JSON. Save the returned items and source URLs into your local files, sheets, or downstream scripts.

  1. Keyword & Filters
  2. Ad Library Lookup
  3. Normalized Records
Illustrative flow from keyword query and optional filters to normalized JSON ad records.

Test Keywords in the Browser

Run a quick search in the free browser tool to see which keywords return useful public ads before writing code.

Call the REST Endpoint with GET

Send a GET request to facebook.adlibrary_search_ads with your query, supported filters, and x-api-key header funded by account balance.

Save JSON and Source Links

Download or write the JSON response to a file or sheet, and keep the source URLs for later review.

How Do You Call the Ads API via GET?

Send a GET request to facebook.adlibrary_search_ads with an x-api-key header and save the normalized JSON output locally. Requires an account API key and balance; missing source fields remain null or absent.

social-media-ads-api.sh
curl --get "https://socialmediascraper.org/v1/facebook/adlibrary_search_ads" \
  --header "x-api-key: $SOCIALSCRAPER_API_KEY" \
  --data-urlencode "query=running"

Copy or download the request, Python script, or n8n workflow, then run it in your own environment with an active API key and balance.

Who Uses Public Ad Records for Creative Briefs?

Teams doing competitor ad research, ad creative research, and advertiser research use public records as examples for creative briefs. Compare the returned hooks, offers, and positioning, then open source links to check the original context.

Marketers Comparing Ad Hooks

Compare opening lines, offers, and calls to action across competing ads to spot common angles before writing new copy.

Agencies Building Creative Boards

Collect public ad text and links into a shared board or sheet so writers and designers can reference examples during brief prep.

Product Teams Checking Positioning

Review how other brands describe features, pricing, or problems in public ads to sharpen product messaging.

What Limits Apply to Public Ad Records?

Public ad library records only show what is publicly disclosed and do not include private ad account data. Treat returned records as research input rather than proof of ad performance or full archive coverage.

No Spend, ROAS, or Conversions

Public ad records do not include private metrics such as ad spend, return on ad spend, conversions, clicks, or audience targeting.

Age Does Not Mean Profit

How long an ad appears in search results does not prove profitability, budget size, or campaign success.

No Media Downloads or Full Archive

Responses do not guarantee media file downloads, landing-page captures, start dates, active status flags, or every historical ad.

What Questions Come Up About Ad Library Searches?

Read the API documentation →

How Can You Test a Keyword Search Now?

Run a keyword lookup in the browser tool to inspect real returned fields before calling the GET endpoint in your workflow.