Repository navigation
[Image] Stop suggesting image_id for engines that drop it - #20
Merged
Merged
Conversation
--image's error told agents to upload with `serpapi image` and pass image_id=<id> to another engine, but SerpApi takes image_id only on google_lens: other engines drop it and run a normal, counted search without the image. --image now also takes engine=Google_Lens, which SerpApi lowercases, and refuses url= before uploading, which Lens rejects next to image_id. The help, Cost line and README say what an upload costs, and the README's Lens example uses type=exact_matches instead of the discontinued type=products. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Opus 5.5 Max fix, tests and checks:
Fixes
--image's advice before v0.4.0 ships. The error told agents to upload withserpapi imageand passimage_id=<id>to another engine. SerpApi takesimage_idonly on google_lens, though: other engines drop it and run a normal, counted search without the image. Follow-up of #14.This is the release PR for #16 (
--debug) and #14 (image). Both merged withrelease:skip, and this one carriesrelease:minor, so merging it releases v0.4.0 with all three.On main 433aa35 → this PR:
search … --image photo.pngengine=google q=catengine=Google_Lens(SerpApi lowercases it)engine=google_lens url=…(Lens refusesurlnext toimage_id)The fake-API tests behind the table fail on 433aa35: 4 of the 5 refusal cases plus the Google_Lens test, all passing here.
Docs:
imagehelp, the Cost line and the README say an upload doesn't count against your searches, but it needs searches left this month and this hour, and has its own hourly limit (account_rate_limit_per_hour).type=products, which SerpApi rejects as discontinued; it now usestype=exact_matches.Checks on 5a768a1, no API key and a dead proxy, so nothing reached SerpApi:
Not covered: the live e2e tests, which run in CI.