How to call API successfully and parse results



Hi Thunkers,

I am writing hoping for some assistance with an app I am wanting to make.

I have found an API for a plants database: however I am having difficulties successfully calling this API in my app and parsing the results in a manner I want to.

I have tried reading Domhnall’s tutorial (Introduction to APIs) but I haven’t been able to solve my issues.

What I would really like to have happen is a call made to the API which brings back a random plant from the plants database and the Species, Genus and Scientific Name are displayed for the random plant selected.

Is anyone able to help me out with how to achieve this?

Thanks in advance!


what did you try? the API does not offer to return a random plant…

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

example call to get 5 plants (limit) skipping the first 10 plants (offset) and returning the fields id, Genus, Species, AcceptedSymbol,Genus,Species,AcceptedSymbol

{"count":92161,"returned":5,"citation":"USDA, NRCS. 2016. The PLANTS Database (, 12 July 2016). National Plant Data Team, Greensboro, NC 27401-4901 USA.","terms":"Our plant information, including the distribution maps, lists, and text, is not copyrighted and is free for any use.","data":[{"id":11,"Species":"ammophila","Genus":"Abronia"},{"id":12,"Species":"americana","Genus":"Abama"},{"id":13,"Species":"americanum","Genus":"Abutilon"},{"id":14,"Species":"angustifolia","Genus":"Abronia"},{"id":15,"Species":"angustifolia","Genus":"Abronia"}],"error":null}