πŸš€ WhatsExtract API User Guide

Extract Contact Information from WhatsApp Messages in Seconds

Version 2.6 | RapidAPI Marketplace Edition

πŸ“Œ Quick Overview:

WhatsExtract is an AI-powered API that automatically extracts email addresses, phone numbers, and names from WhatsApp-style messages. Distributed via RapidAPI with a FREE tier so you can start in minutes.

πŸ—ΊοΈ Quick Flow – Your Journey in 5 Steps

Sign Up
β†’
Get API Key
β†’
Test API
β†’
Integrate
β†’
Monitor & Scale

πŸ“– Before You Begin – Key Terms

  • API: A way for two applications to talk to each other.
  • API Key: A secret code that lets you access the API.
  • Endpoint: A specific API URL you send requests to.
  • Request: The message you send to the API (often in JSON).
  • Response: The message the API sends back (usually JSON data).
  • JSON: A text format for structured data (like { "email": "x@y.com" }).

⚑ Quickstart (1 Minute)

  1. Sign up at RapidAPI.com
  2. Subscribe to WhatsExtract API (Basic)
  3. Copy your API Key
  4. Run this command in your terminal:
curl --request POST \ --url https://whatsapp-lead-extractor-api.p.rapidapi.com/leads/ \ --header 'content-type: application/json' \ --header 'X-RapidAPI-Key: YOUR_KEY_HERE' \ --header 'X-RapidAPI-Host: whatsapp-lead-extractor-api.p.rapidapi.com' \ --data '{"message": "Hi, contact me at john@example.com or +1-555-123-4567", "mode": "lite"}'

βœ… You’ll see extracted contact details immediately.

πŸ”‘ Getting Your API Key (Step-by-Step)

Visit API Page
β†’
Create Account
β†’
Choose Plan
β†’
Copy Key

1Visit WhatsExtract on RapidAPI

Open: https://rapidapi.com/devopsviji02/api/whatsapp-lead-extractor-api

Or search β€œWhatsExtract” / β€œWhatsApp Lead Extractor” on RapidAPI.

2Create Your RapidAPI Account

Click Sign Up (top right). You can sign up with Email, Google, GitHub, or Facebook. Accounts are free.

3Subscribe to a Plan

On the API page, click Pricing and choose a plan:

PlanPriceRequests / MonthBest For
Basic (FREE)$0100Testing & Small Projects
Pro$91,000Small Businesses
Ultra$2910,000Growing Teams
Mega$9950,000Large Organizations
βœ… Tip: Basic plan requires no credit card and resets monthly.

4Find Your API Key

Option A (fast): On the API page’s Endpoints tab, the code snippet shows X-RapidAPI-Key.

Option B (dashboard): Profile β†’ Dashboard β†’ Security β†’ copy your default application key.

⚠️ Keep your key secret. Never commit it to GitHub or expose it in browser code.

πŸ§ͺ Testing the API

Method 1: Use RapidAPI’s Built-in Tester

  1. Open the Endpoints tab
  2. Select POST Extract Leads
  3. Provide a request body like:
{ "message": "Hi, I'm Sarah from TechCorp. Email me at sarah@techcorp.com or call +1-555-123-4567", "mode": "lite" }

Click Test Endpoint. Expected result:

{ "status": "success", "data": { "email": "sarah@techcorp.com", "phone": "+1-555-123-4567" } }

Method 2: Test with Code

cURL

curl --request POST \ --url https://whatsapp-lead-extractor-api.p.rapidapi.com/leads/ \ --header 'X-RapidAPI-Host: whatsapp-lead-extractor-api.p.rapidapi.com' \ --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY_HERE' \ --header 'content-type: application/json' \ --data '{"message":"Contact me at test@example.com or call 555-1234","mode":"lite"}'

Python

