Repository navigation
Releases: serpapi/serpapi-cli
Releases · serpapi/serpapi-cli
Release list
v0.4.0
Immutable
release. Only release title and notes can be modified.
Changelog
- 77ce1b4 Add --debug option
- 906d968 Add server timeline and local address to debug output
- 3c60b35 Change wording to direct users to focus on checking VPN, proxy, and connectivity
- 0caec01 Emit --debug trace as JSON lines off a terminal
- 433aa35 Merge pull request #14 from serpapi/image-api
- 82bc6d0 Merge pull request #16 from serpapi/debug-option
- 993b281 Merge pull request #19 from serpapi/ilyazub-serpapi-cli-refinement
- e0e0c70 Merge pull request #20 from serpapi/ilyazub-cli-open-pr-reviews
- 778b66c Refuse --image flag for non-supported engines
- 2b8a540 Support /image API
- 8e98b0c [Debug] Keep main's timeout advice and point to --debug when it's off
- b606c29 [Debug] Redact the API key from every trace line
- e80918f [Debug] Say the timeline's verdicts assume the clocks agree
- 75048b1 [Docs] Say release tags and releases can't change once published
- e0a949d [Image] Refuse an empty image or one over 500 KB before uploading
- dfa8de9 [Image] Say only how to retry when an upload times out
- d9544cb [Image] Stop at once on Ctrl-C while reading the image from stdin
- 5a768a1 [Image] Stop suggesting image_id for engines that drop it
- be7762d [Image] Test that uploads are traced as POST /image
- 0b1ac1e [Image] Upload with the client and stdin every command uses
v0.3.0
serpapi is now predictable for scripts and AI agents, and safe on a terminal.
- One error contract. Errors and warnings are JSON lines on stderr with the HTTP status. Exit 2 means fix the command; it fails before a billed search, except when a
--jqfilter fails on the response itself; 1 is an API or network error; 130 means Ctrl-C or SIGTERM stopped it before it finished, after printing what had arrived. - Markdown and other formats.
output=md,html,plainandcsv, in any case, work forsearchandarchive(#10). - Timeouts.
--timeouttakes seconds, such as120, or a duration, such as2m;SERPAPI_TIMEOUTsets it for a shell;0waits indefinitely. The default is 60 s (#15, @strzibny). --all-pages.--fieldsno longer stops paging after page 1 (#9, @adarshdigievo).no_cache,zero_traceandoutputapply to every page. Paging stops at a repeated page or at a page a mistyped--fieldsmatches nothing on. Pages already fetched are printed, through--jqtoo, when a later page fails or on Ctrl-C. Output streams, so 100 pages of 1 MiB peak at 187–188 MiB instead of 720–735 MiB (3 runs each against v0.2.3 on macOS arm64, from a local fake API).- Warnings that name the fix. A large result lists its top-level keys by size and the free
serpapi archive ID --jqnext step, or says whenno_cacheorzero_tracemakes a repeat a new, counted search. A--jqthat prints only null lists the keys the response has. A parameter given twice says which value was sent. - Safer. Terminal output escapes control characters from results and from the account email that
loginprints, so a page title can't set the clipboard or clear the screen.serpapi accountmasks the API key (#7, @ilyazub), and the key is never echoed from a stray argument or a broken config file.loginsaves the key only under an absolute HOME, through a new private temp file, so a file left at the old temp name can't widen its permissions or receive the key. Ctrl-C or SIGTERM at its prompts stops it at once with echo on. - Also:
serpapi version;login --api-key;loginasks before replacing a saved key (#7);SERPAPI_API_KEYas a fallback forSERPAPI_KEY;--helpdocuments exit codes, errors and costs. - Patched Go. Binaries are built with the latest patched Go at release time;
go version -m "$(command -v serpapi)"shows which. v0.2.3's binaries were built with go1.25.0, in whichgovulncheck -mode=binaryfinds 57 (darwin/arm64) and 58 (linux/amd64) known vulnerabilities; a release rehearsal with go1.27.2 found none.
Changes scripts may notice
- These now exit 2 before any request:
q=with bare words, no parameters, the API key passed askey,apikey,serp_api_keyorserpapi_key(api_keyalready did),--fieldsoutsidesearch,--max-pages 0,--all-pageswithasync=true,--jqor--all-pageswithoutput=md, an unknownoutput=, andlocationswithout a query. - A
--jqfilter that can't run, such as a syntax error,inputordebug, fails before the search; one that fails on the response, such astonumberon a title, still exits 2 after it.haltnow works. - Bare words are joined into one
q:serpapi search engine=google coffee shopssendsq=coffee shops, notq=shops. --fieldsaddserrortojson_restrictor, so an API error still arrives.--fields ,,sends nojson_restrictor; it used to send,,and print{}.- A
SERPAPI_KEYpadded with spaces or a newline is trimmed before it's sent. serpapi accountprintsapi_keymasked, asabcd…wxyz(#7).--all-pages: when a later page fails, orserpapi_pagination.nextisn't a valid URL, the pages so far are printed before the error, exit 1; that invalid URL is nowapi_error, notnetwork_error. A 200 response with an error on a later page is a warning after the pages so far, exit 0, not exit 1.- A JSON array body is exit 1
api_error, not exit 0. serpapiwith no command prints nothing on stdout, where its usage used to go; stderr has the JSON error, and the usage too on a terminal. It still exits 2.serpapi help TOPICwith an unknown topic exits 2 with a JSONusage_errornaming the closest command; it exited 0 with the usage on stderr.serpapi loginexits 2 when HOME (%AppData%on Windows) isn't an absolute path, and no command reads a config file then; v0.2.3 used.config/serpapiunder the current directory.- At the hidden key prompt, Ctrl-D exits 2 with "No API key given" (v0.2.3 kept waiting), and SIGTERM exits 130 with echo on (v0.2.3: 143, echo off).
- The default timeout is 60 s, not 30 s.
Thanks to @adarshdigievo (#4, #9), @jvmvik (#6), @strzibny (#15) and @ilyazub (#7).
v0.2.3
Changelog
- 7c66aeb fix: set up SSH deploy key inline without third-party action
v0.2.2
Changelog
- c1a272d fix: use deploy key for homebrew-tap instead of PAT
v0.2.1
Changelog
- 24237d9 fix: use directory instead of folder in goreleaser brews config
v0.1.1
v0.1.0
What's Changed
New Contributors
Full Changelog: https://github.com/serpapi/serpapi-cli/commits/v0.1.0