Original article: "Serper API Key and Docs: From Login to Your First Result", https://everyinfra.com/en/blog/serper-api-docs-key-alternative Summary: Serper has no docs site: the Playground is the docs, and keys can only be created, renamed or reset. 34 live calls map params, errors and key rotation. Angle for this piece (different from the original; do not rewrite it): EveryInfra vs Serper for a startup moving a RAG chatbot off a hard-coded search key: key rotation, per-product key limits, error handling in Python, and the bill at three query volumes from public prices. Research this angle in depth: find many primary sources from the last 30 days and the last year (official documentation and announcements, government and regulator pages, standards bodies, company filings, academic papers, industry reports) to cross-check, add context and counter-examples; cite each with its date. Compared with: Serper. Read its public pricing page, API documentation, billing and refund terms, changelog and public user reviews, and give the date you read each price. EveryInfra's prices are the measurements below and https://everyinfra.com/en/pricing. EveryInfra's measured findings (from the original, fact-checked at 2026-11-05T01:30:00+08:00, Singapore time): 1. Serper's docs are the Playground. On November 5, 2026, serper.dev/docs, /llms.txt and /openapi.json all returned 404. The Playground builds sample code with an open-source generator, and its GET variant puts `apiKey` in the URL. 2. The Serper API Keys page lets you create, rename, copy and reset a key. Its script has no delete, no per-key scope and no IP allowlist. A reset kills the old key at once. The EveryInfra docs and pricing page say keys can be scoped by product, disabled and locked to IP addresses. The OpenAPI file also lets each key carry its own USD spend limit and expiry. 3. We sent Serper-style bodies to our API as they were. `gl`, `hl` and `type` each returned a 422 with the list of valid parameters. A typo, `locaton`, came back with `did_you_mean: location`. None of the 13 failed or empty calls cost anything. 4. A ten-country test of `location` showed overlap with the US top 9 fall from 9 (Singapore, UK) to 5 (Mexico, Germany). The 21 paid requests took 0.98 to 3.48 seconds, with a median of 1.81 seconds. 5. In the top 20 English results for "serper api documentation", only 3 URLs are on serper.dev, and none of them is a docs page. Eight are framework docs, and those frameworks do not agree on the key's environment variable name. Data tables from the original: | Item | Serper | EveryInfra | |---|---|---| | Sign-up | Name, email, password, plus a human check; email verification after sign-up | Email, or continue with GitHub or Google | | Login | Email and password; optional 2FA with an authenticator app | Same as sign-up | | Free usage | 2,500 queries, no credit card | Star two GitHub repos for a $1 trial credit, valid for 24 hours | | Where the key is | API Keys page in the dashboard | API Keys in the console; the full key shows once, at creation | | Keys per account | Several, each with a name | Several, split by environment or use | | Key management | Create, rename, copy, reset | Create, scope by product, disable, IP allowlist, rotate | | Auth header | `X-API-KEY: <key>` (the GET variant puts `apiKey` in the URL) | `Authorization: Bearer <key>` | | Endpoint | `https://google.serper.dev/<type>` | `https://api.everyinfra.com/api/v1/search` | | Where the docs are | Playground (after login); no docs site | `/docs`, `/llms.txt`, `/openapi.json` and a free tool catalog | | Machine-readable spec | No OpenAPI or llms.txt found | OpenAPI 3.0.3 with 61 paths, llms.txt, tool catalog JSON | | MCP | None from Serper; community servers that run locally | Remote MCP server at `https://api.everyinfra.com/mcp` | | Error shape | `{"message": "...", "statusCode": 403}` (third-party posts) | `{"error": {"code", "message", "fault", "retryable", "next_steps", ...}}` | | Action | Serper (API Keys page script) | EveryInfra (docs, pricing page, OpenAPI) | |---|---|---| | Create | Yes, a name is required | Yes, one per environment or use | | Rename | Yes | Yes (`PATCH /portal/api/keys/{key_id}` in OpenAPI) | | See the full key again | Copy button on the page | Full key shows once, at creation | | Reset or rotate | Yes, the old key dies at once | Yes, in the console only | | Disable but keep | Not found | Yes, calls then return 401 | | Delete | Not found | Console keys can only be disabled; keys made through the API can be deleted | | Scope by product | Not found | Yes, a blocked product returns 403 `capability_denied` | | IP allowlist | Not found | Yes, in the console only | | Logs per key | Yes, Activity logs filter by key | Yes, console call history; OpenAPI has a per-key usage endpoint | | Spend limit and expiry per key | Not found | Yes, `spend_limit_usd` and `expires_at` (OpenAPI) | | Endpoint | What it does | Limits in the spec | |---|---|---| | `GET /portal/api/keys` | Lists each key's name, masked prefix, status, scopes, per-minute limit, USD spend limit and last use | Never returns the key secret | | `POST /portal/api/keys` | Creates a key and returns it once; can set `ip_allow`, `expires_at` and `spend_limit_usd` | A key made through the API is never broader than the calling key and never gets a write scope; at most 20 per account per UTC day; a key with a spend limit cannot create keys | | `PATCH /portal/api/keys/{key_id}` | Renames a key, changes its note or moves its expiry earlier | Only for keys made through the API or the calling key; console keys can only be disabled | | `POST /portal/api/keys/{key_id}/disable` | Disables any key on the account at once | Only the account owner can enable it again, in the console | | `DELETE /portal/api/keys/{key_id}` | Deletes a key for good | Only for keys made through the API or the calling key | | `GET /portal/api/keys/{key_id}/usage` | Shows one key's successes, failures, spend and last call over recent days | Needs `requests:read` | | Playground rule | Where it is | What it means for your code | |---|---|---| | Type is in the URL, not the body | `https://google.serper.dev/` + type | Change the URL to change the type | | Defaults gl=us, hl=en, num=10, page=1 | Removed from generated code | No parameters means US English | | Plain search num has one choice, 10 | Result count menu | Use page for more results | | Credit cost differs by type | "Credits: N" widget | maps and lens cost 3 credits | | Up to 100 queries per request | Mini-batch switch | Credits count per query | | GET puts apiKey in the URL | GET/POST switch in the code panel | Use POST and the header | | 100,029 locations | api.serper.dev/locations | Down to city and postal code | | Source of the top 20 results | Count | Examples | |---|---|---| | serper.dev pages | 3 | Home, /api-keys, /signup | | Framework and platform docs | 8 | docs.crewai.com, reference.langchain.com, docs.haystack.deepset.ai, docs.langflow.org | | API directories and marketplaces | 4 | apitracker.io, apis.io and others | | Other | 5 | github.com/Serper-API, medium.com, youtube.com | | File | What it holds | |---|---| | [Tool catalog](https://api.everyinfra.com/api/v1/search/tools) | All 17 search tools with parameters, defaults, limits, descriptions in three languages and the price; no key needed | | [OpenAPI file](https://api.everyinfra.com/openapi.json) | Version 3.0.3, with 61 paths on November 5, 2026 | | `/llms.txt` | An index for language models; its first block gives the base URL, the header and a note that bad parameters come back with `did_you_mean` and `allowed` | | Serper parameter | Meaning in the Playground | EveryInfra match | Note | |---|---|---|---| | `q` | Query | `q` (`web` tool); `keyword` in the data catalog | Same name, same meaning | | `gl` | Country, two letters, default us | `location` | `gl` returns 422; `location` works at country level | | `hl` | Interface language, default en | None in `web`; `language` in `web/search` | `hl` returns 422 | | `num` | Results per page, 10 for plain search | `num`, up to 10 | Same name | | `page` | Page number from 1 | `page` from 1, each page is one charge | Same name | | `type` | URL segment: search, news, images | Body field `tool`: `web`, `news`, `media` | `type` in the body returns 422 | | `tbs` | Time range `qdr:h/d/w/m/y` | `after`, `before` (dates) | Convert to dates | | `location` | City, area or postal code; 100,029 entries | `location` works per country | Same name, different meaning | | `autocorrect` | Spelling fix, on by default | None | Drop it | | — | — | `site` (one domain only) | Serper uses `site:` inside `q` | | Serper type | EveryInfra search tool | Data catalog options | |---|---|---| | search | `web` | [`web/search`](/en/web-api/search), [`bing/search`](/en/bing-api/search), [`duckduckgo/search`](/en/duckduckgo-api/search) | | news | `news` | [`google_news/search`](/en/google-news-api/search) | | images, videos | `media` (`kind` is image or video) | — | | places, maps | `places` | — | | shopping | `shopping` | [`google_shopping/search`](/en/google-shopping-api/search) | | scholar, patents | `scholar` (`kind` is papers or patents) | — | | autocomplete | `suggest` | — | | lens | `lens` | — | | webpage | `read` | — | | reviews, product-reviews | Not in search | Map and product reviews are in the data catalog by platform |
---Let me analyze the user's query carefully:
- The user wants a deep comparison between Serper API and EveryInfra for a startup moving a RAG chatbot off a hard-coded search key
- Key focus areas:
- Key rotation capabilities
- Per-product key limits
- Error handling in Python
- Bill comparison at three query volumes from public prices
- Need to find primary sources from last 30 days and last year
- Need to read Serper's pricing page, API documentation, billing/refund terms, changelog, and user reviews
- EveryInfra's prices are provided and at https://everyinfra.com/en/pricing
- There are specific measured findings from the original article that need to be cross-checked
- There are important URLs to read (13 URLs)
Let me start by reading the important URLs provided, particularly the original article and the EveryInfra pages, then search for Serper's current documentation and pricing.
First, let me read the key URLs in parallel:
-
https://everyinfra.com/en/blog/serper-api-docs-key-alternative (original article)
-
https://everyinfra.com/en/pricing (EveryInfra pricing)
I'll continue expanding my search by including additional EveryInfra API endpoints and conducting targeted searches on Serper's current documentation and pricing details. This comprehensive approach will help me gather the most up-to-date information for the comparison
I'll start by reading the key URLs in parallel and searching for Serper's current documentation simultaneously.
Good, I've read the original article and EveryInfra's pricing page. Several URLs timed out. Let me now read the remaining URLs and search for Serper's current documentation and pricing. Let me also read the Google Shopping API, MCP server, and other pages.
Good — original article and pricing page are read. Several URLs timed out; I'll retry those and simultaneously search for Serper's current pricing, docs, and changelog.
Good progress. I've read many URLs. Let me now search for Serper's current pricing, documentation, and user reviews more specifically. The previous searches returned results from omggrow.com (which is a blacklisted domain) - I need to avoid those and focus on serper.dev specifically.
Let me search for:
- Serper's current pricing page
- Serper's billing and refund terms
- Serper user reviews on G2, Capterra, or Reddit
- Serper changelog
I also need to read the EveryInfra Google Shopping API search page (it timed out).
Good progress. Several URLs timed out. Let me now search specifically for Serper's current pricing, billing terms, changelog, and user reviews, and retry the timed-out EveryInfra pages.
I'm making good progress. Let me now read the Serper pricing page and terms of service, and also try to read the EveryInfra search API pages that timed out. I need to:
- Read serper.dev homepage for pricing
- Read serper.dev/terms for billing/refund terms
- Try to read the EveryInfra API reference pages that timed out
- Search for more Serper user reviews
Let me also search for RAG chatbot search API comparison and Python error handling patterns to add
Good — found Serper's pricing page and terms. Now let me deep-read those and the remaining EveryInfra pages simultaneously.
Let me continue searching for more Serper information and also look for Python error handling patterns and RAG chatbot search API comparisons
I now have Serper's current pricing and terms. Let me search for more Serper changelog/user feedback and Python RAG error handling patterns.
The searches are returning results from omggrow.com which is a blacklisted domain. I need to adjust my search strategy. Let me try different search queries to find Serper changelog and user reviews, as well as Python error handling patterns for RAG chatbots.
Let me also try to read the EveryInfra API documentation pages that timed out, and search for more specific information about Serper's changelog and user feedback.
The searches keep returning results from omggrow.com (blacklisted). Let me try more targeted searches for Serper changelog and Python error handling.
The searches keep returning results from omggrow.com (blacklisted). Let me try different search approaches to find information about:
- Serper changelog/release notes
- Python error handling patterns for RAG chatbots
- Serper user reviews
I should also try to read the Serper homepage and terms pages more carefully for pricing details.
The searches are dominated by omggrow.com (blacklisted). Let me try different search angles and read the Serper pages more carefully.
I'm finding useful information. Let me now search for more specific information about:
- Serper's actual pricing per-query breakdown (credits per query)
- Python error handling patterns for RAG chatbots
- More context.dev information about the Google /goto redirect issue
- The EveryInfra OpenAPI file
I should also try to read the tool catalog and OpenAPI file from EveryInfra.
Let me read the EveryInfra tool catalog and OpenAPI file directly, and search for more specific pricing breakdowns and Python error handling patterns.
Excellent! I found important context about the Google /goto redirect issue from context.dev. This is very relevant for the RAG chatbot use case. Let me now read the Serper incident page and try to get more specific information about:
- Serper's actual per-query pricing breakdown (credits per query)
- Python error handling patterns for RAG chatbots
- More EveryInfra API documentation
I should also search for EveryInfra's OpenAPI file and error handling patterns
Excellent — the context.dev article on Google /goto redirects is highly relevant for RAG. Let me read Serper's incident page and the tool catalog's key points, and search for Python error handling patterns.
I'm making good progress. I have found the Serper /goto incident page. Let me now read that incident page and the tool catalog. I also need to search for more information about:
- Serper's actual per-query pricing breakdown (credits per query)
- Python error handling patterns for RAG chatbots
- More EveryInfra API documentation
Let me try different search queries to find information about Python error handling patterns and Serper's pricing
Let me read the Serper /goto incident page and search for more specific pricing and error handling information.
The tool calls have been exhausted. I need to write the final article now based on all the information I've gathered. Let me organize the key findings:
-
Serper Pricing (from serper.dev, read 2026-11-05):
- Free tier: 2,500 queries, no credit card
- Starter: $50 for 50,000 credits ($1.00 per 1,000)
- Standard: $375 for 500,000 credits ($0.75 per 1,000)
- Scale: $1,250 for 2.5M credits ($0.50 per 1,000)
- Ultimate: $3,750 for 12.5M credits ($0.30 per 1,000)
- All credits expire after 6 months
-
EveryInfra Pricing (from everyinfra.com/en/pricing, read 2026-11-05):
- Free tier: Star two GitHub repos for $1 trial credit (24 hours)
- Web search: $0.000694 per call ($0.694 per 1,000)
- Bing search: $0.56 per 1,000
- DuckDuckGo: $0.56 per 1,000
- Google News: $0.79 per 1,000
- Google Shopping: $0.56 per 1,000
- Paid balance never expires
-
Key Management :
- Serper: Create, rename, copy, reset (no delete, no scopes, no IP allowlist)
- EveryInfra: Create, scope by product, disable, IP allowlist, rotate (OpenAPI)
-
Error Handling :
- Serper:
{"message": "...", "statusCode": 403}(third-party posts) - EveryInfra:
{"error": {"code", "message", "fault", "retryable", "next_steps", ...}}
- Serper:
-
Documentation :
- Serper: Playground (no separate docs site)
- EveryInfra:
/docs,/llms.txt,/openapi.json, tool catalog
-
MCP :
- Serper: Community servers only (local)
- EveryInfra: Remote MCP server at
https://api.everyinfra.com/mcp
-
EveryInfra measured findings :
- Serper's docs are the Playground (serper.dev/docs returned 404 on Nov 5, 2026)
- Serper API Keys: create, rename, copy, reset (no delete, no per-key scope, no IP allowlist)
- Serper-style bodies to EveryInfra API:
gl,hl,typeeach returned 422 with valid parameters list - Typo
locatoncame back withdid_you_mean: location - 13 failed or empty calls cost nothing
- Ten-country test of
location: overlap with US top 9 fell from 9 (Singapore, UK) to 5 (Mexico, Germany) - 21 paid requests: 0.98 to 3.48 seconds, median 1.81 seconds
- Top 20 results for "serper api documentation": only 3 URLs on serper.dev, none a docs page; 8 framework docs with conflicting key variable names
-
Google /goto redirect incident (context.dev, Oct 30, 2026):
- Google changed /goto redirect handling, breaking Serper and SerpApi
- Serper resolved on Oct 31, 2026 16:50 UTC
Now I need to write a comprehensive article covering:
- Key rotation capabilities
- Per-product key limits
- Error handling in Python
- Bill comparison at three query volumes
The article should be at least 6,000 words with 8-12 sections of 450-700 words each.
Let me structure it:
- Introduction - The case for switching
- Key Rotation and Security Architecture
- Per-Product Key Limits and Scoping
- Error Handling in Python: Serper vs EveryInfra
- Pricing Comparison: The Numbers
- Documentation and Developer Experience
- MCP and AI Agent Integration
- Real-World Incident: Google /goto Redirects
- Migration Checklist: From Serper to EveryInfra
- Conclusion
I need to cite at least 30 different external websites and state the date of each fact.
Key sources to cite:
- https://everyinfra.com/en/blog/serper-api-docs-key-alternative (EveryInfra, 2026-11-05)
- https://everyinfra.com/en/pricing (EveryInfra, 2026-11-05)
- https://api.everyinfra.com/api/v1/search/tools (EveryInfra, 2026-11-05)
- https://api.everyinfra.com/openapi.json (EveryInfra, 2026-11-05)
- https://serper.dev/ (Serper, 2026-11-05)
- https://serper.dev/terms (Serper, 2026-11-05)
- https://serper.betteruptime.com/incident/1108349?mp=true (Serper, 2026-10-30)
- https://www.context.dev/blog/google-goto-redirect-links-october-2026 (Context.dev, 2026-10-30)
- https://serper.dev/signup (Serper, 2026-11-05)
- https://serper.dev/login (Serper, 2026-11-05)
- https://serper.dev/api-keys (Serper, 2026-11-05)
- https://serper.dev/playground (Serper, 2026-11-05)
- https://github.com/Serper-API (GitHub, 2026-11-05)
- https://api.serper.dev/locations (Serper, 2026-11-05)
- https://docs.litellm.ai/blog/security-incident-oct-21-2026-attack-chain (LiteLLM, 2026-10-23)
- https://blog.railway.com/p/security-disclosure-wednesday-october-21st (Railway, 2026-10-21)
- https://github.blog/changelog/2026-10-13-secret-scanning-blocks-anthropic-keys-by-default-adds-salesforce/ (GitHub, 2026-10-13)
- https://github.blog/changelog/2026-10-28-push-protection-beyond-predefined-secret-patterns/ (GitHub, 2026-10-28)
- https://github.com/trufflesecurity/trufflehog/releases/tag/v3.99.8 (TruffleHog, 2026-11-02)
- https://docs.crewai.com/en/tools/search-research/serperdevtool (CrewAI, 2026-11-05)
- https://reference.langchain.com/python/langchain-community/utilities/google_serper/GoogleSerperAPIWrapper (LangChain, 2026-11-05)
- https://docs.haystack.deepset.ai/docs/serperdevwebsearch (Haystack, 2026-11-05)
- https://docs.litellm.ai/docs/search/serper (LiteLLM, 2026-11-05)
- https://docs.langflow.org/bundles-serper (Langflow, 2026-11-05)
- https://github.com/marcopesani/mcp-server-serper (GitHub, 2026-11-05)
- https://github.com/garylab/serper-mcp-server (GitHub, 2026-11-05)
- https://modelcontextprotocol.io/specification/2026-07-28 (MCP, 2026-07-28)
- https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization (MCP, 2026-07-28)
- https://code.claude.com/docs/en/mcp (Anthropic, 2026-11-05)
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/422 (MDN, 2026-11-05)
- https://www.rfc-editor.org/rfc/rfc9110 (IETF, 2022-06)
- https://www.rfc-editor.org/rfc/rfc6585 (IETF, 2012-04)
- https://www.rfc-editor.org/rfc/rfc9457 (IETF, 2023-07)
- https://docs.github.com/en/code-security/secret-scanning/introduction/supported-secret-scanning-patterns (GitHub, 2026-11-05)
- https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html (OWASP, 2026-11-05)
- https://12factor.net/config (12factor.net, 2026-11-05)
- https://pypi.org/project/python-dotenv/ (PyPI, 2026-11-05)
- https://requests.readthedocs.io/en/latest/user/quickstart/ (Requests, 2026-11-05)
- https://everyinfra.com/en/mcp-server (EveryInfra, 2026-11-05)
- https://everyinfra.com/en/web-api (EveryInfra, 2026-11-05)
- https://everyinfra.com/en/bing-api (EveryInfra, 2026-11-05)
- https://everyinfra.com/en/duckduckgo-api (EveryInfra, 2026-11-05)
- https://everyinfra.com/en/google-news-api (EveryInfra, 2026-11-05)
- https://everyinfra.com/en/google-shopping-api (EveryInfra, 2026-11-05)
Now I need to write the article. Let me make sure I have at least 30 unique citations and that I'm following all the rules.
The article needs to:
- Start with the conclusion in the first paragraph
- Have 8-12 sections of 450-700 words each
- Be at least 6,000 words
- Cite at least 30 different external websites
- Use short paragraphs (2-5 sentences)
- No emoji
- Never invent numbers
- Compare prices hard with arithmetic
- Say plainly where Serper is cheaper or better
- End with a "Source data" section
Let me start writing.
EveryInfra vs Serper: Key Rotation, Per-Product Limits, Python Error Handling, and the Bill for a RAG Chatbot
Introduction: The Hard-Coded Key Problem
This article compares the two APIs for a startup moving a RAG chatbot off a hard-coded search key. The focus is on four dimensions: key rotation and isolation, per-product key limits, error handling patterns in Python, and the monthly bill at three realistic query volumes. All EveryInfra measurements come from live calls made between 00:18 and 00:54 SGT on November 5, 2026. All Serper statements come from public pages and scripts read on the same date, or from dated third-party posts.
Key Rotation: Disable One Key, Keep the Rest Running
POST /portal/api/keys/{key_id}/disable endpoint in the OpenAPI file disables any key on the account. Only the account owner can enable it again, and that requires signing in to the console [1].The practical consequence for a RAG chatbot is the number of keys you need and what happens when one leaks. A typical deployment has at least three places a key might live: the production server that serves the chatbot, the CI pipeline that runs integration tests, and a demo notebook or staging environment that developers share. If those three places share one Serper key, a leak in the demo notebook forces a reset that breaks the production server and the CI pipeline at the same time. You have to redeploy the new key in three places before the chatbot works again.
spend_limit_usd field in the OpenAPI file is a lifetime USD cap for one key: charges minus refunds, and it never resets [1].Per-Product Key Limits: Scoping, IP Allowlists, and Spend Caps
web search tool returns HTTP 403 with error code capability_denied if a request tries to use a blocked tool. The IP allowlist restricts which source addresses can use the key. The spend_limit_usd field caps lifetime charges for that key. The expires_at field makes a temporary key stop working on a specific date [1].The practical difference shows up in two scenarios. The first is the demo notebook shared with a client. That notebook needs a key that can expire when the demo ends and cannot be used from outside the company's IP range. On Serper, you can only reset the key after the demo, and that breaks every other place using the same key. On EveryInfra, you create a key with an expiry date and an IP allowlist. When the demo ends, the key stops working on its own. If it was copied before the expiry, the IP allowlist blocks it from elsewhere.
The second scenario is a production key that should only be used from the application server. The IP allowlist means that even if the key is extracted from a running process or a log file, it cannot be used from an attacker's machine. This does not protect against an attacker who can also reach the allowed IP addresses, but it raises the bar. Serper has no equivalent setting. Any copy of the key works from anywhere.
GET /portal/api/keys/{key_id}/usage endpoint returns one key's successes, failures, spend, and last call over recent days. It requires the requests:read scope. The GET /portal/api/keys endpoint lists each key's name, masked prefix, status, scopes, per-minute limit, USD spend limit, and last use. It never returns the key secret [1]. Serper's Activity logs page offers per-key filtering, but the filtering is done in the dashboard UI, not through an API endpoint that a script can poll.Error Handling in Python: Structured Errors Enable Automated Recovery
error.code, error.message, error.allowed, error.did_you_mean, and error.next_steps. A missing or invalid key returns HTTP 401 with error.code: unauthorized, error.fault: account, error.retryable: false, and a next_steps field that tells the caller to ask the user for a working key. A rate limit returns HTTP 429 with error.code: rate_limited, a retry_after value in seconds, error.max_retries: 3, and a note that nothing was charged [1].{"message": "Unauthorized. Sign up for a free account.", "statusCode": 403} [12]. CrewAI issue #633, filed May 17, 2024, records the same 403 pattern when a key from a different service is used [13]. A commit note from October 23, 2026 records 400 {"message": "Not enough credits"} for an empty balance [16]. There is no published mapping of error codes to recovery actions, no retryable flag, and no next_steps field in any documented response [1].The Python implications are concrete. A RAG chatbot that calls the search API from an async request handler needs to distinguish between errors that are worth retrying and errors that require a code fix. HTTP 422 means the request has a wrong parameter name or value. Retrying the same request will not help. HTTP 429 means the rate limit is hit; waiting and retrying is the correct action. HTTP 401 means the key is missing or disabled; the caller needs to get a new key, not retry.
retryable boolean tells the caller whether to retry. The next_steps field tells it what to do instead. The allowed field on a 422 lists the valid parameter names, so a program can fix its own request. The did_you_mean field suggests corrections for typos. A Serper-style request body sent to EveryInfra with gl, hl, and type in it returned three separate 422 responses, each listing the valid parameters for the web tool. A typo of locaton instead of location returned did_you_mean: ["location"] in 0.11 seconds. None of the 13 failed or empty calls in that test cost anything [1].Pricing: The Arithmetic at Three Query Volumes
https://api.everyinfra.com/api/v1/search/tools, read at 00:16 SGT on the same date [1]. There is no expiry on paid balance [2].The three query volumes below are realistic for a small-to-medium RAG chatbot. At 10,000 queries per month, Serper's Starter pack covers the month for $50. EveryInfra charges $6.94. At 50,000 queries per month, Serper's Standard pack covers the month for $375. EveryInfra charges $34.70. At 250,000 queries per month, Serper's Scale pack covers the month for $1,250. EveryInfra charges $173.50.
| Monthly queries | Serper Starter ($1.00/1K) | Serper Standard ($0.75/1K) | Serper Scale ($0.50/1K) | EveryInfra ($0.694/1K) |
|---|---|---|---|---|
| 10,000 | $10.00 | — | — | $6.94 |
| 50,000 | $50.00 (full pack) | $37.50 | — | $34.70 |
| 250,000 | — | — | $125.00 (full pack) | $173.50 |
news and shopping tools each cost $0.000694 per call, the same as web. At the 250,000 query volume with mixed types, EveryInfra's bill is predictable and does not depend on the mix.Documentation: The Playground Is Not a Docs Site
serper.dev/docs, serper.dev/llms.txt, and serper.dev/openapi.json all returned 404. The working documentation is the Playground, a page that requires a login. The parameter rules, credit costs, and sample code all live in the Playground's JavaScript, which runs in the browser after authentication [1].https://api.everyinfra.com/openapi.json is version 3.0.3 with 61 paths as of November 5, 2026. The /llms.txt file gives the base URL, the authentication header, and a note that bad parameters return did_you_mean and allowed fields. The tool catalog at https://api.everyinfra.com/api/v1/search/tools lists all 17 search tools with parameters, defaults, limits, descriptions in three languages, and prices. No key is needed to read any of these files [1].allowed field on a 422 error lets an assistant fix its own request in one turn. Serper has no published error code table, so an assistant that encounters a wrong parameter has no programmatic way to discover the correct name. It must rely on framework documentation that may be out of date. CrewAI's SerperDevTool documentation maps country, locale, and n_results to Serper's gl, hl, and num. LangChain's GoogleSerperAPIWrapper uses k, gl, hl, and type. Haystack's SerperDevWebSearch uses top_k and search_params. LiteLLM's search integration uses SERPER_API_KEY. The frameworks do not agree on the environment variable name for the key, and they do not agree on the parameter names for the search itself [1].Authentication: Header Names and Key Placement
X-API-KEY header for POST requests. The Playground's code generator, built with Postman's open-source postman-code-generators library, offers a GET option that puts the key in the URL as the apiKey query parameter [1]. A key in a URL appears in server access logs, browser history, and proxy logs. The n8n community thread from July 26, 2025 shows a user who sent GET with a header and received HTTP 403. The reply explained that GET needs the key in the URL, and POST is the method that reads the header [12].Authorization: Bearer header. The POST endpoint is https://api.everyinfra.com/api/v1/search. There is no GET variant that puts the key in the URL. The full key is shown only once, at creation time. After that, the console shows a masked prefix. A copy button is not available on the page [1].X-API-KEY header to EveryInfra returns HTTP 401 with code: unauthorized and message: Missing API key in 0.12 seconds. The error does not say "use Authorization: Bearer instead." The caller must read the documentation to discover the correct header name [1].Authorization: Bearer header is the standard defined in RFC 6750 for OAuth 2.0 bearer tokens. Most HTTP clients, proxies, and logging systems recognize it and offer built-in masking. The X-API-KEY header is a custom header with no standard masking behavior. If a proxy logs all request headers, the Serper key appears in plain text in the proxy logs.Parameter Mapping: What Changes and What Breaks
q parameter stays the same: it is the query string in both APIs. The num parameter stays the same: it is results per page, capped at 10 in both. The page parameter stays the same: page number starting from 1, charged per page. The gl parameter moves to location, but the meaning changes: Serper's gl is a two-letter country code, while EveryInfra's location accepts a country name or two-letter code. Serper's location parameter, which accepts city and postal code values from a list of 100,029 entries, has no direct equivalent in EveryInfra's web tool. The hl parameter for interface language has no equivalent in the web tool. Serper's autocorrect parameter, which enables spelling correction by default, has no equivalent. EveryInfra's web tool silently corrects common misspellings in the query string itself [1].type parameter, which is embedded in the URL as https://google.serper.dev/<type>, becomes the tool field in the request body. Sending type in the body returns HTTP 422. Serper's tbs parameter for time range, expressed as qdr:h/d/w/m/y, becomes after and before date fields. Serper's site: operator inside the query string becomes a separate site parameter in EveryInfra. These changes are not cosmetic: sending a Serper-style body to EveryInfra with gl, hl, and type included returns three separate 422 errors, each listing the valid parameters for the web tool [1].web/search data catalog entry offers a language parameter that the web tool does not have. It costs $0.001389 per call, twice the web price. If a RAG chatbot needs to set the result language explicitly, the web/search entry is the correct choice. If it only needs web results in the user's language, the web tool's location parameter combined with a language hint in the query string is sufficient [1].search maps to EveryInfra's web. news maps to news. images and videos map to media with kind set to image or video. places and maps map to places. shopping maps to shopping. scholar and patents map to scholar with kind set to papers or patents. autocomplete maps to suggest. lens maps to lens. webpage maps to read. Serper's reviews and product-reviews types have no search equivalent in EveryInfra; they must be accessed through the data catalog by platform [1].MCP Integration: Remote Server vs. Local Process
marcopesani/mcp-server-serper is MIT licensed with 171 stars as of November 5, 2026. The last push was March 13, 2025. garylab/serper-mcp-server has 39 stars. The last push was November 10, 2025. Both start a local process on the developer's machine with npx or uvx. The key is stored in the env block of the client configuration file as SERPER_API_KEY [1].https://api.everyinfra.com/mcp. It uses the HTTP transport from the MCP specification version 2026-07-28 [27]. The key goes in the Authorization header. Claude Code adds it with a single command. The MCP spec section on authorization recommends OAuth for remote servers; EveryInfra uses a static Bearer key today [28] [29]. Twelve tools are available without a key: calling tools/list with no key returns 12 tools. The full server, available at https://api.everyinfra.com/mcp/all, exposes 24 tools including account management, key creation, and billing [21].everyinfra_search tool accepts a tool field that picks one of 17 search tools, and a params object that carries the query parameters. Putting q outside params returns isError: true with missing_param: q is required. The error arrives in 0.17 seconds at no charge [1].Python Integration: Environment Variables and Framework Names
GoogleSerperAPIWrapper reads SERPER_API_KEY [21]. CrewAI's SerperDevTool reads SERPER_API_KEY [18]. Haystack's SerperDevWebSearch reads SERPERDEV_API_KEY — the word DEV is inserted in the middle [23]. LiteLLM's search integration reads SERPER_API_KEY [25]. If one machine runs both LangChain and Haystack, two environment variables are needed, or Haystack must use Secret.from_env_var("SERPER_API_KEY") explicitly [1].requests library is sufficient. A Serper-style request body can be converted to an EveryInfra body with a small function that maps gl to location, drops hl and autocorrect, converts tbs time range codes to after dates, and moves type to the tool field. The function was tested on November 5, 2026: the input {"q": "serper api key rotate", "gl": "gb", "hl": "en", "num": 10, "tbs": "qdr:y", "autocorrect": true} produced {"tool": "web", "q": "serper api key rotate", "location": "gb", "num": 10, "page": 1, "after": "2025-11-04"}. The call returned 10 results in 2.24 seconds for $0.000694. All 10 results had a published date after November 4, 2025 [1].python-dotenv package reads a .env file, and .gitignore should exclude it [50] [51] [52]. The practical implication is that a RAG chatbot should read the search API key from an environment variable, not embed it in the codebase. Both APIs support this pattern. The difference is that Serper's variable name differs across frameworks, while EveryInfra's key is passed directly in the Authorization header without a framework-specific variable name.requests library quickstart shows the standard pattern: requests.post(url, headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"}, json=body). Error handling for a production RAG chatbot should distinguish 401 (key missing or disabled), 422 (wrong parameter), and 429 (rate limited). A correct pattern raises on 401 and 422, retries on 429 with exponential backoff, and returns the result on 200. EveryInfra's error.retryable field tells the caller whether retry is appropriate. Serper has no equivalent field in any published documentation [1].Rate Limits: Throughput and Burst Capacity
For a RAG chatbot that needs burst capacity, Serper's per-second limits are more generous at every pack level. The Ultimate pack allows 300 queries per second, compared to EveryInfra's maximum of 1,800 per minute, which is 30 per second. If the chatbot ingests documents in batches of 100 concurrent queries, Serper's Standard pack handles that without a speed package. EveryInfra requires the 1,800 requests per minute speed package at $78 per 30 days.
The /goto Redirect Incident: Why Link Quality Matters for RAG
google.com/goto redirect links in search results. The change broke the link quality for SERP API providers including Serper and SerpApi. Serper's incident page, maintained at serper.betteruptime.com, recorded the event starting at 01:30 UTC on October 30, 2026. Google limited the number of /goto links that could be resolved immediately after a search. Serper's workaround was to parse the first 3 natural search results and return google.com/goto links for results 4 through 10. Those links became resolvable about 30 seconds later. The incident was marked resolved at 16:50 UTC on October 31, 2026 [94].google.com/goto links carry a CAES... protobuf envelope that decodes to the real target URL. The envelope is opaque and cannot be read without requesting Google. Unlike the old google.com/url?q= format, the /goto link cannot be resolved locally. For a RAG chatbot, this means three failure modes: increased latency from an extra HTTP request per unresolved link, broken domain filtering because the visible host is google.com instead of the real domain, and broken citations because the returned URL is not the source URL [91]./resolve endpoint can parse remaining results after about 30 seconds. This adds a round-trip delay for results beyond the first 3. For a RAG chatbot that retrieves 10 results and presents them as sources, 7 of those sources would have unusable URLs during the incident window. The EveryInfra web tool returns results[].url directly in the response. If EveryInfra's upstream search provider encounters the same /goto issue, the behavior would depend on how that provider handles it, but EveryInfra's error response would include a retryable flag and a next_steps field describing the condition [1].This incident is a recent example of why a RAG chatbot needs structured error handling. A service disruption that changes the shape of returned data is not a network failure; it is a data quality failure. The chatbot's retrieval code needs to detect missing or malformed URLs in results and either retry or fall back to a secondary source, not pass broken citations to the language model.
Location Granularity: Country vs. City and Postal Code
api.serper.dev/locations and was downloaded on November 5, 2026 [1]. EveryInfra's location parameter accepts a country name or two-letter country code. A city name is treated as its country. There is no postal code or neighborhood-level targeting in the web tool [1].For a RAG chatbot that serves a single country or a small set of countries, EveryInfra's country-level targeting is sufficient. For a product that needs to compare rankings across cities or postal codes — for example, a local SEO rank tracker or a restaurant review aggregator — Serper's finer-grained location data is the right tool. The choice depends on whether the use case requires geographic precision or not.
Free Tier and Trial Credit: What You Get Without Paying
Sign-Up and Onboarding Friction
X-API-KEY header. EveryInfra's MCP Client Tool node shows how to configure a remote MCP connection with Bearer auth. Both integrations are possible; the difference is the number of manual steps before the integration works [1].Secret Scanning: Neither API Is Covered by Default
.env file containing either a Serper key or an EveryInfra key will not trigger a default push protection block. GitHub Advanced Security users can write custom patterns for their key formats. Until that is done, the protection relies on code review and the developer's awareness that a committed key is a committed key. The LiteLLM incident is a case study: the key was in a config file in a public repository, and it stayed there for four months before being exploited [15].SERPER_API_KEY appears in public code across CrewAI, LangChain, Haystack, LiteLLM, and h2oGPT repositories. A search for SERPER_API_KEY with site: github.com on November 5, 2026 returned 10 public GitHub pages. The variable name itself is not a secret, but it makes it easier for automated scanners to guess the key format if they know to look for it. EveryInfra's key is passed as a Bearer token with no conventional variable name, which makes format guessing slightly harder but does not change the underlying risk [1].Result Shape: organic vs. results
knowledgeGraph, organic, peopleAlsoAsk, and relatedSearches. Each organic result has title, link, snippet, and position, with optional sitelinks, date, and attributes. LangChain reads organic for search results. LangChain's source maps news to the news field, places to the places field, and images to the images field [1].web response has a top-level structure with id, tool, location, results, billing, and quota. Each result has title, url, snippet, and published when a date is known. The web/search data catalog entry returns text instead of snippet and rank instead of array position. It also returns published_at in UTC ISO 8601, image_url, and sub_links. The billing object carries charged, charged_usd, and balance_after_usd in every response. Serper's FAQ says credits are deducted per successful response, but the response does not include a billing record. The dashboard and Activity logs are the only way to see spend [1].peopleAlsoAsk for follow-up questions or knowledgeGraph for entity data, those fields are missing in EveryInfra. The web tool returns title, URL, snippet, and date only. If the chatbot stores web results alongside other platform data — for example, in a table that includes product reviews or social media mentions — EveryInfra's web/search entry with text and rank fields is more consistent with the data catalog's other platforms [1].When Serper Is the Right Choice
location parameter stops at the country. For a local SEO rank tracker or a city-by-city result checker, Serper's granular location data is necessary [1].knowledgeGraph, peopleAlsoAsk, or relatedSearches, migrating to EveryInfra requires new logic for those features. If the codebase is stable and only processes US English web search results, the migration cost may exceed the savings. Consider switching when adding search to a new AI agent, when per-product key limits become necessary, or when the current Serper key approach creates operational friction.Migration Checklist: From Hard-Coded Serper Key to Scoped EveryInfra Keys
EVERYINFRA_API_KEY from the console. The key shows once at creation and is not retrievable later. Store it in a secrets manager or environment variable, not in code or a config file [1].https://google.serper.dev/search with https://api.everyinfra.com/api/v1/search. Replace the X-API-KEY header with Authorization: Bearer. Move the result type from the URL to the tool field in the body. Rename gl to location and drop hl and autocorrect. Convert tbs time range codes to after dates. Replace organic[].link with results[].url in the response parser.spend_limit_usd and an expires_at date on the demo key. Set a spend_limit_usd on the CI key. Each key operates independently. A leak of the demo key does not affect the production key.error.retryable before retrying. Check error.code to distinguish between 401 (key), 422 (parameter), and 429 (rate). Use error.allowed and error.did_you_mean to auto-correct parameter errors. The 422 response arrives in under 0.2 seconds, so an assistant can fix and resend in one turn [1].GET /portal/api/keys/{key_id}/usage, which requires requests:read [1].https://api.everyinfra.com/mcp. The MCP server supports the same 17 search tools as the REST API, and billing is identical [21].error.allowed and error.next_steps without retrying. Send one request with a missing key and verify that it raises without retrying. Send enough requests to hit the rate limit and verify that the retry waits for error.retry_after seconds.Conclusion: The Trade-offs in Practice
retryable and next_steps fields enable automated recovery in a way Serper's undocumented error format does not. EveryInfra's OpenAPI specification, /llms.txt, and tool catalog are publicly readable without authentication; Serper's parameter rules live in a login-only Playground.For a startup that needs the cheapest possible query cost and does not require per-key scoping, Serper at the Scale or Ultimate pack is the cheaper choice. For a startup that needs to isolate environments, cap damage from a key leak, or automate error recovery in a RAG agent, EveryInfra's key management and error model reduce operational risk in ways that matter more than the per-query price difference.