# Contact Details Scraper Bundler (`hamza.alwan/contact-bundle`) Actor

Bundles any actor with Contact Details Scraper and enhances the original dataset with contact details.

- **URL**: https://apify.com/hamza.alwan/contact-bundle.md
- **Developed by:** [Hamza Alwan](https://apify.com/hamza.alwan) (community)
- **Categories:** Lead generation
- **Security:** Full permissions
- **Stats:** 295 total users, 0 monthly users, 0.0% runs succeeded, 6 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

## What does Any Actor + Contact Bundle do?

This Actor accepts a dataset ID and then runs a contact task (Contact Details) on the result URLs, and then merges the provided dataset and contact task results into one output.

Here's an input example in JSON:

```json
{
    "sourceIdOrFullName": "BLYdoKb1gg5swPcSU",
    "pathToUrl": "url"
}
```

Optionally, you can also change the default Contact Details Actor inputs.

#### Output example

```json
{
    // Source actors output...,
    "contactDetails": {
        "emails": [],
        "phones": ["+1 800-555-5555"],
        "phonesUncertain": [],
        "linkedIns": [],
        "twitters": [],
        "instagrams": [],
        "facebooks": [],
        "youtubes": [],
        "tiktoks": [],
        "pinterests": [],
        "discords": []
    }
}
```

# Changelog

This Actor's version history is a separate document: https://apify.com/hamza.alwan/contact-bundle/changelog.md

# Actor input Schema

## `sourceIdOrFullName` (type: `string`):

The ID of the dataset of a run that will be enhanced with contact details.

## `pathToUrl` (type: `string`):

The path to the URL in the actor's task result to use for the contact task

## `contactPathToOutput` (type: `string`):

The path to the results of the contact task to output

## `maxRequestsPerStartUrl` (type: `integer`):

The maximum number of pages that will be enqueued from each start URL you provide.

## `maxDepth` (type: `integer`):

The maximum number of links away from the <b>Start URLs</b> that the actor will crawl. If <code>0</code>, the scraper will not follow any links. If empty or null, the scraper will follow links to an arbitrary depth.

## `maxParallelContactRuns` (type: `integer`):

Maximum number of Contact Details Scraper runs that will be started in parallel. This option will never exceed your account memory. Useful if you want the scrape to finish as soon as possible.

## `proxyConfig` (type: `object`):

Proxy servers let you bypass website protections, avoid IP address blocking, and view content for other countries. Try to use a proxy if you are experiencing timeout errors.

## Actor input object example

```json
{
  "sourceIdOrFullName": "aBcDeFgHiJkLmNoPq",
  "pathToUrl": "url",
  "contactPathToOutput": "contactDetails",
  "maxRequestsPerStartUrl": 20,
  "maxDepth": 2,
  "maxParallelContactRuns": 1,
  "proxyConfig": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "pathToUrl": "url",
    "proxyConfig": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("hamza.alwan/contact-bundle").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 = {
    "pathToUrl": "url",
    "proxyConfig": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("hamza.alwan/contact-bundle").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 '{
  "pathToUrl": "url",
  "proxyConfig": {
    "useApifyProxy": true
  }
}' |
apify call hamza.alwan/contact-bundle --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hamza.alwan/contact-bundle"
        }
    }
}
```

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/BdtRlPFj05ACoLn3q/builds/dlItMhpWzdTx1uSDP/openapi.json
