# Peer

Network peer and validator information

## Get ANR by public key

> Retrieve Address and Routing (ANR) information for a specific peer by public key

```json
{"openapi":"3.0.3","info":{"title":"Amadeus Blockchain API","version":"1.5.0"},"tags":[{"name":"Peer","description":"Network peer and validator information"}],"servers":[{"url":"https://nodes.amadeus.bot","description":"Mainnet"},{"url":"https://testnet-rpc.ama.one","description":"Testnet"}],"paths":{"/api/peer/anr/{pk}":{"get":{"tags":["Peer"],"summary":"Get ANR by public key","description":"Retrieve Address and Routing (ANR) information for a specific peer by public key","parameters":[{"name":"pk","in":"path","required":true,"description":"Public key (Base58 encoded)","schema":{"type":"string"}}],"responses":{"200":{"description":"ANR information","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"anr":{"type":"object","description":"Address and Routing information"}}}}}}}}}}}
```

## Get ANRs for all validators

> Retrieve Address and Routing information for all active validators

```json
{"openapi":"3.0.3","info":{"title":"Amadeus Blockchain API","version":"1.5.0"},"tags":[{"name":"Peer","description":"Network peer and validator information"}],"servers":[{"url":"https://nodes.amadeus.bot","description":"Mainnet"},{"url":"https://testnet-rpc.ama.one","description":"Testnet"}],"paths":{"/api/peer/anr_validators":{"get":{"tags":["Peer"],"summary":"Get ANRs for all validators","description":"Retrieve Address and Routing information for all active validators","responses":{"200":{"description":"List of validator ANRs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"anrs":{"type":"array","items":{"type":"object"}}}}}}}}}}}}
```

## Get all ANRs

> Retrieve Address and Routing information for all known peers

```json
{"openapi":"3.0.3","info":{"title":"Amadeus Blockchain API","version":"1.5.0"},"tags":[{"name":"Peer","description":"Network peer and validator information"}],"servers":[{"url":"https://nodes.amadeus.bot","description":"Mainnet"},{"url":"https://testnet-rpc.ama.one","description":"Testnet"}],"paths":{"/api/peer/anr":{"get":{"tags":["Peer"],"summary":"Get all ANRs","description":"Retrieve Address and Routing information for all known peers","responses":{"200":{"description":"List of all ANRs","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"anrs":{"type":"array","items":{"type":"object"}}}}}}}}}}}}
```

## Get all nodes

> Retrieve information about all connected nodes

```json
{"openapi":"3.0.3","info":{"title":"Amadeus Blockchain API","version":"1.5.0"},"tags":[{"name":"Peer","description":"Network peer and validator information"}],"servers":[{"url":"https://nodes.amadeus.bot","description":"Mainnet"},{"url":"https://testnet-rpc.ama.one","description":"Testnet"}],"paths":{"/api/peer/nodes":{"get":{"tags":["Peer"],"summary":"Get all nodes","description":"Retrieve information about all connected nodes","responses":{"200":{"description":"List of nodes","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"nodes":{"type":"array","items":{"type":"object"}}}}}}}}}}}}
```

## Get all trainers (validators)

> Retrieve list of all active validator nodes

```json
{"openapi":"3.0.3","info":{"title":"Amadeus Blockchain API","version":"1.5.0"},"tags":[{"name":"Peer","description":"Network peer and validator information"}],"servers":[{"url":"https://nodes.amadeus.bot","description":"Mainnet"},{"url":"https://testnet-rpc.ama.one","description":"Testnet"}],"paths":{"/api/peer/trainers":{"get":{"tags":["Peer"],"summary":"Get all trainers (validators)","description":"Retrieve list of all active validator nodes","responses":{"200":{"description":"List of trainers","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"trainers":{"type":"array","items":{"type":"object"}}}}}}}}}}}}
```

## Get removed trainers

> Retrieve list of validators that have been removed

```json
{"openapi":"3.0.3","info":{"title":"Amadeus Blockchain API","version":"1.5.0"},"tags":[{"name":"Peer","description":"Network peer and validator information"}],"servers":[{"url":"https://nodes.amadeus.bot","description":"Mainnet"},{"url":"https://testnet-rpc.ama.one","description":"Testnet"}],"paths":{"/api/peer/removed_trainers":{"get":{"tags":["Peer"],"summary":"Get removed trainers","description":"Retrieve list of validators that have been removed","responses":{"200":{"description":"List of removed trainers","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"removed_trainers":{"type":"array","items":{"type":"object"}}}}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ama.one/http-api/peer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
