Open dosumis opened 8 years ago
Snippet of EuroPMC API lookup code for reference:
url_base = 'http://www.ebi.ac.uk/europepmc/webservices/rest/search?'
q = requests.get(url_base + urlencode({ 'query' : 'ext_id:' + pmid_accession + ' src:med', 'format' : 'json'}))
if q.status_code == 200:
if q.json()['hitCount']:
return q.json()['resultList']['result'][0]
else:
warnings.warn("No results returned in response to query for PMID:%s" % pmid_accession)
return False
else:
warnings.warn("Query failed for '%s' lookup: %s (%s)" % (pmid_accession, q.status_code, q.reason))
return False
This looks useful: PMCID - PMID - Manuscript ID - DOI Converter
For some datasets, we need to link to preprints which means we need DOIs. For everything else, we need will make sure FlyBase has a record and use FBrf.
~EuroPMC API can be used for metadata on PMIDs.~
Cross ref API can be used for DOIs.
http://api.crossref.org/works/10.1371/journal.pbio.1000461
But be careful of figure DOIs. Metadata on these appears to be pretty useless:
http://api.crossref.org/works/10.1371/journal.pbio.1000461.g002