# Website Contacts Scraper API (`openweb-ninja/website-contacts-scraper`) Actor

Fast and reliable website contact information scraper - extract emails, phone numbers, and social media links from any website in real-time.

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

## Pricing

from $0.75 / 1,000 api requests

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

## Website Contacts Scraper API

Website Contacts Scraper is a fast and reliable API for extracting contact information from any website in real-time. It returns emails, phone numbers, and social media profile links as structured JSON via REST.

What it returns: emails, phone numbers, and social profile links (Facebook, Instagram, TikTok, Twitter, LinkedIn, and others) scraped from a website, plus website lookup by keyword.

This actor runs the same Website Contacts Scraper API that developers use on RapidAPI and OpenWeb Ninja, with the same endpoints, parameters and output.

### What you can do with it

- Extract emails, phone numbers and social profiles from any website
- Enrich lead lists with contacts for every company website
- Find the website of a business by name or keyword
- Feed sales prospecting and outreach tools

### Endpoints

Pick the endpoint in the **Endpoint** field. Each run makes one call to that endpoint and writes its results to the dataset.

#### Scrape Contacts from Website

`GET /scrape-contacts`

Scrape emails, phone numbers, and social profile links from a website root domain. Supports batching of up to 20 domains in a single request. Note that by default, the emails returned by the endpoint are not restricted to match the website domain (after the "@"), to restrict emails to the website domain, set the match_email_domain parameter to true (or 1). The endpoint also supports external matching of contacts (outside the company website and social profiles) by setting the  external_match parameter to true (or 1).

| Parameter | Required | Description |
|---|---|---|
| `query` | Yes |  |
| `match_email_domain` | No |  Default: `false`. |
| `external_matching` | No |  Default: `false`. |

#### Get Website by Keyword

`POST /website-url-by-keyword` (parameters go in the JSON body)

Get company website URL by keyword / company name. Up to 20 keywords are supported in a single query.

| Parameter | Required | Description |
|---|---|---|
| `keywords` | Yes | Search keywords / company names. Up to 20 keywords are supported in a single request. |
| `limit` | No | Maximum number of website URLs to return per keyword. When set above 1, each keyword maps to a list of website URLs instead of a single URL. Default: `1`. |

### Example input

```json
{
  "endpoint": "/scrape-contacts",
  "query": "wsgr.com"
}
```

### Example output

One dataset item per result. A Scrape Contacts from Website item looks like this (trimmed):

```json
{
  "domain": "wsgr.com",
  "query": "wsgr.com",
  "emails": [
    {
      "value": "wsgr_resource@wsgr.com",
      "sources": [
        "https://www.wsgr.com/email/FINPRO/FINPRO_web.html",
        "https://www.wsgr.com/email/SayOnPay/say-on-pay-webinar.htm"
      ]
    },
    {
      "value": "klynn@wsgr.com",
      "sources": [
        "https://www.wsgr.com/email/mcle/2014/Client_DVD_CD_List_2014-2015.xls"
      ]
    }
  ],
  "phone_numbers": [
    {
      "value": "787465546",
      "sources": [
        "https://www.wsgr.com/en/about-us/offices/index.html"
      ]
    },
    {
      "value": "5123385400",
      "sources": [
        "https://www.wsgr.com/en/about-us/offices/index.html"
      ]
    }
  ],
  "facebook": "https://www.facebook.com/wilsonsonsini",
  "instagram": "https://www.instagram.com/wilson_sonsini",
  "tiktok": null,
  "snapchat": null,
  "twitter": "https://twitter.com/wilsonsonsini",
  "linkedin": null,
  "github": "https://github.com/ethangarofolo-wsgr",
  "youtube": "https://www.youtube.com/user/WSGRChannel",
  "pinterest": null
}
```

The run's key-value store `OUTPUT` record holds the request parameters, the request id and any non-list fields of the response (for example a pagination cursor).

### Pricing

Pay per event: you pay per API request, at the same rates as our API plans. Most runs are one request; some parameters (such as fetching several pages at once) count as several, exactly as they do on the API.

| Apify plan | Price per 1,000 requests |
|---|---|
| Free | $5.00 |
| Starter (Bronze) | $2.50 |
| Scale (Silver) | $1.50 |
| Business (Gold) and above | $0.75 |

A request that fails is not charged.

### Using it from code

Run it through the [Apify API](https://docs.apify.com/api/v2) or a client library, with the input above as the JSON body:

```bash
curl -X POST "https://api.apify.com/v2/acts/openweb-ninja~website-contacts-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"endpoint":"/scrape-contacts","query":"wsgr.com"}'
```

Need higher volume or a direct REST API? Website Contacts Scraper API is also available as an API on [OpenWeb Ninja](https://www.openwebninja.com/api/website-contacts-scraper) and [RapidAPI](https://rapidapi.com/letscrape-6bRBa3QguO5/api/website-contacts-scraper).

### Support

For custom plans, high volumes or anything else:

- Email: support@openwebninja.com
- Discord: https://discord.gg/wxJxGsZgha

# Actor input Schema

## `endpoint` (type: `string`):

Which endpoint of the API to call. Each endpoint uses the parameters listed in its section below; parameters of other endpoints are ignored.

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

<br><br><em>Used by: Scrape Contacts from Website. Required for Scrape Contacts from Website.</em>

## `match_email_domain` (type: `boolean`):

<br><br><em>Used by: Scrape Contacts from Website.</em>

## `external_matching` (type: `boolean`):

<br><br><em>Used by: Scrape Contacts from Website.</em>

## `keywords` (type: `array`):

Search keywords / company names. Up to 20 keywords are supported in a single request.<br><br><em>Used by: Get Website by Keyword. Required for Get Website by Keyword.</em>

## `limit` (type: `integer`):

Maximum number of website URLs to return per keyword. When set above 1, each keyword maps to a list of website URLs instead of a single URL.<br><br><em>Used by: Get Website by Keyword.</em>

## Actor input object example

```json
{
  "endpoint": "/scrape-contacts",
  "query": "wsgr.com",
  "match_email_domain": false,
  "external_matching": false,
  "limit": 1
}
```

# Actor output Schema

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

One dataset item per result of the API call.

## `summary` (type: `string`):

Endpoint, parameters, request id, billed requests and any non-list response fields (such as a pagination cursor).

# 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 = {
    "query": "wsgr.com",
    "limit": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("openweb-ninja/website-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 = {
    "query": "wsgr.com",
    "limit": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("openweb-ninja/website-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 '{
  "query": "wsgr.com",
  "limit": 1
}' |
apify call openweb-ninja/website-contacts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,openweb-ninja/website-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/6bUEIZDSSY6crqek6/builds/WtlfbhgHYqLMpyAYH/openapi.json
