Why can’t you connect to the relay and run the request and leave it open?
If you do a request and pull the data after the “EOSE” message you’ll get new data coming in satisfying your query request.
I’m a little thick headed so just to try to visualize this. You have a nodejs “servlet” that’s doing these queries and then storing them for you to retrieve via an API call you invoke from a web browser?