title: Is it possible to protect json api scraping using random tokens?
body: <p>I have built a restful json api for an online store using Laravel.</p>
  
  <p>I now wish to create an AngularJS app to run the front-end web application. Product prices for my store need to update every second, so Angular needs to get the product json from the server once per second to update the html.</p>
  
  <p>I wish to somehow protect this json data from being stolen by scrapers / bots repetitively hitting my api to steal my product and pricing data.</p>
  
  <p>My thoughts:</p>
  
  <p>Each json api response contains a random use-once token (i am aware about doing stuff to stop collisions).</p>
  
  <p>This random token is injected via AngularJS into a hidden field within the html page.
  Angularjs reads the hidden token prior to re-requesting the api and uses this in the header of the next get request.</p>
  
  <p>A json response is only provided with the correct token in the header. Once the token is used, it expires, and any attempt to re-use the expired token, results in that IP address being locked out for a period of time or flagged to administrator to investigate.</p>
  
  <p>Is there a better way of doing the above? Are there any kind of actual available solutions to my problem? Considering that I am paying for the product pricing feed in the first place, I really don't want some schmuck getting it from me for free just because I exposed an api!</p>