When I manually searched the pubchem web page using the keyword "1-(2-Hydroxyphenyl)-2-phenyl ethanone", I got the following results.
Although no compounds exactly matched the above keywords, four compounds were found that partially matched the keywords.
But if I search using the following code, no compounds are found.
import requests
prolog = "https://pubchem.ncbi.nlm.nih.gov/rest/pug"
a = requests.get(prolog + "/compound/name/1-(2-Hydroxyphenyl)-2-phenyl ethanone/json").json()
print(a)
output :
{'Fault': {'Code': 'PUGREST.NotFound', 'Message': 'No CID found', 'Details': ['No CID found that matches the given name']}}
Another example, using methane as a keyword
There is one "BEST MATCH" (compound 297) and other 444027 related compounds. But the above python code only gives me one result (compound 297)
Therefore, I presume that the above code will only get the BEST MATCH result. How can I get other related results by name please? (or the first few of the relevant compounds)