Repository navigation
Add -timeout flag to increase client timeout - #15
Merged
Merged
Conversation
strzibny
requested review from
adarshdigievo,
bradenr402,
dsojevic,
ilyazub,
peterberkenbosch and
pulkitchowdry
October 8, 2026 11:03
adarshdigievo
approved these changes
Oct 9, 2026
hilmanski
reviewed
Oct 9, 2026
hilmanski
left a comment
There was a problem hiding this comment.
Late review on the README addition
| ``` | ||
| Quote the expression with single quotes in bash/zsh to avoid shell interpretation of `$`, `|`, and `"`. | ||
| - `--api-key <key>` — Override API key (takes priority over environment and config file) | ||
| - `--timeout <seconds>` — HTTP request timeout (default `60`, env: `SERPAPI_TIMEOUT`). Use `0` to wait indefinitely. Slow engines such as `google_ai_mode`, or searches with `no_cache=true`, can take longer than the default; raise this if you see a `network_error` mentioning `Client.Timeout exceeded`. Note that a timed-out search may still complete on SerpApi's side and be billed and retrievable with `serpapi archive <search-id>`. |
There was a problem hiding this comment.
Why do we consider google_ai_mode as a slow engine?
or searches with
no_cache=true, can take longer than the default
This is also a bit confusing. All of the searches have no_cache=true by default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I think we should let people handle their timeout considerations. This does not change the server timeout and/or if request finishes, but let people manage their expectations. I am also changing the default to 60s which is serpapi-golang's default.