Works with the best tools:
Works with the best tools:
Have a question?
Contact usThe Social Media API extracts structured data from LinkedIn, Instagram, Facebook, Twitter/X, TikTok, and Threads — profiles, posts, hashtags, search results, and more. Because of the heavy anti-bot protections on these platforms, this endpoint uses a two-step asynchronous flow to avoid timeouts and blocking.
Why two steps? Social media platforms have strong bot detection. Scraping happens asynchronously in the background — the POST queues your request and returns immediately, while the GET retrieves the result once it's ready. This prevents long-hanging requests and gives you refunds if scraping fails.
POST — Queue the scrape
Send your scraper name, target URL, and parameters. Receive a responseId immediately.
GET — Retrieve the result
Poll with your responseId until the result is ready. If scraping failed, credits are refunded.
| Parameter | Type | Description |
|---|---|---|
| scraper | string | RequiredName of the scraper to use (e.g. linkedinProfile, instagramPost). See the full list below. |
| url | string | OptionalPublic page URL, including https://. Required only for the scrapers shown in the matrix below. |
| account | string | OptionalAccount name for the Instagram profile scraper. Required only for the scrapers shown in the matrix below. |
| search | string | OptionalSearch term for the Twitter / X search scraper. Required only for the scrapers shown in the matrix below. |
| hashtag | string | OptionalHashtag without the # symbol for the TikTok hashtag scraper. Required only for the scrapers shown in the matrix below. |
| keywords | string | OptionalKeywords for the LinkedIn search scraper. Required only for the scrapers shown in the matrix below. |
| keyword | string | OptionalKeyword for the Facebook Marketplace search scraper. Required only for the scrapers shown in the matrix below. |
| city | string | OptionalCity required by the Facebook Marketplace search scraper. Required only for the scrapers shown in the matrix below. |
| country | string | OptionalCountry required by the Facebook Marketplace scrapers. Required only for the scrapers shown in the matrix below. |
Each scraper supports a specific set of parameters. A ✓ indicates the parameter is used by that scraper.
| Scraper name | scraper | url | account | search | hashtag | keywords | keyword | city | country |
|---|---|---|---|---|---|---|---|---|---|
| linkedinProfile | ✓ | ✓ | · | · | · | · | · | · | · |
| linkedinCompanyProfile | ✓ | ✓ | · | · | · | · | · | · | · |
| linkedinPost | ✓ | ✓ | · | · | · | · | · | · | · |
| linkedinSearchResult | ✓ | · | · | · | · | ✓ | · | · | · |
| instagramProfile | ✓ | · | ✓ | · | · | · | · | · | · |
| instagramPost | ✓ | ✓ | · | · | · | · | · | · | · |
| facebookProfile | ✓ | ✓ | · | · | · | · | · | · | · |
| facebookPost | ✓ | ✓ | · | · | · | · | · | · | · |
| facebookOrganization | ✓ | ✓ | · | · | · | · | · | · | · |
| facebookMarketplaceSearch | ✓ | · | · | · | · | · | ✓ | ✓ | ✓ |
| facebookMarketplaceItem | ✓ | ✓ | · | · | · | · | · | · | ✓ |
| Twitter / X | |||||||||
| twitterProfile | ✓ | ✓ | · | · | · | · | · | · | · |
| twitterSearch | ✓ | · | · | ✓ | · | · | · | · | · |
| TikTok | |||||||||
| tiktokProfile | ✓ | ✓ | · | · | · | · | · | · | · |
| tiktokHashtag | ✓ | · | · | · | ✓ | · | · | · | · |
| Threads | |||||||||
| threadsPost | ✓ | ✓ | · | · | · | · | · | · | · |
| threadsProfile | ✓ | ✓ | · | · | · | · | · | · | · |
| Parameter | Type | Default | Scrapers | Description |
|---|---|---|---|---|
| language | string | null | linkedinProfilelinkedinCompanyProfilelinkedinPostlinkedinSearchResult | Language of the LinkedIn page or search. |
| page | string | null | linkedinSearchResult | Result page for the LinkedIn search scraper. |
| Parameter | Type | Default | Scrapers | Description |
|---|---|---|---|---|
| items_limit | int | 50 | facebookMarketplaceSearch | Maximum Marketplace results to retrieve. |
| Parameter | Type | Default | Scrapers | Description |
|---|---|---|---|---|
| number_of_tweets | int | 30 | twitterProfile | Number of tweets to retrieve from a Twitter / X profile. |
| posts_max_count | int | 100 | twitterSearch | Maximum Twitter / X search posts to retrieve. |
| Parameter | Type | Default | Scrapers | Description |
|---|---|---|---|---|
| max_video_count | int | 30 | tiktokHashtag | Maximum number of videos to retrieve. |
Polling strategy: The result may not be ready immediately. Wait a few seconds after the POST before making your first GET request, then retry if needed. If scraping failed, the API returns an error message and your credits are refunded.
| Parameter | Type | Description |
|---|---|---|
| responseId | string | RequiredThe responseId returned by the POST request. |
| scraper | string | RequiredMust match the scraper value used in the POST request. |
| Scenario | Response | Credits |
|---|---|---|
| Scrape successful | JSON data array returned | Consumed normally |
| Result not ready yet | 429 — wait a few seconds before polling again | Not consumed yet |
| Scrape failed (blocked, timeout…) | Error message returned | Refunded |
| Invalid responseId | 400 — responseId does not match one of your requests | Not consumed |
| Invalid credentials | 401 Unauthorized | Not consumed |
const username = "yourUsername";
const apiKey = "yourApiKey";
const auth = "Basic " + Buffer.from(`${username}:${apiKey}`).toString("base64");
function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
async function scrape() {
const startResponse = await fetch("https://api.scraping-bot.io/scrape/data-scraper", {
method: "POST",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
Authorization: auth,
},
body: JSON.stringify({
scraper: "linkedinCompanyProfile",
url: "https://linkedin.com/company/google",
}),
});
const { responseId } = await startResponse.json();
console.log("responseId received: ", responseId);
let finalData;
do {
// checking for response data every 5s or more, there is no need to check more often as scraping data from
// social media is quite longer than normal scraping, and we limit how often you can do those checks
await sleep(5000);
const responseUrl = `https://api.scraping-bot.io/scrape/data-scraper-response?scraper=linkedinCompanyProfile&responseId=${responseId}`;
const pollResponse = await fetch(responseUrl, {
method: "GET",
headers: {
Accept: "application/json",
Authorization: auth,
},
});
finalData = await pollResponse.json();
console.log("data received: ", finalData);
} while (finalData == null || finalData.status === "pending");
return finalData;
}
scrape().then((result) => console.log(result));Here is an example of result you'd receive when using linkedinCompanyProfile scraper as above :
[
{
"id": "google",
"name": "Google",
"country_code": "US,NL,BR,CA,IE,IN,AU,PH,SG,ES,CO,HK,IT,GB,CL,PL,DE,MX,AR,FR,IL,CH,SE",
"locations": [
"1600 Amphitheatre Parkway Mountain View, CA 94043, US",
"111 8th Ave New York, NY 10011, US"
],
"followers": 42759177,
"employees_in_linkedin": 333179,
"about": "A problem isn't truly solved until it's solved for all. Googlers build products that help create opportunities for everyone, whether down the street or acros…",
"specialties": "search, ads, mobile, android, online video, apps, machine learning, virtual reality, cloud, hardware, artificial intelligence, youtube, and software",
"company_size": "10,001+ employees",
"organization_type": "Public Company",
"industries": "Software Development",
"website": "https://goo.gle/3DLEokh",
"company_id": "1441",
"employees": [
{
"img": "https://media.licdn.com/dms/image/v2/C4E03AQG2Lq9P131RPw/profile-displayphoto-shrink_100_100/profile-displayphoto-shrink_100_100/0/1516155461240?e=2147483647…",
"link": "https://www.linkedin.com/in/linusupson?trk=org-employees",
"title": "Linus Upson"
},
{
"img": "https://media.licdn.com/dms/image/v2/C4E03AQHjFT5OOou_gQ/profile-displayphoto-shrink_100_100/profile-displayphoto-shrink_100_100/0/1516155469391?e=2147483647…",
"title": "LinkedIn Member"
}
],
"headquarters": "Mountain View, CA",
"image": "https://media.licdn.com/dms/image/v2/D563DAQGtANfXBwQdug/image-scale_191_1128/B56Z2dEWlfIAAg-/0/1776456657776/google_cover?e=2147483647&v=beta&t=f1V4NKVCAzcu…",
"logo": "https://media.licdn.com/dms/image/v2/D4E0BAQGv3cqOuUMY7g/company-logo_200_200/B4EZmhegXHGcAM-/0/1759350753990/google_logo?e=2147483647&v=beta&t=Hzaw0d0Yz1Yi-…",
"similar": [
{
"Links": "https://www.linkedin.com/company/microsoft?trk=similar-pages",
"subtitle": "Software Development",
"title": "Microsoft",
"location": "Redmond, Washington"
},
{
"Links": "https://www.linkedin.com/company/amazon?trk=similar-pages",
"subtitle": "Software Development",
"title": "Amazon"
}
],
"url": "https://www.linkedin.com/company/google",
"updates": [
{
"likes_count": 196,
"text": "Earlier this month, we announced that you can connect Google Wallet to Personal Intelligence in the Gemini app, and I’m so excited that Google Wallet now wor…",
"time": "14h",
"title": "Stavan Parikh",
"comments_count": 18,
"images": [
"https://media.licdn.com/dms/image/sync/v2/D4E27AQHfSpF3yYwQow/articleshare-shrink_800/B4EaIJXo1JIkAY-/0/1795453522087?e=2147483647&v=beta&t=6cfCBpnt52jlwcZID…"
],
"post_url": "https://www.linkedin.com/posts/activity-7530697442309222400-vVww",
"post_id": "7530733569380356096",
"date": "2026-11-23T20:46:37.204Z",
"tagged_companies": null,
"tagged_people": null,
"repost": {
"tagged_companies": null,
"tagged_users": null,
"images": null,
"videos": null,
"external_links": null,
"repost_hangtags": null
},
"text_html": "Earlier this month, we announced that you can connect Google Wallet to Personal Intelligence in the Gemini app, and I’m so excited that Google Wallet …"
},
{
"likes_count": 379,
"text": "With Gemini 4 Neon joining our slate of new Gemini models, here’s how the lineup breaks down at a glance: ✨ Neon: Deep reasoning across software engineering,…",
"time": "12h",
"title": "Google",
"comments_count": 34,
"post_url": "https://www.linkedin.com/posts/google_our-latest-gemini-models-explained-activity-7530731491056648192-wRQ-",
"post_id": "7530731491056648192",
"date": "2026-11-23T20:38:21.693Z",
"tagged_companies": null,
"tagged_people": null,
"repost": {
"tagged_companies": null,
"tagged_users": null,
"images": null,
"videos": null,
"external_links": null,
"repost_hangtags": null
},
"text_html": "With Gemini 4 Neon joining our slate of new Gemini models, here’s how the lineup breaks down at a glance: \n\n✨ Neon: Deep reasoning across softw…"
}
],
"affiliated": [
{
"title": "Google for Developers",
"subtitle": "Technology, Information and Internet",
"location": "Mountain View, CA",
"Links": "https://www.linkedin.com/showcase/googledevelopers/?trk=affiliated-pages"
},
{
"title": "Google Cloud",
"subtitle": "Software Development",
"location": "Mountain View, California",
"Links": "https://www.linkedin.com/showcase/google-cloud/?trk=affiliated-pages"
}
],
"formatted_locations": [
"1600 Amphitheatre Parkway, Mountain View, CA 94043, US",
"111 8th Ave, New York, NY 10011, US"
],
"get_directions_url": [
{
"directions_url": "https://www.bing.com/maps?where=1600+Amphitheatre+Parkway+Mountain+View+94043+CA+US&trk=org-locations_url"
},
{
"directions_url": "https://www.bing.com/maps?where=111+8th+Ave+New+York+10011+NY+US&trk=org-locations_url"
}
],
"description": "Google | 42,759,177 followers on LinkedIn. A problem isn't truly solved until it's solved for all. Googlers build products that help create opportuni…",
"additional_information": "Additional jobs info: Google (14,143 open jobs). Analyst (63,799 open jobs). Engineer (79,088 open jobs). Project Manager (33,848 open jobs). Developer (33,4…",
"country_codes_array": [
"US",
"NL"
],
"alumni": null,
"alumni_information": null,
"website_simplified": "goo.gle",
"unformatted_about": "\n A problem isn't truly solved until it's solved for all. Googlers build products that help create opportunities for everyone, whether down the …",
"timestamp": "2026-11-24T08:42:34.781Z",
"input": {
"url": "https://www.linkedin.com/company/google"
}
}
]