Adding in querying for the API