Lambda function which returns basic metadata for a single URL provided as a ?url
querystring parameter. Intended to be deployed as an endpoint served with Netlify functions.
- HTTP Request:
GET
- Endpoint:
https://hackersandslackers.com/.netlify/functions/scrape
- Parameters:
?url=https://toddbirchard.com
$ curl https://hackersandslackers.com/.netlify/functions/scrape?url=https://toddbirchard.com
Response:
{
"Title": "Todd Birchard: Engineering, Product, Technology.",
"Image": "https://storage.googleapis.com/toddbirchard-cdn/2019/08/cover.jpeg",
"Description": "Giant reptile giving technology a good name. Occasional tangents of mass destruction. Made in Silicon Alley.",
"Favicon": "/icons/icon-48x48.png"
}