# Lead Extractor - JustDial (`happitap/lead-extractor---justdial`) Actor

Lead Extractor is an automation tool that extracts business leads and contact details from Justdial. Instantly collect company names, phone numbers, and more for easy export and outreach. Perfect for sales, marketing, and lead generation.

- **URL**: https://apify.com/happitap/lead-extractor---justdial.md
- **Developed by:** [HappiTap](https://apify.com/happitap) (community)
- **Categories:** Lead generation, Real estate, Automation
- **Stats:** 742 total users, 18 monthly users, 100.0% runs succeeded, 5 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$2.80 / 1,000 extracted data records

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

## Lead Extractor - JustDial

Extract business leads and contact details directly from [JustDial.com](https://www.justdial.com) using this Apify Actor. Ideal for generating B2B leads, service provider lists, or local business insights.

***

### 🧠 What it does

This actor scrapes business listings from JustDial based on a given search term and location. It returns structured data including business name, phone number (if available), address, and more.

***

### ✅ Use cases

- Extract leads for local businesses
- Generate contact lists for cold outreach
- Market research on service providers by city
- Competitive analysis in your niche

***

### 📥 Input

You can provide the following fields as input:

````json
{
  "search": "plumbers",
  "location": "Mumbai",
  "maxItems": 50,
  "debugMode": false,
  "startUrls": []
}

#### Fields explained:

| Field       | Type      | Description                                                                 |
|-------------|-----------|-----------------------------------------------------------------------------|
| `search`    | `string`  | Search term for JustDial (e.g., `"salon"`, `"electricians"`)                |
| `location`  | `string`  | Location to search in (e.g., `"Delhi"`, `"Bangalore"`)                      |
| `maxItems`  | `number`  | (Optional) Maximum number of listings to extract                            |
| `debugMode` | `boolean` | (Optional) Logs more information during execution for troubleshooting       |
| `startUrls` | `array`   | (Optional) Custom start URLs if you want to override the default search URL |



### 📤 Output

The actor returns a dataset containing an array of business listings. Each record may contain the following fields:

#### Sample Output

```json
[
  {
    "isAd": false,
    "url": "https://www.justdial.com/Goa/The-Goan-Room-Near-Donapaula-Police-Station-Donapaula/0832PX832-X832-161005124923-N2E9_BZDET?trkid=&term=&ncatid=10408936&area=&search=Best%20Restaurants%20in%20Goa%20-%20Order%20Food%20Online&mncatname=Restaurants&ftterm=&abd_btn=&abd_heading=&bd=1&cat_b2b_flag=0&searchfrom=lst",
    "name": "The Goan Room",
    "email": null,
    "websiteLink": null,
    "address": "Donapaula Road Donapaula, Goa",
    "phone": null,
    "Whatsapp": null,
    "rating": null,
    "ratingCount": null,
    "services": [],
    "infoSnippet": [],
    "image": null,
    "categories": []
  }
]
#### 📄 Output Fields Explained

| Field         | Type      | Description                                                                 |
|---------------|-----------|-----------------------------------------------------------------------------|
| `isAd`        | `boolean` | Indicates whether the listing is a sponsored advertisement                 |
| `url`         | `string`  | Direct URL to the JustDial business listing                                 |
| `name`        | `string`  | Name of the business                                                        |
| `email`       | `string`  | Email address of the business (if available)                                |
| `websiteLink` | `string`  | Official website link of the business (if available)                        |
| `address`     | `string`  | Physical address of the business                                            |
| `phone`       | `string`  | Phone number of the business (if available)                                 |
| `Whatsapp`    | `string`  | WhatsApp number of the business (if available)                              |
| `rating`      | `number`  | User rating out of 5 (if available)                                         |
| `ratingCount` | `number`  | Total number of users who rated                                             |
| `services`    | `array`   | List of services or business highlights                                     |
| `infoSnippet` | `array`   | Additional snippets or descriptions about the business                      |
| `image`       | `string`  | URL of the business image/logo (if available)                               |
| `categories`  | `array`   | List of categories or tags the business is associated with                  |


### 🔒 Proxy

This actor uses **Apify Proxy** automatically to avoid IP bans and to access location-based content seamlessly.

---

### 🚀 How to use

1. Go to [Apify Console](https://console.apify.com)
2. Click **"Try actor"** or schedule it in your task
3. Fill in your `search` term and `location`
4. Run the actor
5. Download your leads as **JSON**, **CSV**, or **Excel**

---

### 🛠️ Tech Stack

- [Apify SDK](https://sdk.apify.com/)
- [Crawlee](https://crawlee.dev/)
- [Puppeteer](https://pptr.dev/)
- Node.js



# Actor input Schema

## `search` (type: `string`):

The business category or keyword to search for.
## `location` (type: `string`):

The location to search in.
## `maxItems` (type: `integer`):

Maximum number of leads to extract (optional). Leave blank to extract all.
## `debugMode` (type: `boolean`):

If true, enables verbose logging and debug features.
## `startUrls` (type: `array`):

URLs to start with (optional). If empty, the scraper will construct URLs based on search and location.

## Actor input object example

```json
{
  "search": "Dentist",
  "location": "Los Angeles",
  "debugMode": false,
  "startUrls": []
}
````

# Actor output Schema

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

All extracted business listings with contact details

# 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 = {
    "startUrls": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("happitap/lead-extractor---justdial").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 = { "startUrls": [] }

# Run the Actor and wait for it to finish
run = client.actor("happitap/lead-extractor---justdial").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 '{
  "startUrls": []
}' |
apify call happitap/lead-extractor---justdial --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,happitap/lead-extractor---justdial"
        }
    }
}
```

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/5tx6Ge1MUqIYMKx4P/builds/uAq770d0kQjCyR2Zo/openapi.json
