# Email Provider Detector: Google Workspace, Microsoft 365 & MX (`data-done-right/email-provider-detector`) Actor

Detect the email provider behind any domain from DNS only: Google Workspace, Microsoft 365, Zoho, Proton, security gateways. Returns MX hosts, SPF and DMARC policy, free-mail and disposable flags. Bulk domains or emails in, one row each. No mailbox checks, no email sent.

- **URL**: https://apify.com/data-done-right/email-provider-detector.md
- **Developed by:** [Data Done Right](https://apify.com/data-done-right) (community)
- **Categories:** Lead generation, Developer tools, SEO tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 domain checkeds

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

## Email Provider Detector: Google Workspace, Microsoft 365 & MX Lookup

This **email provider detector** tells you which email provider a domain uses (Google Workspace, Microsoft 365, Zoho, Proton, a security gateway or its own server) by reading the domain's public DNS records. Paste domains, email addresses or URLs and get one flat row per domain with the provider, MX hosts, SPF and DMARC policy, and free-mail and disposable flags. No API key, no email sent, no mail server contacted.

> **What it does not do.** It reads **DNS only** (MX, SPF, DMARC, plus A/AAAA when there is no MX). It **does not check mailboxes**, does not connect to any mail server (no SMTP), and cannot tell you whether `jane@company.com` exists or is deliverable. The provider is inferred from MX host names (and the SPF record when a security gateway sits in front), so it is a strong hint, not a contract: "Google Workspace" also covers other paid Google mail plans, and "Microsoft 365" also covers standalone Exchange Online. It does **not** read DKIM keys, does not expand SPF includes or count SPF lookups, does not validate DMARC alignment, and does not look at websites or social platforms. The free-mail and disposable lists are small, written for this Actor, and not exhaustive.

**What you get**

- Per domain: provider name and type, `isGoogleWorkspace`, `isMicrosoft365`, security gateway and the mailbox provider behind it, MX hosts with priorities, and whether the domain can receive mail at all.
- SPF: present or not, policy (hardfail, softfail, neutral, pass, redirect), include domains, and known sending services (SendGrid, Mailchimp, Amazon SES, Salesforce...). DMARC: present, policy, subdomain policy, pct, reporting on or off.
- Free-mail and disposable flags, with explained rows for bad input and for DNS errors. Only domains that got a real DNS answer are charged.

### How to find out if a company uses Google Workspace or Microsoft 365

1. Paste company domains (or the email addresses or website URLs you already have) in `domains`, one per line. `https://www.acme.io/pricing`, `jane@acme.io` and `acme.io` all become `acme.io`.
2. Run it. Filter the dataset on `isGoogleWorkspace` or `isMicrosoft365`, or group by `provider`.
3. Read `providerSource`: `mx` means the MX hosts name the provider; `spf` means a security gateway (Mimecast, Proofpoint...) answers first and the mailbox provider was inferred from the SPF record.

### How to do a bulk MX record lookup

Every row has `mxHosts` (`[{"priority": 10, "host": "aspmx.l.google.com"}]`, lowest priority first), `primaryMx`, `mxCount` and `mailRouting`: `mx`, `implicit-a` (no MX, mail would go to the A/AAAA address), `null-mx` (the domain says it takes no mail) or `none`. `acceptsMail` summarizes this as true or false.

### How to check SPF and DMARC for many domains

Turn on `includeRawRecords` to get the full `spfRecord` and `dmarcRecord` text next to the parsed `spfPolicy`, `spfIncludes`, `dmarcPolicy`, `dmarcPct` and `dmarcReporting`. `warnings` flags problems such as two SPF records on one domain, which receivers treat as an error. For a full deliverability audit (DKIM, SSL, headers) use the sibling Actor listed below.

### How to flag free-mail and disposable domains

`isFreeMail` is true for providers such as gmail.com, outlook.com, yahoo.com, proton.me and regional variants. `isDisposable` is true for known temporary-inbox services (and their subdomains). Both come from small lists inside the Actor; a domain that is not flagged is not guaranteed to be a real business domain.

### Input

| Field | Default | What it does |
|---|---|---|
| `domains` | 5 sample domains | Domains, email addresses or URLs, one per line. Required. |
| `checkSpf` | `true` | Read the SPF record (also used to name the provider behind a gateway). |
| `checkDmarc` | `true` | Read the DMARC record at `_dmarc.<domain>`. |
| `includeRawRecords` | `false` | Add the raw SPF and DMARC text to each row. |
| `deduplicate` | `true` | Check each domain once. Duplicates are free. |
| `maxDomains` | 1000 | Most domains checked in a run (max 100,000). Extra domains are skipped and free. |
| `dnsResolver` | `system` | `system`, `cloudflare`, `google` or `quad9`. Switch if you see temporary DNS failures. |
| `concurrency` | 20 | Domains looked up at the same time (1 to 50). |
| `retries` | 3 | Attempts per DNS query after a timeout or SERVFAIL. |
| `dnsTimeoutSecs` | 5 | Seconds before one DNS attempt is abandoned. |

Input example:

```json
{
  "domains": ["gmail.com", "github.com", "stripe.com", "mailinator.com", "proton.me"],
  "includeRawRecords": false
}
```

### Output

From a real local run of the input above (the `stripe.com` row):

```json
{
  "input": "stripe.com",
  "domain": "stripe.com",
  "status": "ok",
  "error": null,
  "provider": "Google Workspace",
  "providerType": "mailbox",
  "providerSource": "mx",
  "allProviders": ["Google Workspace"],
  "isGoogleWorkspace": true,
  "isMicrosoft365": false,
  "isFreeMail": false,
  "isDisposable": false,
  "securityGateway": null,
  "mailBackend": null,
  "mailRouting": "mx",
  "acceptsMail": true,
  "mxCount": 5,
  "primaryMx": "aspmx.l.google.com",
  "mxHosts": [{"priority": 10, "host": "aspmx.l.google.com"}, {"priority": 20, "host": "alt1.aspmx.l.google.com"}],
  "spfPresent": true,
  "spfPolicy": "softfail",
  "spfIncludes": ["spf1.stripe.com", "greenhouse-outbound-mail.stripe.com", "_spf.qualtrics.com"],
  "spfRecordCount": 1,
  "sendingServices": ["Stripe"],
  "spfRecord": null,
  "dmarcPresent": true,
  "dmarcPolicy": "reject",
  "dmarcSubdomainPolicy": null,
  "dmarcPct": 100,
  "dmarcReporting": true,
  "dmarcRecord": null,
  "warnings": [],
  "checkedAt": "2026-11-10T21:58:00+00:00"
}
```

(`mxHosts` shortened to two of five entries here.) Providers found for the sample input in that run: Gmail (gmail.com), Microsoft 365 (github.com), Google Workspace (stripe.com), "Other / self-hosted" (mailinator.com, flagged `isDisposable`) and Proton Mail (proton.me). DNS answers change over time, so a later run can differ.

`status` is `ok` (DNS answered), `nxdomain` (the domain does not exist), `invalid-domain` (the entry is not a domain, for example an IP address or an internal name; explained in `error`) or `dns-failed` (temporary DNS failure after all retries; not a verdict about the domain). Invalid entries are listed in the `FAILED` record, and the `SUMMARY` record counts rows, charges and top providers.

**Provider types:** `mailbox` (hosted mailboxes: Google Workspace, Microsoft 365, Zoho Mail, Proton Mail, Fastmail, IONOS, GoDaddy and others), `gateway` (security filter in front, such as Mimecast or Proofpoint, when no backend could be inferred), `forwarding` (Cloudflare Email Routing, ImprovMX and similar), `other` (an MX host we do not recognize, or no MX and an A/AAAA fallback) and `none`. Free domains are named by product: `Gmail` and `Outlook.com` instead of Google Workspace and Microsoft 365.

### Use with the Apify API, MCP, n8n and Make

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("data-done-right/email-provider-detector").call(run_input={
    "domains": ["acme.io", "contoso.com"], "checkDmarc": False})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["domain"], row["provider"], row["isGoogleWorkspace"], row["spfPolicy"])
