> For the complete documentation index, see [llms.txt](https://tna-btc.gitbook.io/tna-whitepaper-2/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tna-btc.gitbook.io/tna-whitepaper-2/developer-guide/developer-apis/resolution/get-names-from-an-address.md).

# Get Names from an Address

### Get Names from an Address

> Code samples

```javascript

const headers = {
  'Accept':'application/json'
};

fetch('https://tna-btc.com/api/userTapnames?address=bc1xxxxx',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

```

`GET /api/userTapnames`

#### Parameters <a href="#get-tapnames-from-address-parameters" id="get-tapnames-from-address-parameters"></a>

| Name     | In    | Type           | Required | Description   |
| -------- | ----- | -------------- | -------- | ------------- |
| address  | query | string(string) | true     | owner address |
| timeZone | query | integer(int)   | false    | default -480  |
| page     | query | integer(int)   | false    | default 1     |
| pageSize | query | integer(int)   | false    | default 20    |

> Example responses

> 200 Response

```json
{
  "code": 0,
  "message": "string",
  "data": {
    "tapnames": [
      {
        "name": "string",
        "ownTime": "string",
        "txid": "string",
        "assetId": "string"
      }
    ],
    "address": "string",
    "total": 0,
    "page": 0
  }
}
```

#### Responses <a href="#get-tapnames-from-address-responses" id="get-tapnames-from-address-responses"></a>

| Status | Meaning | Description       | Schema |
| ------ | ------- | ----------------- | ------ |
| 200    | Success | none              | Inline |
| 400    | Failed  | see error message | Inline |

#### Response Schema <a href="#get-tapnames-from-address-responseschema" id="get-tapnames-from-address-responseschema"></a>

Status Code **200**

| Name        | Type            | Required | Restrictions | Description                           |
| ----------- | --------------- | -------- | ------------ | ------------------------------------- |
| » code      | integer (int)   | false    | none         | Error code                            |
| » message   | string (string) | false    | none         | Error message                         |
| » data      | object          | false    | none         | Result data                           |
| »» tapnames | object          | false    | none         | Object containing tapname information |
| »»» name    | string (string) | false    | none         | Tapname                               |
| »»» ownTime | string (string) | false    | none         | Ownership timestamp                   |
| »»» txid    | string (string) | false    | none         | Transaction ID                        |
| »»» assetId | string (string) | false    | none         | Asset ID associated with tapname      |
| »»» address | string (string) | false    | none         | Address associated with tapname       |
| »» total    | integer (int)   | false    | none         | Total number of tapnames              |
| »» page     | integer (int)   | false    | none         | Current page number                   |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://tna-btc.gitbook.io/tna-whitepaper-2/developer-guide/developer-apis/resolution/get-names-from-an-address.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.
