# API Reference

The following sections will provide you a quick and straightforward explanation of the **REST NOTO API** endpoint with practical and ready-to-use examples.

### The API offers the following endpoints:

<details>

<summary><a href="api-reference/endpoints/resolve">Resolve</a></summary>

Fetch all records corresponding to the Domain Name in the request, e.g. example.tld\
In case the domain exists in multiple blockchains/namespace, this endpoint returns only the domain with the highest score, based on the NOTO scoring algorithm and/or your custom collision rule, [more info here](https://docs.noto.network/noto-api-docs/api-reference/scoring-mechanism)

You can also specify a Network and/or a Provider in the API call to limit the search to those specific Network/Provider.

</details>

<details>

<summary><a href="api-reference/endpoints/deep-resolve">Deep Resolve</a></summary>

Fetch all records corresponding to the Domain Name in the request, e.g. example.tld\
In case the domain exists in multiple blockchains/namespace, this endpoint returns an array of all the matching records, ordered based on the NOTO scoring algorithm and/or your custom collision rule, [more info here](https://docs.noto.network/noto-api-docs/api-reference/scoring-mechanism)

You can also specify a Network and/or a Provider in the API call to limit the search to those specific Network/Provider.

</details>

<details>

<summary><a href="api-reference/endpoints/reverse-resolve">Reverse Resolve</a></summary>

Search for Web3 domains by passing the On-Chain Address.\
This is the implementation of [Reverse DNS Lookup](https://en.wikipedia.org/wiki/Reverse_DNS_lookup), instead of using an IP address, you provide a Blockchain Address.

You can also specify a Network and/or a Provider in the API call to limit the search to those specific Network/Provider.

</details>

### Since each endpoint has a different scope, the body of the response will change accordingly, what will not change is the structure of each Record returned

{% hint style="warning" %}
The content of the record may vary depending on the domain. The following keys are always returned for each query:

* info
* records
* fullQualifiedDomain
* network
* provider
* ownerAddress
* score
* spam
  {% endhint %}

```json
{
  "info":{
    "sld":"example",
    "tld":"tld",
    "smartContractAddress":"0x0000000000000000000000000000000000000000",
    "lastUpdate":"2024-02-02T17:58:39.330Z",
    "CSAMValidation":false,
    "KYC":false,
    "tags":[]
  },
  "records":{
    // if any records exist, will look like this example
    "redirect.WEBSITE.0": "https://freename.io",
    "profile.OWNER.fullname": "John Doe",
    "record.TXT.0": "https://ex.ample/",
    "record.A.0": "30.25.212.37"
    "token.ETH.0":"0x0000000000000000000000000000000000000000",
    ...
  },
  "fullQualifiedDomain":"example.tld",
  "network":"POLYGON",
  "provider":"FREENAME",
  "ownerAddress":"0x0000000000000000000000000000000000000000",
  "score":0,
  "spam":false
}
```
