SSHOT is a ✨ Web Screenshot API ✨ with caching kept in mind!

Overview
label icon
Quick Start
rocket

Welcome to SSHOT

(/s:shot/)

SSHOT is a Web Screenshot API with caching kept in mind!

Just pass in the parameters for the screenshot, copy the link and you are good to go! 🚀

A screenshot is fetched using puppeteer and cached for 24 hours . The expiry time will keep getting pushed forward if the file is being accessed frequently.


Quick start

You can call it from anywhere whether its a normal HTTP GET call from browser or a curl request from terminal

+++ HTTP GET

https://sshot.x-axis.me/api?link=https://github.com

+++ cURL

curl "https://sshot.x-axis.me/api?link=https://github.com" --output filename.png

+++ Wget

wget "https://sshot.x-axis.me/api?link=https://github.com" -O filename.png

+++

If the request is not cached or expired, a new screenshot will be taken and a cache will stored as a record in redis database.

Cache will expire after 24 hours of inactivity 🗑️ .


API Parameters

Endpoint: https://sshot.x-axis.me/api?

Example: https://sshot.x-axis.me/api?link=https://google.com&device=tablet

Parameter Description
link Link of the webpage whose screenshot you want to take. For long links URL Percent-Encoding is recommended.
Links should start with http(s)://
dimension Size of the website screenshot in format [width]x[height] .
Default dimension is 1920x1080 .
width can be any number between 100 and 1920 (both inclusive).
height can be any number between 100 and 1920 (both inclusive).
[!badge Default:] 1920x1080 pixels

Currently full length webpage screenshot is not implemented.
Will implement it soon don't worry! 😎

Examples:
360x800 - mobile dimension website 360x800 pixels
800x600 - website screenshot size 800x600 pixels
768x1024 - tablet dimension website 768x1024 pixels
1024x768 - website screenshot size 1024x768 pixels
1920x1080 - desktop dimension website 1920x1080 pixels
device Feeling lazy in providing a dimension?
You can just pass a device as a parameter for dimension.
These are the device params currently available: desktop, mobile and tablet .

[!badge variant="warning" text="Note"]
If dimension and device both are provided then dimension will be used and device will be ignored.
delay delay comes handy if the website has a lot animations. Using delay you can wait for the specified time and then take the screenshot after that.
[!badge Default:] delay is 200 ms.

Allowed range is between 0 and 5000 ms (both inclusive).

Error Messages

You may get a 400 Error Header and a Error 400 status message when you provide any parameter wrongly.

Error code Description
ERR_INVALID_LINK Link provided is not valid! Make sure it starts with http(s):// .
ERR_NO_LINK Link is not provided! Looks like you haven't provided any link at all!
ERR_INVALID_DIMENSION Dimension provided is not valid! Make sure the dimension are in range and in the format [width]x[height] .
ERR_INVALID_DEVICE Device provided is not valid! Make sure the device is desktop, mobile or tablet .
ERR_INVALID_DELAY Delay provided is not valid! Make sure the delay is in the range 0 to 5000 .
ERR_TIMEOUT Link provided took more than 10s to load and thus haulted and resulted in ERR_TIMEOUT
You might also like...

An upgradable boilerplate for Progressive web applications (PWA) with server side rendering, build with SEO in mind and achieving max page speed and optimized user experience.

An upgradable boilerplate for Progressive web applications (PWA) with server side rendering, build with SEO in mind and achieving max page speed and optimized user experience.

React PWA v2 A highly scalable, Progressive Web Application foundation,boilerplate, with the best Developer Experience. Demo: https://demo.reactpwa.co

Dec 26, 2022

:zap: RAN! React . GraphQL . Next.js Toolkit :zap: - SEO-Ready, Production-Ready, SSR, Hot-Reload, CSS-in-JS, Caching, CLI commands and more...

:zap: RAN! React . GraphQL . Next.js Toolkit :zap: - SEO-Ready, Production-Ready, SSR, Hot-Reload, CSS-in-JS, Caching, CLI commands and more...

RAN : React . GraphQL . Next.js Toolkit New version is coming... Follow up here: https://github.com/Sly777/ran/issues/677 Features Hot-Reload Ready fo

Jan 3, 2023

⚛️ Hooks for fetching, caching and updating asynchronous data in React

⚛️ Hooks for fetching, caching and updating asynchronous data in React

Hooks for fetching, caching and updating asynchronous data in React Enjoy this library? Try the entire TanStack! React Table, React Form, React Charts

