Another resource which is a legal alternative to sci-hub.tw is Unpaywall.
We harvest content directly from over 50,000 journals and open-access repositories from all over the world. We also use great open data from PubMed Central, the DOAJ, Crossref (particulary their license info), and DataCite.
- Rest API: takes a DOI and returns JSON data with URLs to paper PDF
Example: https://api.unpaywall.org/v2/10.1038/nature12373?email=YOUR_EMAIL
To complete the download of the full dataset, please fill out this form, which helps us report usage back to our funders, and we'll immediately provide you with a download link.