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.
- Request Type:
GET
- Endpoint:
https://hackersandslackers.com/.netlify/functions/scrape
- Parameter:
?url=[TARGET_URL]
$ curl https://hackersandslackers.com/.netlify/functions/scrape?url=https://toddbirchard.com \
-H "Content-Type: application/json"
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"
}