{"id":13708857,"url":"https://github.com/shenzhencenter/google-ads-pb","last_synced_at":"2026-04-02T14:01:26.556Z","repository":{"id":37667104,"uuid":"430281825","full_name":"shenzhencenter/google-ads-pb","owner":"shenzhencenter","description":"Google Ads API Client Library for Golang","archived":false,"fork":false,"pushed_at":"2026-03-26T07:48:52.000Z","size":31445,"stargazers_count":104,"open_issues_count":1,"forks_count":31,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-27T02:41:56.678Z","etag":null,"topics":["go","golang","google-ads","google-ads-api","google-ads-go","google-ads-golang","google-ads-sdk"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shenzhencenter.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-11-21T05:29:36.000Z","updated_at":"2026-03-26T07:47:05.000Z","dependencies_parsed_at":"2023-12-15T20:30:36.571Z","dependency_job_id":"84af82cb-f269-42ef-bc3b-561ebf6f1c68","html_url":"https://github.com/shenzhencenter/google-ads-pb","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/shenzhencenter/google-ads-pb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenzhencenter%2Fgoogle-ads-pb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenzhencenter%2Fgoogle-ads-pb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenzhencenter%2Fgoogle-ads-pb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenzhencenter%2Fgoogle-ads-pb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shenzhencenter","download_url":"https://codeload.github.com/shenzhencenter/google-ads-pb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenzhencenter%2Fgoogle-ads-pb/sbom","scorecard":{"id":30839,"data":{"date":"2025-08-04","repo":{"name":"github.com/shenzhencenter/google-ads-pb","commit":"a3ab94794cbdcecee4c2fc045c67cd0c2b5e4964"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":4.8,"checks":[{"name":"Maintained","score":10,"reason":"22 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/generator.yml:1","Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/4 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":6,"reason":"dependency not pinned by hash detected -- score normalized to 6","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/shenzhencenter/google-ads-pb/go.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/shenzhencenter/google-ads-pb/go.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   3 out of   3 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-14T19:04:34.216Z","repository_id":37667104,"created_at":"2025-08-14T19:04:34.217Z","updated_at":"2025-08-14T19:04:34.217Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31232577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-31T09:14:28.471Z","status":"ssl_error","status_checked_at":"2026-03-31T09:14:19.506Z","response_time":111,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["go","golang","google-ads","google-ads-api","google-ads-go","google-ads-golang","google-ads-sdk"],"created_at":"2024-08-02T23:00:33.498Z","updated_at":"2026-04-02T14:01:26.056Z","avatar_url":"https://github.com/shenzhencenter.png","language":null,"funding_links":[],"categories":["Client libraries","Others"],"sub_categories":[],"readme":"\n# Google Ads API Client Library for Golang\n\n[![Go](https://github.com/shenzhencenter/google-ads-pb/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/shenzhencenter/google-ads-pb/actions/workflows/go.yml)\n[![GoDoc](https://godoc.org/github.com/shenzhencenter/google-ads-pb?status.svg)](https://pkg.go.dev/github.com/shenzhencenter/google-ads-pb)\n[![Go Report Card](https://goreportcard.com/badge/github.com/shenzhencenter/google-ads-pb)](https://goreportcard.com/report/github.com/shenzhencenter/google-ads-pb)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nThis library provides a Golang client for the [Google Ads API](https://developers.google.com/google-ads/api/docs/start). It's fully generated from the [googleapis](https://github.com/googleapis/googleapis/tree/master/google/ads/googleads) repository. More information on the generation process can be found [here](https://github.com/shenzhencenter/google-ads-pb/blob/main/.github/workflows/generator.yml).\n\nAlthough this project isn't official, we deem it as low-risk due to its maturity and our many years of using it in production. However, always consult the [sunset schedule](https://developers.google.com/google-ads/api/docs/sunset-dates) of the Google Ads API.\n\n## Features\n\n- Full support for Google Ads API.\n- Support for gRPC and REST Interface.\n- Source code generated from the official googleapis repository.\n\n## Version support\n\n| google-ads-pb      | Google Ads API   | Sunset date                  |\n| ------------------ | ---------------- | ---------------------------- |\n| v1.23.0            | v23              | February 2027                |\n| v1.22.0            | v22              | October 2026 (tentative)     |\n| v1.21.0            | v21              | August 2026 (tentative)      |\n| v1.20.0            | v20              | June 2026 (tentative)        |\n\n## Requirements\n\n- Familiarize yourself with the [OAuth2 guide](https://developers.google.com/google-ads/api/docs/oauth/overview).\n- If needed, obtain a [developer token](https://developers.google.com/google-ads/api/docs/first-call/dev-token).\n\n## Installation\n\n```bash\ngo get github.com/shenzhencenter/google-ads-pb\n```\n\n## Getting started\n\n1. Prepare `ACCESS_TOKEN`, `DEVELOPER_TOKEN`, and `CUSTOMER_ID`.\n\n\u003e Tips: For testing purposes, you can use [google/oauth2l](https://github.com/google/oauth2l) to obtain an access token.\n\n2. gRPC example.\n\n```go\nvar (\n    customerID     = os.Getenv(\"CUSTOMER_ID\")\n    developerToken = os.Getenv(\"DEVELOPER_TOKEN\")\n    accessToken    = os.Getenv(\"ACCESS_TOKEN\")\n)\n\ncred := grpc.WithTransportCredentials(credentials.NewClientTLSFromCert(nil, \"\"))\nconn, err := grpc.NewClient(\"googleads.googleapis.com:443\", cred)\nif err != nil {\n    panic(err)\n}\ndefer conn.Close()\n\nctx := context.Background()\nheaders := metadata.Pairs(\n    \"authorization\", \"Bearer \"+accessToken,\n    \"developer-token\", developerToken,\n    \"login-customer-id\", customerID,\n)\nctx = metadata.NewOutgoingContext(ctx, headers)\n\nreq := \u0026services.SearchGoogleAdsRequest{\n    CustomerId: customerID,\n    Query: \"SELECT user_list.name, user_list.resource_name FROM user_list\",\n}\nsvc := services.NewGoogleAdsServiceClient(conn)\nvar header metadata.MD\nresult, err := svc.Search(ctx, req, grpc.Header(\u0026header))\nrequestId := header.Get(\"request-id\")\nlog.Printf(\"request-id: %v, login-customer-id: %v\", requestId[0], customerID)\nif err != nil {\n    apiErr := status.Convert(err)\n    log.Fatalf(\"code: %s, message: %s, details: %v\", apiErr.Code(), apiErr.Message(), apiErr.Details())\n}\n\nfor _, row := range result.Results {\n    if row.UserList == nil {\n        continue\n    }\n    log.Print(\"resource_name: \", row.UserList.GetResourceName(), \" name: \", row.UserList.GetName())\n}\n```\n\n3. HTTP example.\n\n```go\nvar (\n    customerID     = os.Getenv(\"CUSTOMER_ID\")\n    developerToken = os.Getenv(\"DEVELOPER_TOKEN\")\n    accessToken    = os.Getenv(\"ACCESS_TOKEN\")\n)\n\nvar endpoint = fmt.Sprintf(\"https://googleads.googleapis.com/v23/customers/%s/googleAds:search\", customerID)\nreq := services.SearchGoogleAdsRequest{\n    Query: \"SELECT user_list.name, user_list.resource_name FROM user_list\",\n}\nreqBody, _ := protojson.Marshal(\u0026req)\n\nreqHttp, _ := http.NewRequest(\"POST\", endpoint, bytes.NewReader(reqBody))\nheader := make(http.Header)\nheader.Set(\"content-type\", \"application/json\")\nheader.Set(\"authorization\", \"Bearer \"+accessToken)\nheader.Set(\"developer-token\", developerToken)\nheader.Set(\"login-customer-id\", customerID)\nreqHttp.Header = header\n\nhttpResp, err := http.DefaultClient.Do(reqHttp)\nif os.Getenv(\"DEBUG\") != \"\" {\n    reqId := httpResp.Header.Get(\"request-id\")\n    log.Print(\"request-id: \", reqId, \" login-customer-id: \", reqHttp.Header.Get(\"login-customer-id\"))\n}\nif err != nil {\n    log.Panic(err)\n}\ndefer httpResp.Body.Close()\nvar httpRespBody []byte\nif httpRespBody, err = io.ReadAll(httpResp.Body); err != nil {\n    log.Panic(err)\n}\nresult := new(services.SearchGoogleAdsResponse)\nif err := protojson.Unmarshal(httpRespBody, result); err != nil {\n    log.Fatal(\"failed to unmarshal response: \", err, \"response: \", string(httpRespBody))\n}\nfor _, row := range result.Results {\n    if row.UserList == nil {\n        continue\n    }\n    log.Print(\"resource_name: \", row.UserList.GetResourceName(), \" name: \", row.UserList.GetName())\n}\n```\n\n## References\n\n- [Google APIs](https://github.com/googleapis/googleapis)\n- [Google Ads API Client Library for PHP](https://github.com/googleads/google-ads-php)\n- [google/oauth2l](https://github.com/google/oauth2l)\n- [How to Use a Service Account to Call the Google Ads API with Golang](https://www.liaozhen.cn/posts/how-to-use-service-account-call-google-ads-api/)\n\n## Contributing\n\nAs this project is fully protoc-generated, we aren't accepting pull requests. However, we value your feedback and suggestions, so feel free to open an issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshenzhencenter%2Fgoogle-ads-pb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshenzhencenter%2Fgoogle-ads-pb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshenzhencenter%2Fgoogle-ads-pb/lists"}