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

# API Reference

> Complete reference for the Sentrion API

## Introduction

The Sentrion API provides programmatic access to job market intelligence. Use our APIs to search for job postings from specific companies or run direct, cross-company job searches with detailed filters.

To use Sentrion from an AI assistant, connect to the [MCP server](https://docs.sentrion.ai/api-reference/mcp-server.md)
with your API key. It provides tools for job searches, filter lookups, and credit balance.

## Getting Started

**1. Create your account**

Head to [app.sentrion.ai](https://app.sentrion.ai) and sign up. You'll get access to your dashboard right away.

**2. Get your API key**

In your dashboard, go to **Settings > API Keys** and create a new key. This key is how Sentrion identifies your requests.

> [!NOTE]
>
> Your API key is like a password — keep it private and never share it publicly.

**3. Make your first request**

Use your API key to search for company jobs:

```bash cURL theme={null}
curl -X POST https://api.sentrion.ai/api/v1/company-jobs/search \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"company_linkedin_url": "https://www.linkedin.com/company/google/", "company_name": "Google"}'
```

```python Python theme={null}
import requests

response = requests.post(
    "https://api.sentrion.ai/api/v1/company-jobs/search",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"company_linkedin_url": "https://www.linkedin.com/company/google/", "company_name": "Google"}
)
data = response.json()
```

```javascript Node.js theme={null}
const response = await fetch("https://api.sentrion.ai/api/v1/company-jobs/search", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({ company_linkedin_url: "https://www.linkedin.com/company/google/", company_name: "Google" })
});
const data = await response.json();
```

## Base URL

Use this host, followed by the full endpoint path:

```
https://api.sentrion.ai
```

## Authentication

The documented endpoints require Bearer token authentication. Include your API key in the `Authorization` header:

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Retrying searches

For Jobs Search and Company Jobs, including historical searches, send an optional
`Idempotency-Key` header so retries can reuse the same request key. Generate the
key once per request, reuse it with the same endpoint and body for retries, and
use a new key for each new search or page of results.

See [idempotency best practices](https://docs.sentrion.ai/api-reference/best-practices.md#use-idempotency-keys-for-search-retries)
for the key format, a Python example, and conflict handling.

## API Versioning

> [!NOTE]
>
> Current job searches use `/api/v1/company-jobs/search` and `/api/v1/jobs-search/search`. Historical searches use `/api/v1/company-jobs/historical/search` and `/api/v1/jobs-search/historical/search`.

## Response Format

Job searches return `success`, `data`, and `error`. `data` contains jobs, totals,
credits, and `search_after`; `error` is a string or null. Check both the HTTP status
and `success`: a search failure can return HTTP 200 with `success: false`. An empty
successful search can also include an explanatory error string.

```json theme={null}
{
  "success": false,
  "data": {
    "jobs": [],
    "total": 0,
    "total_jobs_found": 0,
    "credits_used": 0,
    "credits_remaining": 100,
    "search_after": null
  },
  "error": "Error retrieving job listings."
}
```

Authentication and input errors use FastAPI's `detail` envelope instead:

```json theme={null}
{"detail": "Invalid or inactive API key"}
```

Validation errors normally contain an array of issues under `detail`.

## Filters and billing

Use [Departments](https://docs.sentrion.ai/api-reference/departments.md), [Job Boards](https://docs.sentrion.ai/api-reference/job-boards.md),
and [Locations](https://docs.sentrion.ai/api-reference/locations.md) to build search filters.
[Credit Balance](https://docs.sentrion.ai/api-reference/credit-balance.md) is documented under Billing.
These endpoints consume no credits and work with zero or negative balances.
Their responses use endpoint-specific objects without a `success`/`data` wrapper.

## Rate Limiting

Current search endpoints allow **200 requests per minute** per API key;
historical search endpoints allow **100 requests per minute**. If a request is
rate-limited, handle HTTP `429` and retry with exponential backoff. Preserve the
same idempotency key and request body when retrying a search.

## Error Codes

| HTTP status | Meaning |
| - | - |
| 200 with `success: false` | Search failed; inspect the string `error` |
| 400 | Missing LinkedIn URL, invalid job-board value, or invalid `Idempotency-Key` / request identity |
| 402 | The complete new-job result is unaffordable; no jobs were delivered or charged |
| 403 | Missing, invalid, or inactive API key |
| 409 | Idempotency key reused with changed request intent or an expired billing period |
| 422 | Request validation failed; inspect `detail` |
| 429 | Rate limit exceeded |
| 503 | Temporary search/service unavailability: nothing was charged; retry with the same `Idempotency-Key` |
| 500 | Unexpected server error |

## OpenAPI Contract

Download the [live OpenAPI contract](https://api.sentrion.ai/openapi.json). It covers the documented
Jobs Search and Company Jobs endpoints (current and historical searches under v1), plus departments, job boards, locations,
and credit balance. Legacy, admin, and other application APIs are excluded.


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