{"id":21740912,"url":"https://github.com/whois-api-llc/domain-discovery-go","last_synced_at":"2025-08-09T13:04:56.645Z","repository":{"id":61623822,"uuid":"537052287","full_name":"whois-api-llc/domain-discovery-go","owner":"whois-api-llc","description":"Domains \u0026 Subdomains Discovery API client library for Go","archived":false,"fork":false,"pushed_at":"2022-09-15T14:03:16.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-25T21:27:59.222Z","etag":null,"topics":["discovery","domain","go","golang","subdomain","whois","whoisxmlapi"],"latest_commit_sha":null,"homepage":"https://domains-subdomains-discovery.whoisxmlapi.com/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/whois-api-llc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-15T13:58:24.000Z","updated_at":"2022-11-09T07:28:14.000Z","dependencies_parsed_at":"2022-10-19T19:45:51.897Z","dependency_job_id":null,"html_url":"https://github.com/whois-api-llc/domain-discovery-go","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fdomain-discovery-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fdomain-discovery-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fdomain-discovery-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fdomain-discovery-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whois-api-llc","download_url":"https://codeload.github.com/whois-api-llc/domain-discovery-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244717339,"owners_count":20498284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discovery","domain","go","golang","subdomain","whois","whoisxmlapi"],"created_at":"2024-11-26T06:15:52.025Z","updated_at":"2025-03-21T01:15:38.948Z","avatar_url":"https://github.com/whois-api-llc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![domain-discovery-go license](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![domain-discovery-go made-with-Go](https://img.shields.io/badge/Made%20with-Go-1f425f.svg)](https://pkg.go.dev/github.com/whois-api-llc/domain-discovery-go)\n[![domain-discovery-go test](https://github.com/whois-api-llc/domain-discovery-go/workflows/Test/badge.svg)](https://github.com/whois-api-llc/domain-discovery-go/actions/)\n\n# Overview\n\nThe client library for\n[Domains \u0026 Subdomains Discovery API](https://domains-subdomains-discovery.whoisxmlapi.com/)\nin Go language.\n\nThe minimum go version is 1.17.\n\n# Installation\n\nThe library is distributed as a Go module\n\n```bash\ngo get github.com/whois-api-llc/domain-discovery-go\n```\n\n# Examples\n\nFull API documentation available [here](https://domains-subdomains-discovery.whoisxmlapi.com/api/documentation/making-requests)\n\nYou can find all examples in `example` directory.\n\n## Create a new client\n\nTo start making requests you need the API Key. \nYou can find it on your profile page on [whoisxmlapi.com](https://whoisxmlapi.com/).\nUsing the API Key you can create Client.\n\nMost users will be fine with `NewBasicClient` function. \n```go\nclient := domaindiscovery.NewBasicClient(apiKey)\n```\n\nIf you want to set custom `http.Client` to use proxy then you can use `NewClient` function.\n```go\ntransport := \u0026http.Transport{Proxy: http.ProxyURL(proxyUrl)}\n\nclient := domaindiscovery.NewClient(apiKey, domaindiscovery.ClientParams{\n    HTTPClient: \u0026http.Client{\n        Transport: transport,\n        Timeout:   20 * time.Second,\n    },\n})\n```\n\n## Make basic requests\n\nDomains \u0026 Subdomains Discovery API lets you find domains and subdomains related by specific terms in their hostnames.\n\n```go\n\n// Make request to get a list of all domains matching the criteria without subdomains.\ndomainDiscoveryResp, resp, err := client.Get(ctx,\n    \u0026domaindiscovery.SearchTerms{[]string{\"amazon.*\"}, nil},\n    nil)\n\nfor _, domainName := range domainDiscoveryResp.DomainsList {\n    log.Println(domainName)\n}\n\n\n// Make request to get only subdomains matching the criteria.\ndomainDiscoveryResp, resp, err := client.Get(ctx,\n    nil,\n    \u0026domaindiscovery.SearchTerms{[]string{\"adidas*\"}, []string{\"*shoes*\"}})\n\nlog.Println(domainDiscoveryResp.DomainsCount)\n\n\n// Make request to get raw data in XML.\nresp, err := client.GetRaw(ctx,\n    \u0026domaindiscovery.SearchTerms{Include: []string{\"amazon.com\"}, Exclude: nil},\n    \u0026domaindiscovery.SearchTerms{Include: []string{\"aws*\"}, Exclude: []string{\"*portal*\", \"*beta*\"}},\n    domaindiscovery.OptionOutputFormat(\"XML\"))\n\nlog.Println(string(resp.Body))\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhois-api-llc%2Fdomain-discovery-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhois-api-llc%2Fdomain-discovery-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhois-api-llc%2Fdomain-discovery-go/lists"}