Ssweb-Rest-API

Package ssweb API with puppeteer and google chrome

App Deployments one Click

Deploy on Railway Deploy

Heroku Buildpacks

Running with Dockerfile

Railway is now supported for heroku. You can deploy with Railway.app and you do not anything to do.

If you are Heroku users, you can set to container with heroku stack for running a container for Dockerfile without must a heroku buildpack, and you can deploy to heroku with Dockerfile as the command below👇 :)

$ heroku stack:set container

Usage for ssweb API

You can see how to use web screenshot my rest API's in below.

Params query input type Description
/ - - - for see a documentation and info about my API's
/api/webscreen url https://example.com string Enter the URL
/api/webscreen mediatype "desktop", "handphone", "custom" string Web Screenshot with media type (screen size)
/api/webscreen filetype "jpeg", "png", "webp" string to select file formats
/api/webscreen fullpage "true", "false" boolean fullpage scroll, if you set to true
/api/webscreen viewport "1920x1080"(<width>x<height>) string Using the viewport to scale the screen, if you using the paramenter of mediatype is custom
/api/webscreen responsetype "json", "xml", "image" string to API format response.

Example

URL Details: https://webscreenn.herokuapp.com/api/webscreen?url={ENTER_URL}&mediatype={SCREEN_TYPE}&filetype={FILE_FORMAT}viewport={SCREEN_SIZE}&fullpage={BOOLEAN}&responsetype={RESPONSE_FORMAT}

Response result on json

{
    "status": 200,
    "method": "GET",
    "success": true,
    "creator": "Cakrayp & Caliph",
    "message": "You can add paramenter of 'responsetype=image' to image response",
    "result": {
        "title": "GitHub - caliphdev/caliph-api: Simple Package caliph-api for javascript",
        "description": "Simple Package caliph-api for javascript. Contribute to caliphdev/caliph-api development by creating an account on GitHub.",
        "origin_url": "https://github.com/caliphdev/caliph-api",
        "viewport": {
            "width": 1920,
            "height": 1080
        },
        "files": {
            "server": "Nginx (file Uploader)",
            "hash": "4566958dd672eab02bc639a40bc1e06f0eeaf882",
            "originalname": "IMG-129779AD0342BA1E.jpg",
            "filetype": "jpg",
            "size": "129.3 KB",
            "file_url": "https://a.uguu.se/ecoAzWEj.jpg"
        }
    }
}

Response result on xml

<root>
    <status>200</status>
    <method>GET</method>
    <success>true</success>
    <creator>Cakrayp & Caliph</creator>
    <message>You can add paramenter of 'responsetype=image' to image response</message>
    <result>
        <title>GitHub - caliphdev/caliph-api: Simple Package caliph-api for javascript</title>
        <description>Simple Package caliph-api for javascript. Contribute to caliphdev/caliph-api development by creating an account on GitHub.</description>
        <origin_url>https://github.com/caliphdev/caliph-api</origin_url>
        <viewport>
            <width>1920</width>
            <height>1080</height>
        </viewport>
        <files>
            <server>Nginx (file Uploader)</server>
            <hash>539fa8fc4dfa7f18eaba6511bb2d8eeac1ad7fcd</hash>
            <originalname>IMG-6EC83B9F1E6C6DFC.jpg</originalname>
            <filetype>jpg</filetype>
            <mimetype/>
            <size>130.6 KB</size>
            <file_url>https://a.uguu.se/XeeqLwqu.jpg</file_url>
        </files>
    </result>
</root>

Response result on image(s)

if you want to use images response, you can add paramenter of responsetype=image

https://webscreenn.herokuapp.com/api/webscreen?url={ENTER_URL}&mediatype={TYPE_MEDIA}&responsetype=image

  • Response result on image for desktop

  • Response result on image for handphone

  • Response result on image for Custom, But it use a paramenter of viewport (screen size) E.g: viewport=1920x720

fullpage scroll

You can use fullpage=true for page scroll

https://webscreenn.herokuapp.com/api/webscreen?url=https://youtube.com&mediatype=desktop&fullpage=true&filetype=png

Creator

Contact

If you want to report bug or chat owner, please create in issues on this repository, or contact me in below.


WhatsApp