title: How to use the Alpha Vantage API directly from Python
body: <p>I've been using Romel Torres' alpha_vantage package but would also like to use the Alpha Vantage API directly from python (gives greater functionality) with package requests as described here <a href="https://stackoverflow.com/questions/38289153/call-with-curl-an-api-through-python">CALL with CURL an API through Python</a>:</p>
  
  <pre><code>import requests
  import alpha_vantage
  
  API_URL = "https://www.alphavantage.co/query"
  
  data = {
      "function": "TIME_SERIES_DAILY",
      "symbol": "NIFTY",
      "outputsize": "compact",
      "datatype": "csv"
      "apikey": "XXX",
      }
  response = requests.get(API_URL, data)
  print(response.json())[/code]
  </code></pre>
  
  <p>But am getting the following error message in the dict returned:</p>
  
  <blockquote>
    <p>{'Error Message': 'Invalid API call. Please retry or visit the documentation        (<a href="https://www.alphavantage.co/documentation/" rel="noreferrer">https://www.alphavantage.co/documentation/</a>) for TIME_SERIES_DAILY.'}</p>
  </blockquote>
  
  <p>And with requests.post() the outcome is: </p>
  
  <pre><code>response = requests.post(API_URL, data)
  {'detail': 'Method "POST" not allowed.'}
  </code></pre>
  
  <p>I've re-checked the documentation and am following all the required API parameters. Appreciate some help re what I might be missing here and what the correct call would be and/or any other alternative approach. Thanks </p>