Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.sixtyfour.ai/llms.txt

Use this file to discover all available pages before exploring further.

Use case

Search people or companies with simple_filters or filters. Discover valid fields first, inspect top values for one field, then run the paginated search.

API Reference

See the full request/response schema and parameters in the API Reference.

Pricing

See Credits & Pricing Guide for credit costs.

Errors

For error responses (400, 403, 404, 409, 503, etc.), see Handling Errors.

Simple filters

simple_filters is the primary query format for this API. It supports common exact-match, range, logical, and text-search operations with concise JSON syntax.

Top-level shape

{
  "simple_filters": {
    "hq_country_iso2": { "$eq": "US" },
    "employees_count": { "$gte": 100, "$lte": 5000 }
  }
}

Supported operators

The capabilities response exposes supported simple-query operators in simple_query_operators.
OperatorDescription
$eq, $neExact match or exact exclusion.
$gt, $gte, $lt, $lteNumeric or date range comparisons.
$in, $ninMatch or exclude multiple exact values.
$existsMatch documents where a field is present or absent.
$match, $phraseText matching for one field.
$and, $or, $not, $norLogical composition.
$elemMatchMatch nested array elements.
$searchFull-text search across supported fields.
$sortSort results in search requests.
$limitLimit result count in search requests.

Query examples

Find US-based companies:
{
  "mode": "company",
  "simple_filters": {
    "hq_country_iso2": { "$eq": "US" }
  }
}
Find US-based companies with at least 4 employees:
{
  "mode": "company",
  "simple_filters": {
    "hq_country_iso2": { "$eq": "US" },
    "employees_count": { "$gte": 4 }
  }
}
Find US-based companies with at least 4 employees where a post mentions YC X25:
{
  "mode": "company",
  "simple_filters": {
    "$and": [
      { "hq_country_iso2": { "$eq": "US" } },
      { "employees_count": { "$gte": 4 } },
      { "company_updates.description": { "$match": "(YC X25)" } }
    ]
  }
}
Find US-based companies sorted by employee count descending, capped to 8 total results:
{
  "mode": "company",
  "simple_filters": {
    "hq_country_iso2": { "$eq": "US" },
    "$sort": [{ "employees_count": "desc" }],
    "$limit": 8
  }
}
Find Canadian companies that have raised any amount and mention technology in categories or keywords:
{
  "mode": "company",
  "simple_filters": {
    "$and": [
      { "hq_country_iso2": { "$eq": "CA" } },
      { "last_funding_round_amount_raised": { "$gt": 0 } },
      { "categories_and_keywords": { "$match": "technology" } }
    ]
  }
}
Full-text search across specific fields:
{
  "mode": "company",
  "simple_filters": {
    "$search": {
      "query": "cloud security",
      "fields": ["description", "categories_and_keywords"]
    }
  }
}

DSL filters

filters accepts a constrained DSL subset for cases where simple_filters is not expressive enough. For DSL syntax and clause behavior, see the OpenSearch Query DSL docs.

Top-level shape

{
  "filters": {
    "query": { ... },
    "sort": [ ... ],
    "size": 100
  }
}

Supported query clauses

ClauseDescription
boolCombine conditions with must, filter, should, and must_not.
termExact-match query for a single value.
termsExact-match query for multiple values.
rangeNumeric or date range with gt, gte, lt, lte.
existsMatch documents where a field is present.
matchFull-text match query.
match_phrasePhrase query.
multi_matchSearch the same value across multiple fields.
nestedQuery nested arrays and nested objects.
match_allMatch all records in the selected mode.

Query examples

Exact match:
{
  "term": {
    "website_domain": "stripe.com"
  }
}
Range filter:
{
  "range": {
    "employees_count": {
      "gte": 100,
      "lte": 5000
    }
  }
}
Multi-field full-text search:
{
  "multi_match": {
    "query": "cloud security",
    "fields": [
      "description",
      "categories_and_keywords"
    ],
    "type": "best_fields",
    "operator": "and"
  }
}
Nested query:
{
  "nested": {
    "path": "funding_rounds",
    "query": {
      "match_phrase": {
        "funding_rounds.name": "Series B"
      }
    }
  }
}

Core concepts

TermDescription
simple_filtersThe primary query input format for search and field-values requests. It supports Mongo-style operators such as $eq, $in, $gte, $match, and $and.
DSL filtersThe backup query format accepted through filters. The API rejects queries that exceed the field and query limits defined by GET /search/filter-capabilities.
fieldsUnified field metadata returned by GET /search/filter-capabilities. Use it to discover queryable, sortable, rangeable, and top-value-capable fields.
filter_snippetA ready-to-use exact-match clause in filters format returned alongside each top value. Use it when you need filters.
cursorA pagination token returned as next_cursor. Pass it as the only field in follow-up requests to fetch the next page.

Rate limits