import os, requests RAPIDAPI_KEY = os.getenv("RAPIDAPI_KEY", "YOUR_RAPIDAPI_KEY_HERE") url = "https://whatsapp-lead-extractor-api.p.rapidapi.com/leads/" headers = { "content-type": "application/json", "X-RapidAPI-Key": RAPIDAPI_KEY, "X-RapidAPI-Host": "whatsapp-lead-extractor-api.p.rapidapi.com" } payload = {"message": "Contact me at john@example.com or +1 555 0123", "mode": "lite"} resp = requests.post(url, json=payload, headers=headers, timeout=10) print(resp.status_code, resp.text)

Node.js (Axios)

const axios = require("axios"); require("dotenv").config(); // npm i dotenv const RAPIDAPI_KEY = process.env.RAPIDAPI_KEY || "YOUR_RAPIDAPI_KEY_HERE"; (async () => { try { const res = await axios.post( "https://whatsapp-lead-extractor-api.p.rapidapi.com/leads/", { message: "Email me at jane@company.com", mode: "lite" }, { headers: { "content-type": "application/json", "X-RapidAPI-Key": RAPIDAPI_KEY, "X-RapidAPI-Host": "whatsapp-lead-extractor-api.p.rapidapi.com", }, timeout: 10000, } ); console.log(res.data); } catch (err) { console.error(err.response?.status, err.response?.data || err.message); } })();

PHP (cURL)

<?php $ch = curl_init("https://whatsapp-lead-extractor-api.p.rapidapi.com/leads/"); $data = json_encode(["message" => "Ping me at dev@site.com", "mode" => "lite"]); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_POSTFIELDS => $data, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ "content-type: application/json", "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY_HERE", "X-RapidAPI-Host: whatsapp-lead-extractor-api.p.rapidapi.com" ] ]); $resp = curl_exec($ch); $http = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); echo $http . PHP_EOL . $resp;

Java (OkHttp)

OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"message\":\"Call me at 555-9876\",\"mode\":\"lite\"}"); Request request = new Request.Builder() .url("https://whatsapp-lead-extractor-api.p.rapidapi.com/leads/") .post(body) .addHeader("content-type", "application/json") .addHeader("X-RapidAPI-Key", "YOUR_RAPIDAPI_KEY_HERE") .addHeader("X-RapidAPI-Host", "whatsapp-lead-extractor-api.p.rapidapi.com") .build(); Response response = client.newCall(request).execute(); System.out.println(response.code()); System.out.println(response.body().string());
❗ Security Tip: Don’t call the API directly from client-side JavaScript; use a backend to keep your key secret.

πŸ“¦ Request & Response Schema

Endpoint

POST https://whatsapp-lead-extractor-api.p.rapidapi.com/leads/

Headers

content-type: application/json X-RapidAPI-Key: YOUR_RAPIDAPI_KEY X-RapidAPI-Host: whatsapp-lead-extractor-api.p.rapidapi.com

Request Body

