php - Get NPM Package README via API

I need to get NPM Package README files in PHP. Does anyone know an API that I can use to grab this?

I've tried to use registry.npmjs.org, although the latest version of packages that I am testing with do not reflect a README file.

Answer

Solution:

So I'm assuming you need the content of the README file of a repo. From what I know, currently, NPM registry does not provide this. FASLE: npm does offer the readme file for SOME packages:

A possible workaround would be to use the git repo URL from the NPM response object and fetch the README file using Github API.

I think you should investigate this further to get to the bottom of it.

Source