Docs · Search Ad Library ads
Search Ad Library ads
Find ads in Meta's Ad Library by keyword, with their copy, media, landing page and run dates.
https://api.lurkapi.com /v1/facebook/adLibrary/search/adsWhen to use this
Use it to see how a whole market advertises: the angles, offers and formats that keep running. For one advertiser's ads, use company ads (facebook_company_ads) instead. Stopped ads are included unless you pass status=active.
It searches every ad in Meta's Ad Library, the same as typing into the search box at facebook.com/ads/library. Filter by country, status, format, language and date range. The most-seen ads come first by default.
Pagination. The first page has up to 30 ads and searchResultsCount, the estimated total. For more, pass cursor back with the same filters. Later pages have up to 10 ads (Facebook's own page size), and searchResultsCount is null there. cursor is null on the last page.
Example request
Copy one and replace YOUR_API_KEY with your API key (get one free). The code versions read the key from the LURKAPI_API_KEY environment variable instead.
curl "https://api.lurkapi.com/v1/facebook/adLibrary/search/ads?query=running+shoes&country=US&status=active" \
-H "x-api-key: YOUR_API_KEY"Paste it into a terminal, with your key in place of YOUR_API_KEY.
const params = new URLSearchParams({
query: "running shoes",
country: "US",
status: "active",
});
const res = await fetch(`https://api.lurkapi.com/v1/facebook/adLibrary/search/ads?${params}`, {
headers: { "x-api-key": process.env.LURKAPI_API_KEY },
});
const data = await res.json();
if (!data.success) throw new Error(`${data.code}: ${data.error}`);
console.log(data.searchResults);Node 18+. Save it as lurk.mjs and run node lurk.mjs. It reads your key from LURKAPI_API_KEY.
import os
import requests
res = requests.get(
"https://api.lurkapi.com/v1/facebook/adLibrary/search/ads",
params={
"query": "running shoes",
"country": "US",
"status": "active",
},
headers={"x-api-key": os.environ["LURKAPI_API_KEY"]},
timeout=60,
)
data = res.json()
if not data["success"]:
raise RuntimeError(f"{data['code']}: {data['error']}")
print(data["searchResults"])Run pip install requests, save it as lurk.py and run python lurk.py. It reads your key from LURKAPI_API_KEY.
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"os"
"time"
)
func main() {
params := url.Values{}
params.Set("query", "running shoes")
params.Set("country", "US")
params.Set("status", "active")
req, _ := http.NewRequest("GET", "https://api.lurkapi.com/v1/facebook/adLibrary/search/ads?"+params.Encode(), nil)
req.Header.Set("x-api-key", os.Getenv("LURKAPI_API_KEY"))
client := &http.Client{Timeout: 60 * time.Second}
res, err := client.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
var data map[string]any
if err := json.NewDecoder(res.Body).Decode(&data); err != nil {
panic(err)
}
if data["success"] != true {
panic(fmt.Sprintf("%v: %v", data["code"], data["error"]))
}
out, _ := json.MarshalIndent(data["searchResults"], "", " ")
fmt.Println(string(out))
}Save it as main.go and run go run main.go. It reads your key from LURKAPI_API_KEY.
<?php
$params = http_build_query([
'query' => 'running shoes',
'country' => 'US',
'status' => 'active',
]);
$context = stream_context_create(['http' => [
'header' => 'x-api-key: ' . getenv('LURKAPI_API_KEY'),
'timeout' => 60,
'ignore_errors' => true,
]]);
$body = file_get_contents('https://api.lurkapi.com/v1/facebook/adLibrary/search/ads?' . $params, false, $context);
$data = json_decode($body, true);
if (!$data['success']) {
throw new Exception("{$data['code']}: {$data['error']}");
}
print_r($data['searchResults']);Save it as lurk.php and run php lurk.php. It reads your key from LURKAPI_API_KEY.
require 'json'
require 'net/http'
uri = URI('https://api.lurkapi.com/v1/facebook/adLibrary/search/ads')
uri.query = URI.encode_www_form(
'query' => 'running shoes',
'country' => 'US',
'status' => 'active',
)
req = Net::HTTP::Get.new(uri)
req['x-api-key'] = ENV.fetch('LURKAPI_API_KEY')
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https', read_timeout: 60) do |http|
http.request(req)
end
data = JSON.parse(res.body)
raise "#{data['code']}: #{data['error']}" unless data['success']
puts JSON.pretty_generate(data['searchResults'])Save it as lurk.rb and run ruby lurk.rb. It reads your key from LURKAPI_API_KEY.
Parameters
Add them to the URL after a ?, as in ?query=running+shoes&country=US&status=active. Join several with &.
| Parameter | Description |
|---|---|
querystringrequired | Keywords to search ad text for, e.g. running shoes.
|
search_typestringoptional | keyword_unordered matches all words in any order; keyword_exact_phrase matches the phrase as typed.
|
countrystringoptional | The country the ad ran in, as a 2-letter code (US, GB, DE…), or ALL for every country. One country per request.
|
statusstringoptional | Only ads that are running now (active), only stopped ads (inactive), or both (all).
|
media_typestringoptional | Ad format. meme is Facebook's name for an image with text. none means text-only ads.
|
ad_typestringoptional | Ad category. Political and issue ads also show spend and impression ranges.
|
languagestringoptional | Language of the ad text as an ISO 639-1 code, e.g. en or es. |
sort_bystringoptional | total_impressions puts the most-seen ads first. relevancy_monthly_grouped puts the newest first.
|
start_datestringoptional | Only ads shown on or after this date (YYYY-MM-DD). The ad itself may have launched earlier. |
end_datestringoptional | Only ads shown on or before this date (YYYY-MM-DD). |
cursorstringoptional | The cursor from the previous response, to get the next page. Keep every other param the same. |
trimbooleanoptional | true leaves out image and video URLs, including those in snapshot.cards, for a much smaller response. All text stays.
|
Example response
A real response, captured from the live API. Lists are trimmed to a couple of items, and long text such as media links is cut short with ….
Show the example response (7 KB)Hide
{
"success": true,
"credits_remaining": 999,
"credits_charged": 1,
"searchResults": [
{
"ad_archive_id": "1279489107485101",
"ad_id": null,
"categories": [
"UNKNOWN"
],
"collation_count": 3,
"collation_id": "955107020207956",
"contains_digital_created_media": false,
"contains_sensitive_content": false,
"currency": "",
"end_date": 1790751600,
"end_date_string": null,
"fev_info": null,
"gated_type": "ELIGIBLE",
"has_user_reported": false,
"hide_data_status": "NONE",
"impressions_with_index": {
"impressions_text": null,
"impressions_index": -1
},
"is_aaa_eligible": false,
"is_active": true,
"menu_items": [],
"page_id": "103032366405927",
"page_is_deleted": false,
"page_name": "HOKA",
"publisher_platform": [
"FACEBOOK",
"INSTAGRAM"
],
"reach_estimate": null,
"regional_regulation_data": {
"finserv": {
"is_deemed_finserv": false,
"is_limited_delivery": false
},
"tw_anti_scam": {
"is_limited_delivery": false
}
},
"report_count": null,
"snapshot": {
"additional_info": null,
"branded_content": null,
"brazil_tax_id": null,
"byline": null,
"caption": "HOKA.com",
"cards": [],
"country_iso_code": null,
"cta_text": "Learn more",
"cta_type": "LEARN_MORE",
"disclaimer_label": null,
"display_format": "IMAGE",
"ec_certificates": [],
"event": null,
"extra_images": [],
"extra_links": [],
"extra_texts": [],
"extra_videos": [],
"images": [
{
"image_crops": [],
"original_image_url": "https://scontent-sin11-2.xx.fbcdn.net/v/t39.35426-6/660610392_9315190863…",
"resized_image_url": "https://scontent-sin6-3.xx.fbcdn.net/v/t39.35426-6/658157694_15247761589…",
"watermarked_resized_image_url": ""
}
],
"is_reshared": false,
"link_description": "From first summits to 5Ks, HOKA designs running shoes and gear built to …",
"link_url": "https://www.hoka.com/en/us/fly-human-fly/?utm_source=facebookinstagram&u…",
"page_categories": [
"Outdoor & Sporting Goods Company"
],
"page_id": "103032366405927",
"page_is_deleted": false,
"page_like_count": 1218804,
"page_name": "HOKA",
"page_profile_picture_url": "https://scontent-sin2-1.xx.fbcdn.net/v/t39.35426-6/661719637_14799039102…",
"page_profile_uri": "https://facebook.com/hoka",
"root_reshared_post": null,
"title": "FLY HUMAN FLY™",
"videos": [],
"body": {
"text": "The legs give out. The heart doesn’t. Together We Fly Higher."
}
},
"spend": null,
"start_date": 1775026800,
"start_date_string": null,
"state_media_run_label": null,
"targeted_or_reached_countries": [],
"total_active_time": null,
"url": null
},
{
"ad_archive_id": "1672311423863159",
"ad_id": null,
"categories": [
"UNKNOWN"
],
"collation_count": null,
"collation_id": null,
"contains_digital_created_media": false,
"contains_sensitive_content": false,
"currency": "",
"end_date": 1790751600,
"end_date_string": null,
"fev_info": null,
"gated_type": "ELIGIBLE",
"has_user_reported": false,
"hide_data_status": "NONE",
"impressions_with_index": {
"impressions_text": null,
"impressions_index": -1
},
"is_aaa_eligible": false,
"is_active": true,
"menu_items": [],
"page_id": "9062006483",
"page_is_deleted": false,
"page_name": "REI",
"publisher_platform": [
"FACEBOOK",
"INSTAGRAM"
],
"reach_estimate": null,
"regional_regulation_data": {
"finserv": {
"is_deemed_finserv": false,
"is_limited_delivery": false
},
"tw_anti_scam": {
"is_limited_delivery": false
}
},
"report_count": null,
"snapshot": {
"additional_info": null,
"branded_content": null,
"brazil_tax_id": null,
"byline": null,
"caption": "rei.com",
"cards": [],
"country_iso_code": null,
"cta_text": "Shop now",
"cta_type": "SHOP_NOW",
"disclaimer_label": null,
"display_format": "VIDEO",
"ec_certificates": [],
"event": null,
"extra_images": [],
"extra_links": [],
"extra_texts": [],
"extra_videos": [],
"images": [],
"is_reshared": false,
"link_description": "Trail-running gear",
"link_url": "https://www.rei.com/c/trail-running-shoes?cm_mmc=sm_fbig_76501-_-hero_tr…",
"page_categories": [
"Outdoor & Sporting Goods Company"
],
"page_id": "9062006483",
"page_is_deleted": false,
"page_like_count": 2113405,
"page_name": "REI",
"page_profile_picture_url": "https://scontent-sin6-3.xx.fbcdn.net/v/t39.35426-6/753881065_89714526678…",
"page_profile_uri": "https://facebook.com/REI",
"root_reshared_post": null,
"title": "Get your gear for the trail",
"videos": [
{
"video_hd_url": "https://video-sin2-2.xx.fbcdn.net/o1/v/t2/f2/m366/AQNiLrO3Mqup5to6yp2shI…",
"video_preview_image_url": "https://scontent-sin11-1.xx.fbcdn.net/v/t39.35426-6/753145822_1584018949…",
"video_sd_url": "https://video-sin11-1.xx.fbcdn.net/o1/v/t2/f2/m412/AQOUVO8Jd7h4piW3xQtRw…",
"watermarked_video_hd_url": null,
"watermarked_video_sd_url": null
}
],
"body": {
"text": "Shoes required. Fun type may vary."
}
},
"spend": null,
"start_date": 1785481200,
"start_date_string": null,
"state_media_run_label": null,
"targeted_or_reached_countries": [],
"total_active_time": null,
"url": null
}
],
"searchResultsCount": 37660,
"cursor": "AQHTNrjEvTw_VUW75_xQkUb5_yjH682WwzNgh8oZPUIyUZdNkk1m_9q-4jP_law5Dv9p"
}Response fields
Every field in a successful response, and what it means. A name with [] belongs to each item of a list: searchResults[].ad_archive_id is the ad_archive_id of every item in searchResults. null means there's no value.
Show all 104 fieldsHide
| Field | Type | Description |
|---|---|---|
| success | true | Always true here; errors have success: false. |
| credits_remaining | number | Your balance after this call. On anonymous playground calls: free tries left today. |
| credits_charged | number | Credits this call cost; 0 on free endpoints. On anonymous playground calls: tries used (1). |
| searchResults | object[] | Matching ads. |
| searchResults[].ad_archive_id | stringcan be null | The Ad Library id. Pass it as id to the ad details endpoint. |
| searchResults[].ad_id | stringcan be null | Meta's internal ad id. null in every response we've seen; use the Ad Library id. |
| searchResults[].page_id | stringcan be null | The advertiser's Facebook page id. Pass it as pageId to the company ads endpoint. |
| searchResults[].page_name | stringcan be null | The advertiser's page name. |
| searchResults[].is_active | boolean | Whether the ad is running now. |
| searchResults[].start_date | numbercan be null | The day the ad started running, as Unix seconds at midnight Pacific time. |
| searchResults[].end_date | numbercan be null | The day the ad stopped, or its latest delivery day if still running, as Unix seconds at midnight Pacific time. |
| searchResults[].start_date_string | stringcan be null | The same date as ISO 8601 text when Facebook includes it; null in every response we've seen, so use the Unix seconds field. |
| searchResults[].end_date_string | stringcan be null | The same date as ISO 8601 text when Facebook includes it; null in every response we've seen, so use the Unix seconds field. |
| searchResults[].total_active_time | numbercan be null | Seconds the ad has run, when Facebook reports it; usually null. |
| searchResults[].publisher_platform | string[] | Where it ran, uppercase: FACEBOOK, INSTAGRAM, AUDIENCE_NETWORK, MESSENGER, THREADS. |
| searchResults[].collation_count | numbercan be null | How many near-identical versions are grouped under this ad. A high count means the advertiser is scaling it; null for a single version. |
| searchResults[].collation_id | stringcan be null | Id shared by the grouped versions of this ad; null for a single version. |
| searchResults[].snapshot | object | The creative: copy, media, landing page and advertiser details. |
| searchResults[].snapshot.page_id | stringcan be null | The advertiser's page id (same as the ad's). |
| searchResults[].snapshot.page_name | stringcan be null | The advertiser's page name as shown on the ad. |
| searchResults[].snapshot.page_profile_uri | stringcan be null | The advertiser's Facebook page URL. |
| searchResults[].snapshot.page_profile_picture_url | stringcan be null | The advertiser's profile picture, 60×60 px. |
| searchResults[].snapshot.page_like_count | numbercan be null | Followers of the advertiser's page. |
| searchResults[].snapshot.page_categories | string[] | Page categories, e.g. ["Outdoor & Sporting Goods Company"]. |
| searchResults[].snapshot.page_is_deleted | boolean | Whether the advertiser's page has been deleted. |
| searchResults[].snapshot.title | stringcan be null | Headline under the creative; null when there is none. |
| searchResults[].snapshot.caption | stringcan be null | Display link under the creative, usually the domain (e.g. HOKA.com). |
| searchResults[].snapshot.link_url | stringcan be null | Landing page the ad sends people to, UTM tags included. |
| searchResults[].snapshot.link_description | stringcan be null | Text under the headline; null when there is none. |
| searchResults[].snapshot.cta_text | stringcan be null | Button label, e.g. "Shop now". |
| searchResults[].snapshot.cta_type | stringcan be null | Button type, e.g. SHOP_NOW, LEARN_MORE, NO_BUTTON. |
| searchResults[].snapshot.display_format | stringcan be null | Creative format, e.g. IMAGE, VIDEO, DCO (dynamic creative), DPA (dynamic product ad) or MULTI_IMAGES. For DCO and DPA ads the creative is in cards. |
| searchResults[].snapshot.images | object[] | Image creatives. Empty for video and card-based ads, and with trim=true. |
| searchResults[].snapshot.images[].original_image_url | stringcan be null | Full-size image URL. Facebook's links expire after a few days, so download what you need. |
| searchResults[].snapshot.images[].resized_image_url | stringcan be null | 600 px image URL, good for thumbnails. |
| searchResults[].snapshot.images[].watermarked_resized_image_url | string | Watermarked copy; empty or null in every response we've seen. |
| searchResults[].snapshot.images[].image_crops | any[] | Facebook internal field; an empty array in every response we've seen. Crop hints for the image. |
| searchResults[].snapshot.videos | object[] | Video creatives. Empty for image and card-based ads, and with trim=true. |
| searchResults[].snapshot.videos[].video_hd_url | stringcan be null | HD video file URL; null if Facebook has no HD version. |
| searchResults[].snapshot.videos[].video_sd_url | stringcan be null | SD video file URL. |
| searchResults[].snapshot.videos[].video_preview_image_url | stringcan be null | Poster frame (still image) URL. |
| searchResults[].snapshot.videos[].watermarked_video_hd_url | stringcan be null | Watermarked copy; empty or null in every response we've seen. |
| searchResults[].snapshot.videos[].watermarked_video_sd_url | stringcan be null | Watermarked copy; empty or null in every response we've seen. |
| searchResults[].snapshot.cards | object[] | Carousel, dynamic-creative and product versions, each with its own copy and media. With trim=true the text stays and media URLs are null. |
| searchResults[].snapshot.cards[].title | stringcan be null | This version's headline. |
| searchResults[].snapshot.cards[].body | stringcan be null | This version's primary text. |
| searchResults[].snapshot.cards[].caption | stringcan be null | This version's display link, usually the domain. |
| searchResults[].snapshot.cards[].cta_text | stringcan be null | Button label, e.g. "Shop now". |
| searchResults[].snapshot.cards[].cta_type | stringcan be null | Button type, e.g. SHOP_NOW, LEARN_MORE. |
| searchResults[].snapshot.cards[].link_url | stringcan be null | This version's landing page URL. |
| searchResults[].snapshot.cards[].link_description | stringcan be null | Text under the headline; null when there is none. |
| searchResults[].snapshot.cards[].original_image_url | stringcan be null | Full-size image URL; null for video versions. |
| searchResults[].snapshot.cards[].resized_image_url | stringcan be null | 600 px image URL; null for video versions. |
| searchResults[].snapshot.cards[].watermarked_resized_image_url | string | Watermarked copy; empty or null in every response we've seen. |
| searchResults[].snapshot.cards[].image_crops | any[] | Facebook internal field; an empty array in every response we've seen. Crop hints for the image. |
| searchResults[].snapshot.cards[].video_hd_url | stringcan be null | HD video file URL; null for image versions. |
| searchResults[].snapshot.cards[].video_sd_url | stringcan be null | SD video file URL; null for image versions. |
| searchResults[].snapshot.cards[].video_preview_image_url | stringcan be null | Poster frame URL; null for image versions. |
| searchResults[].snapshot.cards[].watermarked_video_hd_url | stringcan be null | Watermarked copy; empty or null in every response we've seen. |
| searchResults[].snapshot.cards[].watermarked_video_sd_url | stringcan be null | Watermarked copy; empty or null in every response we've seen. |
| searchResults[].snapshot.byline | stringcan be null | Who paid for the ad (the "Paid for by" name) on political and issue ads; null on most others. |
| searchResults[].snapshot.disclaimer_label | stringcan be null | The disclaimer kind on political and issue ads, e.g. PAID_FOR_BY (the name is in byline); null otherwise. |
| searchResults[].snapshot.country_iso_code | stringcan be null | Facebook internal field; null in every response we've seen. A country code on some ads. |
| searchResults[].snapshot.is_reshared | boolean | Whether the ad reshares an existing post (see root_reshared_post). |
| searchResults[].snapshot.root_reshared_post | any | The original post when is_reshared is true; null otherwise. |
| searchResults[].snapshot.branded_content | any | Paid partnership details when the ad is branded content; null otherwise. |
| searchResults[].snapshot.additional_info | any | Facebook internal field; null in every response we've seen. |
| searchResults[].snapshot.brazil_tax_id | any | Advertiser tax id shown on ads under Brazil's rules; null otherwise. |
| searchResults[].snapshot.ec_certificates | any[] | Facebook internal field; an empty array in every response we've seen. |
| searchResults[].snapshot.event | any | Event details on event ads; null otherwise. |
| searchResults[].snapshot.extra_images | any[] | More images from dynamic creative; usually empty. |
| searchResults[].snapshot.extra_links | any[] | More landing page URLs from dynamic creative; usually empty. |
| searchResults[].snapshot.extra_texts | any[] | More text variations from dynamic creative; usually empty. |
| searchResults[].snapshot.extra_videos | any[] | More videos from dynamic creative; usually empty. |
| searchResults[].snapshot.body | objectcan be null | Primary text as { text }; null when the copy is only in cards. |
| searchResults[].snapshot.body.text | stringcan be null | The ad's primary text. |
| searchResults[].categories | string[] | Special ad categories Facebook assigned. ["UNKNOWN"] for ordinary ads. |
| searchResults[].targeted_or_reached_countries | string[] | Countries the ad targeted or reached, when Facebook discloses them; empty in most results. |
| searchResults[].currency | string | Currency code of spend (e.g. USD) when spend is reported; an empty string otherwise. |
| searchResults[].spend | any | Spend range as Facebook shows it, e.g. "$600K - $700K" or ">$1M" (see currency). Political and issue ads only; null otherwise. |
| searchResults[].impressions_with_index | object | Impressions range, reported for political and issue ads only. |
| searchResults[].impressions_with_index.impressions_text | stringcan be null | The range as Facebook shows it; null when not reported. |
| searchResults[].impressions_with_index.impressions_index | number | Facebook's bucket number for the range; -1 when not reported. Ad details usually omit it. |
| searchResults[].reach_estimate | any | Estimated reach as Facebook shows it, e.g. ">1M", on political and issue ads and some EU-delivered ads; null otherwise. |
| searchResults[].url | stringcan be null | Ad Library link for this ad. null in every response we've seen; build it as https://www.facebook.com/ads/library/?id=<Ad Library id>. |
| searchResults[].contains_digital_created_media | boolean | Whether Facebook labels the creative as AI-generated or digitally altered. |
| searchResults[].contains_sensitive_content | boolean | Facebook internal field; false in every response we've seen. Facebook's sensitive-content flag. |
| searchResults[].gated_type | string | Facebook internal field; ELIGIBLE (lowercase in ad details) in every response we've seen. |
| searchResults[].has_user_reported | boolean | Whether the viewer reported the ad. Always false, since we read the Ad Library logged out. |
| searchResults[].hide_data_status | string | Facebook internal field; NONE in every response we've seen. |
| searchResults[].is_aaa_eligible | boolean | Facebook flag, true on a few ads; meaning undocumented. Ad details' aaa_info holds the related data when present. |
| searchResults[].menu_items | any[] | Facebook internal field; an empty array in every response we've seen. |
| searchResults[].page_is_deleted | boolean | Whether the advertiser's page has been deleted. |
| searchResults[].regional_regulation_data | object | Delivery limits under regional ad rules. |
| searchResults[].regional_regulation_data.finserv | object | Financial-services ad rules. |
| searchResults[].regional_regulation_data.finserv.is_deemed_finserv | boolean | Facebook treats the ad as a financial-services ad. |
| searchResults[].regional_regulation_data.finserv.is_limited_delivery | boolean | Delivery is limited under financial-services rules. |
| searchResults[].regional_regulation_data.tw_anti_scam | object | Taiwan's anti-scam ad rules. |
| searchResults[].regional_regulation_data.tw_anti_scam.is_limited_delivery | boolean | Delivery is limited under Taiwan's anti-scam rules. |
| searchResults[].report_count | numbercan be null | Times the ad was reported, when disclosed; null in every response we've seen. |
| searchResults[].fev_info | any | Facebook internal field; null in every response we've seen. |
| searchResults[].state_media_run_label | any | Label for ads run by state-controlled media; null otherwise. |
| searchResultsCount | numbercan be null | Total matching ads, as Facebook estimates it. Only on the first page; null on cursor pages. |
| cursor | stringcan be null | Pass as cursor for the next page. null on the last page. |
Pagination
Results come in pages. For the next page, repeat the call with the same parameters and add the response's cursor as cursor. On the last page, cursor is null. Each page costs 1 credit.
let cursor = null;for (let page = 1; page <= 5; page++) {const params = new URLSearchParams({ query: "running shoes", country: "US", status: "active" });if (cursor) params.set("cursor", cursor);const res = await fetch(`https://api.lurkapi.com/v1/facebook/adLibrary/search/ads?${params}`, {headers: { "x-api-key": process.env.LURKAPI_API_KEY },});const data = await res.json();if (!data.success) throw new Error(`${data.code}: ${data.error}`);console.log(data.searchResults);cursor = data.cursor;if (!cursor) break; // last page}Cost and freshness
Each call costs 1 credit. Calls turned away before they reach the platform (invalid parameters, a key or balance problem, a rate limit) are free, and so are 5xx errors. A not_found is charged, since the platform was checked. How charging works.
Answers are cached for up to 30 minutes. A repeat call within that time can return the same data, and costs the same.
Errors
A failed call returns success: false, an error message, a code your program can check, and a docs link. These are the errors this endpoint can return. All error codes.
| Status | Code | Meaning |
|---|---|---|
| 401 | missing_api_key | No API key was sent. Put it in the x-api-key header. |
| 401 | invalid_api_key | This key doesn't exist or was revoked. |
| 402 | insufficient_credits | Not enough credits for this call. Buy a pack, or wait for tomorrow's free top-up. |
| 402 | over_max_credits | This call would cost more than the max_credits you set. The error says what it needs; raise max_credits to allow it. Not charged. |
| 403 | account_suspended | This account is suspended. Email support@lurkapi.com. Not charged. |
| 405 | method_not_allowed | Endpoints only take GET, with parameters in the URL. |
| 429 | rate_limited | Too many calls in a short time. Wait as many seconds as the retry-after header says, then retry. |
| 500 | internal_error | Something broke on our side. Retry. Not charged. |
| 502 | upstream_error | The platform didn't send a usable answer. Retry. Not charged. |
| 503 | upstream_busy | All our connections to the platform are busy. Retry in a few seconds. Not charged. |
| 504 | upstream_timeout | The platform took over 30 seconds to answer (90 for web pages). Retry. Not charged. |
Use it in Claude
Connect LurkAPI to Claude and ask in plain English. This endpoint is the facebook_search_ads tool. For example:
Use LurkAPI's facebook_search_ads tool with query "running shoes", country "US", status "active", then summarize what you find.Claude calls facebook_search_ads with arguments like these, and each call costs 1 credit:
{"query": "running shoes","country": "US","status": "active"}To save tokens, tool results leave out empty fields, keep one URL per image or video, and give transcripts as plain text unless you pass timestamps=true. A result over 45,000 characters comes in parts. Its _note gives the offset for the next part, and later parts are free for 15 minutes. Pass trim=false for the full response.
From the blog
All posts
· 5 min read
Best Reddit scrapers in 2026: price and speed compared
LurkAPI is the best Reddit scraper: 1,000 subreddit posts for $0.04, a feed in 0.92 s, and search and comment threads on the same key.

· 5 min read
Instagram MCP server for Claude and ChatGPT
Claude can’t read Instagram on its own. Add one MCP URL and it reads any public account’s posts, reels and comments, 1 credit a call, no Meta app.

· 5 min read
Best Threads scrapers in 2026: what 1,000 posts cost
LurkAPI is the best Threads scraper: 1,000 posts for $0.06, a page in about 1.2 s, and pages back to an account's first post.