One of the Additional HTTP Status Codes (RFC6585) is
- 429 Too Many Requests
Where can I find examples of HTTP / REST API Rate-Limiting HTTP response headers that are useful with this HTTP response status?
One of the Additional HTTP Status Codes (RFC6585) is
Where can I find examples of HTTP / REST API Rate-Limiting HTTP response headers that are useful with this HTTP response status?
Here are some examples of HTTP API Rate Limiting HTTP Response headers. Taken from four common REST APIs: Github, Vimeo, Twitter and Imgur:
#=============================#=============================================#
# HTTP Header # Description #
#=============================#=============================================#
| X-RateLimit-Limit | Request limit per hour |
+-----------------------------+---------------------------------------------+
| X-RateLimit-Remaining | The number of requests left for the time |
| | window |
+-----------------------------+---------------------------------------------+
#=============================#=============================================#
# HTTP Header # Description #
#=============================#=============================================#
| X-RateLimit-Limit | Request limit per day / per 5 minutes |
+-----------------------------+---------------------------------------------+
| X-RateLimit-Remaining | The number of requests left for the time |
| | window |
+-----------------------------+---------------------------------------------+
| X-RateLimit-Reset | The remaining window before the rate limit |
| | resets in UTC epoch seconds |
+-----------------------------+---------------------------------------------+
Note: Twitter uses headers with similar names like Vimeo, but has another dash in each name.
#=============================#=============================================#
# HTTP Header # Description #
#=============================#=============================================#
| X-Rate-Limit-Limit | The rate limit ceiling for that given |
| | request |
+-----------------------------+---------------------------------------------+
| X-Rate-Limit-Remaining | The number of requests left for the |
| | 15 minute window |
+-----------------------------+---------------------------------------------+
| X-Rate-Limit-Reset | The remaining window before the rate limit |
| | resets in UTC epoch seconds |
+-----------------------------+---------------------------------------------+
#=============================#=============================================#
# HTTP Header # Description #
#=============================#=============================================#
| X-RateLimit-UserLimit | Total credits that can be allocated |
+-----------------------------+---------------------------------------------+
| X-RateLimit-UserRemaining | Total credits available |
+-----------------------------+---------------------------------------------+
| X-RateLimit-UserReset | Timestamp (unix epoch) for when the credits |
| | will be reset |
+-----------------------------+---------------------------------------------+
| X-RateLimit-ClientLimit | Total credits that can be allocated for the |
| | application in a day |
+-----------------------------+---------------------------------------------+
| X-RateLimit-ClientRemaining | Total credits remaining for the application |
| | in a day |
+-----------------------------+---------------------------------------------+
In addition to API specific headers, don't forget the humble, standard Retry-After
header.