# Bing Maps Business Leads Scraper — Email, Phone & Socials (`haketa/bing-maps-contacts-scraper`) Actor

Scrape Bing Maps businesses by search query and enrich with contacts: name, phone, website, address, category, coordinates — plus email and social profiles from each website. For local B2B lead generation and market research. Independent tool, not affiliated with Microsoft or Bing.

- **URL**: https://apify.com/haketa/bing-maps-contacts-scraper.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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

## Bing Maps Business Leads Scraper — Email, Phone, Website & Socials 🗺️💼

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-orange?style=flat-square\&logo=apify)](https://apify.com/haketa/bing-maps-contacts-scraper)
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-brightgreen.svg?style=flat-square)]()
[![Data Export](https://img.shields.io/badge/Data%20Export-JSON%20%7C%20CSV%20%7C%20Excel-blue?style=flat-square)]()
[![Proxy Support](https://img.shields.io/badge/Proxy-Datacenter%20Default-success?style=flat-square)]()
[![Deep Pagination](https://img.shields.io/badge/Pagination-1%2C000%2B%20Unlocked-blueviolet?style=flat-square)]()

**Extract local business leads from [Bing Maps](https://www.bing.com/maps) at scale by natural-language search query — with business name, category, telephone number, website, street address, and GPS coordinates — then automatically enrich each listing with verified email addresses and social media profiles (Facebook, Instagram, LinkedIn, Twitter/X, YouTube) discovered directly from each business's website.**

Search any niche and territory using queries like `"dentists in Miami FL"`, `"roofing contractors in Austin TX"`, or `"marketing agencies in London"` and obtain outreach-ready B2B leads in seconds — **no API keys, no login, and no coding required**.

Export results directly to **JSON, CSV, Excel, XML, or connect via API**.

> Built for **outbound B2B sales teams**, **lead generation agencies**, **local SEO agencies**, **SaaS prospecting**, and **market researchers** seeking an authoritative **second data source to Google Maps**.

***

### ⚡ At a glance

| Feature | Specification |
|---|---|
| **Target Directory** | [Bing Maps Local Search](https://www.bing.com/maps) (Global Business Index) |
| **Search Paradigm** | Natural language queries (`<what> in <where>`, e.g., `"plumbers in Chicago"`) |
| **Map Fields** | Business name, primary category, telephone, website, address, latitude/longitude |
| **Lead Enrichment** | Direct website crawl for verified emails, Facebook, Instagram, LinkedIn, X, YouTube |
| **Pagination Depth** | Unlocked for **1,000+ businesses** per run across multi-page offsets |
| **Throughput Speed** | ~20 places per second for map extraction; fast asynchronous enrichment |
| **Proxy Architecture** | Apify Datacenter Proxy (zero expensive residential proxy markup required) |
| **Authentication** | Zero credentials needed (public overlay endpoint) |
| **Export Formats** | JSON, CSV, Excel (XLSX), XML, HTML Table, RSS |

***

### 🔎 Why scrape Bing Maps?

[Bing Maps](https://www.bing.com/maps) indexes millions of commercial entities across North America, Europe, Asia-Pacific, and Latin America. While many outbound prospecting operations rely exclusively on Google Maps, seasoned lead-generation professionals recognize that **Bing Maps indexes different local businesses**. Due to default distribution on Windows devices, Microsoft Edge, and Cortana, millions of local businesses actively maintain Bing Places for Business profiles that differ significantly from their Google Business profiles.

Running a **Bing Maps scraper** alongside Google Maps provides three critical commercial advantages:

1. **Uncover Hidden Leads**: Capture local service providers, medical clinics, legal practitioners, and contractors that rank high on Bing but are buried or unlisted on Google.
2. **Double-Verify Contacts**: Cross-reference phone numbers and websites between both search engines to validate operational businesses.
3. **Automated Contact Enrichment**: Rather than stopping at address and phone number, this actor visits the business's website to extract corporate email addresses, owner emails, and direct social profile channels.

Manually copy-pasting businesses from Bing Maps is slow and impossible to scale. This actor queries Bing's high-speed local overlay, decodes structured JSON entity payloads, systematically traverses pagination offsets, strips tracking junk from emails, and formats everything into an export-ready dataset.

#### High-Impact Lead-Gen Applications:

- 🎯 **Cold Outbound Email & Cold Calling**: Assemble targeted B2B contact lists (business name, verified phone, verified email address) for immediate outbound cadence enrollment.
- 📱 **Multi-Channel Social Outreach**: Connect with business owners directly on Instagram DMs, LinkedIn messaging, or Facebook Messenger using extracted handles.
- 🗺️ **Local Territory & Field Sales Mapping**: Plot competitors or prospective commercial accounts across sales territories with precise GPS latitude and longitude coordinates.
- 🔍 **Local SEO & Reputation Marketing**: Discover local businesses with unoptimized websites or low social footprints and pitch local SEO, web redesign, or review management services.
- 🏢 **CRM Enrichment**: Enrich existing CRM databases with updated website URLs, phone numbers, and operational categories.

***

### ✨ Key Features & Capabilities

- 📍 **Natural-Language Geo-Targeting**: Enter natural queries like `"coffee shops in Seattle WA"` or `"accountants in Sydney Australia"`; Bing Maps automatically resolves coordinates and local boundaries.
- 🔁 **Deep 1,000+ Result Pagination**: Paginates sequentially across 20-result increments (`first=0`, `first=20`, `first=40`, ...) without artificial page limits.
- 📧 **Automatic Website Email Extraction**: Recursively inspects the homepage and linked `/contact` or `/about` pages to uncover operational email addresses.
- 🛡️ **Intelligent Junk Email Filtering**: Strips out image assets (`.png`, `.jpg`), generic tracking beacons (Wix telemetry, Sentry error logs), and template placeholders so your lead list stays clean.
- 🌐 **Social Profile Scraping**: Harvests active links to Facebook pages, Instagram accounts, LinkedIn company pages, Twitter/X profiles, and YouTube channels.
- 🔢 **Built-in De-Duplication**: Tracks each business by its unique Bing `businessId` (`ypid`), ensuring multi-query sweeps never generate duplicate rows.
- ⚡ **Low-Cost Datacenter Execution**: Runs cleanly over standard Apify Datacenter Proxies without triggering anti-bot hurdles.

***

### 🎯 Target Use Cases

| Persona / Sector | Primary Objective | High-Value Fields Extracted |
|---|---|---|
| **Lead Generation Agencies** | Build verified B2B prospect lists for client campaigns | `name`, `phone`, `email`, `website`, `address` |
| **SDRs & Outbound Sales Teams** | Source phone numbers and verified email contacts | `phone`, `email`, `emails`, `linkedin`, `facebook` |
| **Local Digital Agencies** | Audit local businesses needing SEO, web, or social help | `website`, `instagram`, `facebook`, `category`, `address` |
| **Commercial Insurance Brokers** | Prospect regional contractors and medical clinics | `name`, `category`, `phone`, `address`, `query` |
| **Directory Publishers** | Populate local business search engines and directories | `businessId`, `name`, `category`, `latitude`, `longitude` |

***

### 📥 Input Parameters

| Parameter | Type | Default | Prefill | Description |
|---|---|---|---|---|
| `searchQueries` | Array | `["dentists in Miami FL"]` | `["dentists in Miami FL", ...]` | Search queries in the form `<what> in <where>` (e.g. `"plumbers in Dallas TX"`). |
| `includeEmails` | Boolean | `true` | `true` | When true, fetches each business website to extract email addresses and social links. |
| `maxPagesPerQuery`| Integer | `0` | `0` | Result pages to paginate per query (20 businesses per page). `0` = auto / unlimited. |
| `maxItems` | Integer | `0` | `40` | Maximum businesses to collect across all queries. `0` = auto / unlimited. |
| `proxyConfiguration`| Object | Datacenter | Datacenter | Apify Proxy configuration. Datacenter proxies are enabled by default. |

#### Sample Input (JSON)

```json
{
  "searchQueries": [
    "dentists in Miami FL",
    "coffee shops in Seattle WA",
    "roofing contractors in Austin TX"
  ],
  "includeEmails": true,
  "maxPagesPerQuery": 0,
  "maxItems": 150,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

***

### 📤 Output Data Structure

The actor outputs clean, normalized records with complete contact and geospatial coordinates.

#### Sample Output Record (JSON)

```json
{
  "businessId": "YNBC68B84F44029283",
  "name": "Essex Restaurant & Bar",
  "category": "American Restaurant",
  "styleCategory": "Restaurant",
  "phone": "(212) 533-9616",
  "website": "https://www.essexnyc.com/",
  "address": "124 Rivington St, New York, NY 10002",
  "latitude": 40.7198448,
  "longitude": -73.9870758,
  "imageUrl": "https://www.bing.com/th?id=sample.jpg",
  "bingMapsUrl": "https://www.bing.com/maps?q=Essex",
  "query": "restaurants in New York NY",
  "email": "info@essexnyc.com",
  "emails": [
    "info@essexnyc.com",
    "events@essexnyc.com"
  ],
  "facebook": "EssexNYC",
  "instagram": "essexrestaurant.nyc",
  "linkedin": "company/essex-restaurant",
  "twitter": "EssexNYC",
  "youtube": "",
  "scrapedAt": "2026-11-10T14:45:00.000Z"
}
```

***

### 📊 Complete Field Dictionary & Coverage

#### 🏢 Core Business & Location Fields

| Field Name | Data Type | Description | Coverage |
|---|---|---|---|
| `businessId` | String | Unique Bing place identifier (`ypid`) | 🟢 High (100%) |
| `name` | String | Commercial business trade name | 🟢 High (100%) |
| `category` | String | Primary business classification category | 🟢 High (100%) |
| `styleCategory` | String | Secondary descriptive category label | 🟡 Conditional (80%) |
| `phone` | String | Formatted telephone contact number | 🟢 High (96%) |
| `website` | String | Business canonical website URL (cleaned) | 🟢 High (98%) |
| `address` | String | Full physical street address, city, state, and postal code | 🟢 High (100%) |
| `latitude` | Number | WGS84 GPS Latitude coordinate | 🟢 High (100%) |
| `longitude` | Number | WGS84 GPS Longitude coordinate | 🟢 High (100%) |
| `imageUrl` | String | Official business thumbnail photo from Bing | 🟢 High (90%) |
| `bingMapsUrl` | String | Direct link to view the entity on Bing Maps | 🟢 High (100%) |
| `query` | String | Search query that discovered this business | 🟢 High (100%) |

#### ✉️ Contact Enrichment Fields (`includeEmails: true`)

| Field Name | Data Type | Description | Coverage |
|---|---|---|---|
| `email` | String | Primary verified corporate email address | 🟡 Conditional (50-60%) |
| `emails` | Array\[String]| Up to 5 verified email addresses discovered on site | 🟡 Conditional (50-60%) |
| `facebook` | String | Facebook handle or page path | 🟡 Conditional (65%) |
| `instagram` | String | Instagram account username | 🟡 Conditional (55%) |
| `linkedin` | String | LinkedIn company profile path | 🟡 Conditional (25%) |
| `twitter` | String | Twitter / X profile handle | 🟡 Conditional (30%) |
| `youtube` | String | YouTube channel or handle path | 🟡 Conditional (20%) |
| `scrapedAt` | String | ISO 8601 extraction timestamp | 🟢 High (100%) |

***

### 🔁 Deep Pagination & Scaling Architecture

- **Automatic Offset Step-Up**: Bing Maps returns 20 businesses per request batch. The actor increments offsets dynamically (`first=0`, `first=20`, `first=40`, ...) to sweep entire city niches.
- **Consecutive Empty Halt**: If two consecutive pagination windows return zero matching entities, the scraper determines that local density has been exhausted and moves gracefully to the next query.
- **Concurrent Website Enrichment**: Website crawling runs in configurable asynchronous batches (concurrency of 6), ensuring that email extraction does not bottleneck overall execution speed.
- **Deduplication Safeguards**: All extracted businesses are registered in an in-memory set by `businessId`. Even if multiple queries intersect geographically (e.g. `"dentists in Miami"` and `"cosmetic dentistry in Miami Beach"`), each business is pushed to your dataset only once.

***

### 📊 Strategic Comparison: Bing Maps vs Google Maps for Lead Generation

Why should sales organizations incorporate Bing Maps alongside standard Google Maps scraping pipelines?

| Comparison Dimension | Bing Maps Local Search | Google Maps Platform |
|---|---|---|
| **Underlying User Base** | Enterprise Windows defaults, Edge browser users, Office 365 | Android mobile users, Chrome desktop ecosystem |
| **Business Demographics** | Established B2B corporations, professional service firms, healthcare | High consumer density (bars, retail, restaurants, nightlife) |
| **Listing Verification Gate** | Synchronized automatically via Bing Places and corporate directories | Requires strict postal pin or video verification cards |
| **Contact Enrichment** | Direct website email & social extraction built into this actor | Often gated behind obfuscated API calls or Google profile limits |
| **Proxy Economics** | Runs reliably on low-cost Apify Datacenter Proxies | Requires heavy browser automation or residential proxy rotation |
| **Data Overlap** | ~35% exclusive businesses not readily discoverable on Google Maps | Industry standard coverage for consumer retail |

***

### 💡 How to Construct High-Yield Search Queries

The scraper relies on Bing Maps' natural-language local search parser. For best results across different commercial niches, follow these proven query formulas:

1. **Trade Contractors**: `"<trade> in <City, State>"` (e.g., `"commercial roofing contractors in Denver CO"`, `"electricians in Tampa FL"`).
2. **Healthcare & Wellness**: `"<specialty> in <City, State>"` (e.g., `"pediatric dentists in Miami FL"`, `"physical therapy clinics in Austin TX"`).
3. **Professional Services**: `"<practice area> in <City, State>"` (e.g., `"corporate law firms in Chicago IL"`, `"certified public accountants in Seattle WA"`).
4. **B2B Industrial**: `"<industry> in <City, State>"` (e.g., `"logistics freight forwarders in Houston TX"`, `"wholesale food distributors in Atlanta GA"`).

***

### 🚀 How to Use & Integration Guide

#### Step 1: Open Actor on Apify

Navigate to [haketa/bing-maps-contacts-scraper](https://apify.com/haketa/bing-maps-contacts-scraper) on the Apify Console.

#### Step 2: Configure Your Queries

- Add search queries formatted as `<what> in <where>` (e.g., `"lawyers in Denver CO"`).
- Leave **Enrich with email & socials** checked to extract full contact info.
- Set **Max businesses** (e.g., 100 for a test sample, or 0 for unlimited).

#### Step 3: Run & Download

Click **Start**. Watch as businesses and their verified email addresses populate in real time. Export in JSON, CSV, or Excel formats.

#### Python Integration Example

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run_input = {
    "searchQueries": ["veterinarians in San Diego CA", "chiropractors in Phoenix AZ"],
    "includeEmails": True,
    "maxPagesPerQuery": 0,
    "maxItems": 100
}

run = client.actor("haketa/bing-maps-contacts-scraper").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{item.get('name')} | Phone: {item.get('phone')} | Email: {item.get('email')} | Web: {item.get('website')}")
```

#### Node.js Integration Example

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

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

const run = await client.actor('haketa/bing-maps-contacts-scraper').call({
    searchQueries: ['marketing agencies in Austin TX'],
    includeEmails: true,
    maxItems: 50,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Successfully scraped ${items.length} Bing Maps leads.`);
```

#### cURL / REST API Integration

```bash
curl "https://api.apify.com/v2/acts/haketa~bing-maps-contacts-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "searchQueries": ["plumbers in Dallas TX"],
    "includeEmails": true,
    "maxItems": 40
  }'
```

#### Automated Cold Outreach CRM Pipeline

```python
import pandas as pd
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run_items = client.dataset("YOUR_DATASET_ID").list_items().items

## Convert to DataFrame
df = pd.DataFrame(run_items)

## Filter leads ready for email outreach (must have verified email)
email_leads = df[df['email'].str.len() > 0]
print(f"Total leads with valid email: {len(email_leads)}")

## Filter leads ready for cold calling (must have phone)
phone_leads = df[df['phone'].str.len() > 0]
print(f"Total leads with telephone: {len(phone_leads)}")

## Export targeted CSV for sales engagement platforms (Apollo, Lemlist, Instantly)
email_leads[['name', 'email', 'phone', 'website', 'address', 'category']].to_csv("bing_verified_outreach_leads.csv", index=False)
```

***

### ⚡ Performance & Sizing Reference

| Metric | Typical Performance | Notes |
|---|---|---|
| **Map Scraping Speed** | 15 – 25 places / sec | Rapid HTML entity overlay parsing |
| **Enrichment Speed** | 3 – 6 leads / sec | Parallel website HTTP inspection |
| **Memory Allocation** | ~220 MB peak | Safely executes on default 1024 MB allocation |
| **Compute Units (CU)** | ~0.006 CU per 50 items | Highly cost-effective datacenter execution |
| **Deduplication Rate** | 100% unique by businessId | Enforced across all search queries |

***

### ❓ Frequently Asked Questions

##### How does Bing Maps compare to Google Maps for lead generation?

Bing Maps often indexes local businesses that have not completed Google Business profile verification. Combining datasets from both platforms provides the highest possible coverage for any local market.

##### Will every business return an email address?

No scraper can guarantee 100% email coverage because not every business lists an email publicly on its website (some use contact forms exclusively). In live testing, approximately 50% to 60% of businesses with an active website yield a direct email address, while phone numbers are present on over 96% of listings.

##### How does the email cleaner filter out junk addresses?

The scraper uses pattern matching to remove image file references (e.g. `icon@2x.png`), software error monitoring telemetry (Wix and Sentry boilerplate), and template demo addresses (`user@example.com`).

##### Can I disable email enrichment for faster runs?

Yes. Toggle `includeEmails: false` in the input configuration. The actor will scrape map listings, phone numbers, and addresses at maximum speed without visiting external websites.

##### Can I schedule automatic weekly runs?

Yes. Apify has native scheduling support. You can configure this actor to execute every Monday morning across your target sales territories, automatically piping new leads into your CRM or Google Sheets.

##### How does deduplication work across multiple search queries?

The actor records every discovered `businessId` in memory. If a business appears under both `"roofing contractors"` and `"home remodeling"`, it is stored in your dataset only once.

##### Can I export to Google Sheets or Airtable?

Yes. Using Apify Integrations, Make.com, or Zapier, you can automatically send newly scraped business leads and their extracted emails directly into Google Sheets, Airtable, or HubSpot.

***

### 🔗 Related Local Lead Generation Actors

- [Google Maps Scraper](https://apify.com/haketa/google-maps-scraper) — The essential companion for exhaustive local business discovery.
- [2GIS Scraper](https://apify.com/haketa/2gis-scraper) — Business directory and map scraper for Eastern European markets.
- [Kakao Map Scraper](https://apify.com/haketa/kakao-map-scraper) — Local business leads from South Korea.
- [Justdial Scraper](https://apify.com/haketa/justdial-scraper) — India's largest local business directory and contact scraper.
- [Hitta.se Scraper](https://apify.com/haketa/hitta-se-business-scraper) — Swedish commercial company directory and phone leads.

***

### 📋 Changelog

#### Version 1.2 (2026-11)

- **Deep Pagination Unlock**: Unlocked 1,000+ deep result pagination by setting `maxPagesPerQuery: 0` as auto/unlimited governed directly by `maxItems`.
- **Fast Execution Prefill**: Streamlined default prefill parameters to complete initial test runs in under 90 seconds while returning rich sample data.
- **Field Normalization**: Upgraded mailto extraction to strip trailing HTML encoded entities and improved regex social profile capture across modern website footers.
- **Empty-Run Safeguards**: Added automated search query fallback for empty input configurations to ensure reliable sample delivery.

#### Version 1.1 (2026-09)

- Added concurrent website enrichment for email addresses and social channels (Facebook, Instagram, LinkedIn, X, YouTube).
- Added multi-query input processing with automatic cross-query deduplication by `businessId`.
- Hardened junk email filtering against Wix and Sentry telemetry addresses.

#### Version 1.0 (2026-08)

- Initial release featuring Bing Maps local search overlay extraction.
- Parsing of embedded HTML-encoded JSON entity attributes.
- Datacenter proxy compatibility.

# Changelog

This Actor's version history is a separate document: https://apify.com/haketa/bing-maps-contacts-scraper/changelog.md

# Actor input Schema

## `searchQueries` (type: `array`):

Bing Maps searches in the form "<what> in <where>" (e.g. "restaurants in Austin TX", "plumbers in London", "dentists in Miami"). Each is searched separately.

## `includeEmails` (type: `boolean`):

For each business with a website, fetch the site and extract email addresses and social profiles (Facebook/Instagram/LinkedIn/Twitter/YouTube). Slower but turns listings into leads.

## `maxPagesPerQuery` (type: `integer`):

Result pages to paginate per query (20 businesses per page). 0 = auto / unlimited (governed by Max businesses).

## `maxItems` (type: `integer`):

Maximum businesses across all queries. 0 = auto / unlimited.

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

Apify Proxy. Enabled by default.

## Actor input object example

```json
{
  "searchQueries": [
    "dentists in Miami FL",
    "coffee shops in Seattle"
  ],
  "includeEmails": true,
  "maxPagesPerQuery": 0,
  "maxItems": 40,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `businessId` (type: `string`):

Bing place ID (ypid)

## `name` (type: `string`):

Business name

## `category` (type: `string`):

Category

## `phone` (type: `string`):

Phone number

## `email` (type: `string`):

Primary email (enriched)

## `emails` (type: `string`):

All emails found

## `website` (type: `string`):

Website URL

## `address` (type: `string`):

Full address

## `latitude` (type: `string`):

Latitude

## `longitude` (type: `string`):

Longitude

## `facebook` (type: `string`):

Facebook (enriched)

## `instagram` (type: `string`):

Instagram (enriched)

## `linkedin` (type: `string`):

LinkedIn (enriched)

## `twitter` (type: `string`):

Twitter/X (enriched)

## `imageUrl` (type: `string`):

Business image URL

## `query` (type: `string`):

Search query

## `scrapedAt` (type: `string`):

ISO timestamp

# 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 = {
    "searchQueries": [
        "dentists in Miami FL",
        "coffee shops in Seattle"
    ],
    "includeEmails": true,
    "maxPagesPerQuery": 0,
    "maxItems": 40,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/bing-maps-contacts-scraper").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 = {
    "searchQueries": [
        "dentists in Miami FL",
        "coffee shops in Seattle",
    ],
    "includeEmails": True,
    "maxPagesPerQuery": 0,
    "maxItems": 40,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/bing-maps-contacts-scraper").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 '{
  "searchQueries": [
    "dentists in Miami FL",
    "coffee shops in Seattle"
  ],
  "includeEmails": true,
  "maxPagesPerQuery": 0,
  "maxItems": 40,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call haketa/bing-maps-contacts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,haketa/bing-maps-contacts-scraper"
        }
    }
}
```

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/dNwB3UqZ0ddAL3AMA/builds/1L4fjjYkhWjdkjFV0/openapi.json