Filter-search-specific API rate limits.
LimitValue
POST /search/query200 requests per minute per organization
POST /search/filter-field-values20 requests per minute per organization

Filter capabilities

GET https://api.sixtyfour.ai/search/filter-capabilities
Returns the live field contract for filter search in the selected mode, including the unified fields list, supported simple-query operators, and DSL limits. Pass mode=people or mode=company (defaults to company). Pass refresh=true to force a mapping refresh instead of using cached capabilities.

Example request

curl -X GET "https://api.sixtyfour.ai/search/filter-capabilities" \
  -H "x-api-key: YOUR_API_KEY"

Field values

POST https://api.sixtyfour.ai/search/filter-field-values
Returns top values for one field, ranked by descending scoped document count. There is no batch variant.

Scoped query

  • Omit both simple_filters and filters for global scope.
  • Send either simple_filters or filters for scoped discovery.
  • filters.sort, filters.size, and mixed filters plus simple_filters requests are not allowed on this endpoint.
  • simple_filters.$sort and simple_filters.$limit are not supported on this endpoint.
{
  "simple_filters": {
    "hq_country_iso2": { "$eq": "US" }
  }
}

Example request

Global:
curl -X POST "https://api.sixtyfour.ai/search/filter-field-values" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode": "company", "field": "hq_country_iso2", "top_k": 4}'
Scoped:
{
  "mode": "company",
  "field": "industry",
  "top_k": 4,
  "simple_filters": {
    "hq_country_iso2": { "$eq": "US" },
    "employees_count": { "$gte": 200, "$lte": 5000 },
    "ownership_status": { "$eq": "private" }
  }
}

Nested fields

For nested fields such as funding_rounds.name, counts are document counts and each filter_snippet is wrapped in a nested clause so it can be reused directly in DSL flows.

Search query

POST https://api.sixtyfour.ai/search/query
Runs a paginated search. Fresh searches accept simple_filters, filters, parsed_query, or a search_id to re-run a previous search.

Request flow

  1. First request: send exactly one of simple_filters, filters, parsed_query, or search_id, plus optional page_size and max_results.
  2. Next page request: send only {"cursor":"..."}.
  3. Requests that mix cursor with query or pagination fields return 400.

Effective result cap

  • page_size controls rows per page. Range 1..100. Default 10.
  • max_results controls the total row cap across all pages. Range 1..5000.
  • simple_filters.$limit and filters.size are optional query-level caps.
  • When both max_results and a query-level cap are set, the smaller value applies.
  • When no total cap is set, the backend default applies.

Example request

Fresh search:
curl -X POST "https://api.sixtyfour.ai/search/query" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "company",
    "simple_filters": {
      "hq_country_iso2": { "$eq": "US" },
      "employees_count": { "$gte": 100, "$lte": 5000 }
    }
  }'
Re-run a previous search:
{
  "search_id": "e3b0c442-98fc-1c14-9afb-f4c8996fb924"
}
Next page:
{
  "cursor": "eyJpZCI6I..."
}
raw_source returns the document directly. It does not use grouped objects such as identity, profile, or location.

Export search results

Export results from any search as a CSV. See Export Search Results for the full endpoint reference.

Example usage

The following examples walk through the full recommended flow: discover valid fields, inspect top values for one field, then paginate through results.
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.sixtyfour.ai"
headers = {"x-api-key": API_KEY, "Content-Type": "application/json"}

# 1. Get filter capabilities to discover valid fields
caps = requests.get(
    f"{BASE_URL}/search/filter-capabilities",
    headers=headers,
).json()
queryable_fields = [f["field"] for f in caps["fields"] if f["queryable"]][:5]
print(f"Available queryable fields: {queryable_fields}")
print(f"Supported simple operators: {caps['simple_query_operators']}")

# 2. Inspect top values for a field to build a simple filter
values_resp = requests.post(
    f"{BASE_URL}/search/filter-field-values",
    headers=headers,
    json={"mode": "company", "field": "hq_country_iso2", "top_k": 4},
).json()

top_country = values_resp["values"][0]["value"]
print(f"Top country: {values_resp['values'][0]['value']}")

# 3. Run the paginated filter search using simple_filters
all_results = []
cursor = None

while True:
    if cursor:
        payload = {"cursor": cursor}
    else:
        payload = {
            "mode": "company",
            "simple_filters": {
                "hq_country_iso2": {"$eq": top_country},
                "employees_count": {"$gte": 100},
            },
        }

    resp = requests.post(
        f"{BASE_URL}/search/query",
        headers=headers,
        json=payload,
    ).json()

    all_results.extend(resp["results"])
    print(f"Page {resp['page_number']}{resp['page_count']} rows")

    if not resp["has_more"]:
        break

    cursor = resp["next_cursor"]

print(f"Total rows fetched: {len(all_results)}")