Skip to main content
All CollectionsDevelopers
How to use the Reverse Contact API?
How to use the Reverse Contact API?

Help developers understand the structure of our queries

Thomas Dubois avatar
Written by Thomas Dubois
Updated over a week ago

To use the Reverse Contact API effectively, it's essential to familiarize yourself with its REST architecture and JSON-based communication. The API provides various endpoints for tasks like reverse email lookup, extracting person or company data social profiles, and reverse domain lookup.

Each request and response is formatted in JSON, and standard HTTP response codes are used to indicate the success or failure of requests.

For a comprehensive guide and step-by-step instructions on using the Reverse Contact API, visit the official documentation.. Detailed documentation, including how to authenticate and handle errors, is available to guide you through integrating the API into your software.

Here some code snippets that show you how to use the Reverse Contact API:

Nodejs - Axios

const axios = require('axios');

const APIKEY = '<YOUR_API_KEY>'
let email = '[email protected]'

let config = {
method: 'get',
url: 'https://api.reversecontact.com/enrichment?apikey=' + APIKEY '&mail=' + email,
};

axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});

Nodejs - Request

var request = require('request');

const APIKEY = '<YOUR_API_KEY>'
var email = '[email protected]'

var options = {
'method': 'GET',
'url': 'https://api.reversecontact.com/enrichment?apikey=' + APIKEY '&mail=' + email,
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});

Python - Requests

import requests

APIKEY = '<YOUR_API_KEY>'
email = '[email protected]'

url = "https://api.reversecontact.com/enrichment?apikey=" + APIKEY + "&mail=" + email

response = requests.request("GET", url)

print(response.text)

Ruby - Net::HTTP

require "uri"
require "net/http"

APIKEY = '<YOUR_API_KEY>'
email = '[email protected]'

url = URI("https://api.reversecontact.com/enrichment?apikey=" + APIKEY + "&mail=" + email)

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

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

Rust - reqwest

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = reqwest::Client::builder()
.build()?;

const APIKEY: &str = "<YOUR_API_KEY>";
let email = "[email protected]";

let url = format!("https://api.reversecontact.com/enrichment?apikey={}&mail={}", APIKEY, email);
let request = client.request(reqwest::Method::GET, &url);

let response = request.send().await?;
let body = response.text().await?;

println!("{}", body);

Ok(())
}
In this code, the api_key and email variables are defined, and the URL string is created using the format! macro to concatenate the variables with the URL. The api_key and email are inserted into the URL using {} as placeholders.

Java - OkHttp

import okhttp3.*;

public class Main {
public static void main(String[] args) {
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");

final String API_KEY = "<YOUR_API_KEY>";
final String email = "[email protected]";

String url = "https://api.reversecontact.com/enrichment?apikey=" + API_KEY + "&mail=" + email;

Request request = new Request.Builder()
.url(url)
.method("GET", body)
.build();

try {
Response response = client.newCall(request).execute();
// Process the response here
} catch (Exception e) {
e.printStackTrace();
}
}
}

Java - Unirest

import kong.unirest.HttpResponse;
import kong.unirest.Unirest;

public class Main {
public static void main(String[] args) {
Unirest.setTimeouts(0, 0);

final String API_KEY = "<YOUR_API_KEY>";
final String email = "[email protected]";

String url = "https://api.reversecontact.com/enrichment?apikey=" + API_KEY + "&mail=" + email;

HttpResponse<String> response = Unirest.get(url)
.asString();

System.out.println(response.getBody());
}
}

Did this answer your question?