# Instagram Scraper Email Phone Influencer (`autoharvestor/instagram-scraper-email-phone-influencer-lead-finder`) Actor

Extracts Instagram influencer profiles, audience metrics, engagement rates, content statistics, account details, lead scores, influencer tiers, and publicly available business contacts. Includes contact sources, profile links, timestamps, and error information for reliable outreach and analysis.

- **URL**: https://apify.com/autoharvestor/instagram-scraper-email-phone-influencer-lead-finder.md
- **Developed by:** [Dipendra KC](https://apify.com/autoharvestor) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $12.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Instagram Lead Finder — Email & Phone Scraper + Influencer Data

A production-grade, enterprise-ready Apify Actor built for bulk extraction of public Instagram profiles, business contact information (emails & phone numbers), influencer tier classification, engagement analysis, and transparent lead scoring.

***

### Table of Contents

1. [Actor Description](#1-actor-description)
2. [Supported Use Cases](#2-supported-use-cases)
3. [Public-Data & Compliance Limitations](#3-public-data--compliance-limitations)
4. [Installation Instructions](#4-installation-instructions)
5. [Local Execution Instructions](#5-local-execution-instructions)
6. [Apify Deployment Instructions](#6-apify-deployment-instructions)
7. [Input Schema & Examples](#7-input-schema--examples)
8. [Output Structure & Examples](#8-output-structure--examples)
9. [Field-by-Field Documentation](#9-field-by-field-documentation)
10. [Engagement Rate Formula](#10-engagement-rate-formula)
11. [Influencer Tier Thresholds](#11-influencer-tier-thresholds)
12. [Lead Scoring Model & Grade Mapping](#12-lead-scoring-model--grade-mapping)
13. [Proxy Configuration & Best Practices](#13-proxy-configuration--best-practices)
14. [Residential Proxies: Reliability vs. Guarantees](#14-residential-proxies-reliability-vs-guarantees)
15. [Public Contact Extraction Notice](#15-public-contact-extraction-notice)
16. [Dataset Exports (JSON, CSV, Excel)](#16-dataset-exports-json-csv-excel)
17. [Apify API & Client Usage](#17-apify-api--client-usage)
18. [Troubleshooting & Status Codes](#18-troubleshooting--status-codes)
19. [Privacy, Legal & Responsible-Use Notice](#19-privacy-legal--responsible-use-notice)
20. [Heuristics & Estimation Disclaimer](#20-heuristics--estimation-disclaimer)

***

### 1. Actor Description

**Instagram Lead Finder** accepts a bulk list of Instagram handles or profile URLs (up to 10,000 items per run) and outputs structured data designed for lead generation, influencer discovery, agency prospecting, and market research.

The Actor features:

- Multi-channel public extraction (public web profile endpoints, HTML metadata parsing, and Playwright fallback).
- Contact discovery extracting visibly published business emails, phone numbers, and direct contact links.
- Engagement rate calculation based on recent public posts.
- Configurable influencer tier classification (Nano, Micro, Macro, Mega).
- Transparent heuristic lead scoring (0–100) with letter grades (A–D).
- Live monitoring web server exposing OpenAPI 3 endpoints (`/health`, `/status`, `/schema`, `/results`).
- Standard Apify Key-Value Store outputs for `run-summary.json` and `errors.json`.

***

### 2. Supported Use Cases

- **B2B & Agency Prospecting**: Identify creators, verified founders, and business accounts that publicly list business contact channels.
- **Influencer Marketing & Research**: Categorize creators by follower scale and evaluate real engagement rates before initiating outreach.
- **Competitor & Market Research**: Audit follower reach, post frequency, and public categories of industry peers.
- **Clean Outreach Preparation**: Generate deduplicated, standardized contact lists ready for CRM import or email outreach tools.

***

### 3. Public-Data & Compliance Limitations

In strict adherence to ethical standards and platform policies:

- **Public Profiles Only**: Scrapes only visibly accessible, public profile pages.
- **No Authentication Controls Bypassed**: Does not bypass login walls, CAPTCHAs, private account locks, or security challenges.
- **No Password or Cookie Required**: The Actor never asks for, stores, or utilizes Instagram credentials or session cookies.
- **No Predictive or Hidden Data**: Does not infer, guess, or synthesize private email addresses or phone numbers.

***

### 4. Installation Instructions

#### Prerequisites

- [Node.js](https://nodejs.org/) v20 or higher.
- [Apify CLI](https://docs.apify.com/cli) (`npm install -g apify-cli`).

#### Clone & Install

```bash
git clone https://github.com/your-org/instagram-lead-finder.git
cd instagram-lead-finder
npm install
```

***

### 5. Local Execution Instructions

#### Build Project

```bash
npm run build
```

#### Run Unit Tests

```bash
npm test
```

#### Run Locally with Apify CLI

Create your input in `storage/key_value_stores/default/INPUT.json`:

```json
{
  "usernames": ["natgeo", "@garyvee", "https://www.instagram.com/hubspot/"],
  "expandExternalLinks": false,
  "maxConcurrency": 2
}
```

Then execute:

```bash
apify run
```

Dataset records will be saved to `storage/datasets/default/`.

***

### 6. Apify Deployment Instructions

#### Deploy via Apify CLI

```bash
apify login
apify push
```

#### Run on Apify Platform

1. Navigate to the Actor in your Apify Console.
2. Under the **Input** tab, supply your target usernames or URLs.
3. Configure **Proxy Configuration** (Residential proxies recommended).
4. Click **Start** to launch the run.

***

### 7. Input Schema & Examples

The Actor accepts input according to `.actor/input_schema.json`:

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `usernames` | Array | *Required* | List of usernames (e.g. `hubspot`), handles (`@garyvee`), or profile URLs (`https://www.instagram.com/natgeo/`). Max 10,000. |
| `expandExternalLinks` | Boolean | `false` | Safe 1-hop fetch of external website in bio to check for public emails/phones. |
| `proxyConfiguration` | Object | `{ "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }` | Standard Apify Proxy configuration. |
| `requestTimeoutSecs` | Integer | `180` | Timeout for individual profile requests (10 to 180s). |
| `maxConcurrency` | Integer | `10` | Parallel requests (1 to 10). Lower concurrency is recommended if experiencing rate limits. |
| `respectRobotsAndPlatformLimits` | Boolean | `true` | Adaptive delay and backoff when rate-limited. |
| `userData` | Object | `{}` | Optional campaign or user metadata attached to each record. |

#### Example Input

```json
{
  "usernames": [
    "natgeo",
    "@garyvee",
    "https://www.instagram.com/hubspot/"
  ],
  "expandExternalLinks": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  },
  "requestTimeoutSecs": 180,
  "maxConcurrency": 10,
  "respectRobotsAndPlatformLimits": true,
  "userData": {
    "campaign": "Fall_Outreach"
  }
}
```

***

### 8. Output Structure & Examples

Every requested profile produces one normalized JSON record in the Apify Dataset.

#### Example Successful Profile Output

```json
{
  "input_username": "@garyvee",
  "username": "garyvee",
  "profile_url": "https://www.instagram.com/garyvee/",
  "full_name": "Gary Vaynerchuk",
  "biography": "CEO of VaynerMedia. 5x NYT bestselling author. Text me: +1 (212) 555-0198 or email press@vaynermedia.com",
  "followers": 10200000,
  "following": 1520,
  "posts_count": 14820,
  "is_verified": true,
  "is_private": false,
  "is_business_account": true,
  "is_professional_account": true,
  "category": "Entrepreneur",
  "external_url": "https://garyvaynerchuk.com",
  "profile_picture_url": "https://instagram.fsnc1-1.fna.fbcdn.net/sample.jpg",
  "profile_picture_hd_url": "https://instagram.fsnc1-1.fna.fbcdn.net/sample_hd.jpg",
  "igtv_count": 45,
  "highlight_count": 8,
  "profile_status": "success",
  "scraped_at": "2026-09-22T08:00:00.000Z",
  "source": "instagram_public_profile",
  "input_metadata": { "campaign": "Fall_Outreach" },
  "emails_found": ["press@vaynermedia.com"],
  "business_email": "press@vaynermedia.com",
  "email_sources": [{ "email": "press@vaynermedia.com", "source": "bio" }],
  "phones_found": ["+12125550198"],
  "business_phone": "+12125550198",
  "phone_sources": [{ "phone": "+12125550198", "source": "bio", "country_code": "+1" }],
  "contact_links": ["https://garyvaynerchuk.com"],
  "contact_data_is_public": true,
  "contact_extraction_notes": "Contact details extracted from visible profile fields (bio).",
  "engagement_rate_pct": 2.45,
  "average_likes": 45200.5,
  "average_comments": 1280.2,
  "engagement_sample_size": 12,
  "engagement_calculation_method": "Estimated from sample of 12 recent public posts: ((avg_likes 45200.5 + avg_comments 1280.2) / 10200000 followers) * 100",
  "average_video_views": 250000,
  "video_view_sample_size": 6,
  "influencer_tier": "mega",
  "influencer_tier_basis": "1,000,000+ followers",
  "follower_count_at_classification": 10200000,
  "lead_score": 90,
  "lead_grade": "A",
  "lead_grade_label": "A - Priority Lead",
  "lead_score_breakdown": {
    "is_business_or_professional": 15,
    "has_published_email": 25,
    "has_published_phone": 15,
    "has_external_website": 10,
    "is_verified": 5,
    "follower_tier_bonus": 0,
    "engagement_rate_bonus": 15,
    "recent_activity_bonus": 5,
    "total_calculated": 90,
    "final_capped_score": 90
  },
  "lead_score_method": "Heuristic prioritization score (0–100) based on public business categorization, visible contact points, verified status, follower reach, recent activity, and engagement.",
  "error_code": null,
  "error_message": null,
  "retryable": null,
  "attempts": 1,
  "failed_at": null
}
```

#### Example Failed Profile Output

```json
{
  "input_username": "non_existent_profile_12345",
  "username": "non_existent_profile_12345",
  "profile_url": "https://www.instagram.com/non_existent_profile_12345/",
  "full_name": null,
  "biography": null,
  "followers": null,
  "following": null,
  "posts_count": null,
  "is_verified": null,
  "is_private": null,
  "is_business_account": null,
  "is_professional_account": null,
  "category": null,
  "external_url": null,
  "profile_picture_url": null,
  "profile_picture_hd_url": null,
  "igtv_count": null,
  "highlight_count": null,
  "profile_status": "not_found",
  "scraped_at": "2026-09-22T08:05:00.000Z",
  "source": "instagram_public_profile",
  "input_metadata": { "campaign": "Fall_Outreach" },
  "emails_found": [],
  "business_email": null,
  "email_sources": [],
  "phones_found": [],
  "business_phone": null,
  "phone_sources": [],
  "contact_links": [],
  "contact_data_is_public": true,
  "contact_extraction_notes": null,
  "engagement_rate_pct": null,
  "average_likes": null,
  "average_comments": null,
  "engagement_sample_size": 0,
  "engagement_calculation_method": null,
  "average_video_views": null,
  "video_view_sample_size": null,
  "influencer_tier": "unknown",
  "influencer_tier_basis": null,
  "follower_count_at_classification": null,
  "lead_score": 0,
  "lead_grade": "D",
  "lead_grade_label": "D - Low-Signal Lead",
  "lead_score_breakdown": {
    "is_business_or_professional": 0,
    "has_published_email": 0,
    "has_published_phone": 0,
    "has_external_website": 0,
    "is_verified": 0,
    "follower_tier_bonus": 0,
    "engagement_rate_bonus": 0,
    "recent_activity_bonus": 0,
    "total_calculated": 0,
    "final_capped_score": 0
  },
  "lead_score_method": "Heuristic scoring model based on publicly available data.",
  "error_code": "PROFILE_NOT_FOUND",
  "error_message": "The requested Instagram profile does not exist or has been deleted.",
  "retryable": false,
  "attempts": 1,
  "failed_at": "2026-09-22T08:05:00.000Z"
}
```

***

### 9. Field-by-Field Documentation

#### Core Profile Fields

- `input_username`: Original handle or URL provided in input.
- `username`: Clean normalized Instagram handle.
- `profile_url`: Canonical profile URL.
- `full_name`: Display name.
- `biography`: Visible bio text.
- `followers`: Total follower count.
- `following`: Total following count.
- `posts_count`: Total published posts.
- `is_verified`: Blue badge presence.
- `is_private`: Account privacy status.
- `is_business_account`: Instagram business categorization.
- `is_professional_account`: Professional / Creator status.
- `category`: Public business category name.
- `external_url`: Website listed in bio.
- `profile_picture_url`: Standard resolution avatar.
- `profile_picture_hd_url`: High resolution avatar.
- `igtv_count`: Count of IGTV/video catalog items.
- `highlight_count`: Count of story highlight reels.
- `profile_status`: One of `success`, `not_found`, `private`, `login_required`, `rate_limited`, `blocked_or_unavailable`, `parse_error`, `unknown_error`.
- `scraped_at`: ISO 8601 timestamp.
- `source`: Origin marker (`instagram_public_profile`).
- `input_metadata`: Attached user metadata.

#### Lead Generation Fields

- `emails_found`: Array of unique email addresses found.
- `business_email`: Primary public contact email.
- `email_sources`: Array of `{ email, source }` objects documenting provenance (`bio`, `business_contact`, `external_public_page`).
- `phones_found`: Array of unique formatted phone numbers.
- `business_phone`: Primary public contact phone.
- `phone_sources`: Array of `{ phone, source, country_code }` objects.
- `contact_links`: Array of direct URLs (e.g. WhatsApp, Telegram, mailto).
- `contact_data_is_public`: Always `true` to confirm compliance.
- `contact_extraction_notes`: Extraction context notes.

#### Engagement Metrics

- `engagement_rate_pct`: Calculated percentage rounded to 2 decimal places.
- `average_likes`: Mean likes across recent sampled posts.
- `average_comments`: Mean comments across recent sampled posts.
- `engagement_sample_size`: Number of sampled valid posts.
- `average_video_views`: Mean video views across sampled videos.
- `video_view_sample_size`: Number of video posts analyzed.

***

### 10. Engagement Rate Formula

Engagement rate is calculated based on recent sampled public posts using the industry-standard formula:

$$\text{engagement\_rate\_pct} = \left( \frac{\text{average\_likes} + \text{average\_comments}}{\text{followers}} \right) \times 100$$

#### Rules:

1. Only valid public posts with non-negative likes and comments are included.
2. If `followers` is `null`, zero, or unavailable, `engagement_rate_pct` is set to `null`.
3. The value is rounded to two decimal places.

***

### 11. Influencer Tier Thresholds

Tiers are configured in `src/config.ts`:

| Tier | Follower Range | Description |
| :--- | :--- | :--- |
| **Nano** | 1,000 – 9,999 | Highly niche, grassroots creator |
| **Micro** | 10,000 – 99,999 | Targeted community with active engagement |
| **Macro** | 100,000 – 999,999 | Established authority or public figure |
| **Mega** | 1,000,000+ | Celebrity or major global brand |
| **Unknown** | < 1,000 or unavailable | Non-influencer, new account, or private profile |

***

### 12. Lead Scoring Model & Grade Mapping

Each profile receives a transparent heuristic score from 0 to 100 based solely on public indicators:

| Signal | Points Contributed |
| :--- | :---: |
| Public business or professional account | **+15** |
| Publicly published email address | **+25** |
| Publicly published phone number | **+15** |
| External website or contact link | **+10** |
| Verified badge | **+5** |
| Followers between 1,000 and 1,000,000 | **+5** |
| Engagement rate between 1.0% and 5.0% | **+15** |
| Engagement rate above 5.0% | **+20** |
| Recent posting activity detected | **+5** |
| **Maximum Total Capped Score** | **100** |

#### Grade Mapping

- **Grade A** (80–100): `A - Priority Lead` (Direct business contact, verified or high engagement).
- **Grade B** (60–79): `B - Warm Lead` (Published email or website, established account).
- **Grade C** (35–59): `C - Potential Lead` (General profile with partial contact points).
- **Grade D** (0–34): `D - Low-Signal Lead` (Private, missing contacts, or inactive).

***

### 13. Proxy Configuration & Best Practices

In your Actor input, configure `proxyConfiguration`:

```json
{
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

#### Best Practices:

- Keep concurrency moderate (`maxConcurrency: 2` to `4`).
- Enable `respectRobotsAndPlatformLimits: true` to allow automatic exponential backoff.
- Batch large lists (e.g. 500–1,000 items per run) for clean pipeline execution.

***

### 14. Residential Proxies: Reliability vs. Guarantees

> \[!IMPORTANT]
> Using Apify Residential proxies significantly improves connection success rates and helps distribute requests across real consumer IP pools. However, **proxies do not and cannot guarantee 100% uninterrupted access or zero blocking**. Instagram continuously updates automated rate-limiting thresholds and security checkpoints. The Actor implements adaptive backoff and concurrency reduction to respond responsibly to platform conditions.

***

### 15. Public Contact Extraction Notice

All emails and phone numbers output by this Actor are extracted **strictly from visibly published public fields**:

- The creator's public biography text.
- Public business contact buttons exposed on creator/business pages.
- Publicly accessible external links (only if `expandExternalLinks` is explicitly enabled).

The Actor **never** infers emails, guesses phone numbers, accesses private settings, or collects non-public personal information.

***

### 16. Dataset Exports (JSON, CSV, Excel)

All results are pushed to the Apify Default Dataset. You can export data via the Apify Console or API:

- **JSON**: `https://api.apify.com/v2/datasets/{DATASET_ID}/items?format=json`
- **CSV**: `https://api.apify.com/v2/datasets/{DATASET_ID}/items?format=csv`
- **Excel (XLSX)**: `https://api.apify.com/v2/datasets/{DATASET_ID}/items?format=xlsx`

#### Pre-Configured Dataset Views:

1. **Overview**: Core handle, followers, verified status, contact count, and lead grade.
2. **Lead Generation**: Direct business emails, phones, website, and score breakdown.
3. **Influencer Analysis**: Engagement rate %, avg likes/comments, video views, and recent posts.
4. **Errors**: Failed profiles, error codes, and retry diagnostics.

***

### 17. Apify API & Client Usage

#### JavaScript / TypeScript Client

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('username/instagram-lead-finder').call({
  usernames: ['hubspot', '@garyvee'],
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python Client

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_APIFY_TOKEN')

run = client.actor('username/instagram-lead-finder').call(run_input={
    'usernames': ['hubspot', '@garyvee'],
})

for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item['username'], item['lead_grade'], item['business_email'])
```

***

### 18. Troubleshooting & Status Codes

| Profile Status | Meaning | Recommended Action |
| :--- | :--- | :--- |
| `success` | Profile scraped and parsed successfully. | None needed. |
| `not_found` | Handle does not exist or was deleted. | Verify spelling of the username. |
| `private` | Account is private. | In accordance with safety policies, private accounts are not scraped. |
| `login_required` | Instagram displayed a mandatory login screen. | Enable Residential proxies or increase delays. |
| `rate_limited` | Temporary HTTP 429 received. | Lower `maxConcurrency` to 2 or 3 and re-run. |
| `blocked_or_unavailable` | Security challenge or IP restriction. | Switch proxy location or rotate proxy group. |
| `parse_error` | Profile structure changed. | Check `errors.json` in Key-Value store for details. |

***

### 19. Privacy, Legal & Responsible-Use Notice

- This software is intended strictly for accessing public information in compliance with applicable laws, including the EU General Data Protection Regulation (GDPR), the California Consumer Privacy Act (CCPA), and Instagram Terms of Service.
- Users are solely responsible for ensuring that their collection, storage, and outreach practices comply with local privacy regulations, spam legislation (e.g. CAN-SPAM, CASL), and data protection rules.
- Do not use this tool for harassment, unsolicited mass spamming, stalking, or unlawful surveillance.

***

### 20. Heuristics & Estimation Disclaimer

> \[!NOTE]
> All lead scores (0–100), lead grades (A–D), influencer tier categorizations, and engagement rates provided by this Actor are **heuristic estimations based on sampled public metrics**. They do not constitute financial evaluations, business guarantees, or predictions of outreach response rates.

# Actor input Schema

## `usernames` (type: `array`):

List of public Instagram usernames (e.g. 'natgeo', '@garyvee') or full public profile URLs (e.g. 'https://www.instagram.com/hubspot/'). Max 10,000 items.

## `expandExternalLinks` (type: `boolean`):

If enabled, performs a safe 1-hop fetch of the publicly accessible external link in the bio (e.g. Linktree or official site) to extract visible public business email/phone. Strictly no crawling beyond 1 level, no login bypassing, and no excessive fetching.

## `proxyConfiguration` (type: `object`):

Apify Proxy configuration. We strongly recommend Apify Residential proxies for maximum reliability when accessing public pages. Note: Proxies enhance reliability but do not guarantee uninterrupted access or zero blocking.

## `requestTimeoutSecs` (type: `integer`):

Timeout in seconds for fetching individual public profile pages.

## `maxConcurrency` (type: `integer`):

Maximum number of parallel profile requests. Lower concurrency is recommended if experiencing rate limits.

## `respectRobotsAndPlatformLimits` (type: `boolean`):

When enabled, applies conservative delays between requests and automatically reduces concurrency and backs off if rate limits (HTTP 429) or access restrictions are encountered.

## `userData` (type: `object`):

Optional custom metadata (e.g., campaign ID, client name, source) to attach to each scraped profile in the 'input\_metadata' field.

## Actor input object example

```json
{
  "usernames": [
    "natgeo",
    "@garyvee",
    "https://www.instagram.com/hubspot/"
  ],
  "expandExternalLinks": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "requestTimeoutSecs": 180,
  "maxConcurrency": 10,
  "respectRobotsAndPlatformLimits": true,
  "userData": {}
}
```

# Actor output Schema

## `dataset` (type: `string`):

Normalized Instagram profile lead records including emails, phones, engagement metrics, and recent posts.

## `runSummary` (type: `string`):

Comprehensive summary of processed profiles, success rate, contacts extracted, and execution metrics.

## `errors` (type: `string`):

Records and failure diagnostics for profiles that were private, not found, or blocked.

# 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 = {
    "usernames": [
        "natgeo",
        "@garyvee",
        "https://www.instagram.com/hubspot/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("autoharvestor/instagram-scraper-email-phone-influencer-lead-finder").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 = { "usernames": [
        "natgeo",
        "@garyvee",
        "https://www.instagram.com/hubspot/",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("autoharvestor/instagram-scraper-email-phone-influencer-lead-finder").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "usernames": [
    "natgeo",
    "@garyvee",
    "https://www.instagram.com/hubspot/"
  ]
}' |
apify call autoharvestor/instagram-scraper-email-phone-influencer-lead-finder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,autoharvestor/instagram-scraper-email-phone-influencer-lead-finder"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

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