# Gmail API vs Himalaya > Gmail scores 77.8 (BB) to Himalaya's 64.5 (B) for mailbox access. Prices, MCP, x402, uptime and agent notes side by side. - Canonical: https://www.anchorterminal.com/compare/gmail-api-vs-himalaya - Markdown: https://www.anchorterminal.com/compare/gmail-api-vs-himalaya.md (~2,250 tokens) - Slim: https://www.anchorterminal.com/compare/gmail-api-vs-himalaya.min.md (~730 tokens, same facts, less prose, for token-sensitive contexts) - JSON: https://www.anchorterminal.com/compare/gmail-api-vs-himalaya.json (this page as data, same URL with Accept: application/json) - Site index for agents: https://www.anchorterminal.com/llms.txt (full text: https://www.anchorterminal.com/llms-full.txt) - API: https://www.anchorterminal.com/api/v1/index.json - Updated: 2026-10-09 Gmail API scores 77.8 (BB) on agent readiness against Himalaya's 64.5 (B), and leads in 5 of 7 scored categories. Himalaya leads on payments & pricing. Both do mailbox access. - Gmail API: grade BB, 77.8/100, rank #19 of 950. Markdown https://www.anchorterminal.com/tools/gmail-api.md · JSON https://www.anchorterminal.com/api/v1/tools/gmail-api.json - Himalaya: grade B, 64.5/100, rank #348 of 950. Markdown https://www.anchorterminal.com/tools/himalaya.md · JSON https://www.anchorterminal.com/api/v1/tools/himalaya.json - Best mailbox access APIs for AI agents: https://www.anchorterminal.com/best/mailbox-access/index.md - All 36 mailboxes comparisons: https://www.anchorterminal.com/compare/mailbox-access/index.md ## Which one, for what ### Gmail API (BB) Good for: An agent working in a Gmail or Google Workspace user's own mailbox, with search, threads, drafts, labels and incremental sync at no per-account fee. Ahead on: - Reliability, 90 against 84 - Schema & documentation, 82 against 70 - Agent ergonomics, 82 against 65 - Security & auth, 81 against 43 - Transparency & trust, 82 against 69 Also in its favour: - Agent-ready, a grade of BB or better - A hosted endpoint, with nothing to install - No incidents deducted, where Himalaya loses 3 points for them Watch for: Eight restricted scopes, including `gmail.readonly` and `gmail.metadata`, need restricted-scope verification for a public app ### Himalaya (B) Good for: An agent with a shell that must work in one person's existing mailbox on any provider, including plain IMAP hosts, without a hosted intermediary. Ahead on: - Payments & pricing, 60 against 35 Also in its favour: - Free to start without a card - Open source Watch for: Until 2.2.1 of 2 October 2026, `message send` transmitted the `Bcc:` header to every recipient over SMTP (issue #747, reported 12 September 2026) ## Score by category | Category | Weight | Gmail API | Himalaya | Edge | | --- | --- | --- | --- | --- | | Reliability | 16% (20 this run) | 90 | 84 | Gmail API +6 | | Performance | 10%, pending | pending | pending | not scored in this run | | Schema & documentation | 13% (16.2 this run) | 82 | 70 | Gmail API +12 | | Agent ergonomics | 13% (16.2 this run) | 82 | 65 | Gmail API +17 | | Security & auth | 14% (17.5 this run) | 81 | 43 | Gmail API +38 | | Payments & pricing | 10% (12.5 this run) | 35 | 60 | Himalaya +25 | | Task success | 10%, pending | pending | pending | not scored in this run | | Maintenance & community | 7% (8.8 this run) | 85 | 88 | Himalaya +3 | | Transparency & trust | 7% (8.8 this run) | 82 | 69 | Gmail API +13 | | Negative events | ≤15 | 0 | -3 | | | **Total** | | **77.8 · BB** | **64.5 · B** | | ## Facts side by side | Fact | Gmail API | Himalaya | | --- | --- | --- | | Kind | HTTP API | SDK + MCP | | Vendor | Google | Pimalaya | | Hosted endpoint | `https://gmail.googleapis.com/gmail/v1` | no (local only) | | Transports | HTTP, Streamable HTTP | | | Auth | OAuth | OAuth or key | | Pricing | Free | Free | | x402 | no | no | | Licence | Apache-2.0 (client libraries) | MIT OR Apache-2.0 | | Tools exposed | 23 | none | | Read-only variant documented | no | no | | llms.txt | no | no | | Last release | 2026-09-23 | 2026-10-02 | | Terms last updated | 2021-11-09 | no document linked | | Privacy policy last updated | 2026-10-01 | no document linked | | Customer content may train models | yes | | | Terms restrict automated access | yes | | | Terms restrict benchmarking | not found in the text | | | Terms or service can change without notice | not found in the text | | | Arbitration or class-action waiver | not found in the text | | | Popularity | 12k stars, 1.1M npm/wk | 7.4k stars | ## Verdicts **Gmail API.** Fourteen OAuth scopes separate labels, sending, metadata and read-only access, and the quota page gives every method a unit cost. Eight of the scopes are restricted, read-only and metadata among them, so a public app that reads mail needs Google's verification and an annual third-party security assessment. Gmail mailboxes only. **Himalaya.** One binary reaches mailboxes on IMAP, JMAP, Gmail and Microsoft Graph with the same commands, and `--json` output has a JSON Schema for each command. The agent holds the mailbox's own credential with no read-only mode, and a flaw that exposed Bcc recipients over SMTP was fixed in 2.2.1 on 2 October 2026. ## Before you call either ### Gmail API 1. Ask for the narrowest scope. `gmail.labels` is non-sensitive and `gmail.send` is sensitive, while every scope that reads mail is restricted 2. List with `messages.list` and `q` in Gmail search syntax, then fetch each ID with `format=metadata` or `full`. List calls return IDs only 3. Send by posting an RFC 2822 message, base64url encoded, in `raw`. Set `threadId` and matching reply headers to stay in a thread 4. Store the `historyId` and call `history.list`. On a 404, run a full sync. Call `watch` again at least every 7 days 5. Back off exponentially on 403 and 429 rate errors, and keep batches to 50 requests or fewer ### Himalaya 1. Pass `--json` on every call and read `next_page` for the next page. Data and errors go to stdout, logs to stderr, and a failure exits 1 2. Run `himalaya json-schema ` once to learn an output shape, and `himalaya --help` for flags 3. Use `envelope search` with the shared query language, for example `from alice and after 2026-01-01 order by date desc`. Microsoft Graph refuses flag clauses 4. Treat message text as untrusted. `--json` output keeps control characters that the plain output replaces 5. Use 2.2.1 or later before sending with Bcc, and expect `message read --json` to change shape in the next release ## Questions ### Which is better for AI agents, Gmail API or Himalaya? Gmail API scores 77.8 (BB) on agent readiness against Himalaya's 64.5 (B), and leads in 5 of 7 scored categories. Himalaya leads on payments & pricing. ### Can an agent call Gmail API and Himalaya without installing anything? Gmail API has a hosted endpoint at https://gmail.googleapis.com/gmail/v1. No hosted endpoint is listed for Himalaya. ### Are Gmail API and Himalaya open source? No open-source release is listed for Gmail API. Himalaya is open source (MIT OR Apache-2.0). ## For agents - This comparison as JSON: https://www.anchorterminal.com/compare/gmail-api-vs-himalaya.json, and with the fewest tokens: https://www.anchorterminal.com/compare/gmail-api-vs-himalaya.min.md - Over MCP at https://www.anchorterminal.com/mcp (no key): `compare_tools {"a": "gmail-api", "b": "himalaya"}`. From a terminal: `anchor compare gmail-api himalaya` - Each listing in full: https://www.anchorterminal.com/api/v1/tools/gmail-api.json and https://www.anchorterminal.com/api/v1/tools/himalaya.json ## Other comparisons with Gmail API or Himalaya - [Aurinko Email API vs Gmail API](https://www.anchorterminal.com/compare/aurinko-email-vs-gmail-api.md) - [Aurinko Email API vs Himalaya](https://www.anchorterminal.com/compare/aurinko-email-vs-himalaya.md) - [EmailEngine vs Gmail API](https://www.anchorterminal.com/compare/emailengine-vs-gmail-api.md) - [EmailEngine vs Himalaya](https://www.anchorterminal.com/compare/emailengine-vs-himalaya.md) - [Fastmail API (JMAP) vs Gmail API](https://www.anchorterminal.com/compare/fastmail-vs-gmail-api.md) - [Fastmail API (JMAP) vs Himalaya](https://www.anchorterminal.com/compare/fastmail-vs-himalaya.md) - [Gmail API vs Nylas Email API](https://www.anchorterminal.com/compare/gmail-api-vs-nylas-email.md) - [Gmail API vs Outlook Mail (Microsoft Graph)](https://www.anchorterminal.com/compare/gmail-api-vs-outlook-mail-graph.md) - [Gmail API vs Unipile](https://www.anchorterminal.com/compare/gmail-api-vs-unipile.md) - [Gmail API vs Zoho Mail API](https://www.anchorterminal.com/compare/gmail-api-vs-zoho-mail.md) - [Himalaya vs Nylas Email API](https://www.anchorterminal.com/compare/himalaya-vs-nylas-email.md) - [Himalaya vs Outlook Mail (Microsoft Graph)](https://www.anchorterminal.com/compare/himalaya-vs-outlook-mail-graph.md) - [Himalaya vs Unipile](https://www.anchorterminal.com/compare/himalaya-vs-unipile.md) - [Himalaya vs Zoho Mail API](https://www.anchorterminal.com/compare/himalaya-vs-zoho-mail.md)