# Mainnet

## GraphQL

<mark style="color:green;">`POST`</mark> `https://api.tezos.domains/graphql`

This endpoint allows you to query Tezos Domains data.

#### Request Body

| Name | Type   | Description          |
| ---- | ------ | -------------------- |
|      | object | GraphQL query object |

{% tabs %}
{% tab title="200 Tezos Domains data successfully retrieved." %}

```
{
  "data": {
    "domains": {
      "items": [
        {
          "address": "tz1VxMudmADssPp6FPDGRsvJXE41DD6i9g6n",
          "name": "aaa.tez",
          "owner": "tz1VxMudmADssPp6FPDGRsvJXE41DD6i9g6n",
          "level": 2
        },
        {
          "address": null,
          "name": "a.aaa.tez",
          "owner": "tz1VxMudmADssPp6FPDGRsvJXE41DD6i9g6n",
          "level": 3
        },
        {
          "address": null,
          "name": "alice.tez",
          "owner": "tz1Q4vimV3wsfp21o7Annt64X7Hs6MXg9Wix",
          "level": 2
        }
      ]
    }
  },
  "extensions": {}
}
```

{% endtab %}

{% tab title="429 You are hitting the rate limits of Tezos Domains endpoint." %}

```
Status Code: 429
Retry-After: 58
Content: API calls quota exceeded! maximum admitted 100 per 1m.
```

{% endtab %}
{% endtabs %}

### Examples:

#### Get addresses for domains:

```
{
   domains(where: { name: { in: ["domains.tez", "registry.domains.tez"] } }) {
    items {
      address
      owner
      name
      level
    }
  }
}
```

#### Get reverse records for addresses:

```
{
  reverseRecords(
    where: {
      address: {
        in: [
          "KT1Mqx5meQbhufngJnUAGEGpa4ZRxhPSiCgB"
          "KT1GBZmSxmnKJXGMdMLbugPfLyUPmuLSMwKS"
        ]
      }
    }
  ) {
    items {
      address
      owner
      domain {
        name
      }
    }
  }
}
```


---

# 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://developers.tezos.domains/integrating-tezos-domains/graphql/mainnet-endpoint.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.
