{"id":15598691,"url":"https://github.com/jofaval/screenshot","last_synced_at":"2026-05-13T23:36:22.434Z","repository":{"id":48066643,"uuid":"442217065","full_name":"jofaval/screenshot","owner":"jofaval","description":"Take screenshots with a simple API","archived":false,"fork":false,"pushed_at":"2022-01-04T00:37:30.000Z","size":58,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T12:14:56.731Z","etag":null,"topics":["php","python","screenshots","self-hosted","self-hosted-api","webscraping"],"latest_commit_sha":null,"homepage":"https://screenshot.jofaval.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jofaval.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-27T16:45:45.000Z","updated_at":"2023-05-01T20:05:08.000Z","dependencies_parsed_at":"2022-08-12T17:50:45.024Z","dependency_job_id":null,"html_url":"https://github.com/jofaval/screenshot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jofaval/screenshot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jofaval%2Fscreenshot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jofaval%2Fscreenshot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jofaval%2Fscreenshot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jofaval%2Fscreenshot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jofaval","download_url":"https://codeload.github.com/jofaval/screenshot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jofaval%2Fscreenshot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017015,"owners_count":26085949,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","python","screenshots","self-hosted","self-hosted-api","webscraping"],"created_at":"2024-10-03T01:41:02.345Z","updated_at":"2025-10-13T21:05:02.160Z","avatar_url":"https://github.com/jofaval.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Screenshot #\nA project with the idea to provide a basic API for screenshotting pages dinamically.\n\n## Description\nAs aforementioned it will try to provide a very basic API to get the page in an img format, it won't work with `CAPTCHA` nor `login forms`, not at least on the first versioning.\n\nIt's a `self-hosted` solution, while I do host it on my own server, and it could be used as some sort of PoC, the idea behind is to provide a self-hosted solution, not to offer my domain as the way-to-go.\n\n### Ok, but why?\nI was looking for a workaround to get screenshots from a page via PHP, it's a world of libraries and implementations that may or may not work, heavily dependant on your current system, that's a big flag.\n\nAnd the alternative? Testing your page at Google's Page Insight Lighhouse, that may get deprecated over time because of versioning.\n\nSo by building my own system, I bring new errors and risky choices, but at least I get to work with a light system for screenshotting pages with a good quality/resolution.\n\n## Production\nThe production enviroment is currently hosted at [screenshot.jofaval.com](https://screenshot.jofaval.com).\n\n### Pre-Requirements\n- Download de [Chromium](https://chromedriver.chromium.org/downloads) and [Firefox](https://github.com/mozilla/geckodriver/releases) drivers. Avilable for free at the given links.\n- PHP 7.x.x\n- Python \u003e= 3.4.0\n- Implementing a deployment system, seriously.\n\n### Deploy\nThere's a `ci` folder in case you want to implement your own solution (my case).\n\nIf you have the means to actually implement a proper ci solution or use an existent one, you can ignore or use this folder at will. As it won't hold any logic.\n\nFor a complete visualization of the folder structure, [click here](./docs/en/Structure.md).\n\n## API\nThere's only one endpoint, at the start of the project\n\nThe root of the page: `/`, it may work without the separator, but it's a good practice to leave it untouched.\n\n### The advanced documentaiton\nAll the details in a better manner are explain on the [API documentation](./docs/en/Api.md)\n\n### Some examples\n\n#### Get the page\nIt just gets the page with all the default parameters set in, follow the example below:\n\n`{API_BASE_URL}/?url={$site}`\n\n#### Get a screenshot on a specific device\nInstead of specifying an array of possible devices, regsitering them, choose your own resolution and browser header.\n\nSpecified in `px`, maybe in a future implementation it can have a units system.\n\n`{API_BASE_URL}/?url={$site}\u0026width={$width}\u0026height={$height}`\n\n#### Get a screenshot on a browser\nDifferent browsers bring different results. So at least for now it may just work with Chromium and/or Firefox.\n\n*Header* is not **required** for a browser specification, it's completely **optional**.\n\n`{API_BASE_URL}/?url={$site}\u0026browser={'chrome' | 'chrome' | 'firefox'}\u0026[header]={$header}`\n\n#### Return format\nOk, now that we have an image screenshotting process complete, how do we store it, or recieve it?.\n\nYou can specify wether you want the raw base64 image or the visual image and you're the one de/en/coding it!\n\n`{API_BASE_URL}/?url={$site}\u0026format={'base64' | 'visual'}`\n\n## Legal Notice\nThis is a sort of warning, and a heads up at some possible problems along the way.\n\n### Security\nI am, in no way, responsible for the securiy of the system, or the damage it may cause, wether directly or indirectly. Nor am I responsible for any sort of exploiting it may cause on other infraestructures.\n\n### Illegal practices\nYou can get some very basic information, that information may be private, or not to be fetched through public means. Licenses still hold their own, if you screenshot, for example, Google Images, those images have licenses, you're not buying that license, and you will be responsible for a bad use, not me.\n\n### Advice\nThis is a PoC, use at your own risky, highly recomended to use for your own resources from which you hold all the rights.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjofaval%2Fscreenshot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjofaval%2Fscreenshot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjofaval%2Fscreenshot/lists"}