Identity API
Look up a swop.id or search by name and get back its display name, avatar and wallet addresses. Public, read-only, no API key.
The Identity API is two GET endpoints that turn a swop.id into the data you need to show and pay a person: their display name, avatar, EVM address and Solana address.
No key needed
Both endpoints are public and read-only. They accept requests from any origin (CORS is open for GET), so you can call them straight from a browser.
Base URL
https://apps.apiswop.co/api/v5/identityLook up an exact swop.id
GET /lookup?handle=<swop.id>
Use this when you already know the full name, for example to render a profile card or to check that a name exists.
| Query parameter | Required | Description |
|---|---|---|
handle | Yes | The full swop.id, including .swop.id (for example maya.swop.id). Case-insensitive. maya on its own won't match. |
curl "https://apps.apiswop.co/api/v5/identity/lookup?handle=maya.swop.id"Response 200 OK
{
"state": "success",
"data": {
"handle": "maya.swop.id",
"name": "Maya Chen",
"avatar": "https://res.cloudinary.com/.../avatar.jpg",
"primary": true,
"evmAddress": "0x1111111111111111111111111111111111111111",
"solanaAddress": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"
}
}Search by handle or name
GET /resolve?q=<text>&limit=<n>
Use this for a search-as-you-type picker ("send to…", "choose a validator…"). It matches the text anywhere in the handle or the display name, case-insensitive.
| Query parameter | Required | Description |
|---|---|---|
q | Yes | At least 2 characters. |
limit | No | 1 to 20. Defaults to 8. |
curl "https://apps.apiswop.co/api/v5/identity/resolve?q=maya&limit=5"Response 200 OK: data is an array of the same objects /lookup returns. An empty array means no match.
The identity object
| Field | Type | Description |
|---|---|---|
handle | string | The full swop.id, for example maya.swop.id. |
name | string | Display name. May be empty. |
avatar | string | Avatar image URL. May be empty; always check before rendering. |
primary | boolean | true if this is the account's primary swop.id. One account can hold several. |
evmAddress | string | null | The EVM address (Ethereum, Base, Polygon, Arbitrum and other EVM chains). |
solanaAddress | string | null | The Solana address, or null if none is set. |
Addresses are stored by SLIP-44 coin type, the same convention ENS uses: 60 for EVM and 501 for Solana.
Errors
Errors return a non-2xx status with a JSON body:
{ "success": false, "status": "fail", "message": "swop.id not found", "correlationId": "1793287805039" }| Status | When |
|---|---|
400 | handle is missing, or q is shorter than 2 characters. |
404 | /lookup found no swop.id with that exact handle. |
429 | Rate limit reached. |
Quote the correlationId if you contact support about a failed request.
Rate limits
100 requests per 15 minutes per IP address. The standard RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset headers tell you where you stand. Cache results for a few minutes in your app rather than calling on every render.
Before you send money
The Identity API is the right tool for finding and displaying people. Before you send funds to a name, re-resolve it at payment time and show the resolved address to the payer. For the strongest guarantee, resolve through ENS, which is verified against the swop.id resolver contract on Ethereum. See Resolve with ENS.