# ASN ## Get ASN Overview. `client.Intel.ASN.Get(ctx, asn, query) (*ASN, error)` **get** `/accounts/{account_id}/intel/asn/{asn}` Gets an overview of the Autonomous System Number (ASN) and a list of subnets for it. ### Parameters - `ASN ASN` - `query ASNGetParams` - `AccountID param.Field[string]` Identifier. ### Returns - `type ASN int64` ### 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"), ) asn, err := client.Intel.ASN.Get( context.TODO(), int64(0), intel.ASNGetParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", asn) } ``` #### 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": 0 } ``` # Subnets ## Get ASN Subnets `client.Intel.ASN.Subnets.Get(ctx, asn, query) (*ASNSubnetGetResponse, error)` **get** `/accounts/{account_id}/intel/asn/{asn}/subnets` Get ASN Subnets. ### Parameters - `ASN ASN` - `query ASNSubnetGetParams` - `AccountID param.Field[string]` Identifier. ### Returns - `type ASNSubnetGetResponse struct{…}` - `ASN ASN` - `Count float64` Total results returned based on your search parameters. - `IPCountTotal int64` - `Page float64` Current page within paginated list of results. - `PerPage float64` Number of results per page of results. - `Subnets []string` ### 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"), ) subnet, err := client.Intel.ASN.Subnets.Get( context.TODO(), int64(0), intel.ASNSubnetGetParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", subnet.ASN) } ``` #### Response ```json { "asn": 0, "count": 1, "ip_count_total": 0, "page": 1, "per_page": 20, "subnets": [ "192.0.2.0/24", "2001:DB8::/32" ] } ```