title: Simple API endpoint in Python
body: <p>So I am trying to use requests package to be able to do this simple endpoint, but I am not retrieving the proper json I am looking for. Here is my code below.</p>
  <pre><code>import requests
  api_url = &quot;https://vfat.tools/aurora/auroraswap/&quot;
  response = requests.get(api_url)
  response.json()
  </code></pre>
  <p>I am not getting the json that I want for the endpoint to be able to integrate the proper response.</p>
  <p>This is what I get when I run the python script, it's not json and there are several errors which makes me think that I am not doing this properly:</p>
  <p>this is what I get in regards to running the python script.</p>
  <pre><code>Traceback (most recent call last):
    File &quot;/Library/Python/3.8/site-packages/requests/models.py&quot;, line 910, in json
      return complexjson.loads(self.text, **kwargs)
    File &quot;/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/json/__init__.py&quot;, line 357, in loads
      return _default_decoder.decode(s)
    File &quot;/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/json/decoder.py&quot;, line 337, in decode
      obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File &quot;/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/json/decoder.py&quot;, line 355, in raw_decode
      raise JSONDecodeError(&quot;Expecting value&quot;, s, err.value) from None
  json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File &quot;multifarm_endpoint.py&quot;, line 5, in &lt;module&gt;
      response.json()
    File &quot;/Library/Python/3.8/site-packages/requests/models.py&quot;, line 917, in json
      raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
  requests.exceptions.JSONDecodeError: [Errno Expecting value] &lt;!DOCTYPE html&gt; &lt;html lang=en&gt; &lt;head&gt; &lt;meta charset=UTF-8&gt; &lt;!-- Primary Meta Tags --&gt; &lt;title&gt;Yield Farming Info&lt;/title&gt; &lt;meta name=title content=&quot;Yield Farming Info&quot;&gt; &lt;meta name=description content=&quot;&amp;#x1F9D1;&amp;#x200D;&amp;#x1F33E; It ain't much, but it's honest work&quot;&gt; &lt;!-- Open Graph / Facebook --&gt; &lt;meta property=og:type content=website&gt; &lt;meta property=og:url content=https://vfat.tools/ &gt; &lt;meta property=og:title content=&quot;Yield Farming Info&quot;&gt; &lt;meta property=og:description content=&quot;&amp;#x1F9D1;&amp;#x200D;&amp;#x1F33E; It ain't much, but it's honest work&quot;&gt; &lt;meta property=og:image content=https://yieldfarming.info/img/thumbnail.png&gt; &lt;!-- Twitter --&gt; &lt;meta property=twitter:card content=summary_large_image&gt; &lt;meta property=twitter:url content=https://vfat.tools/ &gt; &lt;meta property=twitter:title content=&quot;Yield Farming Info&quot;&gt; &lt;meta property=twitter:description content=&quot;&amp;#x1F9D1;&amp;#x200D;&amp;#x1F33E; It ain't much, but it's honest work&quot;&gt; &lt;meta property=twitter:image content=https://yieldfarming.info/img/thumbnail.png&gt; &lt;link rel=stylesheet href=/css/index.abdd5e2b77d7e79a2729beb9d2ba16e0.css&gt; &lt;link rel=preload href=/js/vendor.c8623390013927ce9b57ef73c7496130.js as=script&gt; &lt;link rel=prefetch href=/js/vendor.c8623390013927ce9b57ef73c7496130.js&gt; &lt;link rel=preload href=/js/app.3e3ef23ced4a0f316d85b7b82847c912.js as=script&gt; &lt;link rel=prefetch href=/js/app.3e3ef23ced4a0f316d85b7b82847c912.js&gt; &lt;meta name=theme-color content=#ffffff&gt; &lt;meta name=viewport content=&quot;width=device-width,initial-scale=1&quot;&gt; &lt;link rel=icon href=/favicon.svg&gt; &lt;link rel=apple-touch-icon href=/apple-touch-icon.png&gt; &lt;link rel=manifest href=/manifest.json&gt; &lt;/head&gt; &lt;div id=quick class=modal&gt; &lt;form class=modal-content id=quick-form&gt; &lt;input autocomplete=off id=quick-input class=modal-input&gt; &lt;ul id=quick-dropdown&gt;&lt;/ul&gt; &lt;/form&gt; &lt;/div&gt; &lt;div id=pool-details-modal class=modal&gt; &lt;div class=modal-content id=pool-details&gt; &lt;a href=# class=modal-close id=close-pool-details-modal&gt;Close&lt;/a&gt;&lt;br&gt; &lt;pre id=pool-details-content&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;script&gt; document
          .getElementById(&quot;close-pool-details-modal&quot;)
          .onclick = () =&gt; {
              document.getElementById(&quot;pool-details-modal&quot;).style.display = 'none'
              document.getElementById(&quot;pool-details-content&quot;).innerHTML = ''
          } &lt;/script&gt; &lt;body&gt; &lt;div&gt; &lt;a href=/ &gt;Home&lt;/a&gt; - &lt;a href=/mcn/ &gt;MCN&lt;/a&gt; - &lt;a href=/all/ &gt;All&lt;/a&gt; - &lt;a href=/bsc/ &gt;BSC&lt;/a&gt; - &lt;a href=/arbitrum/ &gt;ARBITRUM&lt;/a&gt; - &lt;a href=/heco/ &gt;HECO&lt;/a&gt; - &lt;a href=/polygon/ &gt;POLYGON&lt;/a&gt; - &lt;a href=/gnosis/ &gt;GNOSIS&lt;/a&gt; - &lt;a href=/avax/ &gt;AVAX&lt;/a&gt; - &lt;a href=/fantom/ &gt;FANTOM&lt;/a&gt; - &lt;a href=/harmony/ &gt;HARMONY&lt;/a&gt; - &lt;a href=/fuse/ &gt;FUSE&lt;/a&gt; - &lt;a href=/thundercore/ &gt;ThunderCore&lt;/a&gt; - &lt;a href=/okex/ &gt;OKEX&lt;/a&gt; - &lt;a href=/kcc/ &gt;KUCOIN&lt;/a&gt; - &lt;a href=/celo/ &gt;CELO&lt;/a&gt; - &lt;a href=/iotex/ &gt;IoTeX&lt;/a&gt; - &lt;a href=/moonriver/ &gt;Moonriver&lt;/a&gt; - &lt;a href=/optimism/ &gt;Optimism&lt;/a&gt; - &lt;a href=/smartbch/ &gt;SmartBCH&lt;/a&gt; - &lt;a href=/polis/ &gt;Polis&lt;/a&gt; - &lt;a href=/cronos/ &gt;Cronos&lt;/a&gt; - &lt;a href=/velas/ &gt;Velas&lt;/a&gt; - &lt;a href=/aurora/ &gt;Aurora&lt;/a&gt; - &lt;a href=/boba/ &gt;Boba&lt;/a&gt; - &lt;a href=/metis/ &gt;Metis&lt;/a&gt; - &lt;a href=/meter/ &gt;Meter&lt;/a&gt; - &lt;a href=/emerald/ &gt;Emerald&lt;/a&gt; - &lt;a href=/moonbeam/ &gt;Moonbeam&lt;/a&gt; - &lt;a href=/telos/ &gt;Telos&lt;/a&gt; - &lt;a href=/dfk/ &gt;DFK&lt;/a&gt; - &lt;a href=/astar/ &gt;Astar&lt;/a&gt; - &lt;a href=/milkomeda/ &gt;Milkomeda&lt;/a&gt; - &lt;a href=/evmos/ &gt;EVMOS&lt;/a&gt; - &lt;a href=/hoo/ &gt;Hoo&lt;/a&gt; - &lt;a href=/seigniorage/ &gt;Seigniorage&lt;/a&gt; &lt;/div&gt; &lt;div id=quick class=modal&gt; &lt;form class=modal-content id=quick-form&gt; &lt;input autocomplete=off id=quick-input class=modal-input&gt; &lt;ul id=quick-dropdown&gt;&lt;/ul&gt; &lt;/form&gt; &lt;/div&gt; &lt;div id=pool-details-modal class=modal&gt; &lt;div class=modal-content id=pool-details&gt; &lt;a href=# class=modal-close id=close-pool-details-modal&gt;Close&lt;/a&gt;&lt;br&gt; &lt;pre id=pool-details-content&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;script&gt; document
          .getElementById(&quot;close-pool-details-modal&quot;)
          .onclick = () =&gt; {
              document.getElementById(&quot;pool-details-modal&quot;).style.display = 'none'
              document.getElementById(&quot;pool-details-content&quot;).innerHTML = ''
          } &lt;/script&gt; &lt;br&gt; &lt;a href=https://discord.gg/vfat target=_blank&gt;*** Discord ***&lt;/a&gt; &lt;a href=&quot;&quot; id=theme-button&gt;[light mode]&lt;/a&gt; &lt;script&gt; function setDarkMode() {
          document.documentElement.setAttribute('data-theme', 'dark');
          localStorage.setItem('theme', 'dark');
          document.getElementById(&quot;theme-button&quot;).innerText = '[light mode]';
      }
  
      function setLightMode() {
          document.documentElement.setAttribute('data-theme', 'light');
          localStorage.setItem('theme', 'light');
          document.getElementById(&quot;theme-button&quot;).innerText = '[dark mode]';
      }
  
      function initTheme() {
          let currentTheme = localStorage.getItem('theme');
          if (currentTheme === &quot;dark&quot;) {
              setDarkMode();
          } else {
              setLightMode();
          }
      }
  
      function setTheme() {
          let currentTheme = localStorage.getItem('theme');
          if (currentTheme === &quot;dark&quot;) {
              setLightMode();
          } else {
              setDarkMode();
          }
      }
  
      initTheme();
      document.getElementById(&quot;theme-button&quot;).onclick = setTheme &lt;/script&gt; &lt;pre id=log&gt;*************** ð¨âð¾ UNOFFICIAL AURORASWAP.FINANCE FARMING CALCULATOR ð¨âð¾ ***************
  INFO  : https://app.auroraswap.finance
  ***************************************************************************************
  
  &lt;/pre&gt; &lt;div class=loader--1&gt;&lt;/div&gt; &lt;script src=/js/vendor.c8623390013927ce9b57ef73c7496130.js&gt;&lt;/script&gt; &lt;script src=/js/app.3e3ef23ced4a0f316d85b7b82847c912.js&gt;&lt;/script&gt; &lt;script src=/js/data.609946ce4705561f1bf29784d130e46b.js&gt;&lt;/script&gt; &lt;script src=/js/dollars.9d2af9cbbbad251adb5e787b21a6256e.js&gt;&lt;/script&gt; &lt;script src=/js/ethers_helper.0f59f60bc7bacb5abea6b997f2ceca3e.js&gt;&lt;/script&gt; &lt;script src=/js/dollar_helper.97adbbd9237cfa544e79319b86c98a01.js&gt;&lt;/script&gt; &lt;script src=/js/bsc_helpers.16d9433e66510c14b62b427aa38cf6da.js&gt;&lt;/script&gt; &lt;script src=/js/arbitrum_helpers.cab88a4057d56b54b1a7b99cb227f2d4.js&gt;&lt;/script&gt; &lt;script src=/js/heco_helpers.aa62399a0e303500b7ab922f77204e57.js&gt;&lt;/script&gt; &lt;script src=/js/matic_helpers.77288a7ba0b1f0d2d51685ad58146ebb.js&gt;&lt;/script&gt; &lt;script src=/js/avax_helpers.3b7a9df101d0be9bd6c3716ecba4c220.js&gt;&lt;/script&gt; &lt;script src=/js/gnosis_helpers.92bdaa29435cabf7f2dc22a4242ef7c8.js&gt;&lt;/script&gt; &lt;script src=/js/fantom_helpers.f16e8734cee137d249e50f99a5532363.js&gt;&lt;/script&gt; &lt;script src=/js/harmony_helpers.8716ed178dd5747bcae81b97d76b4dec.js&gt;&lt;/script&gt; &lt;script src=/js/fuse_helpers.789415be4b1b1d34adcf3666c1db5792.js&gt;&lt;/script&gt; &lt;script src=/js/pool_table_helpers.ddb10b00ee8de085eb2a7b393ca79310.js&gt;&lt;/script&gt; &lt;script src=/js/thundercore_helpers.124f57b1c6f1e4013513ecac6a1975d4.js&gt;&lt;/script&gt; &lt;script src=/js/kyber_helpers.2725a5eb901fbeef494819b02d80e8df.js&gt;&lt;/script&gt; &lt;script src=/js/kcc_helpers.3dc0dffde4936b4b1b0e421b5b195760.js&gt;&lt;/script&gt; &lt;script src=/js/celo_helpers.75e0b984850392c138cf572d49f23fc9.js&gt;&lt;/script&gt; &lt;script src=/js/iotex_helpers.6b054744a02534531e94485e5d47376b.js&gt;&lt;/script&gt; &lt;script src=/js/moonriver_helpers.653649824d314291d70f41d96e0492ca.js&gt;&lt;/script&gt; &lt;script src=/js/optimism_helpers.981a7cad0bae76030669bd0d7eec29bd.js&gt;&lt;/script&gt; &lt;script src=/js/smartbch_helpers.90dc6bd529760160f70d73c61afcfbea.js&gt;&lt;/script&gt; &lt;script src=/js/polis_helpers.50e36da5b3f54e3e2a4a52606159b46f.js&gt;&lt;/script&gt; &lt;script src=/js/cronos_helpers.ae12c904ce7a0053ee6a93c0036672b2.js&gt;&lt;/script&gt; &lt;script src=/js/velas_helpers.da7df15809bbeebabeb8f885c61673b8.js&gt;&lt;/script&gt; &lt;script src=/js/aurora_helpers.ef28410adf23b6f2bf9866f39edde5fc.js&gt;&lt;/script&gt; &lt;script src=/js/boba_helpers.ba39a1b9858ecc8ab1db5a2d3e43841f.js&gt;&lt;/script&gt; &lt;script src=/js/metis_helpers.0981b03938ececeb96cbb837707cd204.js&gt;&lt;/script&gt; &lt;script src=/js/meter_helpers.75b29551306c610b57b0dc3555a845d2.js&gt;&lt;/script&gt; &lt;script src=/js/emerald_helpers.ca4347657fe4b9d057d984ce22d2ca0e.js&gt;&lt;/script&gt; &lt;script src=/js/moonbeam_helpers.9f9a0e20946652e69c75d490c445d1d9.js&gt;&lt;/script&gt; &lt;script src=/js/telos_helpers.afc289fcfc5e6a35f150b9bde4d9407e.js&gt;&lt;/script&gt; &lt;script src=/js/dfk_helpers.dd75d59e085f8ddae5265ba75b780dd7.js&gt;&lt;/script&gt; &lt;script src=/js/milkomeda_helpers.d29e2dad693d679c93d3c202611489e0.js&gt;&lt;/script&gt; &lt;script src=/js/evmos_helpers.488e8c204658feb17c3948815ad61fcd.js&gt;&lt;/script&gt; &lt;script src=/js/general_helpers.273c3bda887b70222eecad433afcba1b.js&gt;&lt;/script&gt; &lt;script src=/js/prices.c82c76c7852bc074211da10d53d3bf04.js&gt;&lt;/script&gt; &lt;script src=/js/aurora_auroraswap.315835de5b747bded11d2604524e92cd.js&gt;&lt;/script&gt; &lt;/body&gt; &lt;/html&gt; : 0
  </code></pre>
  <p>Any help with this or proper resources I can look at to properly understand how to get an endpoint with no API documentation? Any help is appreciated.</p>
  <p>Please check out the vfat repository and how they integrated AuroraSwap:</p>
  <p>vfat-tools/aurora_auroraswap.js at master · vfat-tools/vfat-tools (github.com)</p>
  <p>Please write a simple endpoint, returning me the yearly APR for that pool (marked red):</p>
  <p>(Link: Yield Farming Info (vfat.tools))</p>