curl --request POST \
--url https://api.sixtyfour.ai/search/filter-field-values \
--header 'Content-Type: application/json' \
--data '
{
"field": "<string>",
"mode": "company",
"top_k": 25,
"filters": {},
"simple_filters": {}
}
'import requests
url = "https://api.sixtyfour.ai/search/filter-field-values"
payload = {
"field": "<string>",
"mode": "company",
"top_k": 25,
"filters": {},
"simple_filters": {}
}
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({field: '<string>', mode: 'company', top_k: 25, filters: {}, simple_filters: {}})
};
fetch('https://api.sixtyfour.ai/search/filter-field-values', 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/filter-field-values",
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([
'field' => '<string>',
'mode' => 'company',
'top_k' => 25,
'filters' => [
],
'simple_filters' => [
]
]),
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.sixtyfour.ai/search/filter-field-values"
payload := strings.NewReader("{\n \"field\": \"<string>\",\n \"mode\": \"company\",\n \"top_k\": 25,\n \"filters\": {},\n \"simple_filters\": {}\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.sixtyfour.ai/search/filter-field-values")
.header("Content-Type", "application/json")
.body("{\n \"field\": \"<string>\",\n \"mode\": \"company\",\n \"top_k\": 25,\n \"filters\": {},\n \"simple_filters\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sixtyfour.ai/search/filter-field-values")
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 \"field\": \"<string>\",\n \"mode\": \"company\",\n \"top_k\": 25,\n \"filters\": {},\n \"simple_filters\": {}\n}"
response = http.request(request)
puts response.read_body{
"field": "<string>",
"canonical_field": "<string>",
"value_type": "<string>",
"supports_top_values": true,
"supports_exact_filter_snippet": true,
"total_scoped_documents": 123,
"mode": "company",
"aggregation_field": "<string>",
"nested_path": "<string>",
"related_fields": [
"<string>"
],
"preferred_for_exact_match": false,
"request_duration_ms": 123,
"values": [
{
"count": 123,
"percent_of_scope": 123,
"value": "<string>",
"filter_snippet": {}
}
]
}{
"detail": "Invalid request body"
}{
"detail": "Invalid API key"
}{
"detail": "Insufficient API credits"
}{
"detail": "Forwarded user_id does not belong to your organization."
}{
"detail": "Search not found or has no parsed_query."
}{
"detail": "Export workflow is already running for this search."
}{
"detail": [
{
"loc": [
"body",
"target_company",
"domain"
],
"msg": "Field required",
"type": "missing",
"input": null,
"ctx": {}
}
]
}{
"detail": "Rate limit exceeded"
}{
"detail": "Internal server error"
}{
"detail": "NL upstream transport error: connection reset by peer"
}{
"detail": "Company search backend endpoint is not configured"
}{
"detail": "Field values request timed out"
}Filter Field Values
Get the top values by count for a single filter-search field.
curl --request POST \
--url https://api.sixtyfour.ai/search/filter-field-values \
--header 'Content-Type: application/json' \
--data '
{
"field": "<string>",
"mode": "company",
"top_k": 25,
"filters": {},
"simple_filters": {}
}
'import requests
url = "https://api.sixtyfour.ai/search/filter-field-values"
payload = {
"field": "<string>",
"mode": "company",
"top_k": 25,
"filters": {},
"simple_filters": {}
}
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({field: '<string>', mode: 'company', top_k: 25, filters: {}, simple_filters: {}})
};
fetch('https://api.sixtyfour.ai/search/filter-field-values', 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/filter-field-values",
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([
'field' => '<string>',
'mode' => 'company',
'top_k' => 25,
'filters' => [
],
'simple_filters' => [
]
]),
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.sixtyfour.ai/search/filter-field-values"
payload := strings.NewReader("{\n \"field\": \"<string>\",\n \"mode\": \"company\",\n \"top_k\": 25,\n \"filters\": {},\n \"simple_filters\": {}\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.sixtyfour.ai/search/filter-field-values")
.header("Content-Type", "application/json")
.body("{\n \"field\": \"<string>\",\n \"mode\": \"company\",\n \"top_k\": 25,\n \"filters\": {},\n \"simple_filters\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sixtyfour.ai/search/filter-field-values")
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 \"field\": \"<string>\",\n \"mode\": \"company\",\n \"top_k\": 25,\n \"filters\": {},\n \"simple_filters\": {}\n}"
response = http.request(request)
puts response.read_body{
"field": "<string>",
"canonical_field": "<string>",
"value_type": "<string>",
"supports_top_values": true,
"supports_exact_filter_snippet": true,
"total_scoped_documents": 123,
"mode": "company",
"aggregation_field": "<string>",
"nested_path": "<string>",
"related_fields": [
"<string>"
],
"preferred_for_exact_match": false,
"request_duration_ms": 123,
"values": [
{
"count": 123,
"percent_of_scope": 123,
"value": "<string>",
"filter_snippet": {}
}
]
}{
"detail": "Invalid request body"
}{
"detail": "Invalid API key"
}{
"detail": "Insufficient API credits"
}{
"detail": "Forwarded user_id does not belong to your organization."
}{
"detail": "Search not found or has no parsed_query."
}{
"detail": "Export workflow is already running for this search."
}{
"detail": [
{
"loc": [
"body",
"target_company",
"domain"
],
"msg": "Field required",
"type": "missing",
"input": null,
"ctx": {}
}
]
}{
"detail": "Rate limit exceeded"
}{
"detail": "Internal server error"
}{
"detail": "NL upstream transport error: connection reset by peer"
}{
"detail": "Company search backend endpoint is not configured"
}{
"detail": "Field values request timed out"
}Headers
Body
Request for top values of a single field.
Canonical field path to aggregate values for.
Search mode: 'people' or 'company'.
people, company Maximum number of top values to return.
1 <= x <= 100Raw OpenSearch DSL filters that scope the aggregation.
MongoDB-style filters that scope the aggregation.
Response
Successful Response
Top values response for one field.
Field requested by the caller.
Canonical field path used for aggregation.
Aggregation target type (keyword, long, etc.).
Whether this field supports top-values aggregation.
Whether the response includes deterministic filter snippets.
Total documents matched by the scoped query.
Search mode: 'people' or 'company'.
people, company Underlying field used for the terms aggregation.
Nested path, if any.
Other field paths representing the same concept (e.g. flat counterpart of nested).
Recommended for simple exact-match queries over its nested counterpart.
Server-side request duration in milliseconds.
Top values ordered by count.
Show child attributes
Show child attributes
Was this page helpful?