cPanel WHM icon

cPanel WHM

Full cPanel WHM API — all 622 operations across Accounts, DNS, Mail, SSL, Backups, Databases and more

Actions262

DNS → Return nameserver's IPv4 and IPv6 addresses

AI-generated

Summary

Retrieve the IPv4 and IPv6 addresses for a specified nameserver hostname via the WHM API.

Inputs

  • Host (required) — The hostname of the nameserver to look up.

Output shape

a single record containing the IP addresses associated with the specified nameserver.

Returns resolved IPv4 and IPv6 addresses for the given nameserver. The input 'Host' parameter is required to perform the lookup. The response reflects the data returned by the WHM 'lookupnsips' DNS API endpoint, without additional pagination or nested arrays.

Examples

Example 1: Retrieve IPs for a nameserver

Set 'Host' to 'ns1.example.com'

Links

Discussion