API rate limit

Introduction

The API rate limit is a limit to the number of calls you can send to the Seven Bridges public API within a predefined time frame. That limit is 1000 requests within 5 minutes. After this limit is reached, no further calls are accepted by the API server, until the 5 minute interval ends.

All rate limit information is returned to the user in the following HTTP headers:

  1. The header X-RateLimit-Limit represents the rate limit - currently this is 1000 requests per five minutes.
  2. The header X-RateLimit-Remaining represents your remaining number of calls before hitting the limit.
  3. The header X-RateLimit-Reset - represents the time in Unix timestamp when the limit will be reset

To learn how you can write optimized code and make the most of the Seven Bridges public API regardless of the rate limit, please consult the examples below.

Each of the examples will first illustrate what an un-optimized code can look like and what makes it less ideal given the rate limit as well as a concrete recommendation on how you can optimize it.

Note that these examples assume that you are using the Python client for the Seven Bridges public API.