The lns_mode parameter classifies Google Lens queries into text, unimodal, or multimodal modes to help route requests and support AI Mode functionality.
Google Lens has quietly become one of the most advanced visual search tools in the world. Behind the scenes, it works by constructing detailed, context-rich search queries. One of the newest additions to this structure is a parameter called L-N-S mode.
This parameter acts as a high-level indicator of the type of search you are running, and it classifies Google Lens queries into three distinct categories. There is "text" for text-only searches, like when the tool reads printed text from an image. Then there is "U-N," short for unimodal, which is an image-only search. And finally, there is "M-U," or multimodal, which combines both text and images.
Google uses this parameter to route requests properly, helping the backend deliver the right results and user interface. It also plays a crucial role in Google's AI Mode, which connects multimodal searches directly with Gemini.
So, while you might never notice it in your address bar, this behind-the-scenes identifier is a big part of how Google is making visual search smarter and more context-aware.
lns_mode is a parameter that classifies Google Lens queries into text, un (unimodal), or mu (multimodal).
Google Lens has quietly become one of the most advanced visual search tools in the world. Behind the scenes, it works by constructing detailed, context-rich search queries that include a growing set of parameters. One of the newest additions to this query structure is lns_mode, introduced on May 14, 2024 by Google engineer Jason Hu.
This article breaks down what lns_mode is, how it fits into the broader Google Lens ecosystem, and why it matters – especially as Lens evolves into a key component of Google’s new AI Mode.
lns_mode?The lns_mode parameter is a query string field appended to URLs generated during Lens-powered searches. It serves as a high-level indicator of the type of search being executed. Based on Chromium source files, the known values are:
text – text-only search (e.g., OCR text selection)un – unimodal image-only searchmu – multimodal search (text + image)This field complements others like q (query), gsc=1, masfc=c, and hl (locale).
lns_mode Added?Two key reasons:
lns_mode=mu enables this functionality.Read the official blog post about AI Mode
https://www.google.com/search?q=apples&lns_mode=text&gsc=1&masfc=c&hl=en-US
https://www.google.com/search?q=&lns_mode=un&gsc=1&masfc=c&hl=en-US
https://www.google.com/search?q=green+apples&lns_mode=mu&gsc=1&masfc=c&hl=en-US&vsrid=...
Inside Chromium, lns_mode is added in the Lens Overlay URL builder logic. Functions like BuildTextOnlySearchURL() and BuildLensSearchURL() select the mode dynamically based on the presence of OCR text, screenshots, or user-selected regions.
Below is a breakdown of the most common query parameters used in Google Lens search URLs:
| Parameter | Description | Example Value |
|---|---|---|
q | The text search query (OCR result, user input, etc.). | green+apples |
lns_mode | Specifies the Lens mode: text = text-only un = unimodal (image-only) mu = multimodal (image + text) | text |
gsc | Marks the request as a Lens Search Companion query. | 1 |
masfc | Indicates the query came from an ambient (contextual) source. | c |
hl | User language/locale. | en-US |
mactx | Encoded metadata about the current page (title and URL), serialized as a Base64URL string. | Base64-encoded context |
gsessionid | Session identifier for grouping multiple queries. | 1234567890abcdef |
vsrid | Encoded request ID identifying the Lens request; includes UUID and sequence data. | Base64-encoded ID |
udm | UI mode flag used internally by Google: 26 = unimodal 24 = multimodal | 24 |
These parameters are assembled automatically by Chrome and Lens-backed apps when performing visual search, with each field enabling a richer, more context-aware response from Google’s backend systems.
Sign in with Google to comment.