Screenshot-API is a small Docker image with chromedp installed and Golang-based Webserver to interact with it. It can be used to take screenshots of provided websites.
Before running anything, you need to make sure you have Docker installed.
- Build a Docker container with:
make build
- Run the Docker container with:
make run
Screenshot-API will start on port 8080. To send a request to screenshot a website, for example, google.com
, go to:
http://localhost:8080/screenshot/?url=https://google.com
This will return a JSON response with a link to the screenshot image, in this format:
{"screenshotUrl":"localhost:8080/storage/LfUqsp.png"}
Contributions are welcome! Having an issue? An idea to improve existing functionality? Critique?
Please leave pull requests/issues with your suggestions!