> ## 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.

# IP2Proxy API reference

> API reference for the IP2Proxy plugin in Corsair: every `ip2proxy.api.*` operation with its input and output types, taken from the plugin's 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).

## Account

### getCredits

`account.getCredits`

Get the credits left on the API key. The balance lags by about 10 minutes.

**Risk:** `read`

```ts theme={null}
await corsair.ip2proxy.api.account.getCredits({});
```

**Input:** *empty object*

Returns the credits left on the key in `response`. The balance lags by about 10 minutes. It spends no credits.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `number \| string` | Yes | — |

***

## Proxy

### checkProxy

`proxy.checkProxy`

Check whether an IP address is a proxy, VPN, Tor exit, or data-center address.

**Risk:** `read`

```ts theme={null}
await corsair.ip2proxy.api.proxy.checkProxy({ ip: '8.8.8.8', package: 'PX1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ip` | `string` | No | IPv4 or IPv6 address. Omit it and the service looks up the caller address. |
| `package` | `PX1 \| PX2 \| PX3 \| PX4 \| PX5 \| PX6 \| PX7 \| PX8 \| PX9 \| PX10 \| PX11` | No | PX1 through PX11. Omit it and the service uses PX1. PX1 spends 1 credit and PX11 spends 11. |

Omit `ip` and the service looks up the caller address. Omit `package` and the service uses PX1. Lower packages leave the later response fields out, so only `response` is required. A lookup with an explicit `ip` is saved to the `checks` table under that address, replacing the previous row for it; a lookup without `ip` is returned but not saved, and a failed save does not fail the lookup.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `string` | Yes | — |
| `countryCode` | `string` | No | — |
| `countryName` | `string` | No | — |
| `regionName` | `string` | No | — |
| `cityName` | `string` | No | — |
| `isp` | `string` | No | — |
| `domain` | `string` | No | — |
| `usageType` | `string` | No | — |
| `asn` | `number \| string` | No | — |
| `as` | `string` | No | — |
| `lastSeen` | `number \| string` | No | — |
| `proxyType` | `string` | No | — |
| `isProxy` | `string` | No | — |
| `threat` | `string` | No | — |
| `provider` | `string` | No | — |
| `creditsConsumed` | `number` | No | — |

***


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