{"id":21740910,"url":"https://github.com/whois-api-llc/website-categorization-go","last_synced_at":"2025-03-21T01:15:40.950Z","repository":{"id":61629318,"uuid":"552826664","full_name":"whois-api-llc/website-categorization-go","owner":"whois-api-llc","description":"Website Categorization API client library for Go","archived":false,"fork":false,"pushed_at":"2023-10-30T08:56:01.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-25T21:27:59.437Z","etag":null,"topics":["categorization","category-api","go","golang","website-categorization","whoisxmlapi"],"latest_commit_sha":null,"homepage":"https://website-categorization.whoisxmlapi.com/api","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-17T09:36:50.000Z","updated_at":"2022-11-09T07:26:50.000Z","dependencies_parsed_at":"2022-10-18T18:15:14.255Z","dependency_job_id":"b41c6ef7-337e-40fd-91fc-b7ce47990b84","html_url":"https://github.com/whois-api-llc/website-categorization-go","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fwebsite-categorization-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fwebsite-categorization-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fwebsite-categorization-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fwebsite-categorization-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/website-categorization-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":["categorization","category-api","go","golang","website-categorization","whoisxmlapi"],"created_at":"2024-11-26T06:15:51.897Z","updated_at":"2025-03-21T01:15:40.932Z","avatar_url":"https://github.com/whois-api-llc.png","language":"Go","readme":"[![website-categorization-go license](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![website-categorization-go made-with-Go](https://img.shields.io/badge/Made%20with-Go-1f425f.svg)](https://pkg.go.dev/github.com/whois-api-llc/website-categorization-go)\n[![website-categorization-go test](https://github.com/whois-api-llc/website-categorization-go/workflows/Test/badge.svg)](https://github.com/whois-api-llc/website-categorization-go/actions/)\n\n# Overview\n\nThe client library for\n[Website Categorization API](https://website-categorization.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/website-categorization-go\n```\n\n# Examples\n\nFull API documentation available [here](https://website-categorization.whoisxmlapi.com/api/documentation/v3/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 := websitecategorization.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 := websitecategorization.NewClient(apiKey, websitecategorization.ClientParams{\n    HTTPClient: \u0026http.Client{\n        Transport: transport,\n        Timeout:   20 * time.Second,\n    },\n})\n```\n\n## Make basic requests\n\nWebsite Categorization API lets you get all supported categories for websites.\n\n```go\n\n// Make request to get a list of categories by a domain name as a model instance.\nwCategorizationResp, _, err := client.Get(ctx, \"whoisxmlapi.com\")\nif err != nil {\n    log.Fatal(err)\n}\n\nfor _, obj := range wCategorizationResp.Categories {\n\tlog.Printf(\"ID: %d, Name: %s, Confidence: %f \", obj.ID, obj.Name, obj.Tier1.Confidence)\n}\n\n// Make request to get raw data in XML.\nresp, err := client.GetRaw(context.Background(), \"whoisxmlapi.com\",\n    websitecategorization.OptionOutputFormat(\"XML\"))\nif err != nil {\n    log.Fatal(err)\n}\n\nlog.Println(string(resp.Body))\n\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhois-api-llc%2Fwebsite-categorization-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhois-api-llc%2Fwebsite-categorization-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhois-api-llc%2Fwebsite-categorization-go/lists"}