# KNS Indexer API

## **1. KNS Asset API**

This **Asset API** retrieves inscribed assets owned by a specific user. If you need to **display KNS assets**, use **KNS Asset API.**

## 2. KNS Asset Detail API

The **Asset Detail API** retrieves detailed information about a specific asset by its inscription ID. The detailed information includes the below.<br>

• Inscription Number\
• Asset ID\
• Mimetype\
• Asset\
• Owner\
• Creation Block Time\
• Status\
• Domain\
• Transaction ID\
• Verified<br>

## **3. KNS Domain API**

This **Domain API** resolves domains its' corresponding addresses, get asset owner by domain . If you need to resolve a **domain to its corresponding address**, use **KNS Domain API.**

## **4. KNS Check Domain API**

**KNS Check Domain API** will checks domain availability before inscribing domain inscriptions.

If you're using KNS [**inscription tool**](/kns-docs-1/inscriptions/operations/create.md), you must use **KNS Check Domain API** to verify availability.

## **5. KNS Profile API**

**KNS Profile API** fetches .kas domain profile detail by inscription ID. Profile detail includes the below data.\
\
• Website\
• Avatar \
• Banner \
• Bio \
• X (Twitter)\
• Telegram \
• Discord \
• GitHub  \
• Email<br>

## **6. KNS Primary Name API (Owner Address)**

**KNS Primary Name API (Owner Address)** fetch the primary name (domain) by owner wallet.

## **7. KNS Primary Name API**

**Primary Name API** can be used through API calls, allowing users to assign their primary name.

### **Important Note(Must Read):**

* If you're using both **KNS Domain API** and **KNS Asset API**, domains must be **URL-encoded** to correctly identify all domain names.
* **Emoji domains cannot be validated using string length**, as it may result in errors. Please refer to the [library ](https://kns-2.gitbook.io/kns-docs-1/inscriptions/operations/create#rules)we use in our docs for proper handling.

***

## Mainnet API

<table><thead><tr><th width="179.25">API</th><th width="328">Link</th><th>Note</th></tr></thead><tbody><tr><td>KNS <strong>Asset</strong> API</td><td><a href="https://apidoc.knsdomains.org/mainnet/">https://apidoc.knsdomains.org/mainnet/</a></td><td>Get assets by owner</td></tr><tr><td>KNS <strong>Asset Detail</strong> API</td><td><a href="https://apidoc.knsdomains.org/mainnet/">https://apidoc.knsdomains.org/mainnet/</a></td><td>Get assets details</td></tr><tr><td>KNS <strong>Domain</strong> API</td><td><a href="https://apidoc.knsdomains.org/mainnet/">https://apidoc.knsdomains.org/mainnet/</a></td><td>Get asset owner by domain (Case-Insensitive)</td></tr><tr><td>KNS <strong>Check Domain</strong> API</td><td><a href="https://apidoc.knsdomains.org/mainnet/">https://apidoc.knsdomains.org/mainnet/</a></td><td>Check Domain (<strong>Make sure to fulfill the</strong> <a href="/pages/LBLKpx8GuRjBrypDtNx7"><strong>guidelines</strong> </a><strong>for APIs, reach out to team if your have any questions.</strong>)</td></tr><tr><td>KNS <strong>Profile</strong> API</td><td><a href="https://apidoc.knsdomains.org/mainnet/">https://apidoc.knsdomains.org/mainnet/</a></td><td>Get profile detail by domain</td></tr><tr><td>KNS <strong>Primary Name (Owner Address)</strong> API</td><td><a href="https://apidoc.knsdomains.org/mainnet/">https://apidoc.knsdomains.org/mainnet/</a></td><td>Get Primary Name by owner address</td></tr><tr><td>KNS <strong>Primary Name</strong> API</td><td><a href="https://apidoc.knsdomains.org/mainnet/">https://apidoc.knsdomains.org/mainnet/</a></td><td>Set Primary Name For Users </td></tr></tbody></table>

## TN10 (Testnet 10) API

<table><thead><tr><th width="176.75">API</th><th width="328">Link</th><th>Note</th></tr></thead><tbody><tr><td>KNS <strong>Assets</strong> API - TN10</td><td><a href="https://apidoc.knsdomains.org/tn10/">https://apidoc.knsdomains.org/tn10/</a></td><td>Get assets by owner</td></tr><tr><td>KNS <strong>Asset Detail</strong> API - TN10</td><td><a href="https://apidoc.knsdomains.org/tn10/">https://apidoc.knsdomains.org/tn10/</a></td><td>Get assets details</td></tr><tr><td>KNS <strong>Domain</strong> API - TN10</td><td><a href="https://apidoc.knsdomains.org/tn10/">https://apidoc.knsdomains.org/tn10/</a></td><td>Get asset owner by domain (Case-Insensitive)</td></tr><tr><td>KNS <strong>Check Domain</strong> API - TN10</td><td><a href="https://apidoc.knsdomains.org/tn10/">https://apidoc.knsdomains.org/tn10/</a></td><td>Check Domain (<strong>Make sure to fulfill the</strong> <a href="/pages/LBLKpx8GuRjBrypDtNx7"><strong>guidelines</strong> </a><strong>for APIs, reach out to team if your have any questions.</strong>)</td></tr><tr><td>KNS <strong>Profile</strong> API - TN10</td><td><a href="https://apidoc.knsdomains.org/tn10/#/">https://apidoc.knsdomains.org/tn10/</a></td><td>Get profile detail by domain</td></tr><tr><td>KNS <strong>Primary Name (Owner Address)</strong> API - TN10</td><td><a href="https://apidoc.knsdomains.org/tn10/#/">https://apidoc.knsdomains.org/tn10/</a></td><td>Get Primary Name by owner address</td></tr><tr><td>KNS <strong>Primary Name</strong> API - TN10</td><td><a href="https://apidoc.knsdomains.org/tn10/#/">https://apidoc.knsdomains.org/tn10/</a></td><td>Set Primary Name For Users </td></tr></tbody></table>


---

# 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://kns-2.gitbook.io/kns-docs-1/kns-indexer-api.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.
