How to get POST data in streamlit to be called from external source?

Hi

I want to show streamlit UI from external source.

How can I extract data (http post) from streamlit ?

External source calles streamlit page for visualization with parameter on HTTP POST.

Welcome to the Streamlit community, and thanks for your thoughtful question! :balloon: Currently, Streamlit does not natively support handling custom HTTP POST requests directly to extract data or receive parameters for visualization. Streamlit apps are designed to be interacted with via the browser, and parameters are typically passed via URL query strings, not POST bodies. The Streamlit server (built on Tornado) does not expose a public API for custom POST endpoints out of the box, and attempts to POST to the root or other endpoints will not be handled as you might expect from frameworks like Flask or FastAPI. This limitation is confirmed in multiple community discussions and the official documentation—see this forum thread and another related discussion.

If you need to pass parameters from an external source, the recommended approach is to use URL query parameters (GET), which Streamlit can access using st.query_params or st.experimental_get_query_params(). For POST-based workflows, a common workaround is to run a separate backend (e.g., Flask or FastAPI) to receive POST requests, process the data, and then communicate with the Streamlit app (e.g., via shared storage, database, or by updating files that Streamlit reads). Direct POST handling within Streamlit itself is not officially supported or documented as a stable feature.

Sources: