Reputation: 31
I am retrieving metadata of Crossref using crossref rest API
I have CSV file of DOIs from which I fetch DOI using python and make API call for each DOI to retrieve metadata from Crossref. I have to fetch metadata for many DOIs but after retrieving some metadata it gives connection error
import requests
response = requests.get("https://api.crossref.org/v1/works/http://dx.doi.org/" + CitedDOI[X])
This is connection error
HTTPSConnectionPool(host='api.crossref.org', port=443): Max retries exceeded with url: /v1/works/http://dx.doi.org/10.1080/10426910802104344 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000019510E068D0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))
Upvotes: 3
Views: 1729
Reputation: 63
Try
import requests
import json
response = requests.get("https://api.crossref.org/works/YOUR_DOI")
print(response.json())
I also recommend looking at the CrossRef API documentation. The rules change every now and then, but right now you can get faster speeds by
Upvotes: 2