# keys.openpgp.org API reference

> keys.openpgp.org is a public OpenPGP key server run on Hagrid. It has a native VKS interface under /vks/v1/ and a subset of the legacy HKP interface under /pks/. Keys come back ASCII-armored. Lookups by email return a key only for an exact match and only when the address owner opted in to email…

Source: https://osinttools.io/apis/keys-openpgp/ (Markdown view of an OSINTtools.io page; append `.md` to any page URL for this format).

Compiled by OSINTtools.io editors from the vendor's docs, updated Nov 29, 2026. Listing: https://osinttools.io/tools/keys-openpgp/

- Base URL: https://keys.openpgp.org
- Authentication: No key needed.
- Rate limits: By fingerprint or key ID: 5 requests per second. By email address: 1 request per minute. The docs say limits also apply to HKP and exceeding them returns 429.
- Vendor docs: https://keys.openpgp.org/about/api

## Overview

keys.openpgp.org is a public OpenPGP key server run on Hagrid. It has a native VKS interface under `/vks/v1/` and a subset of the legacy HKP interface under `/pks/`. Keys come back ASCII-armored.

Lookups by email return a key only for an exact match and only when the address owner opted in to email lookup. Lookups by fingerprint or long key ID work for the primary key or any subkey; hex digits must be uppercase without a `0x` prefix on the VKS endpoints.

No API key is needed. A missing key returns 404 and a plaintext message. Upload and verification endpoints exist in the docs and are not described here.

## Errors

| Status | Meaning |
| --- | --- |
| 404 | No key found |
| 429 | Rate limit exceeded |
| 503 | Database maintenance (POST requests) |

## Key lookups

### Get the key for an exact email address, if its owner opted in to lookup.

`GET /vks/v1/by-email/{email}`

- Takes: Email
- Footprint: passive (the target is not contacted)

Returns the ASCII-armored key with Content-Type application/pgp-keys. The address must be URI-encoded.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `email` | path | string | yes | URI-encoded email address Example: someone%40example.com |

Response fields:

- `(body)` (string): ASCII-armored OpenPGP public key

```bash
curl 'https://keys.openpgp.org/vks/v1/by-email/someone%2540example.com'
```

Example response (200):

```
-----BEGIN PGP PUBLIC KEY BLOCK-----

xjMEZexampleexampleexampleexampleexampleexampleexample
-----END PGP PUBLIC KEY BLOCK-----
```

### Get the key matching a fingerprint (primary key or any subkey).

`GET /vks/v1/by-fingerprint/{fingerprint}`

- Footprint: passive (the target is not contacted)

Hex digits must be uppercase, without a 0x prefix. Returns an ASCII-armored key.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `fingerprint` | path | string | yes | Key fingerprint in uppercase hex Example: 0123456789ABCDEF0123456789ABCDEF01234567 |

Response fields:

- `(body)` (string): ASCII-armored OpenPGP public key

```bash
curl 'https://keys.openpgp.org/vks/v1/by-fingerprint/0123456789ABCDEF0123456789ABCDEF01234567'
```

Example response (200):

```
-----BEGIN PGP PUBLIC KEY BLOCK-----

xjMEZexampleexampleexampleexampleexampleexampleexample
-----END PGP PUBLIC KEY BLOCK-----
```

### Get the key matching a long key ID (primary key or any subkey).

`GET /vks/v1/by-keyid/{keyid}`

- Footprint: passive (the target is not contacted)

Same formatting rules as by-fingerprint. Returns an ASCII-armored key.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `keyid` | path | string | yes | Long key ID in uppercase hex Example: 89ABCDEF01234567 |

Response fields:

- `(body)` (string): ASCII-armored OpenPGP public key

```bash
curl 'https://keys.openpgp.org/vks/v1/by-keyid/89ABCDEF01234567'
```

Example response (200):

```
-----BEGIN PGP PUBLIC KEY BLOCK-----

xjMEZexampleexampleexampleexampleexampleexampleexample
-----END PGP PUBLIC KEY BLOCK-----
```

## HKP

### Machine-readable index of the key matching an email, key ID or fingerprint.

`GET /pks/lookup?op=index&options=mr`

- Takes: Email
- Footprint: passive (the target is not contacted)

Hagrid returns either one key or none. Only exact matches are returned, the expiration date is blank, and parameters other than op and search are ignored. Use op=get to fetch the key itself.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `search` | query | string | yes | Exact email address, long key ID or fingerprint (0x prefix optional for IDs) Example: someone@example.com |

Response fields:

- `(body)` (string): Machine-readable HKP index lines (info, pub and uid lines)

```bash
curl 'https://keys.openpgp.org/pks/lookup?op=index&options=mr&search=someone%40example.com'
```

Example response (200):

```
info:1:1
pub:0123456789ABCDEF0123456789ABCDEF01234567:22:255:1700000000:
uid:someone@example.com:1700000000::
```

---

Listings on OSINTtools.io are reviewed by editors and re-verified on a schedule; check pricing and availability on the vendor's site before relying on them, and use OSINT tools only with a lawful basis.
Site index for agents: https://osinttools.io/llms.txt · Full catalog: https://osinttools.io/llms-full.txt · MCP server (Streamable HTTP, no auth): https://osinttools.io/mcp/