Jan 9, 2023

⚛️ Hooks for fetching, caching and updating asynchronous data in React

⚛️ Hooks for fetching, caching and updating asynchronous data in React

Hooks for fetching, caching and updating asynchronous data in React Enjoy this library? Try the entire TanStack! React Table, React Form, React Charts

Dec 31, 2022

A script and resource loader for caching & loading files with localStorage

A script and resource loader for caching & loading files with localStorage

Basket.js is a script and resource loader for caching and loading scripts using localStorage ##Introduction for the Non-Developer Modern web applicati

Dec 30, 2022

Allo Caching for Deno

Simple caching solution in Typescript.

Feb 14, 2022

This library helps implement caching using Cloudflare Workers KV

With a few lines of code, you can control the execution of functions that you want to cache for speed, store them in the cache, and skip execution of the function if the cache exists.

Oct 20, 2022

🪐 The IPFS gateway for NFT.Storage is not "another gateway", but a caching layer for NFTs that sits on top of existing IPFS public gateways.

nftstorage.link The IPFS gateway for nft.storage is not "another gateway", but a caching layer for NFT’s that sits on top of existing IPFS public gate

Dec 19, 2022

A fast, safe and easy caching mechanism similar to Redis written in typescript

Viper Viper is a memory based caching mechanism which is aimed towards ease of use and speed. It's in a very early stage right now and not meant to us

Jan 24, 2022

A caching middeware library for Deno HTTP framework, Oak.

A caching middeware library for Deno HTTP framework, Oak.

Caching middleware library for Oak Table of Contents Description Getting Started Middleware and caching Authors License Description Zoic is an easy-to

Sep 28, 2022

Next-level mongoose caching layer with event based cache clearing

SpeedGoose ## About The Project This project is a next-level mongoose caching library which is fully written in typescript. It's caching on two levels

Dec 15, 2022

Skip a job if it already succeeded for the same repo state. Uses S3 for caching.

Skip a job if it already succeeded for the same repo state. Uses S3 for caching.

🪣 ♻️ S3 Cache Action First Run, Cold Cache Next Run, Cache Hit Description Allows to skip a job if it already succeeded for the same repo state. Uses

Jul 22, 2022

Promisified thunk with caching (pronounced "funky")

phunky phunky (promisified thunk, pronounced funky) is yet another thunk-inspired library, to delay a calculation until its result is needed, but also

Oct 14, 2022

Change the color of an image to a specific color you have in mind.

image-recolor Run it: https://image-recolor.vercel.app/ image.recolor.mov Acknowledgments Daniel Büchele for the algorithm: https://twitter.com/daniel

Oct 25, 2022

Highly opinionated project template for Serverless Framework that follows and applies hexagonal architecture principle to serverless world. Prepared with easy testing in mind.

Highly opinionated project template for Serverless Framework that follows and applies hexagonal architecture principle to serverless world. Prepared with easy testing in mind.

serverless-hexagonal-template Highly opinionated project template for Serverless Framework that applies hexagonal architecture principles to the serve

Dec 26, 2022

Secure-electron-template - The best way to build Electron apps with security in mind.

Secure-electron-template - The best way to build Electron apps with security in mind.

