# Stack Overflow Email Scraper (`email_scraper/stack-overflow-email-scraper`) Actor

Stack Overflow Email Scraper extracts publicly indexed email addresses from Stack Overflow using targeted keywords, locations, and custom email domains. Find developer, founder, engineer, and B2B leads with structured contact data for prospecting and research.

- **URL**: https://apify.com/email\_scraper/stack-overflow-email-scraper.md
- **Developed by:** [Email Scraper](https://apify.com/email_scraper) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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?

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

### Stack Overflow Email Scraper – Overview

**Stack Overflow Email Scraper** helps you discover publicly indexed email addresses associated with Stack Overflow search results using targeted keywords, optional locations, and configurable email-domain filters.

It is designed for lead generation, developer research, B2B prospecting, recruiting, market research, and contact discovery. Instead of manually searching thousands of indexed Stack Overflow pages, you can provide search terms such as `Founder`, `Web Developer`, `Python Developer`, or `Software Engineer` and let the Actor collect matching publicly visible email addresses.

The **Stack Overflow Email Scraper** returns structured lead data including the keyword used, result title, description snippet, source URL, and discovered email address.

> 💡 **What problem does it solve?**
> Finding relevant Stack Overflow contacts manually can be repetitive and difficult to scale. The Stack Overflow Email Scraper automates keyword-based discovery and organizes matching contact information into an Apify dataset.

The easiest workflow is simple: enter your keywords, optionally provide a location, choose the email domains you want to find, set a maximum per keyword-domain combination, and start the Actor.

### Stack Overflow Email Scraper – Key Features

The **Stack Overflow Email Scraper** focuses on targeted email discovery rather than collecting unrelated Stack Overflow content.

> ⭐ **Key Features**
>
> - Search Stack Overflow-related results using multiple keywords
> - Filter searches by country, state, city, or another location term
> - Target specific email domains such as `@gmail.com` and `@yahoo.com`
> - Support multiple email domains in one run
> - Set a maximum number of emails for each keyword-domain combination
> - Exclude results containing unwanted words or phrases
> - Remove duplicate email addresses
> - Save structured results to an Apify dataset
> - Continue working across multiple keyword and domain combinations
> - Return source context alongside each discovered email

The **Stack Overflow Email Scraper** is particularly useful when your search needs to combine a professional role or technology keyword with a particular email domain.

For example, searches such as `Python Developer + @gmail.com`, `Founder + @outlook.com`, or `Web Developer + @company.com` can create more targeted discovery opportunities.

### Stack Overflow Email Scraper – What Data You Can Extract

The **Stack Overflow Email Scraper** produces structured records for every unique email address it discovers.

| Field         | Description                                                     |
| ------------- | --------------------------------------------------------------- |
| `network`     | Identifies the source network as Stack Overflow.com             |
| `keyword`     | Keyword or query used for the search                            |
| `title`       | Title associated with the search result                         |
| `description` | Search-result description containing the discovered information |
| `url`         | Source result URL                                               |
| `email`       | Email address matching the selected domain                      |

> 📦 **Output / Data Fields**
>
> Each dataset record contains the search context and contact information together, making it easier to understand why an email was returned and where it was found.

The Actor is designed around structured results rather than a simple list of addresses. This gives you additional context for lead qualification, segmentation, filtering, and later analysis.

Because the **Stack Overflow Email Scraper** finds addresses exposed through publicly indexed search-result information, results depend on what is publicly available and indexed. A keyword does not guarantee that an email will be found.

### Stack Overflow Email Scraper – How to Use It

Using the **Stack Overflow Email Scraper** requires only a few input values.

#### 1. Add Keywords or Queries

Enter one or more terms in the `keywords` field.

Examples include:

```text
Founder
Web Developer
Python Developer
Software Engineer
DevOps Engineer
JavaScript Developer
Data Scientist
Startup Founder
```

Using several related search terms can increase coverage because different professional roles may appear in different publicly indexed results.

#### 2. Add a Location

The optional `location` field lets you narrow searches geographically.

Examples:

```text
United States
New York
London
California
Toronto
```

Leave the field empty when you want broader geographic discovery.

#### 3. Choose Email Domains

The `customDomains` field controls which email-domain suffixes the Actor searches for.

Examples:

```text
@gmail.com
@yahoo.com
@outlook.com
@hotmail.com
@company.com
```

You can provide multiple domains to build separate search combinations.

#### 4. Set the Maximum

The `maxEmails` field controls the target for each keyword and email-domain combination.

Its supported range is **1 to 10,000**, with a default value of **10**.

> ⚙️ **Important:**
> The maximum is not simply one shared total across the complete input matrix. Each keyword-domain combination is processed independently, so adding more keywords or domains can increase the total number of combinations searched.

#### 5. Add Exclusion Words

Use `excludeWords` when you want to ignore search-result descriptions containing specific words or phrases.

For example:

```text
crypto
onlyfans
gambling
```

This can help reduce unwanted categories from your lead discovery workflow.

### How to Scrape Stack Overflow Emails by Keyword

The **Stack Overflow Email Scraper** is most effective when keywords describe the people, professions, technologies, or business roles you are trying to discover.

A broad query such as:

```text
Developer
```

may produce different results from more specific terms such as:

```text
React Developer
Python Developer
Senior Software Engineer
Backend Developer
Technical Founder
```

For lead generation, start with several related keywords rather than relying on one generic term.

> 🎯 **Search Strategy**
>
> Combine professional roles, technical skills, and niche descriptions to improve targeting. Examples include `SaaS Founder`, `Python Developer`, `AI Engineer`, `Frontend Developer`, and `Technical Founder`.

The **Stack Overflow Email Scraper** also lets you combine those keywords with email-domain targeting. This can make searches more specific when your campaign requires a particular type of contact address.

### Can You Target a Country or City?

Yes. The **Stack Overflow Email Scraper** provides an optional `location` input.

You can enter a country, state, city, or another location phrase manually. The location is used to narrow the search rather than serving as a separate geographic database filter.

For example:

```text
United States
New York
San Francisco
Canada
Berlin
```

A location can make results more targeted, but it can also reduce the available number of results. When searches produce very few records, removing or broadening the location may improve discovery.

### Can You Search Multiple Email Domains?

Yes. The **Stack Overflow Email Scraper** supports a list of custom email domains.

For example:

```json
{
  "customDomains": [
    "@gmail.com",
    "@yahoo.com",
    "@outlook.com"
  ]
}
```

This allows you to search the same keyword against different email-domain targets.

Business users can also specify company-domain suffixes when they already know which domains are relevant to their prospecting campaign.

> 🔎 **Tip:**
> When results are sparse, testing additional relevant email domains can expand coverage. Results still depend on whether matching addresses are publicly indexed.

### Stack Overflow Email Scraper – Use Cases

The **Stack Overflow Email Scraper** can support several practical research and outreach workflows.

#### B2B Lead Generation

Find publicly indexed contact addresses connected with developers, founders, engineers, and technology professionals.

#### Developer Recruiting

Recruiting teams can search for role-related terms such as `Python Developer`, `Java Developer`, `Backend Engineer`, or `DevOps Engineer`.

#### Technical Community Research

Researchers can identify publicly indexed contacts around technologies, programming skills, or professional roles.

#### Startup Prospecting

Search terms such as `Founder`, `Startup Founder`, `CTO`, or `SaaS Founder` can help build targeted discovery lists.

#### Technology-Specific Outreach

Use technical keywords such as `React`, `Django`, `Kubernetes`, `Machine Learning`, or `Node.js` alongside role-related terms.

#### Market Research

Create structured datasets around specific technology roles, locations, and publicly indexed contact information.

> 🚀 **Why Use This Actor?**
>
> The Stack Overflow Email Scraper combines keyword targeting, location filtering, email-domain targeting, exclusion filtering, duplicate prevention, and structured output in a single workflow.

### Input

The **Stack Overflow Email Scraper** accepts the following inputs:

| Input           | Type    | Required | Default                | Purpose                                            |
| --------------- | ------- | -------: | ---------------------- | -------------------------------------------------- |
| `keywords`      | Array   |      Yes | Founder, Web Developer | Search keywords or queries                         |
| `location`      | String  |       No | Empty                  | Optional geographic search term                    |
| `customDomains` | Array   |       No | `@gmail.com`           | Email domains to target                            |
| `maxEmails`     | Integer |       No | 10                     | Maximum target per keyword-domain combination      |
| `excludeWords`  | Array   |       No | Empty                  | Words or phrases that cause a result to be skipped |

#### Keywords

`keywords` is the primary search input and must contain at least one keyword.

```json
{
  "keywords": [
    "Founder",
    "Python Developer",
    "Web Developer"
  ]
}
```

#### Location

`location` is optional:

```json
{
  "location": "New York"
}
```

#### Custom Domains

```json
{
  "customDomains": [
    "@gmail.com",
    "@outlook.com",
    "@company.com"
  ]
}
```

#### Maximum Emails

```json
{
  "maxEmails": 25
}
```

The accepted value is between 1 and 10,000.

#### Exclude Words

```json
{
  "excludeWords": [
    "crypto",
    "onlyfans"
  ]
}
```

Matching is case-insensitive. Individual words are matched as whole words, while phrases are matched as phrases.

### Output

The **Stack Overflow Email Scraper** stores results in an Apify dataset.

A typical record has this structure:

```json
{
  "network": "Stack Overflow.com",
  "keyword": "Python Developer",
  "title": "Example Result Title",
  "description": "Example public search-result description containing contact information.",
  "url": "https://stackoverflow.com/...",
  "email": "example@gmail.com"
}
```

The exact values depend on the search results available during your run.

> 📊 **Structured Output**
>
> Results are pushed into the Actor's dataset as they are discovered. The dataset provides a structured place to review the collected Stack Overflow leads and their associated source information.

### Pricing

The exact monetary price is not specified in the provided Actor configuration, so this README does not invent a price.

The Actor does, however, distinguish between free and paid usage for result limits. For free usage, the requested `maxEmails` value is capped at **100** per keyword-domain combination. Paid usage does not apply that 100-result cap.

Actual results can still be lower than the configured target because the Actor can only collect email addresses that are publicly discoverable and match the selected search criteria.

> 💰 **Pricing Note**
>
> More keywords and more email domains create more search combinations. Keep that in mind when designing large runs, because broader searches may require more processing.

### Tips and Best Practices

The **Stack Overflow Email Scraper** works best with focused but sufficiently broad search strategies.

Use several related keyword variations instead of relying on one generic phrase. For example, combine `Founder`, `Startup Founder`, `SaaS Founder`, and `Technical Founder` when researching founders.

Avoid making the location unnecessarily restrictive. A highly specific geographic term can reduce available search results.

Experiment with email domains based on your intended audience. Personal domains and company domains can produce different types of contact information.

Use `excludeWords` to remove irrelevant categories before addresses are collected.

> 💡 **Important Notes**
>
> - The Actor relies on publicly indexed search-result information.
> - Results are not guaranteed for every keyword.
> - A larger `maxEmails` value does not guarantee more emails.
> - Multiple keywords and domains increase search coverage.
> - Duplicate email addresses are filtered from collected results.
> - Search-result availability can change over time.

### What Happens When There Are Few Results?

The **Stack Overflow Email Scraper** may return fewer addresses than requested when the available public search results are limited.

This does not necessarily indicate an error. A narrow keyword, restrictive location, uncommon email domain, or limited indexed information can all reduce results.

For better coverage, try related keywords, additional email domains, or a broader location.

### Frequently Asked Questions

#### What is the Stack Overflow Email Scraper?

The **Stack Overflow Email Scraper** is an Apify Actor for discovering publicly indexed email addresses associated with Stack Overflow search results using keywords, optional locations, and configurable email-domain filters.

#### How does the Stack Overflow Email Scraper find emails?

The **Stack Overflow Email Scraper** searches publicly indexed Stack Overflow-related results and extracts email addresses that match the selected domain suffixes.

It does not guarantee that every Stack Overflow profile or page will contain a publicly discoverable email address.

#### What keywords can I use with the Stack Overflow Email Scraper?

You can use professional roles, technical skills, job titles, business categories, or descriptive search phrases.

Examples include `Founder`, `Software Engineer`, `Python Developer`, `Data Scientist`, `CTO`, and `DevOps Engineer`.

#### Can I use a city with the Stack Overflow Email Scraper?

Yes. The optional `location` field accepts manually entered country, state, city, or other location text.

#### Can I search Gmail and Outlook addresses?

Yes. Add multiple values to `customDomains`, such as `@gmail.com` and `@outlook.com`.

#### Can I search company email domains?

Yes. You can provide custom domain suffixes such as `@company.com`, provided matching addresses are publicly indexed.

#### What happens when I use multiple keywords?

The **Stack Overflow Email Scraper** processes each keyword and combines it with the configured email-domain targets, creating multiple search combinations.

#### What happens when I use multiple domains?

Each domain is searched separately for the configured keywords. This can broaden email discovery across different address types.

#### Can I exclude certain words?

Yes. The `excludeWords` input lets you skip search-result descriptions containing unwanted words or phrases.

#### Why did the Stack Overflow Email Scraper return fewer emails than my limit?

The configured limit is a target, not a guarantee. Public search availability, keyword relevance, location restrictions, email-domain availability, and duplicate results can all affect the final count.

#### Is the maximum email setting a total for the whole run?

No. The **Stack Overflow Email Scraper** applies the configured target to each keyword-domain combination. Adding more combinations can therefore increase the potential total.

#### What data does the Stack Overflow Email Scraper return?

The Actor returns `network`, `keyword`, `title`, `description`, `url`, and `email` fields for each collected record.

#### Does the Actor remove duplicate emails?

Yes. Duplicate email addresses are filtered so the same discovered address is not repeatedly stored as a new lead.

#### Can I use a custom domain with the Stack Overflow Email Scraper?

Yes. The `customDomains` input supports user-provided email-domain suffixes, making it possible to target domains beyond common providers.

#### Is every returned email guaranteed to belong to a Stack Overflow user?

The Actor extracts matching email addresses from publicly indexed search-result information associated with the search results. Users should validate and qualify collected contact information before using it.

### Support

For questions, custom requirements, or bespoke Actor development, use the contact information provided with the Actor listing.

The **Stack Overflow Email Scraper** is intended to make keyword-based public contact discovery easier to organize, automate, and scale while keeping the output structured and practical for lead research.

# Actor input Schema

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

A list of keywords or queries to search for.

## `location` (type: `string`):

Optional country, state or city used to narrow the search. Leave it empty to search without a geographic filter.

## `customDomains` (type: `array`):

List of custom email domains

## `maxEmails` (type: `integer`):

How many addresses each search keyword + domain suffix combination may collect before the finder moves on to the next one. This is a per-combination target, not a run-wide total: with 3 keyword and 2 Domains and a limit of 20, the run works through all 6 combinations and aims for up to 20 addresses in each, so up to 120 overall. Lower values finish sooner and cost less; higher values dig deeper but never guarantee a fuller result, since the run can only find what is publicly listed.

## `excludeWords` (type: `array`):

Words or phrases you do not want to see.

## Actor input object example

```json
{
  "keywords": [
    "Founder",
    "Web Developer"
  ],
  "location": "",
  "customDomains": [
    "@gmail.com"
  ],
  "maxEmails": 10,
  "excludeWords": []
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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 = {
    "keywords": [
        "Founder",
        "Web Developer"
    ],
    "location": "",
    "customDomains": [
        "@gmail.com"
    ],
    "excludeWords": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("email_scraper/stack-overflow-email-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 = {
    "keywords": [
        "Founder",
        "Web Developer",
    ],
    "location": "",
    "customDomains": ["@gmail.com"],
    "excludeWords": [],
}

# Run the Actor and wait for it to finish
run = client.actor("email_scraper/stack-overflow-email-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 '{
  "keywords": [
    "Founder",
    "Web Developer"
  ],
  "location": "",
  "customDomains": [
    "@gmail.com"
  ],
  "excludeWords": []
}' |
apify call email_scraper/stack-overflow-email-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,email_scraper/stack-overflow-email-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/YgGXq6b8Rm1MHJFbg/builds/1nmscrvahxa0v4iQp/openapi.json
