Skip to content

cse-bridge 1.1.0

Choose a tag to compare

@Booyaka101 Booyaka101 released this 06 Aug 15:23
· 17 commits to main since this release

Image clients now migrate with the same one-line base-URL change web clients already get.

searchType=image switches the backend query to SearXNG's images category and maps its image results into Google's exact item shape. link is the image file itself, because that is what Google promises and what clients hotlink into <img> tags; the page the image was found on becomes image.contextLink. image.thumbnailLink comes from thumbnail_src, image.width/image.height are parsed from SearXNG's human-readable resolution ("1920 x 1080"), image.byteSize from filesize ("412 KB", 1 KB = 1024), and mime/fileFormat from img_format (jpgimage/jpeg).

Anything an engine does not report is omitted, never guessed — including image.thumbnailWidth/thumbnailHeight, which SearXNG does not report at all. That is the same posture this project takes on totalResults: an honest gap beats a synthesized number. A result with no image URL is dropped entirely rather than emitted with a page URL as link, so no item ever claims to be an image while pointing at an HTML page.

searchType round-trips through queries.request[0], as on Google, and image is the only accepted value — anything else returns Google's INVALID_ARGUMENT envelope.

imgSize, imgType, imgColorType and imgDominantColor are validated against Google's exact enums (an out-of-enum value gets Google's 400, because Google rejects it too) and then accepted for compatibility. SearXNG has no size/type/color parameters to map them onto, so they do not filter — the same documented posture as sort expressions beyond date.

Bug fix: result de-duplication keyed on the result's url, but for image results url is the page the image sits on — so ten images from one gallery collapsed into a single item. De-duplication now keys on the image URL when present, falling back to url for web results.

searchType=image supersedes the profile's categories rather than merging with them: a cx pinned to categories: [news] cannot also be an image engine. The profile's site: restriction, language and engines still apply. Image and web result sets for the same query occupy separate cache entries, so alternating between them never leaks results across.

The Limitations note claiming there is no image search is gone from the README, and the migration guide's searchType=image row now reads Supported.

138 offline tests (up from 109), 142 with CSE_BRIDGE_LIVE=1 against a real SearXNG — all green.

  • npm: npm i -g cse-bridge
  • image: docker pull ghcr.io/booyaka101/cse-bridge:1.1.0
  • full changelog: CHANGELOG.md