# Nametags(WIP)

## Get An Address's Nametag

Returns an address's nametag such as "Coinbase 10", as well as associated labels such as "exchange".

```
https://api.xdcscan.io/api
   ?chainid=1
   &module=nametag
   &action=getaddresstag
   &address=0xA9D1e08C7793af67e9d92fe308d5697FB81d3E43
   &apikey=YourApiKeyToken
```

> Try this endpoint in your [**browser**](https://api.xdcscan.io/api?chainid=1\&module=nametag\&action=getaddresstag\&address=0xA9D1e08C7793af67e9d92fe308d5697FB81d3E43\&apikey=YourApiKeyToken) :link:

{% tabs %}
{% tab title="Request" %}
Query Parameters

| Parameter    | Description                                                                 |
| ------------ | --------------------------------------------------------------------------- |
| address      | the address to check for name tag and labels                                |
| chainid      | the chain to query labels on, addresses `may not` be the same across chains |
| {% endtab %} |                                                                             |

{% tab title="Response" %}
Sample response

```
{
   "status":"1",
   "message":"OK",
   "result":[
      {
         "address":"0xa9d1e08c7793af67e9d92fe308d5697fb81d3e43",
         "nametag":"Coinbase 10",
         "internal_nametag":"",
         "url":"https://coinbase.com",
         "shortdescription":"",
         "notes_1":"",
         "notes_2":"",
         "labels":[
            "Exchange",
            "Coinbase"
         ],
         "labels_slug":[
            "exchange",
            "coinbase"
         ],
         "reputation":0,
         "other_attributes":[
            
         ],
         "lastupdatedtimestamp":1674628276
      }
   ]
}
```

{% endtab %}
{% endtabs %}

## Metadata CSV

For enterprise usage of nametags, CSV exports of label categories such as "phish" or "ofac". Reach out for a demo.

## Export CSV for a Specific Label

Returns addresses filtered by a specific label in CSV format.

```
https://api.xdcscan.io/api
   module=nametag
   &action=exportaddresstags
   &label=nft
   &format=csv
   &apikey=YourApiKeyToken
```

> Try this endpoint in your [**browser**](https://api.xdcscan.io/api?module=nametag\&action=exportaddresstags\&label=nft\&format=csv\&apikey=YourAPIKeyToken) :link:

{% tabs %}
{% tab title="Request" %}
Query Parameters

| Parameter    | Description                                                          |
| ------------ | -------------------------------------------------------------------- |
| label        | the label name representing the 'category' for clustering addresses. |
| {% endtab %} |                                                                      |

{% tab title="Response" %}
Sample response

```
Sample CSV File
```

{% endtab %}
{% endtabs %}

## Get Label Masterlist

Returns the categories of labels available.

```
https://api.xdcscan.io/api
   module=nametag
   &action=getlabelmasterlist
   &apikey=YourAPIKeyToken
```

> Try this endpoint in your [**browser**](https://api.xdcscan.io/api?module=nametag\&action=getlabelmasterlist\&apikey=YourAPIKeyToken) :link:

{% tabs %}
{% tab title="Request" %}
Query Parameters

| Parameter              | Description                                                              |
| ---------------------- | ------------------------------------------------------------------------ |
| labelname              | the label name representing the 'category' for clustering addresses.     |
| labelslug              | the URL slug for the label. can be used for Openscan's Label Word Cloud. |
| shortdescription       | the description of the label.                                            |
| last updated timestamp | the Unix timestamp for the last updated time of the label.               |
| notes                  | private note for the label.                                              |
| {% endtab %}           |                                                                          |

{% tab title="Response" %}
Sample response

```
{
  "status": "1",
  "message": "OK",
  "result": [
    {
      "labelname": "0-Gas Sender",
      "labelslug": "0-gas-sender",
      "shortdescription": "Addresses that sent transactions with 0 gas prices.",
      "notes": "",
      "lastupdatedtimestamp": 1673930922
    },
    {
      "labelname": "0x Protocol",
      "labelslug": "0x-protocol",
      "shortdescription": "0x Protocol is an open protocol that enables the peer-to-peer exchange of assets on the xdcnetwork blockchain.",
      "notes": "",
      "lastupdatedtimestamp": 1670574376
    }
  ]
}
```

{% endtab %}
{% endtabs %}


---

# 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.blocksscan.io/api-endpoints/nametags.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.
