#Pubmed PMC entrez request giving unexpected results

3 messages · Page 1 of 1 (latest)

tacit ledge
#

So im trying to send a search request for PMC via Entrez. I set the search term to boron
it makes the request and gives me a list of PMC IDs that DO NOT point towards any article related to boron
So I went into the debugger and checked the requests
"https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pmc&term=boron&retmax=5&tool=biopython&email=your_email%40example.com"
This is the request Its making. So I check the link and it shows the exact same 5 PMC IDS that have nothing to do with boron.
Also I used the PMC search and I know for certain there are like 59k pages with boron when searched
So essentially the requests in python and actual page is giving different results
Here is a snippet of my code

def search_pubmed_by_text(query, max_pages,embed):
    Entrez.email = "your_email@example.com"  # Provide your email address
    ranked_keywords = get_keywords(query,10)
    keywords = []
    for full_keyword in ranked_keywords:
        keywords.append(full_keyword[1])
    full_term = (" AND ".join(keywords))
    print(full_term)
    handle = Entrez.esearch(db="pmc", term=full_term, retmax=max_pages)
light moss
#

Are you sure the get_keywords function is correct? What is the Entrez?

tacit ledge
#

Yea I modified it to work apparently api searches are just different for some reason