Welcome Developers,
Welcome to the Pagefreezer Website Archiving API, where you will find programming instructions, standards, and secure communications for seamlessly integrating your products and services with Pagefreezer’s website archiving capabilities for compliance or legal purposes.
The Pagefreezer API allows developers to send a webpage URL and receive an accurate, SHA-256 digitally signed and full-text searchable PDF of that webpage in return.
The Pagefreezer API can add specific value to provide a more extensive compliance or legal coverage by capturing URLs mentioned in social media posts, email messages or digital documents.
The PageFreezer API platform has been especially developed for use by our partners. To use the platform, we require authentication through an access token.
Register as a partner to get an API access token. You can do this by:
API Lifecycle
Once you have received your access token you can make API calls to our service.
The API lifecycle looks like this:
- Send an API request to capture a URL. The API supports either request for a single URL or a bulk request with up to 100,000 URLs at a time. Response: a Task ID (for a single URL) or a Request ID (for a list of URLs)
- Check the status of the task/request Response: queued, running, canceled or complete
- When complete: download the PDF with task/request ID
- Clean up (optional) The PageFreezer API server will keep all PDFs for 30 days if not deleted by request.
API Endpoints
- https://pdf.pagefreezer.com/utils/v1/pdf/request/status
- https://pdf.pagefreezer.com/utils/v1/pdf/task/status
- https://pdf.pagefreezer.com/utils/v1/pdf/request/download
- https://pdf.pagefreezer.com/utils/v1/pdf/task/download
Security
- The API endpoints must be accessed through only TLSv1.2.
- All APIs are required to have account_name and access_token to be authorized to use those APIs
APIs
Method | Resource | Description |
POST | /utils/v1/pdf/convert | Make a conversion request |
GET | /utils/v1/pdf/status/request/:request_id | Return the current status of a conversion request (per request). |
DELETE | /utils/v1/pdf/status/request/:request_id | Delete tasks linked to the request_id. |
GET | /utils/v1/pdf/status/task/:task_id | Return the current status of a conversion task (per URL). |
DELETE | /utils/v1/pdf/status/task/:task_id | Delete a task linked to the task_id. |
GET | /utils/v1/pdf/download/task/:task_id.EXT | Download PDF binary file. EXT = pdf or png. |
DELETE | /utils/v1/pdf/download/task/:task_id | Delete rendered PDFs linked to the request_id. |
DELETE | /utils/v1/pdf/download/request/:request_id | Delete a rendered PDF linked to the task_id. |
- Notice
- Request vs Task
- For any individual conversion through /utils/v1/pdf/convert, request and task are the same, but for a bulk upload, it gives one request ID as a representative ID for the job and each individual conversion of the bulk job has its own task ID.
POST /utils/v1/pdf/convert
Batch Job
- Prepare a text file (urls.txt) containing multiple URLs. (please make sure the URLs in the file must be validated beforehand.)
- Response (It returned just one request_id because it is a batch job.)
- Get the status on all tasks in the request
- Response
- Required Parameters
Parameter | Description |
output_format (optional) | default: “pdf” (one of “pdf”,”png”,”both”) (Fixed. This parameter for future use) |
screen_width (optional) | default: 1440 (unit in pixel) |
one_page (optional) | default: 1 (true) (0=multi page or 1=one page) / NOW IT ONLY SUPPORTS ONE PAGE. |
wait_time_before_rendering (optional) | default: 3 (seconds). Wating time to load the web page to be renderred. |
text_timestamp (optional) | Add timestamp text. default: 1(true). 0(false). (This parameter for future use) |
text_url (optional) | Add URL text. default: 1(true). 0(false) (This parameter for future use) |
text (optional) | Add message. (This parameter for future use) |
text_position (optional) | One of ‘top’ or ‘bottom’. (This parameter for future use) |
text_font (optional) | Set a font name for text. default: ‘Arial’. (This parameter for future use) |
text_size (optional) | Set a font size for text. default: 12. (This parameter for future use) |
access_expiration_days (optional) | Default: 7 (days). Days to keep the resulted PDF in the server. |
access_method (optional) | Default: http. (This parameter for future use. email or ftp could be supported later.) |
digital_signature (optional) | Default: 0 (false). (This parameter for future use.) |
priority (optional) | Default: 0. (0: normal priority, 1: express (put a request into a queue directly) |
- Make a conversion request.
- Return HTTP Code: 200 (OK), 400 (Bad Request), 401 (Unauthorized), 404 (Not found)
- request_id, task_id are randomized long string. (hashing with timestamp and url).
- JSON Format :
- Single
Group
GET /utils/v1/pdf/status/task/:task_id
- Return a full details of a task.
- Return HTTP Code: 200 (OK), 400 (Bad Request), 401 (Unauthorized), 404 (Not found)
- Task status = waiting, running, stopped, done.
- JSON Format :
GET /utils/v1/pdf/status/request/:request_id
- The same as /utils/v1/pdf/status/task except this API returns collected results.
DELETE /utils/v1/pdf/status/request/:request_id
- Delete all tasks linked to the request_id
DELETE /utils/v1/pdf/status/task/:task_id
- Delete a task linked to the request_id
GET /utils/v1/pdf/download/task/:task_id
- Streaming a PDF binary file or return HTTP REDIRECT (301).
- If you want to download it directly, please add “?direct=1” at the end of the request URL.
- If there is an error, it just returns JSON.
- Return HTTP Code: 200 (OK), 400 (Bad Request), 401 (Unauthorized), 404 (Not found)
- Error JSON Format :
DELETE /utils/v1/pdf/download/request/:request_id
- Delete all rendered PDFs linked to the request_id
- Return HTTP Code: 200 (OK), 400 (Bad Request), 401 (Unauthorized), 404 (Not found)
- JSON Format :
DELETE /utils/v1/pdf/download/task/:task_id
- Delete a PDF linked to the task_id
- Return HTTP Code: 200 (OK), 400 (Bad Request), 401 (Unauthorized), 404 (Not found)
- JSON Format :
Revision
- Last Updated on Jan 12, 2016
- Request a conversion with http://apple.com.
- Response
- Check the progress of the request (needs task_id from the response of its first request)
- Response
- The status of the task is “complete”, it is ready for downloading it.
- Downloading the completed PDF
- Response: it will return HTTP 301 to the PDF file.
- If you want to download it directly, please add “?direct=1” at the end of the request URL.
Revision
- Last Updated on Jan 12, 2016
Start Leveraging the Pagefreezer API
Get in touch with us to learn more and see Pagefreezer’s solutions in action.
Have more questions?
Contact us at +1-888-916-3999 or sales@pagefreezer.com
1-888-916-3999
support@pagefreezer.com
Head Office:
#500-311 Water Street
Vancouver, BC V6B 1B8
Canada
Europe Office:
Van Leeuwenhoekpark 1 - Office 5
2611 DW, Delft
The Netherlands
UK Office:
+44 20 3744 7173
Australia Office:
+61 (07) 3186 2199