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

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

## 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": []
    }
}
```

# 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
