Search Domains
curl --request POST \
--url https://api.lemlist.com/api/domains-core/search \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"base": "getacme.com"
}
'import requests
url = "https://api.lemlist.com/api/domains-core/search"
payload = { "base": "getacme.com" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({base: 'getacme.com'})
};
fetch('https://api.lemlist.com/api/domains-core/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api.lemlist.com/api/domains-core/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"base\": \"getacme.com\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/domains-core/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'base' => 'getacme.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"domains": [
{
"domain": "getacme.com",
"available": true,
"price": 15,
"currency": "USD",
"providers": [
{
"name": "google",
"price": 15
},
{
"name": "m365",
"price": 15
},
{
"name": "infraforge",
"price": 15
}
]
},
{
"domain": "getacme.net",
"available": false,
"price": 0,
"providers": []
}
]
}{
"error": "Match error: Failed Match.Where validation"
}{
"error": "Unauthorized"
}{
"error": "You do not have permission to perform this action"
}{
"error": "Internal error"
}Domains
Search Domains
Checks whether a domain can be bought through lemlist, with its price and the providers that can register it.
POST
/
domains-core
/
search
Search Domains
curl --request POST \
--url https://api.lemlist.com/api/domains-core/search \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"base": "getacme.com"
}
'import requests
url = "https://api.lemlist.com/api/domains-core/search"
payload = { "base": "getacme.com" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({base: 'getacme.com'})
};
fetch('https://api.lemlist.com/api/domains-core/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api.lemlist.com/api/domains-core/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"base\": \"getacme.com\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/domains-core/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'base' => 'getacme.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"domains": [
{
"domain": "getacme.com",
"available": true,
"price": 15,
"currency": "USD",
"providers": [
{
"name": "google",
"price": 15
},
{
"name": "m365",
"price": 15
},
{
"name": "infraforge",
"price": 15
}
]
},
{
"domain": "getacme.net",
"available": false,
"price": 0,
"providers": []
}
]
}{
"error": "Match error: Failed Match.Where validation"
}{
"error": "Unauthorized"
}{
"error": "You do not have permission to perform this action"
}{
"error": "Internal error"
}Pass one of the returned
providers as provider to Purchase Domain. The provider sets the mailbox type of the domain for good, so pick it from the mailboxes you want (Google Workspace, Microsoft 365 or SMTP), not from the domain price.
price is the yearly price of the domain. Mailboxes are billed on top, monthly, per mailbox.A domain already ordered through lemlist, by any team, reads available: false, including an order that failed or was canceled.Requires the Manage domains permission on the user of the API key.
Authorizations
Body
application/json
Was this page helpful?