WordPress restrict anonymous user

I am using a WordPress as a background for Cordova application and return JSON data from WordPress database to REST call from front-end application.

Everything was working fine, but now when I open posts into another browser using posts permalink of WordPress it shows all the data and I don't want this: I want data in my application but not in the WordPress site.

For this reason I have used some restrict plugins, but they even restrict to the REST call and redirect to the login page; basically data should return to JSON call, but it should redirect to login page whenever an anonymous user wants to access the data from the WordPress site.