I'm trying to get GO terms for a list of NCBI/Entrez genes by querying the Gene Ontology API from Python. I've managed to do this for single genes, like this:
gene_id = 1493
r = requests.get("http://api.geneontology.org/api/bioentity/gene/NCBIGene:" + str(gene_id) + '/function',verify = False)
I could of course loop over my gene IDs one by one, but is there a way to query an entire gene set at once? The GO API documentation (http://api.geneontology.org/api) has some query examples for bioentity sets, but they don't seem to fit my use case.