{ "message": "free text with contact details", "mode": "lite" // or "full" if available }

Successful Response

{ "status": "success", "data": { "email": "user@example.com", "phone": "+1-555-123-4567" } }

Error Response (example)

{ "status": "error", "message": "Invalid API key" }

πŸ’» Integration Guide

Quick Snippets

# Python quick call import requests requests.post( "https://whatsapp-lead-extractor-api.p.rapidapi.com/leads/", json={"message": "hello@example.com", "mode": "lite"}, headers={ "X-RapidAPI-Key": "KEY", "X-RapidAPI-Host": "whatsapp-lead-extractor-api.p.rapidapi.com", "content-type": "application/json" } )
// Node quick call const axios = require("axios"); axios.post( "https://whatsapp-lead-extractor-api.p.rapidapi.com/leads/", { message: "hello@example.com", mode: "lite" }, { headers: { "X-RapidAPI-Key": "KEY", "X-RapidAPI-Host": "whatsapp-lead-extractor-api.p.rapidapi.com", "content-type": "application/json" } } );

Environment Variables

Python (.env)

# .env RAPIDAPI_KEY=your_key_here
# app.py from dotenv import load_dotenv; load_dotenv() import os, requests key = os.getenv("RAPIDAPI_KEY")

Node (.env)

# .env RAPIDAPI_KEY=your_key_here
// app.js require("dotenv").config(); const key = process.env.RAPIDAPI_KEY;

Full Python Client

import requests from typing import Dict class WhatsExtractClient: def __init__(self, rapidapi_key: str): self.base_url = "https://whatsapp-lead-extractor-api.p.rapidapi.com" self.headers = { "content-type": "application/json", "X-RapidAPI-Key": rapidapi_key, "X-RapidAPI-Host": "whatsapp-lead-extractor-api.p.rapidapi.com" } def extract_contacts(self, message: str, mode: str = "lite") -> Dict: payload = {"message": message, "mode": mode} r = requests.post(f"{self.base_url}/leads/", json=payload, headers=self.headers, timeout=10) if r.status_code == 200: return r.json() if r.status_code == 429: raise Exception("Rate limit exceeded. Please upgrade your plan.") if r.status_code == 401: raise Exception("Invalid API key. Check your RapidAPI key.") raise Exception(f"API Error: {r.status_code} - {r.text}")

Full Node.js Client

const axios = require("axios"); class WhatsExtractClient { constructor(rapidApiKey) { this.rapidApiKey = rapidApiKey; this.baseUrl = "https://whatsapp-lead-extractor-api.p.rapidapi.com"; } async extractContacts(message, mode = "lite") { try { const res = await axios.post( this.baseUrl + "/leads/", { message, mode }, { headers: { "content-type": "application/json", "X-RapidAPI-Key": this.rapidApiKey, "X-RapidAPI-Host": "whatsapp-lead-extractor-api.p.rapidapi.com" }, timeout: 10000 } ); return res.data; } catch (error) { if (error.response) { if (error.response.status === 429) throw new Error("Rate limit exceeded. Upgrade your plan."); if (error.response.status === 401) throw new Error("Invalid API key."); throw new Error("API Error: " + error.response.status); } throw error; } } }

Webhook / Callback

WhatsExtract is synchronous. Webhooks are on the roadmap for enterprise needs.

🌍 Real-World Examples

🏠 Real Estate Inquiry

Input:
"Hi, I saw your listing for the 3-bedroom apartment on Zillow. I'm very interested and would like to schedule a viewing this weekend. My name is Jennifer Chen and you can reach me at jchen@gmail.com or call me at (415) 555-8923. My budget is around $3,500/month."
Response:
{"status":"success","data":{"email":"jchen@gmail.com","phone":"(415) 555-8923"}}

πŸ›οΈ E‑commerce Order

Input:
"I'd like to order 5 units of the blue widget (SKU: BW-123). Please ship to Mike Wilson at 123 Main Street, Austin, TX 78701. Send confirmation to mwilson@company.com and call 512-555-0123 if any issues."
Response:
{"status":"success","data":{"email":"mwilson@company.com","phone":"512-555-0123"}}

🎯 Customer Support

Input:
"Hi support team, I'm having trouble accessing my account (#A45678). This is urgent as I need to process payments today. I'm David Park, the account owner. Please contact me immediately at dpark@techfirm.io or on my cell +1-555-987-6543."
Response:
{"status":"success","data":{"email":"dpark@techfirm.io","phone":"+1-555-987-6543"}}

πŸ’² Pricing & ROI

PlanMonthly PriceRequests / MonthCost / RequestBest For
BasicFREE100$0.00Testing, Prototypes
Pro$91,000$0.009Small Businesses
Ultra$2910,000$0.0029Growing Companies
Mega$9950,000$0.00198Large Organizations

πŸ’‘ How to Check Your Usage

  1. Log into RapidAPI
  2. Open your Developer Dashboard
  3. Go to Usage or Billing
  4. Select β€œWhatsApp Lead Extractor API”

πŸ’° ROI Example

  • Manual entry: 50 inquiries/day Γ— 3 min = 150 min/day
  • With API: ~5 sec each β‰ˆ 4 min/day
  • Time saved: ~146 min/day (~2.4 hours)
  • At $30/hour β‡’ $1,584/month saved
  • Ultra plan: $29/month β‡’ ROI > 5,000%

πŸ”’ Security Best Practices

  • Never hardcode API keys in public code; use environment variables.
  • Keep keys out of client-side JS; route via your backend.
  • Always use HTTPS (RapidAPI enforces TLS).
  • Rotate keys regularly; revoke unused ones.
  • Follow least-privilege: share keys only with trusted apps/people.

πŸ› οΈ Troubleshooting

❌ 401 Unauthorized

Cause: Invalid/missing API key or inactive subscription.

Fix:

# Required headers { "X-RapidAPI-Key": "YOUR_KEY", "X-RapidAPI-Host": "whatsapp-lead-extractor-api.p.rapidapi.com", "content-type": "application/json" }

❌ 429 Too Many Requests

Cause: Monthly quota exceeded.

  • Upgrade your plan or wait for the monthly reset.
  • Implement caching to avoid duplicate requests.

❌ 400 Bad Request

Cause: Invalid JSON or missing message field.

  • Ensure JSON is valid and message is a string.
  • Set header: content-type: application/json.

❌ No Data Extracted

Cause: Message lacks clear contact info.

  • Use standard email formats (name@domain.com).
  • Include country code for international numbers.
  • Avoid unusual characters/formatting.

πŸš€ Performance Optimization

  • Batching: Queue and process messages during off-peak hours.
  • Caching: Store and reuse results for identical content.
  • Retries: Exponential backoff for transient failures/timeouts.
  • Rate limiting: Add small delays between bursts.
  • Preprocessing: Trim whitespace, remove emojis if needed.

πŸ™‹ Support & FAQ

Support ChannelBest ForResponse Time
RapidAPI Support
support.rapidapi.com
Billing, subscriptions, keys24–48 hrs
API Documentation
RapidAPI β†’ Endpoints
Integration, code snippetsImmediate
Discussions
RapidAPI β†’ Discussions
Community Q&A, featuresCommunity
Email
support@whatsextract.com
Technical help, custom needs~24 hrs

❓ Frequently Asked Questions

Q: How accurate is the extraction?
A: 100% on standard email formats and ~95%+ on phone numbers across US, UK, and Indian formats. Accuracy improves over time.

Q: Is my data stored?
A: No. Processing is in real time; message content and extracted data are not persisted.

Q: Can I change plans anytime?
A: Yes. Upgrades/downgrades are instant via RapidAPI dashboard.

Q: What happens if I exceed my limit?
A: You’ll receive HTTP 429. Upgrade or wait for the monthly reset.

Q: Is there webhook support?
A: Currently synchronous; webhooks are on the roadmap for enterprise.

Q: Do you support non‑English messages?
A: Optimized for English. Other languages may work with reduced accuracy.

βœ… Success Checklist & Final Flow

  • β˜‘οΈ RapidAPI account created
  • β˜‘οΈ Subscribed to WhatsExtract (Basic/Pro/Ultra/Mega)
  • β˜‘οΈ API key copied securely
  • β˜‘οΈ First test call completed
  • β˜‘οΈ Integrated in your app
  • β˜‘οΈ Error handling & retries added
  • β˜‘οΈ Usage monitoring in RapidAPI

🚦 Final Flow – From Start to Success

1. Sign Up
β†’
2. Subscribe
β†’
3. Get API Key
β†’
4. Test
β†’
5. Integrate
β†’
6. Monitor
β†’
7. Scale πŸš€
Get Started on RapidAPI β†’

Β© 2025 WhatsExtract β€” support@whatsextract.com