Skip to main content

Best Practices

This section outlines recommended practices to follow when consuming our APIs in your website:

Caching

  • Our APIs leverage extensive caching mechanisms. If you query an API with specific parameters, and then query the same API with the same parameters within 24 hours, you will receive the cached response.
  • Please note that even when receiving a cached response, the request still counts towards your rate limit of 5 calls per second.
  • To optimize performance and minimize unnecessary API calls, we strongly recommend implementing an internal caching strategy on your end.

Data Refresh

  • As mentioned above, the minimum interval for potential data changes in our APIs is 24 hours.
  • However, the actual frequency of data updates depends on your comment approval and publishing schedule within the Transparency dashboard.
  • For example, if you follow a monthly publishing cycle (publishing comments on the 15th of each month), the data in your API will technically change once a month.
  • We recommend coordinating with your Transparency Team to determine the optimal data refresh cycle for your use case, and scheduling your jobs accordingly.
  • This approach will help you avoid unnecessary traffic and potential issues.

Uptime

  • We commit to a 99.95% uptime service level agreement (SLA). However, there may be situations where API calls fail due to network issues or unplanned outages.
  • If you encounter status codes such as 500 or 504, we recommend retrying the request after a brief delay (e.g., one minute). We also recommend implementing an exponential backoff policy to maximize successful retries.