fprintf() provides a simple API for retrieving basic information on a web page.
This service is still in beta and probably not ready for production use yet.
To retrieve the information on a page, you can use either POST or GET requests. POST is recommended for production, but GET makes it easier to quickly test something.
There is one endpoint: http[s]://fprin.tf
The only required parameter is url
. This must be a full URL, either HTTP or HTTPS (HTTPS certificates are not checked).
If the parameter callback
is provided and is a valid URL, the request will return immediately and this callback URL will be called once the data has been fetched and generated, with the data posted in the request body.
If the parameter data
is provided, it will be recalled in the answer. This parameter can contain at most 512 alphanumerical characters, as well as +
/
and =
(allowing base64-encoded data).
If the parameter accept
is provided, only content matching this content-type(s) will be processed. Defaults to text/html,application/xhtml,application/xhtml+xml,application/xml,text/plain
.
The answer will be JSON, using this format:
{ "title": "Site title", "description": "Site description", "screenshot_pdf": "<absolute url to PDF screenshot>", "screenshot_png_full": "<absolute url to PNG screenshot>", "screenshot_png": "<absolute url to PNG thumbnail, 200x200px>", "webm": "<absolute url to WebM video>", "mp4": "<absolute url to MP4 video>", "thumbnail_100": "<absolute url to 100x100px WebM or PNG thumbnail>", "data": "5b6b75481a17f3f27d57821f4767b041", }
Any of these information might be absent if they could not be discovered or generated, especially videos which only have meaning for YouTube or other video content.
Screenshot files will be available at least for the next five minutes, but are temporary.
Contact: fprintf@fprin.tf