Search contacts
curl --request POST \
--url https://app.leonar.app/api/v1/contacts/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"name": "<string>",
"title": "<string>",
"company": "<string>",
"location": "<string>",
"linkedin_profile": "<string>",
"contact_types": [
"<string>"
],
"tags": [
"<string>"
],
"created_after": "2023-12-25",
"created_before": "2023-12-25",
"last_contacted_after": "2023-12-25",
"last_contacted_before": "2023-12-25",
"salary_min": 123,
"salary_max": 123,
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sequence_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sort_by": "<string>",
"limit": 50,
"offset": 0
}
'import requests
url = "https://app.leonar.app/api/v1/contacts/search"
payload = {
"query": "<string>",
"name": "<string>",
"title": "<string>",
"company": "<string>",
"location": "<string>",
"linkedin_profile": "<string>",
"contact_types": ["<string>"],
"tags": ["<string>"],
"created_after": "2023-12-25",
"created_before": "2023-12-25",
"last_contacted_after": "2023-12-25",
"last_contacted_before": "2023-12-25",
"salary_min": 123,
"salary_max": 123,
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sequence_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sort_by": "<string>",
"limit": 50,
"offset": 0
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
name: '<string>',
title: '<string>',
company: '<string>',
location: '<string>',
linkedin_profile: '<string>',
contact_types: ['<string>'],
tags: ['<string>'],
created_after: '2023-12-25',
created_before: '2023-12-25',
last_contacted_after: '2023-12-25',
last_contacted_before: '2023-12-25',
salary_min: 123,
salary_max: 123,
project_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sequence_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sort_by: '<string>',
limit: 50,
offset: 0
})
};
fetch('https://app.leonar.app/api/v1/contacts/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.leonar.app/api/v1/contacts/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([
'query' => '<string>',
'name' => '<string>',
'title' => '<string>',
'company' => '<string>',
'location' => '<string>',
'linkedin_profile' => '<string>',
'contact_types' => [
'<string>'
],
'tags' => [
'<string>'
],
'created_after' => '2023-12-25',
'created_before' => '2023-12-25',
'last_contacted_after' => '2023-12-25',
'last_contacted_before' => '2023-12-25',
'salary_min' => 123,
'salary_max' => 123,
'project_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sequence_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sort_by' => '<string>',
'limit' => 50,
'offset' => 0
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.leonar.app/api/v1/contacts/search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"company\": \"<string>\",\n \"location\": \"<string>\",\n \"linkedin_profile\": \"<string>\",\n \"contact_types\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"created_after\": \"2023-12-25\",\n \"created_before\": \"2023-12-25\",\n \"last_contacted_after\": \"2023-12-25\",\n \"last_contacted_before\": \"2023-12-25\",\n \"salary_min\": 123,\n \"salary_max\": 123,\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sequence_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sort_by\": \"<string>\",\n \"limit\": 50,\n \"offset\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.leonar.app/api/v1/contacts/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"company\": \"<string>\",\n \"location\": \"<string>\",\n \"linkedin_profile\": \"<string>\",\n \"contact_types\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"created_after\": \"2023-12-25\",\n \"created_before\": \"2023-12-25\",\n \"last_contacted_after\": \"2023-12-25\",\n \"last_contacted_before\": \"2023-12-25\",\n \"salary_min\": 123,\n \"salary_max\": 123,\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sequence_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sort_by\": \"<string>\",\n \"limit\": 50,\n \"offset\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.leonar.app/api/v1/contacts/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"company\": \"<string>\",\n \"location\": \"<string>\",\n \"linkedin_profile\": \"<string>\",\n \"contact_types\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"created_after\": \"2023-12-25\",\n \"created_before\": \"2023-12-25\",\n \"last_contacted_after\": \"2023-12-25\",\n \"last_contacted_before\": \"2023-12-25\",\n \"salary_min\": 123,\n \"salary_max\": 123,\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sequence_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sort_by\": \"<string>\",\n \"limit\": 50,\n \"offset\": 0\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"first_name": "Sophie",
"last_name": "Martin",
"title": "Senior Software Engineer",
"current_company": "Doctolib",
"location": "Paris, France",
"linkedin_profile": "https://www.linkedin.com/in/sophie-martin",
"emails": [
{
"email": "sophie@doctolib.com",
"type": "work"
}
],
"phones": [
{
"phone": "+33612345678",
"type": "personal"
}
],
"tags": [
"frontend",
"senior"
],
"global_status": "new",
"source": "linkedin",
"summary": null,
"skills": [
"React",
"TypeScript",
"Node.js"
],
"languages": [
"French",
"English"
],
"years_experience": 8,
"custom_data": {
"industry_code": "A12",
"vip": true
},
"do_not_contact": false,
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-20T14:00:00Z",
"last_contacted_at": null,
"archived_at": null
}
],
"meta": {
"total": 142,
"limit": 50,
"offset": 0,
"has_more": true
}
}{
"error": {
"code": "validation_error",
"message": "Invalid input"
}
}{
"error": {
"code": "invalid_api_key",
"message": "Invalid API key"
}
}Contacts
Search contacts
Advanced full-text search across contacts with combined filters.
POST
/
contacts
/
search
Search contacts
curl --request POST \
--url https://app.leonar.app/api/v1/contacts/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"name": "<string>",
"title": "<string>",
"company": "<string>",
"location": "<string>",
"linkedin_profile": "<string>",
"contact_types": [
"<string>"
],
"tags": [
"<string>"
],
"created_after": "2023-12-25",
"created_before": "2023-12-25",
"last_contacted_after": "2023-12-25",
"last_contacted_before": "2023-12-25",
"salary_min": 123,
"salary_max": 123,
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sequence_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sort_by": "<string>",
"limit": 50,
"offset": 0
}
'import requests
url = "https://app.leonar.app/api/v1/contacts/search"
payload = {
"query": "<string>",
"name": "<string>",
"title": "<string>",
"company": "<string>",
"location": "<string>",
"linkedin_profile": "<string>",
"contact_types": ["<string>"],
"tags": ["<string>"],
"created_after": "2023-12-25",
"created_before": "2023-12-25",
"last_contacted_after": "2023-12-25",
"last_contacted_before": "2023-12-25",
"salary_min": 123,
"salary_max": 123,
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sequence_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sort_by": "<string>",
"limit": 50,
"offset": 0
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
name: '<string>',
title: '<string>',
company: '<string>',
location: '<string>',
linkedin_profile: '<string>',
contact_types: ['<string>'],
tags: ['<string>'],
created_after: '2023-12-25',
created_before: '2023-12-25',
last_contacted_after: '2023-12-25',
last_contacted_before: '2023-12-25',
salary_min: 123,
salary_max: 123,
project_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sequence_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sort_by: '<string>',
limit: 50,
offset: 0
})
};
fetch('https://app.leonar.app/api/v1/contacts/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.leonar.app/api/v1/contacts/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([
'query' => '<string>',
'name' => '<string>',
'title' => '<string>',
'company' => '<string>',
'location' => '<string>',
'linkedin_profile' => '<string>',
'contact_types' => [
'<string>'
],
'tags' => [
'<string>'
],
'created_after' => '2023-12-25',
'created_before' => '2023-12-25',
'last_contacted_after' => '2023-12-25',
'last_contacted_before' => '2023-12-25',
'salary_min' => 123,
'salary_max' => 123,
'project_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sequence_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sort_by' => '<string>',
'limit' => 50,
'offset' => 0
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.leonar.app/api/v1/contacts/search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"company\": \"<string>\",\n \"location\": \"<string>\",\n \"linkedin_profile\": \"<string>\",\n \"contact_types\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"created_after\": \"2023-12-25\",\n \"created_before\": \"2023-12-25\",\n \"last_contacted_after\": \"2023-12-25\",\n \"last_contacted_before\": \"2023-12-25\",\n \"salary_min\": 123,\n \"salary_max\": 123,\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sequence_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sort_by\": \"<string>\",\n \"limit\": 50,\n \"offset\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.leonar.app/api/v1/contacts/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"company\": \"<string>\",\n \"location\": \"<string>\",\n \"linkedin_profile\": \"<string>\",\n \"contact_types\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"created_after\": \"2023-12-25\",\n \"created_before\": \"2023-12-25\",\n \"last_contacted_after\": \"2023-12-25\",\n \"last_contacted_before\": \"2023-12-25\",\n \"salary_min\": 123,\n \"salary_max\": 123,\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sequence_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sort_by\": \"<string>\",\n \"limit\": 50,\n \"offset\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.leonar.app/api/v1/contacts/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"company\": \"<string>\",\n \"location\": \"<string>\",\n \"linkedin_profile\": \"<string>\",\n \"contact_types\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"created_after\": \"2023-12-25\",\n \"created_before\": \"2023-12-25\",\n \"last_contacted_after\": \"2023-12-25\",\n \"last_contacted_before\": \"2023-12-25\",\n \"salary_min\": 123,\n \"salary_max\": 123,\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sequence_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sort_by\": \"<string>\",\n \"limit\": 50,\n \"offset\": 0\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"first_name": "Sophie",
"last_name": "Martin",
"title": "Senior Software Engineer",
"current_company": "Doctolib",
"location": "Paris, France",
"linkedin_profile": "https://www.linkedin.com/in/sophie-martin",
"emails": [
{
"email": "sophie@doctolib.com",
"type": "work"
}
],
"phones": [
{
"phone": "+33612345678",
"type": "personal"
}
],
"tags": [
"frontend",
"senior"
],
"global_status": "new",
"source": "linkedin",
"summary": null,
"skills": [
"React",
"TypeScript",
"Node.js"
],
"languages": [
"French",
"English"
],
"years_experience": 8,
"custom_data": {
"industry_code": "A12",
"vip": true
},
"do_not_contact": false,
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-20T14:00:00Z",
"last_contacted_at": null,
"archived_at": null
}
],
"meta": {
"total": 142,
"limit": 50,
"offset": 0,
"has_more": true
}
}{
"error": {
"code": "validation_error",
"message": "Invalid input"
}
}{
"error": {
"code": "invalid_api_key",
"message": "Invalid API key"
}
}Authorizations
API key starting with leo_
Body
application/json
Full-text search query
Search by name
Search by job title
Search by company name
Search by location
Exact LinkedIn profile lookup
Filter by contact types
Filter by tags
Contacts in a specific project
Contacts in a specific sequence
Available options:
asc, desc ⌘I