Managing Your Remaining Credits
To check the number of credits used or remaining, after completing any request to our API endpoints, please refer to the response header. The keyx-rapidapi-credits-remaining
will provide you with this information.
Apply Cache to Your Requests
Working with APIs is straightforward, but to maximize efficiency and avoid unnecessary costs, we recommend implementing a caching mechanism that allows the following:- The code enables making requests.
- Save the results of successful requests (with status codes 200 or 404) into a directory (cache), with the filename hashed based on the URL and parameters.
- Before executing a request, search for the result in the cache directory. If not found, proceed with the request.