Thanks for taking the time to read this. I would like to know if it is possible to filter results from the PubMed API by e.g. article type (only show meta analysis/clinical trial/etc) or use the additional filters such as species
My code:
import requests
import json
db = 'pubmed'
domain = 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils'
query = "cancer"
retmode='json'
queryLinkSearch = f'{domain}/esearch.fcgi?db={db}&retmode={retmode}&term={query}&sort=relevance'
response = requests.get(queryLinkSearch)
pubmedJson = response.json()
print(pubmedJson)
It works and is giving me a list of IDs. What I would like to do is add a filter now, e.g. to only show meta-analyses.
I didn't see anything regarding filtering in the API docs. When I check the link of the website it adds the following filter:
https://pubmed.ncbi.nlm.nih.gov/?term=cancer**&filter=pubt.meta-analysis**
But when I try to add this filter to my query I get the error:
{'ERROR': 'Invalid filter key: pubt.meta-analysis'}}
Does somebody know if this is possible? Thank you!