Работа с базой данных PubMed
Для получения списка айдишников статей по ключевому слову можно использовать get-запрос:
https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pmc&tool=[название вашего скрипта]&email=[контактный email]&format=json&term=[ключевое слово]
Результат будет примерно такой:
{
"header": {
"type":"esearch",
"version":"0.3"},
"esearchresult": {
"count":"556850",
"retmax":"20",
"retstart":"0",
"idlist":["7956338","7956337","7956317","7956313","7956301","7956298","7956293","7956291","7956287","7956282","7956276","7956270","7956269","7956239","7956238","7956234","7956232","7956215","7956214","7956207"],
"translationset":[{
"from":"eye",
"to":"\"eye\"[MeSH Terms] OR \"eye\"[All Fields]"}],
"translationstack":[
{
"term":"\"eye\"[MeSH Terms]",
"field":"MeSH Terms",
"count":"49929",
"explode":"Y"},
{
"term":"\"eye\"[All Fields]",
"field":"All Fields",
"count":"557471",
"explode":"N"},
"OR",
"GROUP"],
"querytranslation":"\"eye\"[MeSH Terms] OR \"eye\"[All Fields]"}
}