Notice: This Post is for educational purpose and is not recommend to try on any API services without the consent of the owner

I was trying out a API service hosted by our government the other day, but without logging in to an account it limits the access of the API to 20 calls per day. I have already register an account but I still need to wait couple for weeks before being check by an admin to use the api.
I really want a way to by pass it since I want to test my code. I search online and found several was to by pass the limit of course some works and some don’t so here is the working way I find and including by explanation.

Changing Headers of X-Forwarded-For

This is probably the one you want to try since it’s very easy. Basically it tricks the API server into thinking that you are an proxy server. Every time when you exceed the rate limit just change the header of “X-Forwarded-For” into an other IP.
Example in Python

import requests
bypass_headers = {
  'X-Forwarded-For' : ip
  }
while(1):
  if(exceed_rate_limit):
    bypass_headers['X-Forwarded-For'] = getNewIp() # Random generate and IP address
  requests.get(url, headers=bypass_headers) 
  # Do something