> For the complete documentation index, see [llms.txt](https://docs.bellsight.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bellsight.xyz/bellsight/bellsight-sns-api/how-to-use-the-api.md).

# How to use the API

The Base endpoint is

```
https://api.bellsight.xyz/api/
```

## Usage

Get sns holded by a certain address:

```
holder/<address> 

Returns example:

[
  {
    "_id": "66d339b90378581bb4b0ad92",
    "blockHeight": 40065,
    "genesis": "3c3cb748adc89e0670443aeff6fa88086d2739c9a296e7c86ffad56111cd823a",
    "inscriptionId": "3c3cb748adc89e0670443aeff6fa88086d2739c9a296e7c86ffad56111cd823ai0",
    "domain": "943.bells",
    "holder": "B6H5FdzSCTReQCBmxVfPXQ2ozEP6yLgQkQ",
    "createdAt": "2024-08-31T15:41:45.574Z",
    "updatedAt": "2024-08-31T15:41:45.574Z",
    "__v": 0
  },
  ...
]
```

Get data for a certain name:

```
name/<name.namespace>

Return example:

[
    {"_id":"66d339b90378581bb4b0ad98",
     "blockHeight":40065,
     "genesis":"2257b235d149644a683e1931c6bf2b0affd9fe6e67f43b8f74d1ace5cef53036",
     "inscriptionId":"2257b235d149644a683e1931c6bf2b0affd9fe6e67f43b8f74d1ace5cef53036i0",
     "domain":"1111.bells",
     "holder":"B6H5FdzSCTReQCBmxVfPXQ2ozEP6yLgQkQ",
     "createdAt":"2024-08-31T15:41:45.648Z",
     "updatedAt":"2024-08-31T15:41:45.648Z",
     "__v":0
    },
    ...
]
```

Get the total count of all names and namespaces on-chain:

```
stats/

Return example:

{"names":231899,"namespaces":2}
```

Get all namespaces:

```
namespaces/

Return example:

[
  {
    "_id": "66d57939e99a9f6deef76367",
    "blockHeight": 166332,
    "genesis": "b6fd3fd0299e7940f01b5a431231666f35edde242be0dd7b9c10367891da7f97",
    "inscriptionId": "b6fd3fd0299e7940f01b5a431231666f35edde242be0dd7b9c10367891da7f97i0",
    "namespace": "bells",
    "avatar": "f3ee6dfcc6b16f8c735778a7593e1b094787bfd764449453ce19c4d93472195ci0",
    "createdAt": "2024-09-02T08:37:13.087Z",
    "updatedAt": "2024-09-02T08:37:13.087Z",
    "__v": 0
  },
  ...
]
```

Get all names for a certain block:

```
block/<height/id>

Return example:

[
  {
    "_id": "66d339b90378581bb4b0ad92",
    "blockHeight": 40065,
    "genesis": "3c3cb748adc89e0670443aeff6fa88086d2739c9a296e7c86ffad56111cd823a",
    "inscriptionId": "3c3cb748adc89e0670443aeff6fa88086d2739c9a296e7c86ffad56111cd823ai0",
    "domain": "943.bells",
    "holder": "B6H5FdzSCTReQCBmxVfPXQ2ozEP6yLgQkQ",
    "createdAt": "2024-08-31T15:41:45.574Z",
    "updatedAt": "2024-08-31T15:41:45.574Z",
    "__v": 0
  },
]
```


---

# 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://docs.bellsight.xyz/bellsight/bellsight-sns-api/how-to-use-the-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.
