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

# API

> API reference for Currents API: every `currentsapi.api.*` operation with input and output types.

Every `currentsapi.api.*` operation is listed below with parameter shapes and return types from the plugin Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Categories

### get

`categories.get`

List valid category codes

**Risk:** `read`

```ts theme={null}
await corsair.currentsapi.api.categories.get({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `categories` | `string[]` | Yes | — |
| `description` | `string` | No | — |
| `status` | `string` | No | — |

***

## Languages

### get

`languages.get`

List valid language codes

**Risk:** `read`

```ts theme={null}
await corsair.currentsapi.api.languages.get({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `languages` | `Record<string, string>` | Yes | — |
| `description` | `string` | No | — |
| `status` | `string` | No | — |

***

## Latest

### get

`latest.get`

Get latest news headlines

**Risk:** `read`

```ts theme={null}
await corsair.currentsapi.api.latest.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `language` | `string` | No | Defaults to "en". |
| `category` | `string` | No | — |
| `country` | `string` | No | — |
| `page_number` | `number` | No | — |
| `page_size` | `number` | No | — |
| `type` | `1 \| 2 \| 3` | No | — |
| `domain` | `string` | No | — |
| `domain_not` | `string` | No | — |
| `author` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `ok \| error` | Yes | — |
| `news` | `object[]` | Yes | — |
| `page` | `number` | Yes | — |
| `query_matched` | `boolean` | No | — |
| `query_scope` | `string` | No | — |
| `reason` | `string` | No | — |
| `page_has_results` | `boolean` | No | — |

> [accordion] news full type
>
> ```ts theme={null}
> {
>   id: string,
>   title: string,
>   description?: string,
>   url?: string,
>   author?: string,
>   image?: string,
>   language?: string,
>   category?: string[],
>   source_category?: string[],
>   published?: string
> }[]
> ```

***

## Regions

### get

`regions.get`

List valid country region codes

**Risk:** `read`

```ts theme={null}
await corsair.currentsapi.api.regions.get({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `regions` | `Record<string, string>` | Yes | — |
| `description` | `string` | No | — |
| `status` | `string` | No | — |

***

## Search

### get

`search.get`

Search news articles by keywords with filters

**Risk:** `read`

```ts theme={null}
await corsair.currentsapi.api.search.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `keywords` | `string` | No | — |
| `query` | `string` | No | — |
| `language` | `string` | No | Defaults to "en". |
| `category` | `string` | No | — |
| `country` | `string` | No | — |
| `start_date` | `string` | No | — |
| `end_date` | `string` | No | — |
| `page_number` | `number` | No | — |
| `page_size` | `number` | No | — |
| `limit` | `number` | No | — |
| `type` | `1 \| 2 \| 3` | No | — |
| `domain` | `string` | No | — |
| `domain_not` | `string` | No | — |
| `author` | `string` | No | — |
| `has_image` | `boolean` | No | — |
| `has_description` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `ok \| error` | Yes | — |
| `news` | `object[]` | Yes | — |
| `page` | `number` | Yes | — |
| `query_matched` | `boolean` | No | — |
| `query_scope` | `string` | No | — |
| `reason` | `string` | No | — |
| `page_has_results` | `boolean` | No | — |

> [accordion] news full type
>
> ```ts theme={null}
> {
>   id: string,
>   title: string,
>   description?: string,
>   url?: string,
>   author?: string,
>   image?: string,
>   language?: string,
>   category?: string[],
>   source_category?: string[],
>   published?: string
> }[]
> ```

***


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