Put your website into Website Grader. The free report they come back with has:
How does Website Grader get this info? Are they screen scraping? Is it possible to get this information under a commercial license?
Do people have experiences to share about using screen-scraped data for their businesses?
Most of this data is easily retrievable using various APIs, ex. Google Ajax Search API.
Furthermore, the links: method is not very accurate, rather the better way is to fetch the indexed pages, number; hint: the one found in Google webmaster tools.
Furthermore, I dont think a user initiated report request would anyways get classified as screen-scraping. though I am in no way qualified to comment on the legal aspects.
Also, perhaps you should take the technical/programming aspect of the question over to Stackoverflow.
Cheers!!
It's interesting to see how they still get Page Rank. Page rank is no longer available publicly on the API and Google blocked SeoMoz from using Page rank data for their tool.
The rest is available from the various API's publicly. The links on Hubspot's report is from Yahoo Site Explorer.