Skip to content

ParrotApi/smtp-mailbox-verification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Email Mailbox Verification API (SMTP Handshake)

You collected an email address. Is anyone actually behind it? A regex can tell you jane.doe@gmali.com is well-formed — it can't tell you the mailbox doesn't exist. You only find that out when the message bounces, and every bounce chips away at your sender reputation until Gmail starts filing your legitimate mail under spam.

This API answers the real question — does this mailbox exist? — with one call. GET /verify?email=jane.doe@gmail.com resolves the domain's MX records and performs a live SMTP RCPT-TO handshake against the actual receiving mail server, the same way another mail server would, then hangs up before any message is sent. The handshakes run over residential IPs, so instead of the timeouts and false unknowns you get from datacenter-hosted checkers (whose port-25 traffic is blocked on sight), you get a straight answer: deliverable, undeliverable, risky, unknown, or invalid — plus catch-all detection, a 0–100 risk score, and flags for disposable domains, role accounts, and free webmail.

Use it to:

  • Reject fake and throwaway addresses at signup, before they enter your database
  • Clean cold-outreach lists so you only email inboxes that exist (up to 100 at a time via /verify-batch)
  • Protect sender reputation by catching hard bounces before you send
  • Route risky or catch-all addresses into a double-opt-in flow instead of trusting them blindly

Get started

  1. Subscribe (free tier available) on RapidAPI and copy your X-RapidAPI-Key.
  2. Call the API — here's the primary endpoint in every major language.

Base URL: https://email-mailbox-verification-api-smtp-handshake.p.rapidapi.com

Code examples

cURL

curl --request GET \
  --url 'https://email-mailbox-verification-api-smtp-handshake.p.rapidapi.com/verify?email=jane.doe%40gmail.com' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: email-mailbox-verification-api-smtp-handshake.p.rapidapi.com'

Python

import requests

url = "https://email-mailbox-verification-api-smtp-handshake.p.rapidapi.com/verify"
querystring = {"email": "jane.doe@gmail.com"}
headers = {
    "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
    "X-RapidAPI-Host": "email-mailbox-verification-api-smtp-handshake.p.rapidapi.com",
}

response = requests.get(url, headers=headers, params=querystring)
print(response.json())

JavaScript (fetch)

const url = 'https://email-mailbox-verification-api-smtp-handshake.p.rapidapi.com/verify?email=jane.doe%40gmail.com';
const options = {
  method: 'GET',
  headers: {
    'X-RapidAPI-Key': 'YOUR_RAPIDAPI_KEY',
    'X-RapidAPI-Host': 'email-mailbox-verification-api-smtp-handshake.p.rapidapi.com',
  },
};

const response = await fetch(url, options);
console.log(await response.json());

Node.js (axios)

import axios from 'axios';

const options = {
  method: 'GET',
  url: 'https://email-mailbox-verification-api-smtp-handshake.p.rapidapi.com/verify',
  params: {email: 'jane.doe@gmail.com'},
  headers: {
    'X-RapidAPI-Key': 'YOUR_RAPIDAPI_KEY',
    'X-RapidAPI-Host': 'email-mailbox-verification-api-smtp-handshake.p.rapidapi.com',
  },
};

const { data } = await axios.request(options);
console.log(data);

TypeScript

const url = 'https://email-mailbox-verification-api-smtp-handshake.p.rapidapi.com/verify?email=jane.doe%40gmail.com';

const response = await fetch(url, {
  method: 'GET',
  headers: {
    'X-RapidAPI-Key': 'YOUR_RAPIDAPI_KEY',
    'X-RapidAPI-Host': 'email-mailbox-verification-api-smtp-handshake.p.rapidapi.com',
  } as Record<string, string>,
});

const data: unknown = await response.json();
console.log(data);

PHP

<?php
$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => "https://email-mailbox-verification-api-smtp-handshake.p.rapidapi.com/verify?email=jane.doe%40gmail.com",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY",
        "X-RapidAPI-Host: email-mailbox-verification-api-smtp-handshake.p.rapidapi.com",
    ],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;

Ruby

require 'uri'
require 'net/http'

