---
title: "Social Media Scraper API - YouTube, TikTok, Instagram & More"
description: "Social media scraper API: send a YouTube, TikTok, X, LinkedIn, Instagram or Reddit URL, get structured JSON. 15 credits per page (Reddit 50), free tier."
url: https://webscraping.ai/social-media-scraper-api
markdown_index: https://webscraping.ai/llms.txt
---
STRUCTURED DATA API

# Social Media Scraper API

Scrape social media with one endpoint: send a YouTube, TikTok, X, LinkedIn, Instagram or Reddit URL to `/data` and get the page's public data back as clean JSON, in the same envelope for every site. No platform API keys, logins, proxies or parsers to maintain.

[Start Free Trial](https://webscraping.ai/auth/sign_up)[View Documentation](https://webscraping.ai/docs#data)

2,000 free API credits · No credit card required

## Supported social media sites

Send the page's normal URL. The site and page type are detected from it and returned in `request_parameters.provider` and `request_parameters.type`. Each site's guide lists its URL shapes, fields and limits.

[YouTube Scraper API](https://webscraping.ai/youtube-scraper-api): Videos, channels, playlists · 15 credits per page Views, likes, comment count and channel stats per video, a channel's latest videos, a playlist's videos in order, and transcripts on request.

[TikTok Scraper API](https://webscraping.ai/tiktok-scraper-api): Videos, profiles · 15 credits per page Plays, likes, shares, comment count, music and hashtags per video; followers, total likes and bio per profile.

[Twitter (X) Scraper API](https://webscraping.ai/twitter-scraper-api): Posts (tweets), profiles · 15 credits per page Text, likes, reposts, quotes, views, bookmarks and media per post; followers and bio per profile. No X API plan.

[LinkedIn Scraper API](https://webscraping.ai/linkedin-scraper-api): Profiles, companies, jobs · 15 credits per page Public profile, company page and job posting data. No cookies or LinkedIn account.

[Instagram Scraper API](https://webscraping.ai/instagram-scraper-api): Profiles, posts, reels · 15 credits per page Followers, bio and recent posts per profile; caption, likes, latest comments and media per post or reel. No login.

[Reddit Scraper API](https://webscraping.ai/reddit-scraper-api): Posts, subreddits, users · 50 credits per page A post with its nested comment tree, a subreddit's front page, or a user's karma and latest activity.

## One request format for every site

Swap the URL and the same code scrapes a TikTok profile, a LinkedIn company or a subreddit. `country` picks the proxy country (default `us`).

**cURL**

```bash
curl -G "https://api.webscraping.ai/data" \
  --data-urlencode "api_key=YOUR_API_KEY" \
  --data-urlencode "url=https://www.youtube.com/watch?v=dQw4w9WgXcQ"
# Response (excerpt). The envelope is the same for every site:
# {
# "request_parameters": {"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
# "provider": "youtube", "type": "video"},
# "parse_status": "ok",
# "data": {
# "video_id": "dQw4w9WgXcQ",
# "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
# "views": 1819213866, "likes": 19407119, "comment_count": 2400000,
# "channel": {"name": "Rick Astley", "subscribers": 4540000, ...},
# ...
# }
# }
```

**Python**

```python
# pip install webscraping_ai
# https://pypi.org/project/webscraping-ai/
from webscraping_ai import Client

client = Client(api_key="YOUR_API_KEY")
result = client.data("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
print(result["request_parameters"]["provider"], result["parse_status"])
print(result["data"])
# Response (excerpt). The envelope is the same for every site:
# {
# "request_parameters": {"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
# "provider": "youtube", "type": "video"},
# "parse_status": "ok",
# "data": {
# "video_id": "dQw4w9WgXcQ",
# "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
# "views": 1819213866, "likes": 19407119, "comment_count": 2400000,
# "channel": {"name": "Rick Astley", "subscribers": 4540000, ...},
# ...
# }
# }
```

**JavaScript**

```javascript
// npm install webscraping-ai
// https://www.npmjs.com/package/webscraping-ai
import { WebScrapingAI } from 'webscraping-ai';

const client = new WebScrapingAI({ apiKey: 'YOUR_API_KEY' });
const result = await client.data({ url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' });
console.log(result.request_parameters.provider, result.parse_status);
console.log(result.data);
// Response (excerpt). The envelope is the same for every site:
// {
// "request_parameters": {"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
// "provider": "youtube", "type": "video"},
// "parse_status": "ok",
// "data": {
// "video_id": "dQw4w9WgXcQ",
// "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
// "views": 1819213866, "likes": 19407119, "comment_count": 2400000,
// "channel": {"name": "Rick Astley", "subscribers": 4540000, ...},
// ...
// }
// }
```

**PHP**

```php
<?php
// composer require webscraping-ai/webscraping-ai-php
// https://packagist.org/packages/webscraping-ai/webscraping-ai-php
require 'vendor/autoload.php';

use WebScrapingAI\Client;

$client = new Client('YOUR_API_KEY');
$result = $client->data(url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ');
echo $result['request_parameters']['provider'], ' ', $result['parse_status'], "\n";
print_r($result['data']);
// Response (excerpt). The envelope is the same for every site:
// {
// "request_parameters": {"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
// "provider": "youtube", "type": "video"},
// "parse_status": "ok",
// "data": {
// "video_id": "dQw4w9WgXcQ",
// "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
// "views": 1819213866, "likes": 19407119, "comment_count": 2400000,
// "channel": {"name": "Rick Astley", "subscribers": 4540000, ...},
// ...
// }
// }
```

**Ruby**

```ruby
# gem install webscraping_ai
# https://rubygems.org/gems/webscraping_ai
require 'webscraping_ai'

client = WebScrapingAI::Client.new(api_key: 'YOUR_API_KEY')
result = client.data('https://www.youtube.com/watch?v=dQw4w9WgXcQ')
puts "#{result['request_parameters']['provider']} #{result['parse_status']}"
puts result['data'].inspect
# Response (excerpt). The envelope is the same for every site:
# {
# "request_parameters": {"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
# "provider": "youtube", "type": "video"},
# "parse_status": "ok",
# "data": {
# "video_id": "dQw4w9WgXcQ",
# "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
# "views": 1819213866, "likes": 19407119, "comment_count": 2400000,
# "channel": {"name": "Rick Astley", "subscribers": 4540000, ...},
# ...
# }
# }
```

**Go**

```go
// go get github.com/webscraping-ai/webscraping-ai-go/v4
// https://pkg.go.dev/github.com/webscraping-ai/webscraping-ai-go/v4
package main

import (
    "context"
    "fmt"

    webscrapingai "github.com/webscraping-ai/webscraping-ai-go/v4"
)

func main() {
    client, _ := webscrapingai.NewClient(&webscrapingai.Config{APIKey: "YOUR_API_KEY"})
    res, _ := client.Data(context.Background(), &webscrapingai.DataOptions{
        URL: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    })
    fmt.Println(res.RequestParameters.Provider, res.ParseStatus)
    fmt.Println(string(res.Data)) // raw JSON; its shape depends on the provider and page type
}
// Response (excerpt). The envelope is the same for every site:
// {
// "request_parameters": {"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
// "provider": "youtube", "type": "video"},
// "parse_status": "ok",
// "data": {
// "video_id": "dQw4w9WgXcQ",
// "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
// "views": 1819213866, "likes": 19407119, "comment_count": 2400000,
// "channel": {"name": "Rick Astley", "subscribers": 4540000, ...},
// ...
// }
// }
```

**Java**

```java
// Maven: ai.webscraping:webscraping-ai:4.2.0
// https://central.sonatype.com/artifact/ai.webscraping/webscraping-ai
import ai.webscraping.Client;
import ai.webscraping.Config;
import ai.webscraping.option.DataOptions;
import ai.webscraping.result.DataResult;

Client client = new Client(Config.builder().apiKey("YOUR_API_KEY").build());
DataResult result = client.data(DataOptions.builder()
    .url("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
    .build());
System.out.println(result.getRequestParameters().getProvider() + " " + result.getParseStatus());
System.out.println(result.getData());
// Response (excerpt). The envelope is the same for every site:
// {
// "request_parameters": {"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
// "provider": "youtube", "type": "video"},
// "parse_status": "ok",
// "data": {
// "video_id": "dQw4w9WgXcQ",
// "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
// "views": 1819213866, "likes": 19407119, "comment_count": 2400000,
// "channel": {"name": "Rick Astley", "subscribers": 4540000, ...},
// ...
// }
// }
```

**C#**

```csharp
// dotnet add package WebScrapingAI
// https://www.nuget.org/packages/WebScrapingAI
using WebScrapingAI;

var client = new WebScrapingAIClient(new WebScrapingAIClientOptions { ApiKey = "YOUR_API_KEY" });
var result = await client.DataAsync(new DataRequest {
    Url = "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
});
Console.WriteLine($"{result.RequestParameters.Provider} {result.ParseStatus}");
Console.WriteLine(result.Data);
// Response (excerpt). The envelope is the same for every site:
// {
// "request_parameters": {"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
// "provider": "youtube", "type": "video"},
// "parse_status": "ok",
// "data": {
// "video_id": "dQw4w9WgXcQ",
// "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
// "views": 1819213866, "likes": 19407119, "comment_count": 2400000,
// "channel": {"name": "Rick Astley", "subscribers": 4540000, ...},
// ...
// }
// }
```

Trimmed; counts are illustrative. Field names are snake\_case on every site. `data` can be `null` when `parse_status` is `parse_failed` or `not_found`, so check it before reading fields.

## Why use a social media scraping API

### No official API limits

No YouTube Data API quota, X API tier, Reddit OAuth app or Instagram login. You get what a logged-out visitor sees, as JSON.

### No scraping infrastructure

Proxies, browsers, retries and each site's markup changes are handled on our side. You don't write or fix selectors.

### One schema style

Every site returns the same envelope (`request_parameters`, `parse_status`, `data`) with snake\_case fields, so one pipeline handles all six.

**Public pages only.** Private accounts, follower lists, DMs and anything behind a login aren't available. Other networks (Facebook, Threads, Pinterest and others) aren't supported yet: their URLs return the free `400`. For those, [`/ai/fields`](https://webscraping.ai/docs#ai-fields) extracts the fields you describe from any public page.

## Flat per-page pricing

15 credits per page on every site except Reddit (50, because each Reddit page is loaded in a real browser). No extra charge for proxies or retries: about $1.74 per 1,000 pages on the $29 plan ($5.80 for Reddit).

| Plan | Price | Pages | Reddit pages |
| --- | --- | --- | --- |
| Free | $0 | up to 133 | up to 40 |
| Personal | $29/mo | up to 16,666 | up to 5,000 |
| Plus | $99/mo | up to 66,666 | up to 20,000 |
| Startup | $249/mo | up to 200,000 | up to 60,000 |

The free plan's 2,000 credits renew monthly. [All plans](https://webscraping.ai/#pricing), including pay-as-you-go credits.

### What's charged

**Unsupported URL or page type:** a `400`, not charged.

**Page couldn't be fetched:** a `500`, not charged.

**Charged even without data:** `parse_status` `parse_failed` (fetched but couldn't be parsed) and `not_found` (the page doesn't exist) are successful requests and cost the same as `ok`.

## Also from the terminal, AI agents, and n8n

### CLI

[webscraping-ai](https://github.com/webscraping-ai/webscraping-ai-cli) has a `data` command; pass `-` to read URLs from stdin, one per line.

```bash
webscraping-ai data 'https://www.reddit.com/r/webscraping/'
```

### MCP server

Claude, Cursor and other MCP clients get a `webscraping_ai_data` tool from the [hosted MCP server](https://webscraping.ai/integrations/mcp-server) (OAuth login, no API key to paste). Paste a social media link and ask for its data.

### n8n

The [WebScraping.AI n8n node](https://webscraping.ai/integrations/n8n) has a **Get Structured Data** operation for social media monitoring workflows, no code.

## Frequently asked questions

What is a social media scraper API?

An HTTP API that takes a social media page's URL and returns that page's public data as structured JSON, so you don't run a headless browser, rotate proxies or maintain selectors yourself. WebScraping.AI's /data endpoint does this for YouTube, TikTok, X (Twitter), LinkedIn, Instagram and Reddit: one request format and one response envelope for all of them.

Which social media sites and page types are supported?

YouTube videos, channels and playlists; TikTok videos and profiles; X posts and profiles; LinkedIn profiles, companies and jobs; Instagram profiles, posts and reels; Reddit posts, subreddits and users. The page type is detected from the URL. More sites and page types are added over time.

Do I need an API key or account for each platform?

No. You only need a WebScraping.AI API key. Data comes from what each site shows a logged-out visitor, so there's no YouTube Data API quota, X API plan, Reddit OAuth app, or social media login involved.

Is there a free social media scraper API?

Yes, for trying it out: the free plan includes 2,000 API credits every month, which covers 133 pages on most sites (40 on Reddit). No credit card is needed. Paid plans start at $29/mo for 250,000 credits, or buy pay-as-you-go credits with no subscription from a $20 top-up (100,000 credits, about 6,666 pages).

How much does it cost?

15 credits per page on every supported site except Reddit, which is 50 because each Reddit page is loaded in a real browser (expect 12–20 seconds per Reddit request rather than a few). On the $29/mo plan that is about $1.74 per 1,000 pages ($5.80 for Reddit). Unsupported URLs return a 400 and fetch failures a 500; neither is charged. parse\_failed and not\_found results are successful requests and are charged.

What if the site I need isn't supported?

Unsupported URLs get a 400 that isn't charged, with a message listing what is supported. For any other public page, /ai/fields extracts the fields you describe in plain language, and /html returns the rendered HTML for your own parser.

## Related

[Social media monitoring](https://webscraping.ai/use-cases/social-media-monitoring): Track brand mentions and engagement across networks.

[Influencer analytics](https://webscraping.ai/use-cases/influencer-analytics): Follower counts and post engagement for creator vetting.

[Google SERP API](https://webscraping.ai/google-serp-api): Parsed Google search results as JSON, from the same API key.

## Get social media data as JSON today

Get started with 2,000 free API credits. No credit card required.

[Start Free Trial](https://webscraping.ai/auth/sign_up)[View API Documentation](https://webscraping.ai/docs#data)
