π 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)
- Sign up at RapidAPI.com
- Subscribe to WhatsExtract API (Basic)
- Copy your API Key
- 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:
Plan | Price | Requests / Month | Best For |
Basic (FREE) | $0 | 100 | Testing & Small Projects |
Pro | $9 | 1,000 | Small Businesses |
Ultra | $29 | 10,000 | Growing Teams |
Mega | $99 | 50,000 | Large 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
- Open the Endpoints tab
- Select POST Extract Leads
- 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
Plan | Monthly Price | Requests / Month | Cost / Request | Best For |
Basic | FREE | 100 | $0.00 | Testing, Prototypes |
Pro | $9 | 1,000 | $0.009 | Small Businesses |
Ultra | $29 | 10,000 | $0.0029 | Growing Companies |
Mega | $99 | 50,000 | $0.00198 | Large Organizations |
π‘ How to Check Your Usage
- Log into RapidAPI
- Open your Developer Dashboard
- Go to Usage or Billing
- 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.
- 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 Channel | Best For | Response Time |
RapidAPI Support support.rapidapi.com | Billing, subscriptions, keys | 24β48 hrs |
API Documentation RapidAPI β Endpoints | Integration, code snippets | Immediate |
Discussions RapidAPI β Discussions | Community Q&A, features | Community |
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 π