> ## Documentation Index
> Fetch the complete documentation index at: https://plain-docs-orca-916-agent-docs-restructure.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch companies

> Fetch companies by ID, by domain, or as a paginated collection.

There are three ways to fetch companies:

* [Get companies](#get-companies) (To fetch more than one company at a time)
* [Get company by ID](#get-company-by-id)
* [Search for companies](#search-for-companies)

<Snippet file="graphql/sdk-note.mdx" />

These operations require the following permissions:

* `company:read`

## Get companies

You can get all companies you've interacted with in your workspace using the `companies` query. This endpoint supports [Pagination](/graphql/pagination).

<Snippet file="graphql/get-companies.mdx" />

## Get company by ID

If you already have the ID of a company you can fetch it directly using the `company` query.

<Snippet file="graphql/get-company-by-id.mdx" />

## Search for companies

The `searchCompanies` query performs a case-insensitive partial match across a company's name and domain. The search term must be at least 2 characters long.

<Snippet file="graphql/search-companies.mdx" />
