I have a website which enables the user to make a search query. The query might take some time to complete (minutes to days), and I would like to enable the user to download
Adam's solution is pretty good if you want to build it yourself.
There's an open-source SDK that does exactly this, by Branch Metrics (full disclosure, I work there).
Basically, you set your URI scheme on the Branch dashboard, create a link with the data you want to pass (in this case, the query parameters, but you decide), and the SDK has a method with a callback that gives you said query parameters (through install or regular deeplink by clicking the Branch link).