title: How do I get the url to an api knowing the request url and headers
body: <p>I wanted to view the raw api data by just typing the url into my browser but I'm not sure how to format the url. Is there a way I can use my python request to get the url I need with the headers included in it?</p>
  
  <p>For example when i type in the request.url : <a href="https://free-geo-ip.p.rapidapi.com/json/[my_ip]" rel="nofollow noreferrer">https://free-geo-ip.p.rapidapi.com/json/[my_ip]</a></p>
  
  <p>I get the error: <code>{"message":"Missing RapidAPI application key. Go to https:\/\/docs.rapidapi.com\/docs\/keys to learn how to get your API application key."}</code></p>
  
  <p>I have my api key and host which are the headers, I just don't know how to put them in the url. </p>
  
  <p>Here's my python code with my ip address and api key taken out:</p>
  
  <pre class="lang-py prettyprint-override"><code>import requests
  
  url = "https://free-geo-ip.p.rapidapi.com/json/(my ip address)"
  
  headers = {
      'x-rapidapi-host': "free-geo-ip.p.rapidapi.com",
      'x-rapidapi-key': "(my api key)"
      }
  
  response = requests.request("GET", url, headers=headers)
  
  r = response.json
  </code></pre>