wrenderer

wrenderer is a web rendering service that uses automated browsers to render web pages.



Overview

wrenderer is designed for SEO purposes and for serving proper content to bots that cannot render or execute JavaScript in client-side rendered applications (e.g., SPAs).The project is inspired by Rendertron.

wrenderer is built with Golang and chromedp, and can be deployed on AWS environment using Lambda or run on premise.

Features

API

All API requests require an x-api-key header with a valid API key.

Render

Single URL

Render a single URL and return the rendered HTML content.


GET /render?url={targetUrl}

Query Parameters

Response

Multiple URLs from sitemap

Render multiple URLs from a sitemap.xml link and cache the rendered HTML for each URL. This is an asynchronous operation, it will return 202 Accepted status code with location header to check the status of the operation. The location endpoint will also be in the response body with location key.


PUT /render/sitemap

Request Body


{
    "sitemapUrl": "https://example.com/sitemap.xml"
}

Response (202 Accepted)


{
    "message": "Sitemap rendering accepted", 
    "location": "/render/sitemap/{jobId}/status"
}

Sitemap rendering status check

Check the status of the sitemap rendering operation, request path can be obtain from response of the sitemap rendering opration.


GET /render/sitemap/{jobId}/status

Cache invalidation

Single url invalidation

Invalidate cache for a single URL.


DELETE /render?url={targetUrl}

Query Parameters

Domain invalidation

Invalidate all cached pages under the given domain.


DELETE /render?domain=www.example.com

Admin APIs

APIs for admin usage only, require admin API key.

Note: Currently implement in local build type only

List rendered caches

List all rendered page in cache.


GET /admin/renders

Query Parameters

List running jobs

List all jobs in progress.


GET /admin/jobs

Query Parameters

Show configuration

Show current configuration settings.


GET /admin/config

Setup