> ## Documentation Index
> Fetch the complete documentation index at: https://developers.clay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Clay's GTM database

> Use advanced queries to search Clay's proprietary database of companies and people.

Searches let your system discover GTM records without building a search UI or wiring directly into multiple data providers. Advanced search supports criteria in Clay's query reference, cross-entity filters, and nested Boolean logic.

## What you can search

| Source type | Use it for |
| - | - |
| `companies` | Accounts, domains, industries, locations, and firmographics |
| `people` | Contacts, titles, locations, and profile data |

## Example search intents

* Find B2B SaaS companies in North America with more than 1,000 employees.
* Find software engineers in New York City.
* Find software companies with more than \$250M in funding.

## Advanced search also supports cross-entity criteria

Advanced search lets you return one entity based on attributes of a related entity.

* Find sales leaders at high-growth software companies:

  ```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
  select from people where experiences.any(is_current = true and job_title is_similar_to ("VP Sales", "Head of Sales") and company.estimated_employee_count >= 500 and company.industry = "Software Development")
  ```

* Find engineers at companies that use Salesforce:

  ```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
  select from people where experiences.any(is_current = true and job_title is_similar_to ("engineer") and company.technographics.any(vendor = "Salesforce"))
  ```

* Find companies that currently employ a VP of Sales:

  ```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
  select from companies where people.exists(is_current = true and job_title is_similar_to ("VP Sales"))
  ```

## How it works

Advanced search is a three-step iterator: fetch the query reference, create a search to receive a `search_id`, then fetch pages of results with that id.

<Card title="Searches" href="/searches">
  Learn the search flow and copy a create-and-fetch example.
</Card>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.