I will design a REST backend that will work with my database. I want users to access this data by viewing my webpage (I will work with an MVC JS framework) without logging in.
At the same time, I want to prevent users making direct API calls to my backend so they can't take advantage of my data. (I am gathering some kind of statistics aggregating from many sites).
Is that somehow possible? I was thinking of generating a session based on a captcha but maybe there is a better solution I haven't thought about.
tldr: I want only my code running in the browser to access my backend.
P.S I know people can use selenium to scrap my site, I want to make it difficult / not a good solution for them.