Python RapidAPI
APIs can be found all over the internet. A great consolidator of many APIs is RapidAPI. In this blog we will use a site to consolidates API stats. Learning a few lines of code and you can start extracting lots of data from the internet via APIs.
• 9 min read
- Python, RapidAPI Terms
- Covid19 RapidAPI Example
- Digital Coin Example
- Formatting Digital Coin example
- Go deeper into APIs
- Hacks
Covid19 RapidAPI Example
To begin the API journey. You need to find an API provider.
- RapidAPI is a great option. You must setup and account, but there are many free options.
- Goto this page for starters, the Corona virus World and India data- Under Code Snippets pick Python - Requests
RapidAPI, you will select Python Requests type of code to work with you Notebook.
- The url is the endpoint to which the API is directed
- The headers is a dictionary data structure to send special messaging to the endpoint
- The requests.request() python function is used to send a request and retrieve their responses
- The response variable receives result of of the request in JSON text
Next step, is to format the response according to your data science needs
"""
Requests is a HTTP library for the Python programming language.
The goal of the project is to make HTTP requests simpler and more human-friendly.
"""
import requests
"""
RapidAPI is the world's largest API Marketplace.
Developers use Rapid API to discover and connect to thousands of APIs.
"""
url = "https://corona-virus-world-and-india-data.p.rapidapi.com/api"
headers = {
"X-RapidAPI-Key": "3caeff5409mshc2c175f29a5e775p13d7f9jsne72bfb6ce7e5",
"X-RapidAPI-Host": "corona-virus-world-and-india-data.p.rapidapi.com"
}
# Request Covid Data
response = requests.request("GET", url, headers=headers)
# print(response.text) # uncomment this line to see raw data
# This code looks for "world data"
print("World Totals")
world = response.json().get('world_total') # turn response to json() so we can extract "world_total"
for key, value in world.items(): # this finds key, value pairs in country
print(key, value)
print()
# This code looks for USA in "countries_stats"
print("Country Totals")
countries = response.json().get('countries_stat')
for country in countries: # countries is a list
if country["country_name"] == "USA": # this filters for USA
for key, value in country.items(): # this finds key, value pairs in country
print(key, value)
World Totals total_cases 509,268,964 new_cases 204,268 total_deaths 6,242,509 new_deaths 630 total_recovered 461,827,849 active_cases 41,198,606 serious_critical 42,510 total_cases_per_1m_population 65,334 deaths_per_1m_population 800.9 statistic_taken_at 2022-04-24 11:18:01 Country Totals country_name USA cases 82,649,779 deaths 1,018,316 region total_recovered 80,434,925 new_deaths 0 new_cases 0 serious_critical 1,465 active_cases 1,196,538 total_cases_per_1m_population 247,080 deaths_per_1m_population 3,044 total_tests 1,000,275,726 tests_per_1m_population 2,990,303
# RapidAPI page https://rapidapi.com/Coinranking/api/coinranking1/
# Begin Rapid API Code
import requests
url = "https://coinranking1.p.rapidapi.com/coins"
querystring = {"referenceCurrencyUuid":"yhjMzLPhuIDl","timePeriod":"24h","tiers[0]":"1","orderBy":"marketCap","orderDirection":"desc","limit":"50","offset":"0"}
headers = {
"X-RapidAPI-Key": "3caeff5409mshc2c175f29a5e775p13d7f9jsne72bfb6ce7e5",
"X-RapidAPI-Host": "coinranking1.p.rapidapi.com"
}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)
# End Rapid API Code
json = response.json() # convert response to python json object
# Observe data from an API. This is how data transports over the internet in a "JSON" text form
# - The JSON "text" is formed in dictionary {} and list [] divisions
# - To read the result, Data Scientist of Developer converts JSON into human readable form
# - Review the first line, look for the keys -- "status" and "data"
{"status":"success","data":{"stats":{"total":1500,"totalCoins":15880,"totalMarkets":29502,"totalExchanges":172,"totalMarketCap":"982914290766","total24hVolume":"63331048743"},"coins":[{"uuid":"Qwsogvtv82FCd","symbol":"BTC","name":"Bitcoin","color":"#f7931A","iconUrl":"https://cdn.coinranking.com/bOabBYkcX/bitcoin_btc.svg","marketCap":"384077698460","price":"20034.033151296964","listedAt":1330214400,"tier":1,"change":"-0.91","rank":1,"sparkline":["20223.555335162455","20136.54831352927","20049.815416539706","20094.393545497052","20158.58698671382","20232.898003614322","20293.618431388033","20355.557600474516","20337.9076796474","20378.945224236224","20339.414870489745","20264.990263682765","20213.26195787923","20202.974824398778","20157.250216544355","20141.409719078547","20143.75303286625","20204.211148012277","20220.284434483106","20137.216620466203","20006.100174996944","20069.0906701522","20048.293652930657","20090.639746665587","20084.906588703758"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/Qwsogvtv82FCd+bitcoin-btc","24hVolume":"34943785068","btcPrice":"1"},{"uuid":"razxDUgYGNAdQ","symbol":"ETH","name":"Ethereum","color":"#3C3C3D","iconUrl":"https://cdn.coinranking.com/rk4RKHOuW/eth.svg","marketCap":"166087220698","price":"1357.8576774509995","listedAt":1438905600,"tier":1,"change":"0.40","rank":2,"sparkline":["1356.1441141557204","1351.126644284867","1349.0384567537553","1350.486586991934","1353.0627871586412","1361.5377625273948","1374.2027236665588","1375.7214408982059","1373.1173416682698","1375.6203205822255","1374.5833968999716","1369.002110485522","1366.0660235467826","1364.8208492018532","1360.0380488934045","1358.8777951928896","1359.201867480813","1366.6546209787482","1370.3407047067003","1366.4064227205356","1361.2014385928683","1365.232068355049","1362.6548801446975","1364.1019072109643","1362.7987815464114"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/razxDUgYGNAdQ+ethereum-eth","24hVolume":"11646152359","btcPrice":"0.06777754969238904"},{"uuid":"HIVsRcGKkPFtW","symbol":"USDT","name":"Tether USD","color":"#22a079","iconUrl":"https://cdn.coinranking.com/mgHqwlCLj/usdt.svg","marketCap":"68328433959","price":"1.0016985066777537","listedAt":1420761600,"tier":1,"change":"0.24","rank":3,"sparkline":["1.0001435467325461","1.0010566171285733","1.0007218035748657","0.9998195240120525","1.0001942073599759","0.999198242906088","0.999970326331934","0.9999578602237212","1.0002749344768964","0.9998618718046304","1.0006329886842509","1.0010446040777476","1.0005604241221613","1.0006413322201635","1.0004437331204448","1.0006101471625053","1.0001687521957723","0.9995037614095902","1.0006440819313598","1.001376308434132","1.0003961159670858","1.0000147257385132","1.0001689083946086","0.9998823624197636","1.000601519429449"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/HIVsRcGKkPFtW+tetherusd-usdt","24hVolume":"42373173933","btcPrice":"0.000049999842723276"},{"uuid":"aKzUVe4Hh_CON","symbol":"USDC","name":"USDC","color":"#7894b4","iconUrl":"https://cdn.coinranking.com/jkDf8sQbY/usdc.svg","marketCap":"46310258518","price":"1.0012371333410857","listedAt":1539043200,"tier":1,"change":"0.14","rank":4,"sparkline":["0.9999345475197645","1.000912309467801","1.0005863270210245","0.9998825447125274","1.0001565051935892","0.9992645129007548","0.9998675462392212","0.9998272931691644","1.0002224153445407","0.9999317743533871","1.0006585942367816","1.000952432863041","1.0004393434555847","1.0005154262173783","1.0004131871429036","1.0005795066052903","1.0001604732903788","0.9995282049737586","1.0005651552462809","1.0012346841550612","1.0005913061423513","0.9999219703304918","1.000293948230519","0.9999281319907949","1.000499583671794"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/aKzUVe4Hh_CON+usdc-usdc","24hVolume":"3333856235","btcPrice":"0.000049976813244729"},{"uuid":"WcwrkfNI4FUAe","symbol":"BNB","name":"Binance Coin","color":"#e8b342","iconUrl":"https://cdn.coinranking.com/B1N19L_dZ/bnb.svg","marketCap":"42467965146","price":"293.1336566398893","listedAt":1503014400,"tier":1,"change":"-0.30","rank":5,"sparkline":["294.0404258490945","293.2855539660301","293.0648258481622","293.07747587851765","293.8892235863702","294.692062571157","297.0994193910956","296.5460033456306","296.5992676846958","296.31121173116384","295.9763936716012","295.45727286275803","294.70032990109524","295.3080570428542","294.4981060492843","294.3337487623815","294.2316324183209","294.6298571055105","294.6595144809562","294.0329800033172","293.5917691431179","294.0227751304564","293.6815627093513","293.5849695749711","293.2590784452913"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/WcwrkfNI4FUAe+binancecoin-bnb","24hVolume":"803691400","btcPrice":"0.014631784545136004"},{"uuid":"-l8Mn2pVlRs-p","symbol":"XRP","name":"XRP","color":"#000000","iconUrl":"https://cdn.coinranking.com/B1oPuTyfX/xrp.svg","marketCap":"24732611262","price":"0.49605531069295133","listedAt":1421798400,"tier":1,"change":"0.39","rank":6,"sparkline":["0.49553799515562663","0.4963944697788394","0.4938981661775617","0.49343949277953586","0.49137790768876555","0.4914838199245121","0.49555594870572434","0.4951890037750714","0.495754600642816","0.49961106217113954","0.5027605293364544","0.49962279916372687","0.4954048830836824","0.49435764214593075","0.4936624491660951","0.49429837449816666","0.4966456636473714","0.497538805172514","0.499422605944309","0.49623220498597587","0.4950030830343421","0.49640009824587233","0.4958072314621451","0.49722200793643323","0.4970756649928469"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/-l8Mn2pVlRs-p+xrp-xrp","24hVolume":"1929812909","btcPrice":"0.000024760631418883"},{"uuid":"vSo2fu9iE1s0Y","symbol":"BUSD","name":"Binance USD","color":"#f0b90b","iconUrl":"https://cdn.coinranking.com/6SJHRfClq/busd.svg","marketCap":"21417066190","price":"1.001656814275489","listedAt":1563197940,"tier":1,"change":"0.24","rank":7,"sparkline":["1.0000799678228294","1.0008905430035575","1.0006911778549377","0.9998223006382758","1.0001331288898294","0.9991026459307589","0.9998674015440719","0.9998433930969712","1.0001634369759003","0.999743197805345","1.0005842712581856","1.0010101947902401","1.0004569135406234","1.0005187863539011","1.0003603032522226","1.000511480157415","1.000089429567618","0.9994167455393567","1.0005356630408002","1.0012875995431658","1.000382721602677","1.0000168735947466","1.000108904159323","0.9997112862091224","1.0004958391321148"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/vSo2fu9iE1s0Y+binanceusd-busd","24hVolume":"6053726221","btcPrice":"0.000049997761644447"},{"uuid":"qzawljRxB5bYu","symbol":"ADA","name":"Cardano","color":"#3cc8c8","iconUrl":"https://cdn.coinranking.com/ryY28nXhW/ada.svg","marketCap":"13337560546","price":"0.4286883755996844","listedAt":1506902400,"tier":1,"change":"-0.41","rank":8,"sparkline":["0.43193246074859537","0.430512533378958","0.42935079509289215","0.42999716955939554","0.43113793091933544","0.43164235605366286","0.4351709066340561","0.4357776886667802","0.43477220488691914","0.435032637484956","0.43469659246229525","0.43367955301045125","0.4325627475054175","0.43224817517625874","0.43131439672036864","0.4311269834439529","0.43033267004685644","0.4315575887711084","0.43212509953213496","0.4309126256113925","0.429306192919787","0.42996753867920334","0.42967860854102746","0.4299956873366783","0.42958841920603125"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/qzawljRxB5bYu+cardano-ada","24hVolume":"442418993","btcPrice":"0.00002139800670001"},{"uuid":"zNZHO_Sjf","symbol":"SOL","name":"Solana","color":"#9cddec","iconUrl":"https://cdn.coinranking.com/yvUG4Qex5/solana.svg","marketCap":"11964155820","price":"33.680808340498636","listedAt":1586539320,"tier":1,"change":"-0.83","rank":9,"sparkline":["34.1497454542223","33.85943727489043","33.76194937947399","33.83018839969452","34.013048292328065","34.22695861442601","34.302948506263874","34.36117055139888","34.33297730862471","34.37725515202584","34.38122367897517","34.2550563983116","34.01974117371273","34.037114601179724","34.018562769728476","33.992592583476906","33.968249070492554","34.076722259021444","34.11137751431098","33.940212287279515","33.89494614343538","33.92127374129869","33.873984510988144","33.807053062760865","33.72616159969263"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/zNZHO_Sjf+solana-sol","24hVolume":"729499957","btcPrice":"0.001681179624998185"},{"uuid":"a91GCGd_u96cF","symbol":"DOGE","name":"Dogecoin","color":"#c2a633","iconUrl":"https://cdn.coinranking.com/H1arXIuOZ/doge.svg","marketCap":"8456189464","price":"0.06373815293060064","listedAt":1391212800,"tier":1,"change":"-1.44","rank":10,"sparkline":["0.06508468000318819","0.06498414093039298","0.06433091677136754","0.06433630601076162","0.06451575976472833","0.0650019016600869","0.06499257008710045","0.06506417867247787","0.06570475320958324","0.06606716612821471","0.06581607679725353","0.06558476365046208","0.06535918379965736","0.06516894403820425","0.06522819536528995","0.06512901579983153","0.06503874743950451","0.06529626541952577","0.06535446649523742","0.06499123465130338","0.06440797483386555","0.06442796997062027","0.06402886312409285","0.06395977844314375","0.06391024647625458"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/a91GCGd_u96cF+dogecoin-doge","24hVolume":"418498970","btcPrice":"0.000003181493833481"},{"uuid":"uW2tk-ILY0ii","symbol":"MATIC","name":"Polygon","color":"#8247e5","iconUrl":"https://cdn.coinranking.com/WulYRq14o/polygon.png","marketCap":"7364350093","price":"0.8410948431615639","listedAt":1558961160,"tier":1,"change":"-0.88","rank":11,"sparkline":["0.8492361528788174","0.8453801338634946","0.8432829962954229","0.849181551492284","0.8536201943011714","0.8541813180047458","0.8515224098574884","0.850265179544537","0.847322542943578","0.8476972952771256","0.8471467304336225","0.844702158937144","0.8447557537787462","0.847783834534723","0.8464624696426057","0.844304871333146","0.8409800916467571","0.8417212018286235","0.8408371640708998","0.839748301181124","0.841132637326318","0.8438753976857096","0.8434398947847157","0.8449687251128872","0.8428929432958985"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/uW2tk-ILY0ii+polygon-matic","24hVolume":"382227712","btcPrice":"0.000041983300956408"},{"uuid":"25W7FG7om","symbol":"DOT","name":"Polkadot","color":"#d64cA8","iconUrl":"https://cdn.coinranking.com/RsljYqnbu/polkadot.svg","marketCap":"7329288943","price":"6.3710898298483825","listedAt":1598365200,"tier":1,"change":"-0.17","rank":12,"sparkline":["6.391801336376841","6.403951175982247","6.399701718761633","6.405337242113671","6.4266248804229384","6.451455659600661","6.483491915376635","6.501811546262432","6.498760844193182","6.4976323368143705","6.477581013777311","6.479927431264483","6.448634624359964","6.443891275539751","6.44572217932727","6.439723965897828","6.433324405763729","6.454887962515635","6.4604059173103","6.432341334197665","6.393903714970722","6.3932166668482395","6.382577104663209","6.390580012706444","6.385565565622373"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/25W7FG7om+polkadot-dot","24hVolume":"273894435","btcPrice":"0.00031801334168382"},{"uuid":"xz24e0BjL","symbol":"SHIB","name":"Shiba Inu","color":"#fda32b","iconUrl":"https://cdn.coinranking.com/D69LfI-tm/shib.png","marketCap":"6652666473","price":"0.000011284194864331","listedAt":1620650373,"tier":1,"change":"-1.17","rank":13,"sparkline":["0.000011431411395939","0.000011396885952609","0.000011384972187891","0.00001139313280198","0.000011429580139168","0.000011482444529902","0.000011517178722671","0.000011525811358147","0.000011555785322931","0.000011591429783261","0.000011505189155736","0.000011477778399831","0.000011435045514583","0.000011441068522037","0.000011451531930929","0.000011472997282849","0.000011474732607287","0.000011470300373336","0.000011446550501303","0.000011383535979231","0.000011350372067707","0.000011344541379274","0.00001129354780181","0.00001127407837216","0.000011288295361626"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/xz24e0BjL+shibainu-shib","24hVolume":"258953405","btcPrice":"5.63251282e-10"},{"uuid":"MoTuySvg7","symbol":"DAI","name":"Dai","color":null,"iconUrl":"https://cdn.coinranking.com/mAZ_7LwOE/mutli-collateral-dai.svg","marketCap":"6334654462","price":"1.0007285765928384","listedAt":1585574040,"tier":1,"change":"0.08","rank":14,"sparkline":["0.9996807063197282","1.000636651844088","1.000345680785842","0.9996768088644196","0.9997620874678727","0.9991192679426156","0.9994334358286668","0.9995689641224628","0.999907059929403","0.9994838161730176","1.0000962236419397","1.0004931721027528","1.0001779802955908","1.0001089295458878","1.000237652922639","1.0001493027958073","0.999867560403255","0.999266680200031","0.9999978573315924","1.0006339409383798","1.0006808487898204","0.9996158529540979","1.0000733663835433","0.999699967664402","1.0001229877486109"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/MoTuySvg7+dai-dai","24hVolume":"115039635","btcPrice":"0.000049951428603284"},{"uuid":"qUhEFk1I61atv","symbol":"TRX","name":"TRON","color":"#eb0029","iconUrl":"https://cdn.coinranking.com/behejNqQs/trx.svg","marketCap":"5776619761","price":"0.06256065764605483","listedAt":1505260800,"tier":1,"change":"0.14","rank":15,"sparkline":["0.06250613632267232","0.06233936646337086","0.06235487176617015","0.06246245556557078","0.06240660740134105","0.0623051569646796","0.06218981455801479","0.06255572539146104","0.0628439660805138","0.06274927695509415","0.0627107369451555","0.06257675995151533","0.06246267761934192","0.06246860310215167","0.06252676971107378","0.06266602786490501","0.0627064601307051","0.06268244860432474","0.06272181454243733","0.06264305726817844","0.06255904556452598","0.06259253116625534","0.06262592704572888","0.06266205758233426","0.06261625379086024"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/qUhEFk1I61atv+tron-trx","24hVolume":"306587135","btcPrice":"0.000003122719083751"},{"uuid":"Mtfb0obXVh59u","symbol":"WETH","name":"Wrapped Ether","color":"#303030","iconUrl":"https://cdn.coinranking.com/KIviQyZlt/weth.svg","marketCap":"5519902938","price":"1358.9816391781385","listedAt":1600259445,"tier":1,"change":"0.54","rank":16,"sparkline":["1355.9613432898727","1353.422449060138","1349.1540983542507","1350.9005820344698","1354.6594355436337","1358.5734173716921","1372.2393635736669","1375.4133500184457","1373.8416709111418","1374.2684069108268","1374.1400838469938","1371.4603171603485","1367.29338349385","1365.576647957882","1361.8120768983374","1361.2918823579867","1360.0415578756765","1365.3854475170606","1371.9196006159282","1368.3891913530783","1361.5340578211528","1367.4475182685767","1362.680731199084","1363.6150076195051","1362.071251252447"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/Mtfb0obXVh59u+wrappedether-weth","24hVolume":"301806130","btcPrice":"0.06783365231130012"},{"uuid":"_H5FVG9iW","symbol":"UNI","name":"Uniswap","color":"#ff007a","iconUrl":"https://cdn.coinranking.com/1heSvUgtl/uniswap-v2.svg?size=48x48","marketCap":"5340693465","price":"6.877484884629705","listedAt":1600323371,"tier":1,"change":"2.18","rank":17,"sparkline":["6.768091971520045","6.761882622124115","6.77237184675032","6.752824244485618","6.78903586558007","6.852613624649713","6.922872589387299","6.9800437339156405","6.955259833823376","6.928956756162565","6.908183341801451","6.885823479955376","6.8796999121503895","6.9137649249190885","6.87311704845351","6.837302765502296","6.829449377075668","6.891186402222689","6.911439464187517","6.861936365531298","6.828814769101655","6.879050406286385","6.89049150506205","6.899404292712641","6.898069297435468"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/_H5FVG9iW+uniswap-uni","24hVolume":"203993320","btcPrice":"0.0003432900820664"},{"uuid":"dvUj0CzDZ","symbol":"AVAX","name":"Avalanche","color":"#e84242","iconUrl":"https://cdn.coinranking.com/S0C6Cw2-w/avax-avalanche.png","marketCap":"5079186978","price":"17.15389336350206","listedAt":1600961596,"tier":1,"change":"-0.62","rank":18,"sparkline":["17.31212380999878","17.26400163397198","17.251404114211134","17.298879643442053","17.34808667709875","17.426941656132254","17.524712176181612","17.559899454169962","17.523659347405594","17.56377672754574","17.524960240775005","17.446353003633845","17.393034315400772","17.389087335664208","17.342336650537163","17.31714980553846","17.31900309406139","17.354595399993247","17.390080348196047","17.351707211402754","17.293284463248067","17.29467067664363","17.237206001258976","17.233307539623787","17.20143642870961"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/dvUj0CzDZ+avalanche-avax","24hVolume":"252184667","btcPrice":"0.000856237644909335"},{"uuid":"x4WXHge-vvFY","symbol":"WBTC","name":"Wrapped BTC","color":"#000000","iconUrl":"https://cdn.coinranking.com/o3-8cvCHu/wbtc[1].svg","marketCap":"4905922801","price":"20044.090315101737","listedAt":1549894980,"tier":1,"change":"-0.81","rank":19,"sparkline":["20226.31646659646","20139.175000464867","20049.66642497842","20092.89008901448","20156.31521210076","20228.25012076666","20291.50619456924","20351.79757539001","20336.52367461082","20376.3859154279","20335.913915665704","20261.657124758975","20210.860549490662","20199.912786977504","20152.35725799045","20138.692674282906","20142.020090922302","20202.11962570712","20220.36071952019","20140.724501856825","20006.046172186805","20073.557445369184","20048.70389238501","20093.515174115382","20087.156900374295"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/x4WXHge-vvFY+wrappedbtc-wbtc","24hVolume":"47380930","btcPrice":"1.0005020039514172"},{"uuid":"Knsels4_Ol-Ny","symbol":"ATOM","name":"Cosmos","color":"#5064fb","iconUrl":"https://cdn.coinranking.com/HJzHboruM/atom.svg","marketCap":"4098803297","price":"13.167310250233948","listedAt":1552520100,"tier":1,"change":"2.36","rank":20,"sparkline":["12.924793487003978","12.878177177424776","12.863612619895465","12.963444525296714","12.997678258298611","13.048598156795691","13.119145598919278","13.159252370152213","13.179334515109312","13.162812288821586","13.137523424001765","13.080422952609398","13.017472526453902","13.020230401382886","12.997475722403461","13.001317245648451","12.96810741292325","13.026166887997375","13.10316541147355","13.128001558390173","13.091123825729781","13.30484137771001","13.346723621921466","13.37656826070367","13.216197488484815"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/Knsels4_Ol-Ny+cosmos-atom","24hVolume":"376896182","btcPrice":"0.000657247103006891"},{"uuid":"PDKcptVnzJTmN","symbol":"OKB","name":"OKB","color":"#2d60e0","iconUrl":"https://cdn.coinranking.com/xcZdYtX6E/okx.png","marketCap":"3938110165","price":"15.650548603354789","listedAt":1538524800,"tier":1,"change":"0.28","rank":21,"sparkline":["15.578393091823456","15.656728912022512","15.57172097704591","15.554456620212141","15.531152169350191","15.556004685562852","15.616987172488637","15.741110499745083","15.721654408590974","15.754592996825584","15.721445252830843","15.68570643031886","15.65885734432721","15.654523400308335","15.638717197317016","15.643011582148882","15.627458291491607","15.730327848031452","15.779009623760075","15.749353181983137","15.707094618160536","15.733008292266929","15.647870425123044","15.657392771047268","15.660598370787731"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/PDKcptVnzJTmN+okb-okb","24hVolume":"20159999","btcPrice":"0.000781198098513758"},{"uuid":"D7B1x_ks7WhV5","symbol":"LTC","name":"Litecoin","color":"#345d9d","iconUrl":"https://cdn.coinranking.com/BUvPxmc9o/ltcnew.svg","marketCap":"3828598187","price":"54.02640985263028","listedAt":1382572800,"tier":1,"change":"-1.05","rank":22,"sparkline":["54.73003734380518","54.548609619768136","54.296108361372866","54.32415717238681","54.49439018324316","54.67152392574348","54.83000909463735","54.86255398531216","54.86130988251709","54.79707265341012","54.775144150456796","54.544338354633034","54.34580309014276","54.37138853472232","54.381706220902295","54.44981719765201","54.48043423896709","54.5218721069334","54.66384490477488","54.487557977792335","54.217667699743956","54.443429057468585","54.19924444211358","54.285306618754106","54.20259958325777"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/D7B1x_ks7WhV5+litecoin-ltc","24hVolume":"386552857","btcPrice":"0.002696731578939846"},{"uuid":"NfeOYfNcl","symbol":"FTT","name":"FTX Token","color":"#77d9ed","iconUrl":"https://cdn.coinranking.com/WyBm4_EzM/ftx-exchange.svg","marketCap":"3295161786","price":"24.685013933924868","listedAt":1566222960,"tier":1,"change":"-0.65","rank":23,"sparkline":["24.86840958470848","24.758395889591455","24.686262825924107","24.708977698495474","24.76275391167715","24.88064501336108","24.989982623495205","25.02527690133806","25.03308663631069","25.096481543960365","25.064183863901825","24.97596757960783","24.905309703817817","24.901770248120254","24.839911865219058","24.833297858653406","24.83746935639624","24.929424731992544","24.957387012206524","24.851056986110105","24.71862835199192","24.792263862901954","24.762469376435654","24.782952955960234","24.7547906117507"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/NfeOYfNcl+ftxtoken-ftt","24hVolume":"69864152","btcPrice":"0.00123215399253379"},{"uuid":"hnfQfsYfeIGUQ","symbol":"ETC","name":"Ethereum Classic","color":"#699070","iconUrl":"https://cdn.coinranking.com/rJfyor__W/etc.svg","marketCap":"3250394495","price":"27.945166401195422","listedAt":1469577600,"tier":1,"change":"1.19","rank":24,"sparkline":["27.63820342762428","27.58901112322496","27.575456313117428","27.57803108679598","27.626107083587126","27.70394559563783","28.153092540695052","28.733080515456265","28.47990216316137","28.460572165061098","28.431061767116237","28.30996933550255","28.150860229865422","28.138076617445943","28.20949388458989","28.323169796622505","28.309067725873184","28.295831261820762","28.321451445159614","28.187546801093646","28.032797543785605","28.053441969742526","27.973728656250728","27.999162574761833","27.991346277464565"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/hnfQfsYfeIGUQ+ethereumclassic-etc","24hVolume":"853641468","btcPrice":"0.001394884703951201"},{"uuid":"3mVx2FX_iJFp5","symbol":"XMR","name":"Monero","color":"#ff7519","iconUrl":"https://cdn.coinranking.com/Syz-oSd_Z/xmr.svg","marketCap":"2636831259","price":"145.0121440359217","listedAt":1422489600,"tier":1,"change":"-0.60","rank":25,"sparkline":["146.8541207974771","146.40695669017853","146.0756556475053","146.16539235107626","146.17871227201726","146.7928043004359","147.49601518947418","147.78321950861786","148.13781758186698","149.1182492747765","148.11631640525192","146.22011551363667","145.4965433643255","145.48529013762573","145.20443339951157","144.9992366994431","145.0215131100292","145.4211725196932","145.22755896602186","144.66035334810422","144.05802759633252","144.10883438071522","143.89007002513964","143.9576715546343","144.58835936754863"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/3mVx2FX_iJFp5+monero-xmr","24hVolume":"114208421","btcPrice":"0.007238290110672692"},{"uuid":"TpHE2IShQw-sJ","symbol":"ALGO","name":"Algorand","color":null,"iconUrl":"https://cdn.coinranking.com/lzbmCkUGB/algo.svg","marketCap":"2458795301","price":"0.3504992484361217","listedAt":1562082540,"tier":1,"change":"-0.30","rank":26,"sparkline":["0.3524917120548109","0.3525148629775276","0.35156176000955314","0.3519023270261265","0.3528916179200212","0.35409161420668545","0.356162056262963","0.35693330326162703","0.3563907953585324","0.35750984328530744","0.35767252929986604","0.35751711842440254","0.3559296747144092","0.3552287744993348","0.35424119924163017","0.35426970667801305","0.3544835447108064","0.3556477875856247","0.3555272621653501","0.3536040900503226","0.3522864243698987","0.35342214024999324","0.3531300840188512","0.35199815230501635","0.3515574139257525"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/TpHE2IShQw-sJ+algorand-algo","24hVolume":"130856381","btcPrice":"0.000017495191596677"},{"uuid":"f3iaFeCKEmkaZ","symbol":"XLM","name":"Stellar","color":"#000000","iconUrl":"https://cdn.coinranking.com/78CxK1xsp/Stellar_symbol_black_RGB.svg","marketCap":"2431418240","price":"0.12033433491018217","listedAt":1484611200,"tier":1,"change":"0.59","rank":27,"sparkline":["0.1195260301967084","0.11922377222555086","0.11889747925878968","0.11895767320851787","0.11904150834797811","0.11902199852210672","0.11927188129997995","0.1193386399802927","0.11934469276243408","0.1196520921041987","0.11983688261385989","0.11932664504934419","0.1189486925609691","0.11915744015413951","0.11884381325504743","0.11876793181027388","0.11864502471222689","0.11951152511302865","0.11981668758909333","0.11922777945229743","0.11945253111942053","0.11959700069285915","0.11981501834328642","0.12021090161849994","0.12013793492697233"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/f3iaFeCKEmkaZ+stellar-xlm","24hVolume":"229931055","btcPrice":"0.000006006495746584"},{"uuid":"ZlZpzOJo43mIo","symbol":"BCH","name":"Bitcoin Cash","color":"#8dc451","iconUrl":"https://cdn.coinranking.com/By8ziihX7/bch.svg","marketCap":"2298685012","price":"120.15247314383501","listedAt":1541808000,"tier":1,"change":"-2.13","rank":28,"sparkline":["122.79003231799453","122.34811455233557","122.31669276815146","122.20221632323882","122.27062280612596","122.55422874145354","123.18638724378391","123.08308366724447","122.75420528237959","122.64408519732375","122.29556101291895","121.67236415586021","121.10544288205719","121.04504869309605","121.30404553315167","121.30303820200477","121.43046725720312","121.68614678410228","121.9273629393347","121.63557758204253","120.69086187559425","121.05219068057347","120.77379521545822","120.74184776630722","120.47330639994128"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/ZlZpzOJo43mIo+bitcoincash-bch","24hVolume":"243918154","btcPrice":"0.005997418105303303"},{"uuid":"9_jH48RBW","symbol":"BTCB","name":"Bitcoin BEP2","color":"#ff9d14","iconUrl":"https://cdn.coinranking.com/Swr_SeZio/4023.png","marketCap":"2260827347","price":"20096.064448414432","listedAt":1629334963,"tier":1,"change":"-0.45","rank":29,"sparkline":["20226.297674290618","20159.180975583204","20062.922923808146","20068.861677407906","20151.07969183831","20194.09983970884","20305.40629467228","20343.061967792306","20336.436454110953","20366.199044829194","20353.223182216174","20294.402282813175","20238.01608382747","20233.25380863164","20160.916584584917","20152.88922538551","20140.29502589623","20175.92975562192","20229.44513448951","20163.555033087247","20003.59217876438","20057.077811662642","20036.164413639184","20082.64188169797","20107.545241449607"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/9_jH48RBW+bitcoinbep2-btcb","24hVolume":"3499085","btcPrice":"1.0030962960203273"},{"uuid":"DCrsaMv68","symbol":"NEAR","name":"NEAR Protocol","color":"#000000","iconUrl":"https://cdn.coinranking.com/Cth83dCnl/near.png","marketCap":"2216548010","price":"3.646571816207654","listedAt":1615164591,"tier":1,"change":"-1.58","rank":30,"sparkline":["3.709248943987382","3.6872974570335644","3.676484006822928","3.6852601908489664","3.6962394641805405","3.703159890046674","3.7307432286844002","3.7313215421676786","3.7270747900297017","3.7312649322104274","3.719144760199497","3.6910824300924796","3.6716231360233196","3.6725817207939535","3.6780481709780166","3.683119368713513","3.6742315532987937","3.6836039895069597","3.6859906515435994","3.665004753763338","3.6452350795556825","3.6544259528384853","3.6500306634153326","3.6565192827127024","3.6525801551208805"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/DCrsaMv68+nearprotocol-near","24hVolume":"245143069","btcPrice":"0.000182018857045346"},{"uuid":"65PHZTpmE55b","symbol":"CRO","name":"Cronos","color":"#01275d","iconUrl":"https://cdn.coinranking.com/2o91jm73M/cro.svg","marketCap":"2209938585","price":"0.1098819722657797","listedAt":1548953220,"tier":1,"change":"-0.33","rank":31,"sparkline":["0.11032801586542061","0.10976151233359543","0.10961438985623642","0.1098841249543377","0.11025473159449753","0.11062336581339045","0.11096926990753721","0.11112616986390883","0.11111054399289587","0.11123574172601472","0.11099926911576126","0.11063982901865921","0.1105017752527065","0.1105127376907447","0.11016448384988357","0.11017585646986554","0.11019175370790078","0.11058733542807475","0.11073578614255948","0.11045619900365686","0.11008749281105315","0.11024440832701132","0.1101715006911389","0.11037985746137138","0.1101561144619121"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/65PHZTpmE55b+cronos-cro","24hVolume":"28718123","btcPrice":"0.000005484765420719"},{"uuid":"AaQUAs2Mc","symbol":"LUNC","name":"Terra Classic","color":"#0E3CA5","iconUrl":"https://cdn.coinranking.com/F-PJdF8Um/LUNA.svg","marketCap":"1915669239","price":"0.000290659173216565","listedAt":1565957940,"tier":1,"change":"-2.39","rank":32,"sparkline":["0.00029894061853861","0.000299845576426398","0.000297671672254111","0.000298963973156913","0.000301720935856393","0.000300113265231995","0.000298930284162236","0.000301416052150239","0.000303244352601534","0.000301825527661809","0.00030045732086974","0.000299635878097677","0.000296355988473923","0.000294095105751322","0.000296180797972324","0.000295905252385445","0.000296203503981859","0.000296728265002539","0.000296686191241626","0.000295429183489837","0.000295182926966483","0.000295951772891279","0.000294465267086072","0.000292607954462553","0.000290882393735087"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/AaQUAs2Mc+terraclassic-lunc","24hVolume":"83449839","btcPrice":"1.4508270552e-8"},{"uuid":"08CsQa-Ov","symbol":"WEMIX","name":"WEMIX TOKEN","color":"#9bdc70","iconUrl":"https://cdn.coinranking.com/1N84MQsoO/7548.png","marketCap":"1804540451","price":"1.8045404510367549","listedAt":1638249982,"tier":1,"change":"-1.23","rank":33,"sparkline":["1.8278016794430552","1.8284835865282176","1.8205505524134962","1.8242876171474678","1.8291343031327176","1.8320876869529952","1.839386569721581","1.834064344910821","1.8333753181908716","1.8376513295883161","1.840233968382716","1.8324791678774568","1.8240655212809676","1.8134872594840754","1.812048584709326","1.8106038800425508","1.805623798931431","1.8156531823539699","1.82100176061989","1.816823315014094","1.8064429950814493","1.8192075219807147","1.8157736829687288","1.8117455542950611","1.8138451641871651"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/08CsQa-Ov+wemixtoken-wemix","24hVolume":"12181006","btcPrice":"0.000090073747877368"},{"uuid":"QQ0NCmjVq","symbol":"FLOW","name":"Flow","color":"#9efad7","iconUrl":"https://cdn.coinranking.com/xh8X8QBss/flow.png","marketCap":"1759936154","price":"1.698452184582722","listedAt":1614963736,"tier":1,"change":"0.75","rank":34,"sparkline":["1.6909292581718869","1.6877695632159755","1.6879637940199872","1.6907794219662977","1.6944343024351958","1.7026071417666502","1.7114262181583197","1.7143682061268322","1.7143997727258644","1.7187065908839465","1.7113103990166811","1.706894909097403","1.6993734245758296","1.7008834097899754","1.697882077989971","1.6941293798653492","1.6913106682283696","1.6988464733936905","1.7015288793320946","1.6921043682242245","1.6851775401563334","1.699772554484989","1.7002371517372683","1.705059319771799","1.7056829152482984"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/QQ0NCmjVq+flow-flow","24hVolume":"47891769","btcPrice":"0.000084778345516153"},{"uuid":"SbWqqTui-","symbol":"ENS","name":"EnergySwap","color":"#ffda55","iconUrl":"https://cdn.coinranking.com/fmYxEUV5a/cropped-logo37-Converted-01-192x192.png","marketCap":"1704218243","price":"17.04218243105481","listedAt":1626134763,"tier":1,"change":"-0.57","rank":35,"sparkline":["17.26630021787606","17.194362151538677","17.081778286859773","17.067893912066662","17.159396834446234","17.409304028654628","17.350424599499906","17.386714429272285","17.38858738165633","17.59776912523738","17.615975294855826","17.448303583422675","17.31657323097496","17.445873550462984","17.338887699046754","17.36558093496022","17.372866013120248","17.36369622256484","17.424026622380484","17.353080080729807","17.372907767169618","17.571798069309555","17.419730662133198","17.376506591149386","17.195781226996747"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/SbWqqTui-+energyswap-ens","24hVolume":"15591257","btcPrice":"0.000850264696071361"},{"uuid":"ymQub4fuB","symbol":"FIL","name":"Filecoin","color":"#0090ff","iconUrl":"https://cdn.coinranking.com/vUmvv-IQA/FIL3-filecoin.svg?size=48x48","marketCap":"1626038546","price":"5.532489021840677","listedAt":1602839473,"tier":1,"change":"-0.79","rank":36,"sparkline":["5.59535705665963","5.582796770582658","5.564490867810681","5.566111951296787","5.573081005993705","5.597638107569036","5.622372212071733","5.621678478547102","5.635046338359381","5.636819831411602","5.621680148394719","5.606495156648643","5.593259801519004","5.594321035269435","5.579378103824905","5.572378988492663","5.568160819553415","5.583463727626935","5.589903056085146","5.574228193644804","5.554314461406937","5.567097256685896","5.5581398364294365","5.558948879985852","5.546794954677992"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/ymQub4fuB+filecoin-fil","24hVolume":"145048762","btcPrice":"0.000276154530645893"},{"uuid":"aMNLwaUbY","symbol":"ICP","name":"Internet Computer (DFINITY)","color":"#00042b","iconUrl":"https://cdn.coinranking.com/1uJ_RVrmC/dfinity-icp.png","marketCap":"1585159845","price":"6.036243406096277","listedAt":1601555742,"tier":1,"change":"0.56","rank":37,"sparkline":["6.0258496993721655","6.024013676992237","6.017430234811706","6.02397822813975","6.026022506481912","6.036706330465778","6.0617952393602765","6.082059364245906","6.119003490105678","6.121522161601521","6.114804820768077","6.099161118790063","6.061474753532823","6.058493612280049","6.044494712184807","6.042534641314195","6.031355333042851","6.045013034529635","6.057593651718467","6.044433476362681","6.030019066888978","6.030841874388808","6.0277264157453025","6.042503096070975","6.044307029394635"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/aMNLwaUbY+internetcomputerdfinity-icp","24hVolume":"33262919","btcPrice":"0.000301299461796363"},{"uuid":"FEbS54wxo4oIl","symbol":"VET","name":"VeChain","color":"#4bc0fa","iconUrl":"https://cdn.coinranking.com/B1_TDu9Dm/VEN.svg","marketCap":"1573352436","price":"0.023567030637523044","listedAt":1533427200,"tier":1,"change":"-1.25","rank":38,"sparkline":["0.023845399405459933","0.023779417756895748","0.0237503648773653","0.023780799909472596","0.023856466417581195","0.02395339578538322","0.024027726003664374","0.02406287804956785","0.024029150650035552","0.02403165474416971","0.024007492514989702","0.023892749313038426","0.02379348575193527","0.023832374059395464","0.023815739677309912","0.023779423448940625","0.023736409723578464","0.023842146312866533","0.02390356478916241","0.023807572304941245","0.023672849299184874","0.023745231289912128","0.023678432475945806","0.023675787092202465","0.023626426270830576"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/FEbS54wxo4oIl+vechain-vet","24hVolume":"101281536","btcPrice":"0.000001176349787362"},{"uuid":"ncYFcP709","symbol":"CAKE","name":"PancakeSwap","color":"#fe9555","iconUrl":"https://cdn.coinranking.com/aRtgdw7bQ/pancakeswap-cake-logo.png","marketCap":"1569894949","price":"4.7202799315248845","listedAt":1613642379,"tier":1,"change":"0.54","rank":39,"sparkline":["4.697656474890724","4.671620835696077","4.661700930843492","4.662153786655901","4.669629519650637","4.6965206988350126","4.729693628603321","4.7140657358610465","4.72362675311866","4.726446209779176","4.717613624950668","4.704697941989018","4.69791612657912","4.703785740874498","4.692788824207762","4.680888740501139","4.684984283524298","4.71775465500595","4.725911539807403","4.712165753049669","4.718042402139693","4.727909952082804","4.726141210207868","4.729976625030199","4.726221847710046"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/ncYFcP709+pancakeswap-cake","24hVolume":"40295542","btcPrice":"0.000235613063823811"},{"uuid":"tEf7-dnwV3BXS","symbol":"MANA","name":"Decentraland","color":"#f47e33","iconUrl":"https://cdn.coinranking.com/ph_svUzXs/decentraland(1).svg","marketCap":"1534611478","price":"0.699617588094656","listedAt":1500336000,"tier":1,"change":"-0.59","rank":40,"sparkline":["0.7062418717505824","0.7036912257786649","0.701977034723851","0.7011237829156313","0.7022081935423256","0.704347215334535","0.7057336965233337","0.7090636534769581","0.7106615358646469","0.7109962681888046","0.7099719076767776","0.7082023207228123","0.7049698949346435","0.707375174193511","0.7053874976507782","0.7047133247052391","0.7038908739017045","0.705913915399678","0.7066603198538087","0.704152500023909","0.7011182119991161","0.7015764522297463","0.7002294758773082","0.7007134228587633","0.7002642899388526"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/tEf7-dnwV3BXS+decentraland-mana","24hVolume":"154880100","btcPrice":"0.000034921455046577"},{"uuid":"Z96jIvLU7","symbol":"IMX","name":"Immutable X","color":"#000000","iconUrl":"https://cdn.coinranking.com/naRGT2Y_X/10603.png","marketCap":"1528362630","price":"0.7641813151403928","listedAt":1649387294,"tier":1,"change":"-3.53","rank":41,"sparkline":["0.7929256499253894","0.7888051736513645","0.7863788485157178","0.7855541947236996","0.7859794469303182","0.7910897411189671","0.793054017744364","0.7920608982909317","0.7932732662277912","0.7937358349094242","0.7899013972015532","0.7873715826948282","0.7829790811061864","0.783269981243268","0.7815344726475157","0.7785425088136787","0.7746500459118211","0.7787006394598114","0.7794923142833631","0.7752303701345216","0.7718252823278199","0.7719711766718481","0.7698820834493335","0.7677390997262953","0.766444073193977"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/Z96jIvLU7+immutablex-imx","24hVolume":"39048847","btcPrice":"0.000038144157462918"},{"uuid":"jad286TjB","symbol":"HBAR","name":"Hedera","color":"#000000","iconUrl":"https://cdn.coinranking.com/dSCnSLilQ/hedera.svg","marketCap":"1411496908","price":"0.05797665954092875","listedAt":1568704980,"tier":1,"change":"0.14","rank":42,"sparkline":["0.057987549534873575","0.05775585952323003","0.057704389710771006","0.057720764112458633","0.05789434173084646","0.05809746344437125","0.058189441306718125","0.05837589581493919","0.058390643995986855","0.05842359197073168","0.058297064663280294","0.05820470132737367","0.0580770804543927","0.05815299545747791","0.05810249319975141","0.05804441712201078","0.05806727832929762","0.05821768851814514","0.05829566804378026","0.05828163498221988","0.05798391287623929","0.058043633564482264","0.058011070179240766","0.05808354148641326","0.05805972541186593"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/jad286TjB+hedera-hbar","24hVolume":"39024129","btcPrice":"0.000002893908535695"},{"uuid":"KfWtaeV1W","symbol":"FRAX","name":"Frax","color":"#000000","iconUrl":"https://cdn.coinranking.com/BpVNCX-NM/frax.png","marketCap":"1358826954","price":"1.0005605770134882","listedAt":1615299931,"tier":1,"change":"0.12","rank":43,"sparkline":["0.9992267752453355","1.0001726269660145","1.0000268231187786","0.9993388779781252","0.9994407930086252","0.9986229045501516","0.9990744412957507","0.9990768091269389","0.999533163749183","0.9992798589768088","0.9998864958466837","1.0002316433678111","0.9997532610148976","0.9998490462219642","0.9997971392980437","0.9997432371796496","0.9993632714074973","0.9989467838306688","0.9999301859278275","1.0004243854982815","1.0003751828101939","0.9992738011961465","0.9997614302328243","0.9992973524200179","0.9997753063108105"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/KfWtaeV1W+frax-frax","24hVolume":"3749885","btcPrice":"0.000049943042893922"},{"uuid":"bauj_21eYVwso","symbol":"QNT","name":"Quant","color":"#585e63","iconUrl":"https://cdn.coinranking.com/a-i9Dl392/quant.png","marketCap":"1354696872","price":"138.55622101984102","listedAt":1533945600,"tier":1,"change":"0.60","rank":44,"sparkline":["137.60236636979457","137.2014469492855","136.86641854250846","137.61943864188262","138.02288004406574","138.71450262820792","139.15753412769195","139.0288846982766","139.1402037166419","138.93629469593716","138.16451460952393","137.36487381286946","137.39695856925007","139.42777188017604","138.9898954474634","139.22872265988386","139.535730109657","140.68449473037566","140.08245100411327","139.61571125671037","139.09062808458668","139.59831707065243","139.40279972120157","139.02719655523083","139.0767096899866"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/bauj_21eYVwso+quant-qnt","24hVolume":"45593188","btcPrice":"0.006916042315267466"},{"uuid":"fsIbGOEJWbzxG","symbol":"XTZ","name":"Tezos","color":"#2c7df7","iconUrl":"https://cdn.coinranking.com/HkLUdilQ7/xtz.svg","marketCap":"1300122586","price":"1.4315589884463442","listedAt":1530662400,"tier":1,"change":"0.25","rank":45,"sparkline":["1.430397215546374","1.4266302917567777","1.422154065982087","1.4244295761005363","1.4277505791732141","1.4331687835452782","1.443452302749013","1.44654853894898","1.4430883131864","1.4486591676627363","1.4453351430074377","1.4406990621963756","1.4358193191734254","1.436525145874335","1.4344049333357989","1.433572195187031","1.4324776156964327","1.4377996834009625","1.439997761210823","1.4337627996067135","1.424354313001366","1.4251526628835012","1.4217217453444855","1.4265670483494004","1.430973763784687"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/fsIbGOEJWbzxG+tezos-xtz","24hVolume":"28561964","btcPrice":"0.000071456355174977"},{"uuid":"omwkOTglq","symbol":"EGLD","name":"Elrond","color":"#000000","iconUrl":"https://cdn.coinranking.com/X62ruAuZQ/Elrond.svg","marketCap":"1295380899","price":"54.826226539392806","listedAt":1612524044,"tier":1,"change":"0.29","rank":46,"sparkline":["54.78182751537088","54.623130667418366","54.53200689084205","54.12891435002389","54.19623024858422","54.633815523213606","55.27290146147566","55.13168195216286","55.385084460868484","55.204117457272815","55.02695582682979","54.88507503357054","54.622210796648005","54.68371878464479","54.97054215534175","55.13258046932118","55.11985989110122","55.09683804375179","55.09201238607855","54.889034734282475","54.82661120319219","55.03289232182354","55.32821889622037","55.09630153988564","54.81917251126187"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/omwkOTglq+elrond-egld","24hVolume":"51421466","btcPrice":"0.002736654478174479"},{"uuid":"GSCt2y6YSgO26","symbol":"CHZ","name":"Chiliz","color":"#d05e72","iconUrl":"https://cdn.coinranking.com/gTsOlSnwR/4066.png","marketCap":"1280466097","price":"0.21553501546254625","listedAt":1562332440,"tier":1,"change":"-0.10","rank":47,"sparkline":["0.21667322581840753","0.2171849304008596","0.2156861139378023","0.21533849342523834","0.21637084202032117","0.2172780853626793","0.2185663393777442","0.21930091082116046","0.21987321663135242","0.21925549598692895","0.218446742092016","0.21799923484351233","0.21707908782693836","0.2162304888287678","0.21564396344092862","0.2160322377313941","0.2156629628227058","0.2160998394185173","0.21616476056443742","0.2150659594569372","0.21484265293098417","0.21685269247547745","0.2174694851304847","0.2169941909375626","0.21640186406857279"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/GSCt2y6YSgO26+chiliz-chz","24hVolume":"175986297","btcPrice":"0.000010758443586213"},{"uuid":"pxtKbG5rg","symbol":"SAND","name":"The Sandbox","color":"#00adef","iconUrl":"https://cdn.coinranking.com/kd_vwOcnI/sandbox.png","marketCap":"1269843640","price":"0.8468615339383961","listedAt":1613583024,"tier":1,"change":"-2.09","rank":48,"sparkline":["0.8655783961108249","0.8655726139511055","0.8593672603083095","0.8592673257045527","0.8609659832018245","0.8648971108758887","0.8663731911826474","0.8667122213039231","0.8663886523811145","0.8668792238690509","0.8649624385349067","0.8611180516082279","0.8585057527325253","0.8659888879718258","0.8604300437005915","0.8554219297700761","0.8526286745187818","0.85555673582445","0.857162179096966","0.8538331404270197","0.8499300848374965","0.8520164372728138","0.8508491562189808","0.8511376364605714","0.8492230247050839"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/pxtKbG5rg+thesandbox-sand","24hVolume":"80976580","btcPrice":"0.000042271145682095"},{"uuid":"Pe93bIOD2","symbol":"LDO","name":"Lido DAO Token","color":"#77cced","iconUrl":"https://cdn.coinranking.com/Wp6LFY6ZZ/8000.png","marketCap":"1215487024","price":"1.5111939904852973","listedAt":1627361901,"tier":1,"change":"-0.14","rank":49,"sparkline":["1.525296480481106","1.5182401826410314","1.5152205100915535","1.5169429140699267","1.52442883963002","1.5352051807886449","1.5507771914692972","1.5584198947059793","1.5611709741306992","1.5622734158186","1.563158380319883","1.5530023128237487","1.5397020867989386","1.5415040661271822","1.5390596625673671","1.5500393853481451","1.5580781625747462","1.560482136152978","1.5593445744690575","1.5496829584461165","1.527032995000603","1.530110226331719","1.5254217630287106","1.5246506775339332","1.5185082563785788"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/Pe93bIOD2+lidodaotoken-ldo","24hVolume":"15476150","btcPrice":"0.000075431341211865"},{"uuid":"iAzbfXiBBKkR6","symbol":"EOS","name":"EOS","color":"#443f54","iconUrl":"https://cdn.coinranking.com/PqOYrWSje/eos2.svg","marketCap":"1157673158","price":"1.1711233536912673","listedAt":1498694400,"tier":1,"change":"-0.13","rank":50,"sparkline":["1.176159663996107","1.1722544811098015","1.1694363470738518","1.1705864439187568","1.1738525342149835","1.178558922119085","1.1837969319466126","1.1858090386610416","1.1862130969952875","1.1884443612524698","1.1872550267419892","1.1834269966357152","1.177571251432726","1.1762334557746148","1.176819224133604","1.1773006391443017","1.1797207072466058","1.1826694645707552","1.1833296312782675","1.1795247040200163","1.1762826971957536","1.1778133333859857","1.175329899238845","1.175643537233567","1.1736718406064062"],"lowVolume":false,"coinrankingUrl":"https://coinranking.com/coin/iAzbfXiBBKkR6+eos-eos","24hVolume":"147663390","btcPrice":"0.000058456694408307"}]}}
Formatting Digital Coin example
JSON text transferred from the API in the previous cell was converted to a Python Dictionary called json. The "coins" in the dictionary contain a list of the most relevant data. Look at the code and comments to see how the original text is turned into something understandable. Additionally, there are error check to make sure we are starting the code with the expectation that the API was run correctly.
"""
This cell is dependent on valid run of API above.
- try and except code is making sure "json" was properly run above
- inside second try is code that is used to process Coin API data
Note. Run this cell repeatedly to format data without re-activating API
"""
try:
print("JSON data is Python type: " + str(type(json)))
try:
# Extracting Coins JSON status, if the API worked
status = json.get('status')
print("API status: " + status)
print()
# Extracting Coins JSON data, data about the coins
data = json.get('data')
# Procedural abstraction of Print code for coins
def print_coin(c):
print(c["symbol"], c["price"])
print("Icon Url: " + c["iconUrl"])
print("Rank Url: " + c["coinrankingUrl"])
# Coins data was observed to be a list
for coin in data['coins']:
print_coin(coin)
print()
except:
print("Did you insert a valid key in X-RapidAPI-Key of API cell above?")
print(json)
except:
print("This cell is dependent on running API call in cell above!")
JSON data is Python type: <class 'dict'> API status: success BTC 20034.033151296964 Icon Url: https://cdn.coinranking.com/bOabBYkcX/bitcoin_btc.svg Rank Url: https://coinranking.com/coin/Qwsogvtv82FCd+bitcoin-btc ETH 1357.8576774509995 Icon Url: https://cdn.coinranking.com/rk4RKHOuW/eth.svg Rank Url: https://coinranking.com/coin/razxDUgYGNAdQ+ethereum-eth USDT 1.0016985066777537 Icon Url: https://cdn.coinranking.com/mgHqwlCLj/usdt.svg Rank Url: https://coinranking.com/coin/HIVsRcGKkPFtW+tetherusd-usdt USDC 1.0012371333410857 Icon Url: https://cdn.coinranking.com/jkDf8sQbY/usdc.svg Rank Url: https://coinranking.com/coin/aKzUVe4Hh_CON+usdc-usdc BNB 293.1336566398893 Icon Url: https://cdn.coinranking.com/B1N19L_dZ/bnb.svg Rank Url: https://coinranking.com/coin/WcwrkfNI4FUAe+binancecoin-bnb XRP 0.49605531069295133 Icon Url: https://cdn.coinranking.com/B1oPuTyfX/xrp.svg Rank Url: https://coinranking.com/coin/-l8Mn2pVlRs-p+xrp-xrp BUSD 1.001656814275489 Icon Url: https://cdn.coinranking.com/6SJHRfClq/busd.svg Rank Url: https://coinranking.com/coin/vSo2fu9iE1s0Y+binanceusd-busd ADA 0.4286883755996844 Icon Url: https://cdn.coinranking.com/ryY28nXhW/ada.svg Rank Url: https://coinranking.com/coin/qzawljRxB5bYu+cardano-ada SOL 33.680808340498636 Icon Url: https://cdn.coinranking.com/yvUG4Qex5/solana.svg Rank Url: https://coinranking.com/coin/zNZHO_Sjf+solana-sol DOGE 0.06373815293060064 Icon Url: https://cdn.coinranking.com/H1arXIuOZ/doge.svg Rank Url: https://coinranking.com/coin/a91GCGd_u96cF+dogecoin-doge MATIC 0.8410948431615639 Icon Url: https://cdn.coinranking.com/WulYRq14o/polygon.png Rank Url: https://coinranking.com/coin/uW2tk-ILY0ii+polygon-matic DOT 6.3710898298483825 Icon Url: https://cdn.coinranking.com/RsljYqnbu/polkadot.svg Rank Url: https://coinranking.com/coin/25W7FG7om+polkadot-dot SHIB 0.000011284194864331 Icon Url: https://cdn.coinranking.com/D69LfI-tm/shib.png Rank Url: https://coinranking.com/coin/xz24e0BjL+shibainu-shib DAI 1.0007285765928384 Icon Url: https://cdn.coinranking.com/mAZ_7LwOE/mutli-collateral-dai.svg Rank Url: https://coinranking.com/coin/MoTuySvg7+dai-dai TRX 0.06256065764605483 Icon Url: https://cdn.coinranking.com/behejNqQs/trx.svg Rank Url: https://coinranking.com/coin/qUhEFk1I61atv+tron-trx WETH 1358.9816391781385 Icon Url: https://cdn.coinranking.com/KIviQyZlt/weth.svg Rank Url: https://coinranking.com/coin/Mtfb0obXVh59u+wrappedether-weth UNI 6.877484884629705 Icon Url: https://cdn.coinranking.com/1heSvUgtl/uniswap-v2.svg?size=48x48 Rank Url: https://coinranking.com/coin/_H5FVG9iW+uniswap-uni AVAX 17.15389336350206 Icon Url: https://cdn.coinranking.com/S0C6Cw2-w/avax-avalanche.png Rank Url: https://coinranking.com/coin/dvUj0CzDZ+avalanche-avax WBTC 20044.090315101737 Icon Url: https://cdn.coinranking.com/o3-8cvCHu/wbtc[1].svg Rank Url: https://coinranking.com/coin/x4WXHge-vvFY+wrappedbtc-wbtc ATOM 13.167310250233948 Icon Url: https://cdn.coinranking.com/HJzHboruM/atom.svg Rank Url: https://coinranking.com/coin/Knsels4_Ol-Ny+cosmos-atom OKB 15.650548603354789 Icon Url: https://cdn.coinranking.com/xcZdYtX6E/okx.png Rank Url: https://coinranking.com/coin/PDKcptVnzJTmN+okb-okb LTC 54.02640985263028 Icon Url: https://cdn.coinranking.com/BUvPxmc9o/ltcnew.svg Rank Url: https://coinranking.com/coin/D7B1x_ks7WhV5+litecoin-ltc FTT 24.685013933924868 Icon Url: https://cdn.coinranking.com/WyBm4_EzM/ftx-exchange.svg Rank Url: https://coinranking.com/coin/NfeOYfNcl+ftxtoken-ftt ETC 27.945166401195422 Icon Url: https://cdn.coinranking.com/rJfyor__W/etc.svg Rank Url: https://coinranking.com/coin/hnfQfsYfeIGUQ+ethereumclassic-etc XMR 145.0121440359217 Icon Url: https://cdn.coinranking.com/Syz-oSd_Z/xmr.svg Rank Url: https://coinranking.com/coin/3mVx2FX_iJFp5+monero-xmr ALGO 0.3504992484361217 Icon Url: https://cdn.coinranking.com/lzbmCkUGB/algo.svg Rank Url: https://coinranking.com/coin/TpHE2IShQw-sJ+algorand-algo XLM 0.12033433491018217 Icon Url: https://cdn.coinranking.com/78CxK1xsp/Stellar_symbol_black_RGB.svg Rank Url: https://coinranking.com/coin/f3iaFeCKEmkaZ+stellar-xlm BCH 120.15247314383501 Icon Url: https://cdn.coinranking.com/By8ziihX7/bch.svg Rank Url: https://coinranking.com/coin/ZlZpzOJo43mIo+bitcoincash-bch BTCB 20096.064448414432 Icon Url: https://cdn.coinranking.com/Swr_SeZio/4023.png Rank Url: https://coinranking.com/coin/9_jH48RBW+bitcoinbep2-btcb NEAR 3.646571816207654 Icon Url: https://cdn.coinranking.com/Cth83dCnl/near.png Rank Url: https://coinranking.com/coin/DCrsaMv68+nearprotocol-near CRO 0.1098819722657797 Icon Url: https://cdn.coinranking.com/2o91jm73M/cro.svg Rank Url: https://coinranking.com/coin/65PHZTpmE55b+cronos-cro LUNC 0.000290659173216565 Icon Url: https://cdn.coinranking.com/F-PJdF8Um/LUNA.svg Rank Url: https://coinranking.com/coin/AaQUAs2Mc+terraclassic-lunc WEMIX 1.8045404510367549 Icon Url: https://cdn.coinranking.com/1N84MQsoO/7548.png Rank Url: https://coinranking.com/coin/08CsQa-Ov+wemixtoken-wemix FLOW 1.698452184582722 Icon Url: https://cdn.coinranking.com/xh8X8QBss/flow.png Rank Url: https://coinranking.com/coin/QQ0NCmjVq+flow-flow ENS 17.04218243105481 Icon Url: https://cdn.coinranking.com/fmYxEUV5a/cropped-logo37-Converted-01-192x192.png Rank Url: https://coinranking.com/coin/SbWqqTui-+energyswap-ens FIL 5.532489021840677 Icon Url: https://cdn.coinranking.com/vUmvv-IQA/FIL3-filecoin.svg?size=48x48 Rank Url: https://coinranking.com/coin/ymQub4fuB+filecoin-fil ICP 6.036243406096277 Icon Url: https://cdn.coinranking.com/1uJ_RVrmC/dfinity-icp.png Rank Url: https://coinranking.com/coin/aMNLwaUbY+internetcomputerdfinity-icp VET 0.023567030637523044 Icon Url: https://cdn.coinranking.com/B1_TDu9Dm/VEN.svg Rank Url: https://coinranking.com/coin/FEbS54wxo4oIl+vechain-vet CAKE 4.7202799315248845 Icon Url: https://cdn.coinranking.com/aRtgdw7bQ/pancakeswap-cake-logo.png Rank Url: https://coinranking.com/coin/ncYFcP709+pancakeswap-cake MANA 0.699617588094656 Icon Url: https://cdn.coinranking.com/ph_svUzXs/decentraland(1).svg Rank Url: https://coinranking.com/coin/tEf7-dnwV3BXS+decentraland-mana IMX 0.7641813151403928 Icon Url: https://cdn.coinranking.com/naRGT2Y_X/10603.png Rank Url: https://coinranking.com/coin/Z96jIvLU7+immutablex-imx HBAR 0.05797665954092875 Icon Url: https://cdn.coinranking.com/dSCnSLilQ/hedera.svg Rank Url: https://coinranking.com/coin/jad286TjB+hedera-hbar FRAX 1.0005605770134882 Icon Url: https://cdn.coinranking.com/BpVNCX-NM/frax.png Rank Url: https://coinranking.com/coin/KfWtaeV1W+frax-frax QNT 138.55622101984102 Icon Url: https://cdn.coinranking.com/a-i9Dl392/quant.png Rank Url: https://coinranking.com/coin/bauj_21eYVwso+quant-qnt XTZ 1.4315589884463442 Icon Url: https://cdn.coinranking.com/HkLUdilQ7/xtz.svg Rank Url: https://coinranking.com/coin/fsIbGOEJWbzxG+tezos-xtz EGLD 54.826226539392806 Icon Url: https://cdn.coinranking.com/X62ruAuZQ/Elrond.svg Rank Url: https://coinranking.com/coin/omwkOTglq+elrond-egld CHZ 0.21553501546254625 Icon Url: https://cdn.coinranking.com/gTsOlSnwR/4066.png Rank Url: https://coinranking.com/coin/GSCt2y6YSgO26+chiliz-chz SAND 0.8468615339383961 Icon Url: https://cdn.coinranking.com/kd_vwOcnI/sandbox.png Rank Url: https://coinranking.com/coin/pxtKbG5rg+thesandbox-sand LDO 1.5111939904852973 Icon Url: https://cdn.coinranking.com/Wp6LFY6ZZ/8000.png Rank Url: https://coinranking.com/coin/Pe93bIOD2+lidodaotoken-ldo EOS 1.1711233536912673 Icon Url: https://cdn.coinranking.com/PqOYrWSje/eos2.svg Rank Url: https://coinranking.com/coin/iAzbfXiBBKkR6+eos-eos
import requests
url = "https://dad-jokes.p.rapidapi.com/random/joke"
headers = {
"X-RapidAPI-Key": "3caeff5409mshc2c175f29a5e775p13d7f9jsne72bfb6ce7e5",
"X-RapidAPI-Host": "dad-jokes.p.rapidapi.com"
}
x = 1
#while x <= 4:
# response = requests.request("GET", url, headers=headers)
# print(response.text)
response = requests.request("GET", url, headers=headers)
print(response.text)
#print('A few dad jokes for your consideration')
data = response.json().get('body') # turn response to json() so we can extract "body"
setup = response.json().get('setup')
#punchline = response.json().get('punchline')
# while x <= 10:
# print(setup,punchline)
# x = x + 1
#print(setup,punchline)
while x <= 2:
json_formatted_str = json.dumps(data ["data"], indent=4)
print (json_formatted_str)
x = x+1
{"success":true,"body":[{"_id":"60dd3705e947792acd62ea0b","setup":"Anyone know the score in the Nigeria Ethiopia footy match?","punchline":"Nigeria 8 - Ethiopia Didn't","type":"nigeria","likes":[],"author":{"name":"unknown","id":null},"approved":true,"date":1618108661,"NSFW":false,"shareableLink":"https://dadjokes.io/joke/60dd3705e947792acd62ea0b"}]}
--------------------------------------------------------------------------- NameError Traceback (most recent call last) /Users/gianninaortegarico/vscode/Timeline/_notebooks/2022-10-03-PBL-python_rapidapi.ipynb Cell 10 in <cell line: 30>() <a href='vscode-notebook-cell:/Users/gianninaortegarico/vscode/Timeline/_notebooks/2022-10-03-PBL-python_rapidapi.ipynb#X11sZmlsZQ%3D%3D?line=22'>23</a> #punchline = response.json().get('punchline') <a href='vscode-notebook-cell:/Users/gianninaortegarico/vscode/Timeline/_notebooks/2022-10-03-PBL-python_rapidapi.ipynb#X11sZmlsZQ%3D%3D?line=23'>24</a> # while x <= 10: <a href='vscode-notebook-cell:/Users/gianninaortegarico/vscode/Timeline/_notebooks/2022-10-03-PBL-python_rapidapi.ipynb#X11sZmlsZQ%3D%3D?line=24'>25</a> # print(setup,punchline) <a href='vscode-notebook-cell:/Users/gianninaortegarico/vscode/Timeline/_notebooks/2022-10-03-PBL-python_rapidapi.ipynb#X11sZmlsZQ%3D%3D?line=25'>26</a> # x = x + 1 <a href='vscode-notebook-cell:/Users/gianninaortegarico/vscode/Timeline/_notebooks/2022-10-03-PBL-python_rapidapi.ipynb#X11sZmlsZQ%3D%3D?line=26'>27</a> <a href='vscode-notebook-cell:/Users/gianninaortegarico/vscode/Timeline/_notebooks/2022-10-03-PBL-python_rapidapi.ipynb#X11sZmlsZQ%3D%3D?line=27'>28</a> #print(setup,punchline) <a href='vscode-notebook-cell:/Users/gianninaortegarico/vscode/Timeline/_notebooks/2022-10-03-PBL-python_rapidapi.ipynb#X11sZmlsZQ%3D%3D?line=29'>30</a> while x <= 2: ---> <a href='vscode-notebook-cell:/Users/gianninaortegarico/vscode/Timeline/_notebooks/2022-10-03-PBL-python_rapidapi.ipynb#X11sZmlsZQ%3D%3D?line=30'>31</a> json_formatted_str = json.dumps(data ["data"], indent=4) <a href='vscode-notebook-cell:/Users/gianninaortegarico/vscode/Timeline/_notebooks/2022-10-03-PBL-python_rapidapi.ipynb#X11sZmlsZQ%3D%3D?line=31'>32</a> print (json_formatted_str) <a href='vscode-notebook-cell:/Users/gianninaortegarico/vscode/Timeline/_notebooks/2022-10-03-PBL-python_rapidapi.ipynb#X11sZmlsZQ%3D%3D?line=32'>33</a> x = x+1 NameError: name 'json' is not defined
import requests
url = "https://cooking-recipe2.p.rapidapi.com/getbycat/Indian%20Desserts"
headers = {
"X-RapidAPI-Key": "3caeff5409mshc2c175f29a5e775p13d7f9jsne72bfb6ce7e5",
"X-RapidAPI-Host": "cooking-recipe2.p.rapidapi.com"
}
response = requests.request("GET", url, headers=headers)
#print(response.text)
x=1
print("URLS to Recipes")
recipe = response.json().get('title')
url = response.json().get('url')
while x <= 3:
json_formatted_str = json.dumps(recipe ["recipe"], indent=4)
print (json_formatted_str)
URLS to Recipes
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) /Users/gianninaortegarico/vscode/Timeline/_notebooks/2022-10-03-PBL-python_rapidapi.ipynb Cell 11 in <cell line: 17>() <a href='vscode-notebook-cell:/Users/gianninaortegarico/vscode/Timeline/_notebooks/2022-10-03-PBL-python_rapidapi.ipynb#X20sZmlsZQ%3D%3D?line=13'>14</a> x=1 <a href='vscode-notebook-cell:/Users/gianninaortegarico/vscode/Timeline/_notebooks/2022-10-03-PBL-python_rapidapi.ipynb#X20sZmlsZQ%3D%3D?line=15'>16</a> print("URLS to Recipes") ---> <a href='vscode-notebook-cell:/Users/gianninaortegarico/vscode/Timeline/_notebooks/2022-10-03-PBL-python_rapidapi.ipynb#X20sZmlsZQ%3D%3D?line=16'>17</a> recipe = response.json().get('title') <a href='vscode-notebook-cell:/Users/gianninaortegarico/vscode/Timeline/_notebooks/2022-10-03-PBL-python_rapidapi.ipynb#X20sZmlsZQ%3D%3D?line=17'>18</a> url = response.json().get('url') <a href='vscode-notebook-cell:/Users/gianninaortegarico/vscode/Timeline/_notebooks/2022-10-03-PBL-python_rapidapi.ipynb#X20sZmlsZQ%3D%3D?line=18'>19</a> while x <= 3: AttributeError: 'list' object has no attribute 'get'
Go deeper into APIs
Web Development vs Jupyter Notebook. A notebook is certainly a great place to start. But, for your end of Trimester project we want you to build the skill to reference and use APIs within your Project. Here are some resources to get you started with this journey.
- In the Nighthawk Coders APCSP you can find an Overview and Examples using APIs:APCSP APIs menu- Using Covid RapidAPI
- JavaScript frontend API code in APCSP Fastpages GitHub repo: https://github.com/nighthawkcoders/APCSP/blob/master/_posts/2022-07-10-PBL-rapidapi.md
- Making a Jokes API (this will next API tech talk)
- Frontend. JavaScript frontend code in APCSP fastpages GitHub repo: https://github.com/nighthawkcoders/APCSP/blob/master/_posts/2022-07-10-PBL-jokes.md
- Backend Endpoints. Python code that allows Frontend access: https://github.com/nighthawkcoders/flask_portfolio/blob/main/api.py
- Backend Jokes Management. Python code that support Create, Read, Update, Delete (CRUD): https://github.com/nighthawkcoders/flask_portfolio/blob/main/model_jokes.py
Hacks
Find and use an API as part of your project. An API and a little coding logic will be a big step toward getting meaningful data for a project. There are many API providers, find one that might work for your project to complete this hack. When picking an API you are looking for something that will work with either JavaScript Fetch or Python Request. Here are some samples, these are not qualified in any way.
Show API and format results in either Web Page or Jupyter Notebook. Ultimately, I will expect that we do APIs in backend (Python/Flask). However, for this Hack you can pick your preference. We will discuss pros and cons in next API tech talk.