https://github.com/luigiimvector/capture-website-api
  
  
    Node.js API to get screenshot of websites 
    https://github.com/luigiimvector/capture-website-api
  
api capture-screenshots curl nodejs screenshots website-screenshot
        Last synced: 8 months ago 
        JSON representation
    
Node.js API to get screenshot of websites
- Host: GitHub
- URL: https://github.com/luigiimvector/capture-website-api
- Owner: LuigiImVector
- License: mit
- Created: 2022-08-22T12:10:17.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-22T17:19:57.000Z (almost 3 years ago)
- Last Synced: 2025-01-15T13:12:06.589Z (10 months ago)
- Topics: api, capture-screenshots, curl, nodejs, screenshots, website-screenshot
- Language: JavaScript
- Homepage: http://167.172.107.45:8000/getImage
- Size: 2.15 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
- 
            Metadata Files:
            - Readme: README.md
- License: LICENSE
 
Awesome Lists containing this project
README
          # Capture website API
APIs list:
method | path | params | result
---- | ---- | ------ | ------
GET | `/getImage` | `?url=https://github.com/LuigiImVector/` | screenshot of that website (1920x1080)
> NOTE ❗ 
> Write the URL with `https://` or `http://`
### Deploy
1. Clone the repository
2. Install dependencies: `npm install`
3. Run: `npm run test`
4. Go to: `localhost:8000`...
#### Testing using cURL (and ngrok)
Install [ngrok](https://ngrok.com) and write:
```sh
ngrok http 8000
```
Save the url, for example:
```
Forwarding   https://8c9b-151-54-23-194.eu.ngrok.io -> http://localhost:8000
```
Install [cURL](https://curl.se) and write:
```sh
curl -o screenshot.png https://8c9b-151-54-23-194.eu.ngrok.io/getImage?url=https://socus.netlify.app/
```
### Support:
Open an issue, if you want to contribute open a PR.
### Related:
- Use this website to get custom screenshot: https://github.com/LuigiImVector/scrnsht/ (coming soon)
### Credits (libs used):
- https://github.com/sindresorhus/capture-website
- https://github.com/ogt/valid-url
- https://github.com/broofa/mime