priority_high

Important

This is an experimental feature. Experimental features and their APIs may change or be removed at any time. To learn more, click here.

Set the query parameters that are shown in the browser's URL bar.

Warning

Query param embed cannot be set using this method.

Function signature[source]

st.experimental_set_query_params(**query_params)

Parameters

**query_params (dict)

The query parameters to set, as key-value pairs.

Example

To point the user's web browser to something like "http://localhost:8501/?show_map=True&selected=asia&selected=america", you would do the following:

import streamlit as st

st.experimental_set_query_params(
    show_map=True,
    selected=["asia", "america"],
)
forum

Still have questions?

Our forums are full of helpful information and Streamlit experts.

Was this page helpful?

editEdit this page on GitHub