secure-electron-template A current electron app template with the most popular frameworks, designed and built with security in mind. (If you are curio

Dec 29, 2022

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

A free and open source resume builder. Go to App What is this app all about? Reactive Resume is a free and open source resume builder that’s built to

Jan 3, 2023

A fleet management Application built with the service providers and user in mind

A fleet management Application built with the service providers and user in mind

A fleet management Application built with the service providers and user in mind. A multi faceted Admin and consumer console application for mobile.

Feb 27, 2022

💬 A Twitch (BTTV and FFZ) emotes and badges parser - built with tmi.js in mind

💬 A Twitch (BTTV and FFZ) emotes and badges parser - built with tmi.js in mind

Sep 2, 2022
Comments
  • Bump minimatch from 3.0.4 to 3.1.2

    Bump minimatch from 3.0.4 to 3.1.2

    Bumps minimatch from 3.0.4 to 3.1.2.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump minimist from 1.2.5 to 1.2.6

    Bump minimist from 1.2.5 to 1.2.6

    Bumps minimist from 1.2.5 to 1.2.6.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • To-do: Full Page Screenshot

    To-do: Full Page Screenshot

    Implement a Full Page Screenshot.

    Puppeteer has an inbuilt method for full page screenshot. Make sure there is enough delay for the page to fully load before taking the full page screenshot.

    More info: https://pptr.dev/#?product=Puppeteer&version=v13.4.0&show=api-pagescreenshotoptions

    help wanted 
    opened by AmreshSinha 0
Releases(v1.1.0)
  • v1.1.0(Feb 8, 2022)

    Changelog:

    • Now filenames and keys in redis db will be hashed to support long queries.
    • Regex for validating dimension had a loophole which could result in DOS or DDOS attacks. It's now updated with a better regex.

    Issues

    I will be happy if someone finds any bug, exploit, memory exploits, SSRF, or any other loopholes! :blush:

    Please do open an issue if you find one! It will help this project a lot!

    https://github.com/AmreshSinha/sshot/issues

    Full Changelog: https://github.com/AmreshSinha/sshot/compare/v1.0.0...v1.0.1

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Feb 8, 2022)

    Features :sparkles:

    :heavy_check_mark: dimension - supported 100 to 1920 (both inclusive) :heavy_check_mark: device - supported ( desktop, mobile and tablet) :heavy_check_mark: delay - supported 0 to 5000 ms (both inclusive)

    :clock1: Default Timeout set to 10000 ms.

    :basket: Cache expires after 24hrs of inactivity on the query link.

    :rocket: Add support for aarch64 architecture servers (The current running instance is on a aarch64 host) :rocket:

    Upcoming features in next release

    • Full Page Screenshot
    • Better Cache Integration

    Issues

    https://github.com/AmreshSinha/sshot/issues

    What's Changed

    • Create LICENSE by @AmreshSinha in https://github.com/AmreshSinha/sshot/pull/1

    New Contributors

    • @AmreshSinha made their first contribution in https://github.com/AmreshSinha/sshot/pull/1

    Full Changelog: https://github.com/AmreshSinha/sshot/commits/v1.0.0

    Source code(tar.gz)
    Source code(zip)
Owner
Amresh Prasad Sinha
Busy in Discovering myself :)
Amresh Prasad Sinha
Type-safe and Promisified API for Web Worker and Iframe

?? You can help the author become a full-time open-source maintainer by sponsoring him on GitHub. typed-worker Install npm i typed-worker Usage Create

EGOIST 189 Dec 31, 2022
Serve read-only Redis data over a HTTP API with auth

Redis data exposer This was created for Cliptok and not intended for use outside of it. Use at your own peril. This application will serve an API that

Erisa A 10 May 28, 2022
Example repo for getting NextJS, Rust via wasm-pack, and web workers all playing nicely together.

Example of integrating WASM & web workers with a Typescript NextJS project. Running yarn yarn dev Open localhost:3000 Layout Rust code is in ./rust, g

Studio Lagier 63 Dec 23, 2022
Self-hosting web code editor (for Hack Club CodeJelly)

reflection Self-hosting web code editor (for Hack Club CodeJelly) Reflection-editor is a code editor that edits its own code, and uses modern web tech

Benjamin Smith 7 Dec 29, 2021
Cache is easy to use data caching Node.js package. It supports Memcached, Redis, and In-Memory caching engines.

Cache Cache NPM implements wrapper over multiple caching engines - Memcached, Redis and In-memory (use with single threaded process in development mod

PLG Works 49 Oct 24, 2022
Mind elixir is a free open source mind map core.

Mind-elixir is a framework agnostic mind map core

DJJo 1.4k Jan 2, 2023
this application for screenshot website

Screenshot Website How to Use Example curl post send url curl -d "url=https://google.com" "https://screenshot-website.herokuapp.com/?api_key=1234" re

null 2 Nov 23, 2021
Bot sviluppato in Node.js che permette la prenotazione e il successivo invio dello screenshot di quest'ultima tramite un bot di telegram.

Unimore-Bot Bot sviluppato in Node.js che permette la prenotazione e il successivo invio dello screenshot di quest'ultima tramite un bot di telegram I

Lorenzo Codeluppi 8 Jun 9, 2022
NoPrint.js - Disable Print, Screenshot, Copy & Paste in HTML by JavaScript.

NoPrint.js Disable Print, Screenshot, Copy & Paste in HTML by JavaScript. NoPrint.js is a small and neat open source JS library that disables print, s

null 33 Dec 26, 2022
Weblookup Telegram bot - The usefully bot like check website, screenshot

Weblookup Telegram bot - The usefully bot like check website, screenshot

Fusedev 3 May 9, 2022