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.
What Is 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).
Why Was lns_mode
Added?
Two key reasons:
- Routing: Lens requests are increasingly complex. The backend must differentiate between modes to deliver the right results and UI.
- AI Mode support: In April 2025, Google announced that Lens multimodal queries were integrated into AI Mode using Gemini.
lns_mode=mu
enables this functionality.
Read the official blog post about AI Mode
Example URLs
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=...
How Is It Used?
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.
Search Parameters
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.
Leave a Reply