Elixir Clients for Every Google API. Automatically Generated.
If you build anything in Elixir that touches Google services, you know the pain. The REST APIs are massive, the documentation is scattered, and writing a custom client for every single service is a full-time job. You end up with a pile of hand-rolled HTTP wrappers that break the moment Google changes a field name.
That's why elixir-google-api is such a breath of fresh air. It's a single repository that contains generated Elixir clients for every Google API. Not just the popular ones like Cloud Storage or BigQuery. All of them. And they're generated straight from the official discovery documents.
This isn't a wrapper or a generic REST client. It's a set of concrete, type-checked Elixir modules that map directly to Google's actual API surface. If you've ever wanted to call a niche Google API without reading through 300 pages of docs, this is your ticket.
What It Does
The repo is essentially a pipeline. Google publishes discovery documents for every API, which describe the endpoints, parameters, and schemas in a structured JSON format. This project reads those documents and generates idiomatic Elixir code.
The result is a collection of Hex packages (or you can just use the source directly) that give you functions like Google.YouTube.V3.PlaylistItems.list(conn, part, optional_params) or Google.Cloud.Storage.V1.Objects.get(conn, bucket, object). Each module is tied to the correct auth scope, and the request/response structs are defined as Elixir types.
The bot (yoshi-code-bot) automatically regenerates these clients whenever Google updates their discovery docs. So if Google adds a new field or endpoint, the Elixir client is updated without you lifting a finger.
Why It's Cool
The sheer scope is the first thing that hits you. There are over 200 APIs represented here, from Gmail to Google Analytics to obscure internal tools. You don't have to hunt for a maintained client for that one random service you need. It's already here, generated and ready.
The code generation approach is the clever part. Instead of hand-maintaining thousands of modules, they parse the official schema and emit code. That means the clients are always in sync with Google's actual behavior. No more guessing what a "undefined field" means. The Elixir structs mirror the JSON schemas exactly.
Another win is the auth handling. The generated modules expose a Connection struct that you can pass around. It handles OAuth tokens and API keys, so you don't have to mess with headers on every single request. You just build a connection and pass it to your calls.
If you're working on a Phoenix app that needs to pull data from Google Drive, or a background job that needs to hit the Admin SDK, the setup is dead simple. You don't have to learn the quirks of each API's HTTP interface. You just call Elixir functions with Elixir data.
How to Try It
The easiest way to test it out is to add one of the packages to your project. But since the repo is huge, you might want to start by cloning it and exploring the structure.
git clone https://github.com/yoshi-code-bot/elixir-google-api
cd elixir-google-api
mix deps.get
Then you can run mix compile and browse the google_api_ directories. Pick a client, for example the YouTube one, and look at the generated modules.
To use it in your own project, you'd add a dependency like:
def deps do
[
{:google_api_youtube, "~> 0.1"}
]
end
You'll need to set up credentials using the standard Google OAuth flow, but the code you write after that looks like any other Elixir library. The repo has a README with a quick start example and links to the full documentation for each API.
If you want a zero-setup taste, check out the examples folder in the repo. It has simple scripts that show how to call a few popular APIs.
Final Thoughts
This project is one of those rare things that feels like it was built by someone who got tired of a dumb problem and just solved it completely. It handles a massive surface area with a single, elegant pipeline of code generation.
For any Elixir developer working with Google services, this is basically a cheat code. It removes the grunt work of writing HTTP calls and parsing JSON, and replaces it with typed functions that feel natural in Elixir. Even if you only need one API, the fact that it's always in sync with Google's updates makes it worth checking out.
It's not flashy. It's not a new paradigm. It's just a solid, practical tool that saves you hours of tedious work. And honestly, that's often the best kind of project.
Found this useful? Follow @githubprojects for more cool repos.