Skip to content

Search for Companies

GET /v1/facebook/adLibrary/search/companies

Searches for companies by name in the Meta Ad Library and returns their page IDs for use with other ad library endpoints. Each result includes page_id, name, category, likes, verification status, and Instagram details like ig_username and ig_followers.

Authentication

All requests require the x-api-key header. Get your key at scrapecreators.com.

Query Parameters

NameTypeRequiredDescriptionExample
querystringyesKeyword to search fornike

Example Request

curl

bash
curl 'https://api.scrapecreators.com/v1/facebook/adLibrary/search/companies?query=nike' \
  -H 'x-api-key: $SCRAPECREATORS_API_KEY'

Node / TypeScript

js
const params = new URLSearchParams({ query: 'nike' });
const res = await fetch(`https://api.scrapecreators.com/v1/facebook/adLibrary/search/companies?${params}`, {
  headers: { 'x-api-key': process.env.SCRAPECREATORS_API_KEY }
});
const data = await res.json();
console.log(data);

Python

python
import os, requests
r = requests.get(
    'https://api.scrapecreators.com/v1/facebook/adLibrary/search/companies',
    headers={'x-api-key': os.environ['SCRAPECREATORS_API_KEY']},
    params={'query': 'nike'},
)
r.raise_for_status()
print(r.json())

CLI

bash
scrapecreators facebook-ads adLibrary-search-companies --help

Example Response

json
{
  "searchResults": [
    {
      "page_id": "51212153078",
      "category": "Product/service",
      "image_uri": "https://scontent.ford4-1.fna.fbcdn.net/v/t39.30808-1/387181570_863325755161415_3589774989337788111_n.jpg?stp=dst-jpg_s200x200_tt6&_nc_cat=103&ccb=1-7&_nc_sid=418b77&_nc_ohc=SzL6LoxpjrMQ7kNvgF5Uyy3&_nc_oc=AdgIflwSC-gA-77yFJHPKOC1dEGUI7YqvKYkmll9n5n8BcvLzRKToufpLG-068BnjE4&_nc_zt=24&_nc_ht=scontent.ford4-1.fna&_nc_gid=AYuU655BQ_HFcmz-fz9agWZ&oh=00_AYDD0ELO2MQikn7TBtxiTe7n64HX6iKiI5ofiI86BQ_jYw&oe=67CAC605",
      "likes": 41136495,
      "verification": "BLUE_VERIFIED",
      "name": "Nike Football",
      "country": null,
      "entity_type": "PERSON_PROFILE",
      "ig_username": "nikefootball",
      "ig_followers": 46451228,
      "ig_verification": true,
      "page_alias": "nikefootball",
      "page_is_deleted": false
    }
  ]
}

Credits

Most ScrapeCreators endpoints consume 1 credit per successful response. Some heavier endpoints (transcripts, AI-driven enrichment, ad detail lookups) may cost more. Check GET /v1/credit-balance for your remaining balance.

Errors

StatusMeaningAction
200Success.Use the JSON payload.
400Invalid or missing parameter.Verify required parameters and value format.
401Missing or invalid x-api-key.Pass a valid API key in the header.
402Out of credits.Top up at scrapecreators.com or wait for plan reset.
404Resource not found or private.Confirm the handle, URL, or id and that the resource is public.
429Rate limited.Backoff and retry with exponential delay.
500Server error or upstream platform failure.Retry with backoff; report persistent errors to support.