diff --git a/swh/web/api/views/origin.py b/swh/web/api/views/origin.py
--- a/swh/web/api/views/origin.py
+++ b/swh/web/api/views/origin.py
@@ -168,6 +168,7 @@
             results.
 
         :param string url_pattern: a string pattern
+        :query string query_string: search query language string
         :query int limit: the maximum number of found origins to return
             (bounded to 1000)
         :query boolean with_visit: if true, only return origins with at least
@@ -189,12 +190,14 @@
     result = {}
     limit = min(int(request.query_params.get("limit", "70")), 1000)
     page_token = request.query_params.get("page_token")
+    query_string = request.query_params.get("query", "")
     with_visit = request.query_params.get("with_visit", "false")
     visit_type = request.query_params.get("visit_type")
 
     (results, page_token) = api_lookup(
         archive.search_origin,
         url_pattern,
+        query_string,
         limit,
         bool(strtobool(with_visit)),
         [visit_type] if visit_type else None,
diff --git a/swh/web/common/archive.py b/swh/web/common/archive.py
--- a/swh/web/common/archive.py
+++ b/swh/web/common/archive.py
@@ -297,6 +297,7 @@
 
 def search_origin(
     url_pattern: str,
+    query: str,
     limit: int = 50,
     with_visit: bool = False,
     visit_types: Optional[List[str]] = None,
@@ -307,6 +308,7 @@
 
     Args:
         url_pattern: the string pattern to search for in origin urls
+        query: swh search query language string
         limit: the maximum number of found origins to return
         with_visit: Whether origins with no visit are to be filtered out
         visit_types: Only origins having any of the provided visit types
@@ -321,13 +323,23 @@
         assert isinstance(page_token, str)
 
     if search:
-        page_result = search.origin_search(
-            url_pattern=url_pattern,
-            page_token=page_token,
-            with_visit=with_visit,
-            visit_types=visit_types,
-            limit=limit,
-        )
+        if config.get_config()["metadata_search_backend"].get("enable_query_language"):
+            page_result = search.origin_search(
+                query=query,
+                url_pattern=url_pattern,
+                page_token=page_token,
+                with_visit=with_visit,
+                visit_types=visit_types,
+                limit=limit,
+            )
+        else:
+            page_result = search.origin_search(
+                url_pattern=url_pattern,
+                page_token=page_token,
+                with_visit=with_visit,
+                visit_types=visit_types,
+                limit=limit,
+            )
         origins = [converters.from_origin(ori_dict) for ori_dict in page_result.results]
     else:
         # Fallback to swh-storage if swh-search is not configured
@@ -367,7 +379,10 @@
 
     """
     results = []
-    if search and config.get_config()["metadata_search_backend"] == "swh-search":
+    if (
+        search
+        and config.get_config()["metadata_search_backend"]["backend"] == "swh-search"
+    ):
         page_result = search.origin_search(metadata_pattern=fulltext, limit=limit,)
         matches = idx_storage.origin_intrinsic_metadata_get(
             [r["url"] for r in page_result.results]
diff --git a/swh/web/config.py b/swh/web/config.py
--- a/swh/web/config.py
+++ b/swh/web/config.py
@@ -128,7 +128,10 @@
             "json_path": "1.0/status/578e5eddcdc0cc7951000520",
         },
     ),
-    "metadata_search_backend": ("string", "swh-indexer-storage"),  # or "swh-search"
+    "metadata_search_backend": (
+        "dict",
+        {"backend": "swh-indexer-storage", "enable_query_language": False},
+    ),  # or "swh-search"
     "counters_backend": ("string", "swh-storage"),  # or "swh-counters"
     "staging_server_names": ("list", STAGING_SERVER_NAMES),
     "instance_name": ("str", "archive-test.softwareheritage.org"),
diff --git a/swh/web/tests/api/views/test_origin.py b/swh/web/tests/api/views/test_origin.py
--- a/swh/web/tests/api/views/test_origin.py
+++ b/swh/web/tests/api/views/test_origin.py
@@ -573,7 +573,9 @@
 def test_api_origin_metadata_search(api_client, mocker, backend):
 
     mock_config = mocker.patch("swh.web.common.archive.config")
-    mock_config.get_config.return_value = {"metadata_search_backend": backend}
+    mock_config.get_config.return_value = {
+        "metadata_search_backend": {"backend": backend}
+    }
 
     url = reverse(
         "api-1-origin-metadata-search", query_params={"fulltext": ORIGIN_METADATA_VALUE}