WebLense is an Express API that captures screenshots of websites and saves them for faster rendering.
API Endpoints
/lense/[height]x[width]
Method:
GET
This is the default URL for capturing screenshots.
Param | Description | Type | Default | Required |
height | The height of the viewport used to captured the screenshot. | Integer | NONE | ✅ |
width | The width of the viewport used to captured the screenshot. | Integer | NONE | ✅ |
Query | Description | Type | Default | Required |
url | The URL you want to capture a screenshot of. | String | NONE | ✅ |
full | Determines if the screenshot should be the full document height and width. | Boolean | FALSE | ❌ |
type | Image format. Used to set the response header. | String jpeg/png | png | ❌ |
latest | Used to grab the latest screenshot of the URL. | Boolean | FALSE | ❌ |
/s/
Method:
GET
This endpoint is used for simple images. They default to a 600x800px viewport.
Query | Description | Type | Default | Required |
url | The URL you want to capture a screenshot of. | String | NONE | ✅ |
full | Determines if the screenshot should be the full document height and width. | Boolean | FALSE | ❌ |
type | Image format. Used to set the response header. | String jpeg/png | png | ❌ |
latest | Used to grab the latest screenshot of the URL. | Boolean | FALSE | ❌ |
/n/
Method:
GET
This endpoint is specifically for Notion cover images. It has special load times and caches set.
Query | Description | Type | Default | Required |
url | The URL you want to capture a screenshot of. | String | NONE | ✅ |
full | Determines if the screenshot should be the full document height and width. | Boolean | FALSE | ❌ |
type | Image format. Used to set the response header. | String jpeg/png | png | ❌ |
latest | Used to grab the latest screenshot of the URL. | Boolean | FALSE | ❌ |
Example Use
<img src="https://weblense.com/lense/600x800/?url=https://clark.today"/>