# DNS ## Get Passive DNS by IP `client.Intel.DNS.List(ctx, params) (*V4PagePagination[DNS], error)` **get** `/accounts/{account_id}/intel/dns` Gets a list of all the domains that have resolved to a specific IP address. ### Parameters - `params DNSListParams` - `AccountID param.Field[string]` Path param: Identifier. - `IPV4 param.Field[string]` Query param - `Page param.Field[float64]` Query param: Requested page within paginated list of results. - `PerPage param.Field[float64]` Query param: Maximum number of results requested. - `StartEndParams param.Field[DNSListParamsStartEndParams]` Query param - `End Time` Defaults to the current date. - `Start Time` Defaults to 30 days before the end parameter value. ### Returns - `type DNS struct{…}` - `Count float64` Total results returned based on your search parameters. - `Page float64` Current page within paginated list of results. - `PerPage float64` Number of results per page of results. - `ReverseRecords []DNSReverseRecord` Reverse DNS look-ups observed during the time period. - `FirstSeen Time` First seen date of the DNS record during the time period. - `Hostname string` Hostname that the IP was observed resolving to. - `LastSeen Time` Last seen date of the DNS record during the time period. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/intel" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) page, err := client.Intel.DNS.List(context.TODO(), intel.DNSListParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "count": 1, "page": 1, "per_page": 20, "reverse_records": [ { "first_seen": "2021-04-01", "hostname": "hostname", "last_seen": "2021-04-30" } ] }, "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Domain Types ### DNS - `type DNS struct{…}` - `Count float64` Total results returned based on your search parameters. - `Page float64` Current page within paginated list of results. - `PerPage float64` Number of results per page of results. - `ReverseRecords []DNSReverseRecord` Reverse DNS look-ups observed during the time period. - `FirstSeen Time` First seen date of the DNS record during the time period. - `Hostname string` Hostname that the IP was observed resolving to. - `LastSeen Time` Last seen date of the DNS record during the time period.