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

# REST quickstart

> Check authentication, search for a company and retrieve its profile.

You need an approved Datalayer account and a dashboard-issued API key. Search and
lookup also require an active profile allowance. Public signup and paid checkout
are not yet available.

The production API base URL is `https://api.datalayer.so`. Run the examples from
your terminal or backend, with `DATALAYER_API_KEY` supplied through your private
environment or secret manager. Never embed it in frontend code or commit it to Git.

## 1. Check your key

This authentication check does not call a data provider or use profiles.

```bash theme={null}
curl --fail-with-body https://api.datalayer.so/v1/auth \
  --header "Authorization: Bearer $DATALAYER_API_KEY"
```

```json theme={null}
{ "authenticated": true }
```

## 2. Search for a company

```bash theme={null}
curl --fail-with-body https://api.datalayer.so/v1/companies/search \
  --header "Authorization: Bearer $DATALAYER_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"query":"Acme","limit":5,"offset":0}'
```

Search returns previews, not full profiles. Select the matching `company_id` from
the returned results. Search uses zero profiles but still requires an active
allowance and counts toward the account request limit.

## 3. Retrieve the selected company

Set `COMPANY_ID` to the returned ID. Set `REQUEST_ID` to a unique identifier for this
lookup, such as a UUID. Keep that identifier for retries of the same request.

```bash theme={null}
curl --fail-with-body https://api.datalayer.so/v1/companies/lookup \
  --header "Authorization: Bearer $DATALAYER_API_KEY" \
  --header 'Content-Type: application/json' \
  --header "Idempotency-Key: $REQUEST_ID" \
  --data "{\"company_id\":\"$COMPANY_ID\"}"
```

A successful new lookup uses one profile. Inspect `meta.profiles_used` and
`meta.billing_status` in the response. Eligible repeats and idempotent replays use
zero additional profiles. A timeout alone does not prove zero usage; retry with
the same key and unchanged input. See [usage and retries](/api-reference/usage).

## Next steps

* [Search people](/api-reference/search-people) using a query or company name.
* [Get a person](/api-reference/get-person), optionally including work email.
* Read [authentication](/authentication) and [errors](/errors) before integrating.

The [OpenAPI specification](/openapi.json) describes all four data operations.
