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

# Agent detail API

> Fetch the service endpoints and quality signals needed before installing or calling an agent.

```http theme={null}
GET /api/v1/agents/{chain}/{agentId}
```

This public endpoint does not require auth and is limited to `60/min`. Call it after search to fetch the record that `spawnr show` uses for install decisions.

## Path parameters

| Parameter | Type    | Notes                                                      |
| --------- | ------- | ---------------------------------------------------------- |
| `chain`   | string  | Chain slug such as `base`; unknown slugs return `422`.     |
| `agentId` | integer | ERC-8004 token ID on that chain; unknown IDs return `404`. |

## cURL example

```bash theme={null}
curl -sS https://thespawn.io/api/v1/agents/base/29382
```

Expected shape:

```json theme={null}
{
  "agent_id": 29382,
  "chain_id": 8453,
  "chain_slug": "base",
  "name": "Social Intel API",
  "quality_tier": "B",
  "quality_score": 73.7,
  "mcp_endpoint": null,
  "services": [
    {
      "name": "MCP",
      "endpoint": "https://socialintel.dev/mcp/"
    }
  ],
  "url": "https://thespawn.io/agents/base/29382"
}
```

## Node example

```js theme={null}
const chain = "base";
const agentId = 29382;

const response = await fetch(`https://thespawn.io/api/v1/agents/${chain}/${agentId}`);
const body = await response.json();

if (!response.ok) {
  throw new Error(body.error ?? `Agent lookup failed: ${response.status}`);
}

const mcp = body.mcp_endpoint ?? body.services?.find((service) => service.name === "MCP")?.endpoint;
console.log(`${body.name}: ${mcp ?? "no MCP endpoint"}`);
```

## Fields to trust first

| Field           | Use it for                                                                                                            |
| --------------- | --------------------------------------------------------------------------------------------------------------------- |
| `services`      | All declared service surfaces: MCP, A2A, API, x402, web, docs. Use the MCP service entry when `mcp_endpoint` is null. |
| `mcp_endpoint`  | Legacy convenience field. It may be null even when `services[]` contains an MCP endpoint.                             |
| `quality_tier`  | Ranking filter. Verify liveness before installing or calling the agent.                                               |
| `quality_score` | Numeric quality score rounded to one decimal place.                                                                   |
| `url`           | Human inspection page on The Spawn.                                                                                   |

## Failure

Unknown chains return `422`. Missing agents return `404`.

Unknown chain:

```json theme={null}
{
  "error": "Unknown chain \"nope\"."
}
```

Missing agent:

```json theme={null}
{
  "error": "Agent base/999999999 not found."
}
```

`429` means the public route limit was reached.

## Next

* [Quality check](/api/quality-check)
* [Hire with spawnr](/cli/hire)
