# Social Media Profile Extractor (`caprolok/social-media-profile-extractor`) Actor

Extract rich profile details from Instagram, TikTok, YouTube, LinkedIn, and Twitter using usernames, URLs, or keywords. Get name, bio, followers, location, verified status, contact info, and more—perfect for research, outreach, and social intelligence.

- **URL**: https://apify.com/caprolok/social-media-profile-extractor.md
- **Developed by:** [Caprolok](https://apify.com/caprolok) (community)
- **Categories:** Lead generation, Social media, Automation
- **Stats:** 244 total users, 10 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Social Media Profile Extractor

Look up social profiles by URL or username across Instagram, TikTok, LinkedIn, Twitter (X), YouTube, Threads, Reddit, Facebook, and VK. Returns one best-matching profile per input with name, stats, match score, and optional alternatives.

### What you can extract

- Name, username, about / bio, user ID
- Platform, profile link, thumbnail
- Followers / following / posts / likes / replies when present
- `status`: `ok` | `not_found` | `private`
- `match_score` and optional `alternatives[]` when the lookup is ambiguous
- Original `search_input` and normalized `keyword`

### How to use

1. Create a free Apify account.
2. Open the [Social Media Profile Extractor](https://apify.com/caprolok/social-media-profile-extractor) on Apify.
3. Add profile URLs or usernames (and/or paste a CSV), pick one platform, optionally set location.
4. Click Start, then download JSON / CSV / Excel or use the API.

### Pricing

This actor uses **pay-per-event** pricing.

| Event | When it charges |
| ----- | --------------- |
| `data_request` (primary) | Once per **ok** profile row |
| `platform_usage` | Usage true-up based on Apify platform compute |

`not_found` and `private` status rows are pushed for honesty but **not billed**. Free users are capped on search inputs and may see upgrade placeholders. Set the Console Monetization primary event to `data_request`.

### Input parameters

| Field | Type | Description | Required |
| ----- | ---- | ----------- | -------- |
| `search_inputs` | array of string | Profile URLs or usernames | Yes\* |
| `search_inputs_csv` | string | Optional multiline/CSV paste (username/url header or one per line) | No |
| `platforms` | array of string | One of `INSTAGRAM`, `TIKTOK`, `LINKEDIN`, `TWITTER`, `YOUTUBE`, `THREADS`, `REDDIT`, `FACEBOOK`, `VK` | Yes |
| `location` | string | Country filter (e.g. `US`) | No |
| `exclusions` | array of string | Keywords / usernames to exclude | No |
| `include_alternatives` | boolean | Attach runner-up matches (default true) | No |

\*Provide `search_inputs` and/or `search_inputs_csv` (at least one value after merge).

Legacy singular `platform` is still accepted.

#### Sample CSV paste

```text
username
google
apple
https://www.instagram.com/nike/
```

#### Sample input

```json
{
    "search_inputs": [
        "https://www.instagram.com/google/"
    ],
    "search_inputs_csv": "username\napple\nnike",
    "platforms": ["INSTAGRAM"],
    "location": "US"
}
```

### Sample output

```json
[
  {
    "contentType": "profile",
    "keyword": "google",
    "search_input": "https://www.instagram.com/google/",
    "name": "Google",
    "platform": "instagram",
    "user_link": "https://www.instagram.com/google",
    "username": "google",
    "followers": 12800000,
    "following": 32,
    "posts": 2400
  }
]
```

### Support

Questions or feature requests: open an issue on the actor page or contact the publisher via Apify.

### Related scrapers

| Actor | Use for |
| ----- | ------- |
| [Social Media Influencer Finder](https://apify.com/caprolok/social-media-influencer-finder) | Discover creators by band + niche |
| [Social Media Email Finder](https://apify.com/caprolok/social-media-email-finder) | Public emails by niche |
| [Social Media Phone Finder](https://apify.com/caprolok/social-media-phone-finder) | Public phones by niche |
| [Social Media Posts Extractor](https://apify.com/caprolok/social-media-posts-extractor) | Posts from known accounts |
| [Social Media Hashtag Posts Extractor](https://apify.com/caprolok/social-media-hashtag-posts-extractor) | Niche hashtag / keyword posts |

# Actor input Schema

## `search_inputs` (type: `array`):

Enter profile URLs or usernames. One best profile is returned per input. Optional: also paste CSV in search\_inputs\_csv.

## `search_inputs_csv` (type: `string`):

Optional multiline or CSV paste. Use a username/url/search\_input header, or one profile per line. Merged with the list above.

## `location` (type: `string`):

Restrict search to a specific country (e.g. US).

## `platforms` (type: `array`):

Select the platform to extract profile details from (one platform per run).

## `exclusions` (type: `array`):

Exclude usernames or keywords from results.

## `include_alternatives` (type: `boolean`):

Attach up to 3 runner-up profile matches when the lookup is ambiguous.

## Actor input object example

```json
{
  "search_inputs": [
    "https://www.instagram.com/google/",
    "apple"
  ],
  "platforms": [
    "INSTAGRAM"
  ],
  "exclusions": [],
  "include_alternatives": true
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset of profile details (name, username, stats, and profile links).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "search_inputs": [
        "https://www.instagram.com/google/",
        "apple"
    ],
    "platforms": [
        "INSTAGRAM"
    ],
    "exclusions": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("caprolok/social-media-profile-extractor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "search_inputs": [
        "https://www.instagram.com/google/",
        "apple",
    ],
    "platforms": ["INSTAGRAM"],
    "exclusions": [],
}

# Run the Actor and wait for it to finish
run = client.actor("caprolok/social-media-profile-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "search_inputs": [
    "https://www.instagram.com/google/",
    "apple"
  ],
  "platforms": [
    "INSTAGRAM"
  ],
  "exclusions": []
}' |
apify call caprolok/social-media-profile-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=caprolok/social-media-profile-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/wL1n0QTt2imvYiyln/builds/slbSbT2XVakOCJDHO/openapi.json
