API Documentation

Everything you need to integrate the RichAPI API into your product.

Ads


Meta Ads Library Scraper

Scrape Meta (Facebook/Instagram) Ad Library — get active ads, creatives, spend ranges, and targeting.

POST
/api/v1/meta_ads_library_scraper_sync

Parameters

FieldTypeRequiredDescription
start_urlstringYesMeta Ads Library search URL
max_resultsintegerNoMax results to return

Response fields

FieldTypeDescription
adArchiveIDstringAd Archive ID
pageNamestringPage name
adStatusstringAd status
adTextstringAd text
publisherPlatformsarrayPublisher platforms
startDatestringStart date
ctaDomainstringCTA domain

Code

curl -X POST https://api.richapi.ai/api/v1/meta_ads_library_scraper_sync \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "start_url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=clay",
  "max_results": 1
}'

Try it

Sign in to test this endpoint with your API key.

Sign in to try


LinkedIn Ad Details

Get full details of a specific LinkedIn ad including variants, impressions by country, and targeting.

POST
/api/v1/ad_details
2 credits per call

Parameters

FieldTypeRequiredDescription
urlstringYesLinkedIn Ad Library detail URL (e.g. https://www.linkedin.com/ad-library/detail/1215501393)

Response fields

FieldTypeDescription
element.idstringAd ID
element.variantsarrayCreative variants (advertiser, content, creativeType)
element.aboutobjectAd metadata: format, advertiserName, paidBy, ranFrom, ranTo
element.impressionsobjectImpression stats: total and byCountry breakdown
element.targetingobjectTargeting info: segments and parameters

Code

curl -X POST https://api.richapi.ai/api/v1/ad_details \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://www.linkedin.com/ad-library/detail/1215501393"
}'

Try it

Sign in to test this endpoint with your API key.

Sign in to try