code to make API calls to SNPedia