Google REST API client for Elixir.
OAuth2 bearer auth, Finch + Jason HTTP, structured errors, and thin wrappers for Search Console, GA4 Admin/Data, AdSense Management, and Google Ads.
Quick start
# config/runtime.exs
config :noizu_google,
access_token: System.get_env("GOOGLE_ACCESS_TOKEN"),
client_id: System.get_env("GOOGLE_CLIENT_ID"),
client_secret: System.get_env("GOOGLE_CLIENT_SECRET")
client = Noizu.Google.client()
{:ok, sites} = Noizu.Google.Api.SearchConsole.Sites.list(client: client)
{:ok, report} =
Noizu.Google.Api.SearchConsole.SearchAnalytics.query(
"https://example.com/",
%{
startDate: "2026-01-01",
endDate: "2026-01-31",
dimensions: ["query"]
},
client: client
)
{:ok, props} =
Noizu.Google.Api.AnalyticsAdmin.Properties.list(
filter: "parent:accounts/123",
client: client
)Architecture
Noizu.Google.Client— credentials + base URLsNoizu.Google.HTTP— REST GET/POST/PUT/PATCH/DELETE with JSON + bearer authNoizu.Google.OAuth— authorize URL, code exchange, refreshNoizu.Google.Scopes— common OAuth scope constantsNoizu.Google.Api.*— endpoint modules by Google productNoizu.Google.Error— structured errors
API namespaces
| Module | Google surface |
|---|---|
Api.SearchConsole.Sites | Search Console sites |
Api.SearchConsole.SearchAnalytics | searchAnalytics/query |
Api.SearchConsole.Sitemaps | sitemaps list/get/submit/delete |
Api.AnalyticsAdmin.Accounts | GA4 Admin accounts |
Api.AnalyticsAdmin.Properties | GA4 properties |
Api.AnalyticsAdmin.DataStreams | GA4 data streams |
Api.AnalyticsData.Reports | GA4 Data API runReport |
Api.AdSense.Accounts | AdSense accounts |
Api.AdSense.AdClients | AdSense ad clients |
Api.AdSense.AdUnits | AdSense ad units |
Api.AdSense.Reports | AdSense reports:generate |
Api.Ads.Customers | Google Ads search / mutate / conversion actions |
Pass %Client{} via opts[:client] (or omit to use application config defaults).
See the HexDocs extras for the OAuth runbook and ADR-001 (MCP + Terraform).
Summary
Functions
Default AdSense Management API base URL.
Default GA4 Admin API base URL.
Default GA4 Data API base URL.
Default general Google APIs base URL.
Build a client from options / application config.
Default Google Ads API base URL.
Default Search Console (webmasters v3) base URL.
Functions
Default AdSense Management API base URL.
Default GA4 Admin API base URL.
Default GA4 Data API base URL.
Default general Google APIs base URL.
@spec client(keyword() | map()) :: Noizu.Google.Client.t()
Build a client from options / application config.
Default Google Ads API base URL.
Default Search Console (webmasters v3) base URL.