CORS stands for Cross Origin Resource Sharing. The Fantasy Nerds API does not currently support CORS.
Virtually every user who has requested CORS support has intended to use it within a Javascript clientside application. Submitting an Ajax call through Javascript can expose your API key to whomever views the page source which is in direct violation of our terms and conditions.
Exposing your API key via a publicly-accessible website would allow someone viewing the source code to obtain your key and make (and potentially abuse) API calls using your key.
Fantasy Nerds monitor the types and frequency of API requests. Our default limits are usually more than enough for nearly all use cases. Please read through this documentation in its entirety to avoid common causes of rate limiting issues.
Caching
We highly recommend that you cache the API responses locally on your side.
Many of our static services like NFL teams and NFL Bye Weeks will only change once per season, it's not necessary to continually call the same service repeatedly as the data returned isn't changing. Even rankings and projections are typically only updated once or twice a day. We recommend that you cache the results locally. Caching has the added benefit of making your application faster.
HTTP Response Status Codes
Please note that all valid responses in JSON format will carry an HTTP Response Status Code of 200. Invalid or malformed requests may throw a response code other than 200. Please note that rate-limited requests may still return an HTTP response status code of 200 but there will be an Error node notifying you of the rate limit.
Simply replace your API key with the word "TEST".
For example, you'd simply replace the apikey variable to TEST. An API URL might look something like:
https://api.fantasynerds.com/v1/nfl/teams?apikey=TEST
The response should contain test data for you to develop against.
With a valid API key, you can hotlink to player photos and team logos. For instructions including URL structure, please visit API Images.