Autoresearch
curl --request POST \
--url https://api.example.com/v1/lexi/autoresearch \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"contact_id": "<string>",
"company_id": "<string>",
"depth": "<string>",
"sources": [
{}
]
}
'import requests
url = "https://api.example.com/v1/lexi/autoresearch"
payload = {
"query": "<string>",
"contact_id": "<string>",
"company_id": "<string>",
"depth": "<string>",
"sources": [{}]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
contact_id: '<string>',
company_id: '<string>',
depth: '<string>',
sources: [{}]
})
};
fetch('https://api.example.com/v1/lexi/autoresearch', 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://api.example.com/v1/lexi/autoresearch",
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>',
'contact_id' => '<string>',
'company_id' => '<string>',
'depth' => '<string>',
'sources' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"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://api.example.com/v1/lexi/autoresearch"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"contact_id\": \"<string>\",\n \"company_id\": \"<string>\",\n \"depth\": \"<string>\",\n \"sources\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.example.com/v1/lexi/autoresearch")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"contact_id\": \"<string>\",\n \"company_id\": \"<string>\",\n \"depth\": \"<string>\",\n \"sources\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/lexi/autoresearch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"contact_id\": \"<string>\",\n \"company_id\": \"<string>\",\n \"depth\": \"<string>\",\n \"sources\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"summary": "<string>",
"key_findings": [
{}
],
"recent_news": [
{}
],
"people": [
{}
],
"competitors": [
{}
],
"talking_points": [
{}
],
"citations": [
{}
],
"credits_remaining": 123
}
}Lexi AI
Autoresearch
Run a deep research task against a contact, company, or freeform query and return a structured briefing
POST
/
v1
/
lexi
/
autoresearch
Autoresearch
curl --request POST \
--url https://api.example.com/v1/lexi/autoresearch \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"contact_id": "<string>",
"company_id": "<string>",
"depth": "<string>",
"sources": [
{}
]
}
'import requests
url = "https://api.example.com/v1/lexi/autoresearch"
payload = {
"query": "<string>",
"contact_id": "<string>",
"company_id": "<string>",
"depth": "<string>",
"sources": [{}]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
contact_id: '<string>',
company_id: '<string>',
depth: '<string>',
sources: [{}]
})
};
fetch('https://api.example.com/v1/lexi/autoresearch', 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://api.example.com/v1/lexi/autoresearch",
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>',
'contact_id' => '<string>',
'company_id' => '<string>',
'depth' => '<string>',
'sources' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"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://api.example.com/v1/lexi/autoresearch"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"contact_id\": \"<string>\",\n \"company_id\": \"<string>\",\n \"depth\": \"<string>\",\n \"sources\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.example.com/v1/lexi/autoresearch")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"contact_id\": \"<string>\",\n \"company_id\": \"<string>\",\n \"depth\": \"<string>\",\n \"sources\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/lexi/autoresearch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"contact_id\": \"<string>\",\n \"company_id\": \"<string>\",\n \"depth\": \"<string>\",\n \"sources\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"summary": "<string>",
"key_findings": [
{}
],
"recent_news": [
{}
],
"people": [
{}
],
"competitors": [
{}
],
"talking_points": [
{}
],
"citations": [
{}
],
"credits_remaining": 123
}
}Autoresearch consumes 6 AI credits per call because it spawns multiple tool invocations and web searches. If the workspace balance is insufficient, the API returns
402 insufficient_credits.Request
Autoresearch synthesizes LeadLex data (CRM, emails, meetings) with authorized web sources into a structured briefing you can render on a contact page or share with the team. Calls usually take 15 - 60 seconds.Headers
Authorization: Bearer wbk_your_api_key_here
Content-Type: application/json
string
Optional UUID to deduplicate retries within 24 hours. Credits are charged only on the first successful completion.
Body Parameters
string
Freeform research prompt. Required when neither
contact_id nor company_id is provided.string
Optional contact UUID to research. Merged with
query when both are present.string
Optional company UUID to research.
string
default:"standard"
quick (~15s, 3 credits), standard (~30s, 6 credits), or deep (~60s, 12 credits).array
Optional whitelist of sources:
crm, emails, meetings, web, news, linkedin. Defaults to all authorized sources.Response
object
Show properties
Show properties
string
Executive summary paragraph
array
Bulleted highlights
array
Each:
title, url, published_at, sourcearray
Notable people related to the subject
array
Related companies worth tracking
array
Conversation starters for outreach
array
Sources used, each with
url, title, and source_typeinteger
Balance after this call
X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-Request-ID.
curl -X POST \
https://data.leadlex.com/functions/v1/api-gateway/v1/lexi/autoresearch \
-H "Authorization: Bearer wbk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"contact_id": "123e4567-e89b-12d3-a456-426614174000",
"depth": "standard"
}'
import requests
API_KEY = "wbk_your_api_key_here"
BASE_URL = "https://data.leadlex.com/functions/v1/api-gateway"
r = requests.post(
f"{BASE_URL}/v1/lexi/autoresearch",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
},
json={"contact_id": "123e4567-e89b-12d3-a456-426614174000", "depth": "standard"},
timeout=90,
)
print(r.json()["data"]["summary"])
const res = await fetch(
'https://data.leadlex.com/functions/v1/api-gateway/v1/lexi/autoresearch',
{
method: 'POST',
headers: {
'Authorization': 'Bearer wbk_your_api_key_here',
'Content-Type': 'application/json',
},
body: JSON.stringify({ contact_id: '123e4567-e89b-12d3-a456-426614174000' }),
}
);
const { data } = await res.json();
console.log(data.summary);
Example Response
{
"data": {
"summary": "Jane Doe, General Counsel at Acme Corp, is leading the legal side of an upcoming Series B round (~EUR 40m). Acme recently expanded into Germany.",
"key_findings": [
"Series B led by a European fund (announced 2026-03-21)",
"Hired two senior engineers in Berlin in the last 30 days",
"Previously worked with US counsel for Series A"
],
"recent_news": [
{
"title": "Acme Corp raises EUR 40m Series B",
"url": "https://example.com/news/acme-series-b",
"published_at": "2026-03-21",
"source": "TechEU"
}
],
"people": [
{ "name": "Jane Doe", "role": "General Counsel" },
{ "name": "Kai Bauer", "role": "CFO" }
],
"competitors": [{ "name": "Beta Legal Systems" }],
"talking_points": [
"Congratulate Jane on the raise",
"Offer a local DE partner intro for employment law"
],
"citations": [
{ "url": "https://example.com/news/acme-series-b", "title": "Acme raises Series B", "source_type": "news" }
],
"credits_remaining": 4842
}
}
Errors
| Status | Code | Description |
|---|---|---|
| 400 | validation_error | Missing all of query, contact_id, company_id |
| 401 | invalid_key | Invalid or expired API key |
| 402 | insufficient_credits | Workspace credit balance is exhausted |
| 403 | insufficient_permissions | Missing write:ai permission |
| 404 | not_found | Supplied contact or company does not exist |
| 429 | rate_limited | Rate limit exceeded |
| 504 | research_timeout | Upstream sources failed to return within the time budget |