```

JavaScript:

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('data-done-right/email-provider-detector').call({ domains: ['acme.io'] });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

In n8n or Make use the Apify node with the Actor name and the same JSON. With Apify's MCP server (mcp.apify.com) an AI assistant can call it: "does acme.io use Google Workspace or Microsoft 365?". Only a domain is needed.

### Use cases

- Sort a lead list by email platform before outreach, migration offers or Workspace and Microsoft 365 partner campaigns.
- Flag free-mail and disposable domains in a signup or lead list before enrichment.
- Find which vendors or clients publish no SPF or DMARC record, or a weak one (`softfail`, `pass`, `none`).
- Find domains with no MX record at all before sending to them or paying to enrich them.
- Enrich CRM accounts with the mail provider and the security gateway they sit behind.

### How much does it cost

Pay per event: **$0.002 per domain checked** (`domain-checked`, $2 per 1,000). Invalid entries, duplicates, domains beyond `maxDomains` and domains with a temporary DNS failure are free. Plan discounts apply (Silver about 10%, Gold and higher about 20%).

- 1,000 domains: $2.
- 10,000 domains: $20.
- 100,000 domains: $200.

`maxDomains` caps a run, and if you set a maximum spend per run the Actor stops cleanly when it is reached. Apify platform usage is included in this price.

### FAQ

#### Does it check whether an email address exists?

No. It only reads DNS records for the domain. It sends nothing and connects to no mail server, so it cannot say whether a mailbox exists or is deliverable. For syntax, MX and disposable checks on full addresses use the Email Verifier listed below, which is also DNS-only.

#### How reliable is "Google Workspace" or "Microsoft 365"?

When the MX hosts are Google's or Microsoft's, it is a strong signal (`providerSource: mx`). The MX records cannot distinguish a paid Google Workspace plan from other Google mail plans, or Microsoft 365 from standalone Exchange Online. Behind a gateway (`providerSource: spf`) the answer rests on the SPF record naming Google or Microsoft as a sender, which is a weaker hint.

#### What does "Other / self-hosted" mean?

The domain has an MX host that is not in the Actor's provider list. It can be a company's own server, a smaller host or a provider we do not know yet. The `primaryMx` field shows the host name so you can judge for yourself.

#### Why is a row `dns-failed`?

The DNS query timed out or the name servers returned an error on every attempt. That says nothing about the domain, so the row is free. Run it again later or set `dnsResolver` to `cloudflare`. If only the SPF or DMARC lookup failed, the row is delivered with `spfPresent` or `dmarcPresent` set to `null` and a `warnings` entry.

#### Does it read DKIM or follow SPF includes?

No. DKIM needs a selector name that only the sender knows, and SPF includes are listed, not expanded. The sibling Domain Health Checker covers more of the DNS and SSL side.

#### Is it safe to give internal or private names?

IP addresses and internal-looking names (`.local`, `.internal`, `.lan` and similar) are refused with an explanation and cost nothing, so no DNS queries go out for them.

### Related tools

- **Verify Email Addresses in Bulk: Syntax, MX & Disposable** for syntax, MX and disposable checks on full email addresses.
- **Domain Health Checker: DNS, SPF, DKIM, DMARC, SSL & Headers** for a deeper audit of one domain's mail and web setup.
- **Website Technology Checker: CMS, WordPress & Tracking Pixels** to profile the websites of the same domains.

# Actor input Schema

## `domains` (type: `array`):

One per line. A domain (example.com), an email address (jane@example.com) or a URL (https://example.com) all work; only the domain part is used. Example: microsoft.com.

## `checkSpf` (type: `boolean`):

Look up the SPF TXT record to get the SPF policy, includes and recognized sending services. Needed to name the mailbox provider behind a security gateway. Default: on.

## `checkDmarc` (type: `boolean`):

Look up the DMARC TXT record at \_dmarc.<domain> to get the policy (none, quarantine, reject). Default: on.

## `includeRawRecords` (type: `boolean`):

Add the full SPF and DMARC record text to each row. Default: off, rows stay smaller.

## `deduplicate` (type: `boolean`):

Check each domain once even if it is listed several times or appears in several email addresses. Duplicates are free. Default: on.

## `maxDomains` (type: `integer`):

Most domains checked in this run. Domains beyond this are skipped and not charged. Example: 1000.

## `dnsResolver` (type: `string`):

Which DNS resolver answers the queries. System default works for most runs; switch to a public resolver if you see temporary DNS failures. Default: system.

## `concurrency` (type: `integer`):

How many domains are looked up at the same time (each needs 2 to 4 DNS queries). Default 20.

## `retries` (type: `integer`):

How often a DNS query is repeated after a timeout or SERVFAIL before the domain gets a dns-failed row (not charged). Default 3.

## `dnsTimeoutSecs` (type: `integer`):

Give up on one DNS query after this many seconds. Default 5.

## Actor input object example

```json
{
  "domains": [
    "gmail.com",
    "github.com",
    "stripe.com",
    "mailinator.com",
    "proton.me"
  ],
  "checkSpf": true,
  "checkDmarc": true,
  "includeRawRecords": false,
  "deduplicate": true,
  "maxDomains": 1000,
  "dnsResolver": "system",
  "concurrency": 20,
  "retries": 3,
  "dnsTimeoutSecs": 5
}
```

# Actor output Schema

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

One row per domain with the detected email provider, MX hosts, SPF and DMARC, as JSON, CSV, Excel and more.

## `records` (type: `string`):

Key-value store records: the run summary and the list of entries that were not valid domains.

# 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 = {
    "domains": [
        "gmail.com",
        "github.com",
        "stripe.com",
        "mailinator.com",
        "proton.me"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("data-done-right/email-provider-detector").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 = { "domains": [
        "gmail.com",
        "github.com",
        "stripe.com",
        "mailinator.com",
        "proton.me",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("data-done-right/email-provider-detector").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 '{
  "domains": [
    "gmail.com",
    "github.com",
    "stripe.com",
    "mailinator.com",
    "proton.me"
  ]
}' |
apify call data-done-right/email-provider-detector --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,data-done-right/email-provider-detector"
        }
    }
}
```

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/htgECnNmR9nCjPcRi/builds/0MEUqOiPhdiddf6Vw/openapi.json
