Search query param pass to results page via JSON API

Hey mates, trying to accomplish to pass some sort of query string from a search to a results page based on a parameter string or value that the results page will pick up a delivered result from my API JSON file.

I know this is a static site generator but I am looking for alternatives to this solution that some of you have already tackled by creating some sort of code routing using partial, shortcode, and or front matter.

I hope my diagram and my explanation are clear. Or may need to use javascript to accomplish this. Not sure where to go with this. Thank you for your suggestions and ideas.

Video Example:
What I want to accomplish

Link to Diagram of what I want to achieve.
Figma Diagram of my project

Past post:


thanks for your help