1. Price
Free tier: Usage under 80,000,000 quota units per day per project isn't billed. As reported on the official pricing page, checked Oct 10, 2026.
developers.google.com/workspace/gmail/api/reference/quota2. Commercial use
“If your public application uses scopes that permit access to certain user data, it must complete a verification process.”
Allowed under the Google APIs Terms and the Workspace user data policy; public apps need verification, and restricted scopes may need a yearly security assessment. Data: Rule for your app, not Google's own use; you may not use Gmail user data to train general AI models.
developers.google.com/workspace/gmail/api/auth/scopes3. Key & sign-up
“Note that client secrets aren't used for Web applications.”
OAuth 2.0 user consent with scopes (each user signs in with Google); the access token goes in the Authorization header.
developers.google.com/workspace/gmail/api/quickstart/js4. Agent access
“This is an MCP server provided by Gmail API.”
Our agent check: 4 of 6 (Nov 13, 2026).
developers.google.com/workspace/gmail/api/reference/mcpChecked against the maker's official pages, pricing on Oct 10, 2026. Tap a verdict to see its source.How we checkedReport an error
What Gmail API does
The Gmail API lets your app work with a person's own Gmail mailbox after they sign in with Google and approve access. The app can search and read messages, add labels, write drafts and send mail from that address. It is for working with real mailboxes, not for sending newsletters or receipts from your own domain.
- Gmail API is one of 23 APIs in the Email sending category on AgentGid.
- It is one of 21 that can be started for free.
- It ships an official MCP server, like 9 others here.
- Its official SDK is the 1st most downloaded in the category (32.1M a week).
What people build with it
Send mail from the user's own address
Your app writes and sends a message, or saves a draft, from the signed-in person's Gmail, so replies come back to their inbox.
Find messages like in the Gmail search box
Pull out invoices, order confirmations or messages from one sender with the same search words people type in Gmail.
Back up or index a mailbox
Copy someone's mail into an archive or a search index, with read-only access so nothing can be changed or deleted.
Sort and label incoming mail
Put labels such as "Invoices" on matching messages, or set up filters that act on new mail automatically.
React the moment new mail arrives
Get a notice on your server when a watched mailbox changes, instead of checking it again and again.
AI assistant that drafts replies Idea
An assistant reads a customer's message and leaves a suggested reply as a draft, which the person checks and sends themselves.
Gmail API popularity
SDK downloads from npm and PyPI, weekly. Numbers as of Nov 17, 2026.
Pricing
Usage under 80,000,000 quota units per day per project isn't billed
No monthly plan
Quota-unit based: messages.send = 100 units; 1,200,000 units per minute per project; 6,000 units per minute per user
Quotas changed May 1, 2026 for new Cloud projects; Google says full billing details for usage above the daily threshold come later in 2026 with 90 days' notice. Limit of 500 recipients per message.
As reported on the official pricing page, checked Oct 10, 2026. Prices change: confirm before you buy. developers.google.com/workspace/gmail/api/reference/quota
Limits
1,200,000 quota units per minute per project; 6,000 per minute per user
80,000,000 quota units per day before charges apply (cannot be raised)
Costs per call: messages.send 100 units, messages.list 5, messages.get 20
500 recipients per message
From the official docs. developers.google.com/workspace/gmail/api/reference/quota
Key and access
OAuth 2.0 user consent with scopes (each user signs in with Google); the access token goes in the Authorization header.
none fixed; the quickstart reads credentials.json, and Python samples use google.auth.default() (GOOGLE_APPLICATION_CREDENTIALS)No
Steps only a person can do
- Create or pick a Google Cloud project, turn on the Gmail API and set up the OAuth consent screen (app name, support e-mail, audience). Read the client ID and secret from credentials.json on the server, kept out of git.
- Create an OAuth client; if the app is an AI agent acting for users, tick the AI-powered agent option (it cannot be changed later). Use that client in the sign-in flow and store each user's refresh token encrypted.
- Before a public launch, submit the app for Google verification, and the security assessment if restricted scopes are used. Until then, keep the app in testing with listed test users.
- Each user signs in and approves the requested access. Call the API with userId 'me' for that user.
Commercial use and your data
Free to call within Google's limits for any app, including paid ones, under the Google APIs Terms. Apps that read people's mail must follow Google's user data rules, and may not use that mail to train general AI models.
Allowed under the Google APIs Terms and the Workspace user data policy; public apps need verification, and restricted scopes may need a yearly security assessment.
“If your public application uses scopes that permit access to certain user data, it must complete a verification process.” source
Mail data may not be used to train or improve general AI models beyond that user's own personalized model.
“Transferring, selling, or using user data to create, train, or improve a machine learning or artificial intelligence model beyond that specific user's personalized model for the appropriate use case or user-facing feature.” source
Fine for internal tools in a client's own Workspace (internal apps skip some review); public apps follow the same verification rules.
“Note: If your app is only used by users within your own domain,” source
Rule for your app, not Google's own use; you may not use Gmail user data to train general AI models.
“Transferring, selling, or using user data to create, train, or improve a machine learning or artificial intelligence model beyond that specific user's personalized model for the appropriate use case or user-facing feature.” source
Your app must publish a privacy policy that says how it uses, stores and shares the Google user data it gets.
“You must publish a privacy policy that fully documents how your application interacts with user data.” source
Errors to handle
The access token is expired or invalid, or lacks the needed scope.
Refresh the token with the refresh token (client libraries do this); if that fails, send the user through sign-in again.
The user or project hit a rate limit.
Retry with exponential backoff and make fewer requests.
The user's Workspace admin does not allow apps to access Gmail.
Tell the user to ask their domain administrator to allow your app.
Daily sending limit, bandwidth limit or too many parallel requests for one user.
Wait for the retry time and back off; per-user limits cannot be raised.
An unexpected error on Google's side.
Retry with exponential backoff.
Use it from an agent
4 of 6: llms.txt no, OpenAPI no, SDK yes, MCP yes, status page yes, AI assistants allowed yes
Checked Nov 13, 2026.
Gmail MCP server (gmailmcp.googleapis.com), Developer Preview
https://gmailmcp.googleapis.com/mcp/v1
npm install @googleapis/gmailpip install google-api-python-clientAlternatives
Gmail API This page
Pick Resend to send transactional or marketing mail from your own domain, without users signing in to Gmail.
Pick Postmark for receipts and password resets from your domain, with handling of incoming mail.
Pick AgentMail when an AI agent needs its own inboxes to send, receive and reply, instead of a person's Gmail.
Get started
Tell your AI assistant
“Connect Gmail with OAuth using googleapis on my server: ask only for gmail.readonly (or gmail.send if we only send), keep credentials.json and tokens out of git, search with the q parameter, and retry 429 and 5xx errors with exponential backoff.”
In a Google Cloud project, turn on the Gmail API, set up the consent screen and create an OAuth client; save the downloaded file as credentials.json.
From developers.google.com/workspace/gmail/api/quickstart/nodejs
Install the client libraries used by the Node.js quickstart.
npm install googleapis@105 @google-cloud/local-auth@2.1.0 --saveFrom developers.google.com/workspace/gmail/api/quickstart/nodejs
Run the sample; the first run opens a browser to sign in and approve, then it lists the mailbox labels.
node .From developers.google.com/workspace/gmail/api/quickstart/nodejs
First request
Request from the search guide (needs an OAuth access token); response is the structure from the messages.list reference, where each message carries only an id and a threadId.
GET https://www.googleapis.com/gmail/v1/users/me/messages?q=in:sent after:2014/01/01 before:2014/02/01{
"messages": [
{
object (Message)
}
],
"nextPageToken": string,
"resultSizeEstimate": integer
}Mistakes to avoid
Broader scopes are restricted and mean more review, and users trust narrow requests more.
The API only accepts the message as one encoded raw string.
Over the daily limit, errors can start several minutes after successful-looking sends.
Gmail has a per-user concurrent request limit on top of the rate limits.
The local sign-in needs a browser on the same machine.
Questions
Does the Gmail API cost money?
Not below the daily threshold of 80 million quota units per project; Google says billing details for usage above it come later in 2026 with at least 90 days' notice.
Can I use it to send newsletters to thousands of people?
It sends from a person's own Gmail with that account's daily limits and at most 500 recipients per message; for bulk mail from your domain an email-sending service fits better.
Which permission should my app ask for?
The narrowest one that works, for example gmail.send to only send; broad ones like full mail access are restricted and need extra review.
Can an AI assistant use Gmail directly?
Google offers a Gmail MCP server in Developer Preview with tools such as search threads and create draft.