{"id":13632746,"url":"https://github.com/urlbox/urlbox-node","last_synced_at":"2025-04-09T10:09:25.499Z","repository":{"id":46025558,"uuid":"71228603","full_name":"urlbox/urlbox-node","owner":"urlbox","description":"Capture website thumbnails using the urlbox screenshot as a service API in node","archived":false,"fork":false,"pushed_at":"2024-10-11T11:11:31.000Z","size":357,"stargazers_count":25,"open_issues_count":3,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-02T03:49:16.857Z","etag":null,"topics":["blink","chrome","chromium","headless","node","nodejs","nodejs-screenshot","page","preview","render","retina","saas","screenshot","screenshot-library","screenshots","thumbnail","urlbox","website-preview","website-screenshot","website-thumbnail"],"latest_commit_sha":null,"homepage":"https://urlbox.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/urlbox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-18T08:56:25.000Z","updated_at":"2024-06-28T19:11:06.000Z","dependencies_parsed_at":"2024-08-01T22:41:33.479Z","dependency_job_id":"8d691c47-0978-47da-bc64-876f07385a8c","html_url":"https://github.com/urlbox/urlbox-node","commit_stats":null,"previous_names":["urlbox/urlbox-node","urlbox/urlbox-screenshots-node","urlbox-io/urlbox-screenshots-node"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urlbox%2Furlbox-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urlbox%2Furlbox-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urlbox%2Furlbox-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urlbox%2Furlbox-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/urlbox","download_url":"https://codeload.github.com/urlbox/urlbox-node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248018061,"owners_count":21034048,"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","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":["blink","chrome","chromium","headless","node","nodejs","nodejs-screenshot","page","preview","render","retina","saas","screenshot","screenshot-library","screenshots","thumbnail","urlbox","website-preview","website-screenshot","website-thumbnail"],"created_at":"2024-08-01T22:03:13.921Z","updated_at":"2025-04-09T10:09:25.462Z","avatar_url":"https://github.com/urlbox.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# urlbox-node\n\nQuickly generate screenshots, PDFs and other renders using the urlbox screenshot as a service API.\n\nSignup at [Urlbox](https://urlbox.com) to get an API key and secret.\n\n## Installation\n\n```\nnpm install urlbox --save\n```\n\n## Example\n\n```js\nimport Urlbox from \"urlbox\";\n\n// Get your API key and secret from urlbox.com\nconst urlbox = Urlbox(YOUR_API_KEY, YOUR_API_SECRET);\n\n// See all urlbox screenshot options at urlbox.com/docs\nconst options = {\n  url: \"github.com\",\n  thumb_width: 600,\n  format: \"jpg\",\n  quality: 80,\n};\n\nconst imgUrl = urlbox.generateRenderLink(options);\n// https://api.urlbox.io/v1/YOUR_API_KEY/TOKEN/jpg?url=github.com\u0026thumb_width=600\u0026quality=80\n```\n\nNow stick that url in an img tag to render the screenshot!\n\n![Urlbox Screenshot of github.com](https://api.urlbox.io/v1/ca482d7e-9417-4569-90fe-80f7c5e1c781/5a9a56f05cf1229bd8f2edf4a0e6c218ccea1bb7/jpeg?url=github.com\u0026thumb_width=600\u0026quality=80)\n\nAvailable options:\n\n| Option          | Default           | Description                                                                                                                                                                                                                                                                                                                       |\n| --------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `url`           | -                 | The URL of the website you want to screenshot                                                                                                                                                                                                                                                                                     |\n| `width`         | 1280              | Viewport width of the browser in pixels                                                                                                                                                                                                                                                                                           |\n| `height`        | 1024              | Viewport height of the browser in pixels                                                                                                                                                                                                                                                                                          |\n| `selector`      | -                 | Take a screenshot of the element that matches this selector                                                                                                                                                                                                                                                                       |\n| `thumb_width`   | -                 | Width in pixels of the generated thumbnail, leave off for full-size screenshot                                                                                                                                                                                                                                                    |\n| `format`        | png               | Format of the resulting screenshot image (`png` or `jpg`)                                                                                                                                                                                                                                                                         |\n| `user_agent`    | -                 | User-Agent string used to emulate a particular client.                                                                                                                                                                                                                                                                            |\n| `cookie`        | -                 | Set a cookie value before taking a screenshot. E.g. OptIn=true. Can be set multiple times to set more than one cookie.                                                                                                                                                                                                            |\n| `delay`         | -                 | Amount of time to wait in milliseconds before urlbox takes the screenshot                                                                                                                                                                                                                                                         |\n| `wait_for`      | -                 | Waits for the element specified by this selector to be visible on the page before taking a screenshot                                                                                                                                                                                                                             |\n| `timeout`       | 30000             | Amount of time to wait in milliseconds for the website at url to respond                                                                                                                                                                                                                                                          |\n| `full_page`     | false             | Specify whether to capture the full-length of the website                                                                                                                                                                                                                                                                         |\n| `flash`         | false             | Enable the flash plugin for flash using websites                                                                                                                                                                                                                                                                                  |\n| `force`         | false             | Take a fresh screenshot instead of getting a cached version                                                                                                                                                                                                                                                                       |\n| `ttl`           | 2592000 (30 days) | Short for 'time to live'. Number of seconds to keep a screenshot in the cache. Note the default is also the maximum value for this option.                                                                                                                                                                                        |\n| `quality`       | 80                | JPEG only - image quality of resulting screenshot (0-100)                                                                                                                                                                                                                                                                         |\n| `disable_js`    | false             | Turn off javascript on target url to prevent popups                                                                                                                                                                                                                                                                               |\n| `retina`        | false             | Take a 'retina' or high definition screenshot equivalent to setting a device pixel ratio of 2.0 or @2x. Please note that retina screenshots will be double the normal dimensions and will normally take slightly longer to process due to the much bigger image size.                                                             |\n| `click`         | -                 | Element selector that is clicked before taking a screenshot e.g. #clickme would click the element with id=\"clickme\"                                                                                                                                                                                                               |\n| `hover`         | -                 | Element selector that is hovered before taking a screenshot e.g. #hoverme would hover over the element with id=\"clickme\"                                                                                                                                                                                                          |\n| `bg_color`      | -                 | Hex code or css color string. Some websites don't set a body background colour, and will show up as transparent backgrounds with PNG or black when using JPG. Use this setting to set a background colour. If the website explicitly sets a transparent background on the html or body elements, this setting will be overridden. |\n| `crop_width`    | -                 | Crop the width of the screenshot to this size in pixels                                                                                                                                                                                                                                                                           |\n| `hide_selector` | -                 | Hides all elements that match the element selector by setting their style to `display:none !important;`. Useful for hiding popups.                                                                                                                                                                                                |\n| `highlight`     | -                 | Word to highlight on the page before capturing a screenshot                                                                                                                                                                                                                                                                       |\n| `highlightfg`   | white             | Text color of the highlighted word                                                                                                                                                                                                                                                                                                |\n| `highlightbg`   | red               | Background color of the highlighted word                                                                                                                                                                                                                                                                                          |\n| `use_s3`        | false             | Save the screenshot directly to the S3 bucket configured on your account                                                                                                                                                                                                                                                          |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furlbox%2Furlbox-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Furlbox%2Furlbox-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furlbox%2Furlbox-node/lists"}