# Social & Email Scraper (rental version) (`lead.gen.labs/social-email-scraper-rental-version`) Actor

Empower your data quest! The Social & Email Scraper Apify Actor: your precision-driven solution for effortlessly extracting vital contact details from any webpage. Elevate outreach strategies with ease and conquer web data intricacies.

- **URL**: https://apify.com/lead.gen.labs/social-email-scraper-rental-version.md
- **Developed by:** [LeadGen Labs](https://apify.com/lead.gen.labs) (community)
- **Categories:** Lead generation
- **Stats:** 156 total users, 2 monthly users, 91.9% runs succeeded, 11 bookmarks
- **User rating**: No ratings yet

## Pricing

$20.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

## 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

![Nature](https://media.discordapp.net/attachments/771325609720545280/1189203574392102932/image-PhotoRoom.png?ex=659d4f22\&is=658ada22\&hm=2fedee31f86c7361fce71deb94106f206777542efb67bd730d7bcc9e38d7eef1&=\&format=webp\&quality=lossless\&width=655\&height=655)

### **Social & Email Scraper Apify Actor**

Meet the Social & Email Scraper Apify Actor! 🚀 It's the ultimate powerhouse in web data extraction, tailored for digital marketers, researchers, and data enthusiasts alike. Imagine effortlessly extracting valuable email addresses and social media links with precision from any webpage you desire. This robust tool is your secret weapon, meticulously scouring URLs to unveil critical contact information. Revolutionize your outreach strategies and forge connections seamlessly. Elevate your data game and conquer the web with ease!

### **What is Social & Email Scraper ?**

Social & Email Scraper is a tool that scrape social media links (such as facebook, linkedin, facebook, instagram, tiktok and twitter)
and emails from inputted list of website.

### 🌟 **Explore Our Stellar Features:**

- Regex Magic: Effortlessly handle regex patterns for precise extractions.
- Top Sites Covered: Facebook, TikTok, Instagram, LinkedIn, Twitter, and more!
- Email Mastery: Seamlessly extract valuable email addresses.
- Phone Number Precision: Extract phone numbers with ease and accuracy.
- Duplicate Filter: Ensures uniqueness by filtering out duplicates.
- URL Validation: Checks and verifies the validity of URLs before adding them.

## 🔍 **What is regex ?**

Regex, a Python library, unlocks the power of precision by capturing specific expressions through patterns. Dive deeper into URLs by customizing your search with personalized regex patterns. Let the actor extract precisely what you seek from your inputted expressions. Explore the realms of specificity and harness the magic of Regex for tailored extractions! 🌟

## 🧩 **How do I make a pattern ?**

Utilize sophisticated tools like ChatGPT to generate a regex pattern. For example, let's make a pattern for identifying YouTube channel links. Craft a prompt without the use of quotation marks, directing to 'create a regex pattern to find YouTube channel links.'. The pattern should look like this : https://www.youtube.com/channel/\[a-zA-Z0-9\_-]+. Not this : "https://www.youtube.com/channel/\[a-zA-Z0-9\_-]+".

### **How to use**

Input your urls separated with a comma or a whiteline(doesn't matter if it's separated by a comma or whiteline) (no limit) and input your regex pattern if you have one (no limit awswell)

### 📄 Input sample (json)

```
{
    "pattern": [
        "\\bcontact(?:\\s+us)?\\b",
        "\\bhome\\b"
    ],
    "urls": "https://generalsf.com/, https://edenavowconstruction.com/, https://prosperdevelopment.com/, missionhomeremodeling.com https://www.leefamilycorp.com/."
}
```

Here's a visual representation for the urls:
![input](https://media.discordapp.net/attachments/771325609720545280/1189207227140149248/image.png?ex=659d5289\&is=658add89\&hm=93bd413c281d57ae172cce95a3d30328b05ada71cc840ec0709341de7eabb73e&=\&format=webp\&quality=lossless\&width=1440\&height=298)
and the patterns :
![pattern](https://media.discordapp.net/attachments/771325609720545280/1189206962483761162/image.png?ex=659d524a\&is=658add4a\&hm=c2de33326c6763be92e17699d9d09dae19f1b5760116428748c36f7582c2b198&=\&format=webp\&quality=lossless\&width=1440\&height=459)
In this scenario, the pattern is designed to identify and save instances of 'contact-us' or 'home'. These patterns are used for testing purposes.

### 📤 Output (json)

```
[
  {
    "url": "https://generalsf.com/",
    "emails": [
      "info@generalsf.com"
    ],
    "facebook": "https://facebook.com/Generalsf",
    "instagram": "",
    "tiktok": "",
    "twitter": "",
    "linkedin": "",
    "phone": [
      "tel:+16503031515"
    ],
    "pattern_1": [
      "contact"
    ]
  },
  {
    "url": "https://edenavowconstruction.com/",
    "emails": [
      "ciarandowler@edenavow.com"
    ],
    "facebook": "https://facebook.com/2008",
    "instagram": "",
    "tiktok": "",
    "twitter": "",
    "linkedin": "",
    "phone": ""
  },
  {
    "url": "https://prosperdevelopment.com/",
    "emails": [
      "prosper@prosperdevelopment.com",
      "binatdigital@gmail.com"
    ],
    "facebook": "",
    "instagram": "",
    "tiktok": "",
    "twitter": "",
    "linkedin": "",
    "phone": "",
    "pattern_1": [
      "contact"
    ],
    "pattern_2": [
      "home"
    ]
  },
  {
    "url": "https://missionhomeremodeling.com",
    "emails": [
      "info@missionhomeremodeling.com"
    ],
    "facebook": "",
    "instagram": "",
    "tiktok": "",
    "twitter": "",
    "linkedin": "",
    "phone": "",
    "pattern_1": [
      "contact"
    ],
    "pattern_2": [
      "home"
    ]
  },
  {
    "url": "https://www.leefamilycorp.com/",
    "emails": [
      "leefamilycorp@gmail.com"
    ],
    "facebook": "https://facebook.com/2008",
    "instagram": "",
    "tiktok": "",
    "twitter": "",
    "linkedin": "",
    "phone": "",
    "pattern_2": [
      "home"
    ]
  }
]
```

When 'pattern\_1' and 'pattern\_2' are absent, it indicates that the pattern instances have not been matched.

### 📞  **Contact me**

If you need to reach out, feel free to contact me via:

- Discord : Kirada
- Email : denigud951@gmail.com

# Actor input Schema

## `urls` (type: `string`):

Input your urls seperated by a whitespace or a comma. The url schema doesn't matter, you can input unvalid urls aswell.

## `version` (type: `boolean`):

If enabled, this option will use another version of the actor which is faster than the normal one (this version is in beta version)

## `empty` (type: `boolean`):

If enabled, this option prevents the inclusion of empty results to the output.

## `pattern` (type: `array`):

Enter your regex patterns. The pattern must not contain quotation marks.

## `maxCrawlDepth` (type: `integer`):

Specify the maximum page limit that the web scraper will traverse in its search for email addresses and social media links. More there is pages to crawl, the slower will be the scraper's performance and the cost will be higher. It is advisable to keep the document length within a maximum of 5 pages.

## Actor input object example

```json
{
  "urls": "https://generalsf.com/ https://edenavowconstruction.com/, https://prosperdevelopment.com/, missionhomeremodeling.com https://www.leefamilycorp.com/",
  "version": true,
  "empty": true,
  "pattern": [],
  "maxCrawlDepth": 0
}
```

# 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 = {
    "urls": "https://generalsf.com/ https://edenavowconstruction.com/, https://prosperdevelopment.com/, missionhomeremodeling.com https://www.leefamilycorp.com/",
    "pattern": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("lead.gen.labs/social-email-scraper-rental-version").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 = {
    "urls": "https://generalsf.com/ https://edenavowconstruction.com/, https://prosperdevelopment.com/, missionhomeremodeling.com https://www.leefamilycorp.com/",
    "pattern": [],
}

# Run the Actor and wait for it to finish
run = client.actor("lead.gen.labs/social-email-scraper-rental-version").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 '{
  "urls": "https://generalsf.com/ https://edenavowconstruction.com/, https://prosperdevelopment.com/, missionhomeremodeling.com https://www.leefamilycorp.com/",
  "pattern": []
}' |
apify call lead.gen.labs/social-email-scraper-rental-version --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=lead.gen.labs/social-email-scraper-rental-version",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/9w29HczXWIgM2IhgW/builds/WdRlbITPu4eCKn3J0/openapi.json
