Welcome to the Streamlit community, and thanks for your detailed question! Unfortunately, my understanding is that with Streamlit’s current architecture, you can’t capture which hyperlink (created via st.write or st.markdown with an href) was clicked, nor can you store the clicked link’s text in a variable, because hyperlinks rendered this way only trigger a browser download—they don’t send any information back to the Streamlit backend. This is a browser limitation, not a Streamlit one.