Get query usage statistics
ns1_get_usage_statsRead-only
DNS query counts for the whole account, one zone, or one record (give zone, or zone + domain + type). period is 1h, 24h or 30d; aggregate, expand, limit and after apply to the account and zone levels only (a record takes just period). If next_page is not null, call again with its after/limit. GET /v1/stats/usage[/{zone}[/{domain}/{type}]].
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Record type, e.g. A, AAAA, CNAME, MX, TXT. | |
| zone | No | Zone name, e.g. example.com. | |
| after | No | Continue after this item: pass next_page.after from the previous reply. | |
| limit | No | Maximum items per page, 1-1000. Omit for NS1's default page size. | |
| domain | No | Full record name inside the zone, e.g. www.example.com (or the zone name itself for the apex). | |
| expand | No | Break the counts down further. Account and zone level only. | |
| period | No | Time window: 1h, 24h or 30d. Omit for the API default. | |
| aggregate | No | Sum the counts over the period. |