url = URI("https://email-mailbox-verification-api-smtp-handshake.p.rapidapi.com/verify?email=jane.doe%40gmail.com")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-RapidAPI-Key"] = 'YOUR_RAPIDAPI_KEY'
request["X-RapidAPI-Host"] = 'email-mailbox-verification-api-smtp-handshake.p.rapidapi.com'

response = http.request(request)
puts response.read_body

Java (OkHttp)

OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
    .url("https://email-mailbox-verification-api-smtp-handshake.p.rapidapi.com/verify?email=jane.doe%40gmail.com")
    .get()
    .addHeader("X-RapidAPI-Key", "YOUR_RAPIDAPI_KEY")
    .addHeader("X-RapidAPI-Host", "email-mailbox-verification-api-smtp-handshake.p.rapidapi.com")
    .build();

Response response = client.newCall(request).execute();
System.out.println(response.body().string());

C#

using var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("https://email-mailbox-verification-api-smtp-handshake.p.rapidapi.com/verify?email=jane.doe%40gmail.com"),
    Headers =
    {
        { "X-RapidAPI-Key", "YOUR_RAPIDAPI_KEY" },
        { "X-RapidAPI-Host", "email-mailbox-verification-api-smtp-handshake.p.rapidapi.com" },
    },
};

using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());

Go

package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://email-mailbox-verification-api-smtp-handshake.p.rapidapi.com/verify?email=jane.doe%40gmail.com", nil)
    req.Header.Add("X-RapidAPI-Key", "YOUR_RAPIDAPI_KEY")
    req.Header.Add("X-RapidAPI-Host", "email-mailbox-verification-api-smtp-handshake.p.rapidapi.com")

    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    body, _ := io.ReadAll(res.Body)
    fmt.Println(string(body))
}

Rust

use reqwest::header::{HeaderMap, HeaderValue};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut headers = HeaderMap::new();
    headers.insert("X-RapidAPI-Key", HeaderValue::from_static("YOUR_RAPIDAPI_KEY"));
    headers.insert("X-RapidAPI-Host", HeaderValue::from_static("email-mailbox-verification-api-smtp-handshake.p.rapidapi.com"));

    let client = reqwest::Client::new();
    let res = client.get("https://email-mailbox-verification-api-smtp-handshake.p.rapidapi.com/verify?email=jane.doe%40gmail.com").headers(headers).send().await?;
    println!("{}", res.text().await?);
    Ok(())
}

Swift

import Foundation

var request = URLRequest(url: URL(string: "https://email-mailbox-verification-api-smtp-handshake.p.rapidapi.com/verify?email=jane.doe%40gmail.com")!)
request.httpMethod = "GET"
request.setValue("YOUR_RAPIDAPI_KEY", forHTTPHeaderField: "X-RapidAPI-Key")
request.setValue("email-mailbox-verification-api-smtp-handshake.p.rapidapi.com", forHTTPHeaderField: "X-RapidAPI-Host")

let (data, _) = try await URLSession.shared.data(for: request)
print(String(data: data, encoding: .utf8)!)

Kotlin

val client = OkHttpClient()

val request = Request.Builder()
    .url("https://email-mailbox-verification-api-smtp-handshake.p.rapidapi.com/verify?email=jane.doe%40gmail.com")
    .get()
    .addHeader("X-RapidAPI-Key", "YOUR_RAPIDAPI_KEY")
    .addHeader("X-RapidAPI-Host", "email-mailbox-verification-api-smtp-handshake.p.rapidapi.com")
    .build()

val response = client.newCall(request).execute()
println(response.body?.string())

Shell (wget)

wget -qO- \
  --header='X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header='X-RapidAPI-Host: email-mailbox-verification-api-smtp-handshake.p.rapidapi.com' \
  'https://email-mailbox-verification-api-smtp-handshake.p.rapidapi.com/verify?email=jane.doe%40gmail.com'

Endpoints

Method Path Description
GET /verify Verify a single mailbox (MX + live SMTP handshake)
GET /syntax Fast syntax validation & address dissection (no network)
GET /mx Look up a domain's MX records
POST /verify-batch Verify up to 100 mailboxes in one request

How to check if an email address exists without sending an email

Read the full guide: How to check if an email address exists without sending an email


⭐ Powered by the Email Mailbox Verification API (SMTP Handshake) API on RapidAPI.

Releases

Packages

Contributors