Web page meta extractor API. This is a simple express app that use Playwright as a headless browser and Metascraper to demonstrate extraction of meta tags from a web page. You can use this to create a link preview or extend the functionality to your need.
curl "localhost:3000?url=https://www.youtube.com/watch?v=IwYut9qF-jM"
{
"title": "Why does hitting your funny bone feel so horrible? - Cella Wright",
"author": "TED-Ed",
"publisher": "YouTube",
"image": "https://img.youtube.com/vi/IwYut9qF-jM/maxresdefault.jpg",
"url": "https://www.youtube.com/watch?v=IwYut9qF-jM",
"description": "Explore the complex anatomy of the elbow, and find out why hitting your funny bone causes such an odd and painful sensation."
}
- Runs a headless browser to properly load web pages.
- Set custom browser user agent.
- Runs as non root user (for chromium sandbox).
- Uses recommended seccomp profile.
- Lightweight docker image.
yarn run start
yarn run compile
yarn run start:watch
docker build -t metapi .
docker run -p 3000:3000 --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json metapi
docker-compose up -d