curl --request POST \
--url https://api.sixtyfour.ai/search/query \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"mode": "company",
"simple_filters": {
"hq_country_iso2": {
"$eq": "US"
},
"employees_count": {
"$gte": 100,
"$lte": 5000
}
},
"page_size": 1
}
'import requests
url = "https://api.sixtyfour.ai/search/query"
payload = {
"mode": "company",
"simple_filters": {
"hq_country_iso2": { "$eq": "US" },
"employees_count": {
"$gte": 100,
"$lte": 5000
}
},
"page_size": 1
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mode: 'company',
simple_filters: {hq_country_iso2: {$eq: 'US'}, employees_count: {$gte: 100, $lte: 5000}},
page_size: 1
})
};
fetch('https://api.sixtyfour.ai/search/query', 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.sixtyfour.ai/search/query",
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([
'mode' => 'company',
'simple_filters' => [
'hq_country_iso2' => [
'$eq' => 'US'
],
'employees_count' => [
'$gte' => 100,
'$lte' => 5000
]
],
'page_size' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.sixtyfour.ai/search/query"
payload := strings.NewReader("{\n \"mode\": \"company\",\n \"simple_filters\": {\n \"hq_country_iso2\": {\n \"$eq\": \"US\"\n },\n \"employees_count\": {\n \"$gte\": 100,\n \"$lte\": 5000\n }\n },\n \"page_size\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.sixtyfour.ai/search/query")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"company\",\n \"simple_filters\": {\n \"hq_country_iso2\": {\n \"$eq\": \"US\"\n },\n \"employees_count\": {\n \"$gte\": 100,\n \"$lte\": 5000\n }\n },\n \"page_size\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sixtyfour.ai/search/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mode\": \"company\",\n \"simple_filters\": {\n \"hq_country_iso2\": {\n \"$eq\": \"US\"\n },\n \"employees_count\": {\n \"$gte\": 100,\n \"$lte\": 5000\n }\n },\n \"page_size\": 1\n}"
response = http.request(request)
puts response.read_body{
"search_id": "aa1deafc-83cd-44ec-b0f9-687a14145824",
"results": [
{
"raw_document_id": "1234567",
"raw_source": {
"name": "Acme Robotics",
"website_domain": "acmerobotics.com",
"hq_country_iso2": "US",
"employees_count": 420
},
"raw_score": 1
}
],
"next_cursor": "eyJzZWFyY2hfaWQiOiJhYTFkZWFmYyJ9",
"has_more": true,
"page_size": 1,
"page_count": 1,
"total_results": 1,
"max_results": 1000,
"remaining_results": 999,
"charge_credits": 0.1,
"output_shape": "raw"
}{
"detail": "Invalid request body",
"code": "bad_request",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21"
}{
"detail": "Invalid API key",
"code": "unauthenticated",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21"
}{
"detail": "Insufficient API credits",
"code": "payment_required",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21"
}{
"detail": "This organization no longer has access to Sixtyfour. Contact your representative at Sixtyfour.",
"code": "forbidden",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21"
}{
"detail": "Search not found or has no parsed_query.",
"code": "not_found",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21"
}{
"detail": [
{
"loc": [
"body",
"target_company",
"domain"
],
"msg": "Field required",
"type": "missing",
"input": null,
"ctx": {}
}
],
"code": "invalid_request",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21"
}{
"detail": "Rate limit exceeded: 200 requests per minute. Retry after 1 second.",
"code": "rate_limited",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21"
}{
"detail": "Internal server error",
"code": "internal_error",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21"
}{
"detail": "Search is at capacity. Retry shortly.",
"code": "unavailable",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21"
}Search Query
Run a search query. Provide exactly one query source: query, simple_filters, filters, parsed_query, or search_id. For pagination, pass cursor alone.
curl --request POST \
--url https://api.sixtyfour.ai/search/query \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"mode": "company",
"simple_filters": {
"hq_country_iso2": {
"$eq": "US"
},
"employees_count": {
"$gte": 100,
"$lte": 5000
}
},
"page_size": 1
}
'import requests
url = "https://api.sixtyfour.ai/search/query"
payload = {
"mode": "company",
"simple_filters": {
"hq_country_iso2": { "$eq": "US" },
"employees_count": {
"$gte": 100,
"$lte": 5000
}
},
"page_size": 1
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mode: 'company',
simple_filters: {hq_country_iso2: {$eq: 'US'}, employees_count: {$gte: 100, $lte: 5000}},
page_size: 1
})
};
fetch('https://api.sixtyfour.ai/search/query', 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.sixtyfour.ai/search/query",
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([
'mode' => 'company',
'simple_filters' => [
'hq_country_iso2' => [
'$eq' => 'US'
],
'employees_count' => [
'$gte' => 100,
'$lte' => 5000
]
],
'page_size' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.sixtyfour.ai/search/query"
payload := strings.NewReader("{\n \"mode\": \"company\",\n \"simple_filters\": {\n \"hq_country_iso2\": {\n \"$eq\": \"US\"\n },\n \"employees_count\": {\n \"$gte\": 100,\n \"$lte\": 5000\n }\n },\n \"page_size\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.sixtyfour.ai/search/query")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"company\",\n \"simple_filters\": {\n \"hq_country_iso2\": {\n \"$eq\": \"US\"\n },\n \"employees_count\": {\n \"$gte\": 100,\n \"$lte\": 5000\n }\n },\n \"page_size\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sixtyfour.ai/search/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mode\": \"company\",\n \"simple_filters\": {\n \"hq_country_iso2\": {\n \"$eq\": \"US\"\n },\n \"employees_count\": {\n \"$gte\": 100,\n \"$lte\": 5000\n }\n },\n \"page_size\": 1\n}"
response = http.request(request)
puts response.read_body{
"search_id": "aa1deafc-83cd-44ec-b0f9-687a14145824",
"results": [
{
"raw_document_id": "1234567",
"raw_source": {
"name": "Acme Robotics",
"website_domain": "acmerobotics.com",
"hq_country_iso2": "US",
"employees_count": 420
},
"raw_score": 1
}
],
"next_cursor": "eyJzZWFyY2hfaWQiOiJhYTFkZWFmYyJ9",
"has_more": true,
"page_size": 1,
"page_count": 1,
"total_results": 1,
"max_results": 1000,
"remaining_results": 999,
"charge_credits": 0.1,
"output_shape": "raw"
}{
"detail": "Invalid request body",
"code": "bad_request",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21"
}{
"detail": "Invalid API key",
"code": "unauthenticated",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21"
}{
"detail": "Insufficient API credits",
"code": "payment_required",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21"
}{
"detail": "This organization no longer has access to Sixtyfour. Contact your representative at Sixtyfour.",
"code": "forbidden",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21"
}{
"detail": "Search not found or has no parsed_query.",
"code": "not_found",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21"
}{
"detail": [
{
"loc": [
"body",
"target_company",
"domain"
],
"msg": "Field required",
"type": "missing",
"input": null,
"ctx": {}
}
],
"code": "invalid_request",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21"
}{
"detail": "Rate limit exceeded: 200 requests per minute. Retry after 1 second.",
"code": "rate_limited",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21"
}{
"detail": "Internal server error",
"code": "internal_error",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21"
}{
"detail": "Search is at capacity. Retry shortly.",
"code": "unavailable",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21"
}Authorizations
Your Sixtyfour API key.
Body
A search: one query source, or a cursor for the next page.
Filters with Mongo-style operators ($eq, $in, $gte, $match, $and). The primary query format.
JSON query DSL, for queries simple_filters cannot express, within the limits GET /search/filter-capabilities returns.
Structured filter set returned by a previous search.
Search history ID returned by a previous search. Replays only the query shape; pass exclusions again on this request if they should apply.
200Natural-language query. Cannot combine with simple_filters, filters, parsed_query or search_id.
10000If false, does not save the search, so its search_id cannot be replayed or exported. Default: true.
Company mode only: results to skip, for page-numbered navigation. Offset pages return no cursor. People mode rejects it.
0 <= x <= 10000Opaque pagination cursor returned by a previous response.
2048people or company. Taken from the saved search when you send search_id.
people, company Maximum results per page, 1 to 100. A page can be shorter while more results remain; rely on has_more and next_cursor.
1 <= x <= 100Maximum results across all pages. Default: 1000. A value above your ceiling (GET /search/limits) is rejected.
raw returns each record as stored (raw_document_id, raw_source, raw_score); workflow returns LEAD or COMPANY rows in the shape workflow blocks use. Cursor pages keep the first page's shape.
raw, workflow Deprecated. Use exclude_entity_ids. People-mode inline identifiers to exclude from results, applied as a post-filter. Accepts LinkedIn public IDs or profile URLs. For company searches, use exclude_entity_ids. Max 1000.
10002048Inline identifiers to exclude from results, applied as a post-filter. People mode: LinkedIn public IDs or profile URLs. Company mode: numeric LinkedIn company IDs, company URLs/slugs, or exact website domains (values that resolve to no or multiple companies are ignored). Max 1000.
10002048Saved exclusion-list IDs to apply as a post-filter. Each list's entity type must match the search mode (person lists for people searches, company lists for company searches). Max 5 (10 for organizations with extended exclusion limits).
10200If true, also matches places near a location in query. Default: true.
Response
Successful Response
Response for a completed filter search.
Rows returned so far (cumulative for company pagination).
Search history ID returned by a previous search. Replays only the query shape; pass exclusions again on this request if they should apply.
Deprecated. Always empty.
Signed URL to download results as CSV.
Signed URL to download results as JSON.
Cursor to fetch the next page; omitted when there are no more results.
Seconds until next_cursor expires.
True when another page is available via next_cursor. Always continue via the cursor; a short or empty page does NOT mean the results are exhausted.
Maximum results per page, 1 to 100. A page can be shorter while more results remain; rely on has_more and next_cursor.
Number of results in this response page. May be less than page_size (down to 0) while has_more is true, e.g. when exclusion filtering is active.
1-based page number (company pagination).
Final total page count; omitted while has_more is true.
Upper bound on pages based on max_results and page_size.
Effective maximum rows this search may return across pages after applying the request and credential limits.
Rows still available under max_results after this page.
Seconds until the download URLs expire.
Exact number of matches across pages, people mode only. Omitted when the exact count is unknown, for example when exclusions apply.
Minimum total matches when the search stopped counting at its cap (50,000), so total_available is omitted. Omitted when the total is exact or no reliable lower bound is available.
Credits this page charged.
Shape of the rows in results.
raw, workflow Deprecated. Always 0.
Rows returned for the current page.
Structured filter set echoed back; round-trippable into a follow-up request.
Original natural-language query echoed verbatim, if any.
Parsed-query fields this search could not apply.
Was this page helpful?