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

# Fetch companies

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

We provide a number of methods for fetching companies:

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

All of these endpoints 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" />
