CustomJS lets you run JavaScript natively inside any HTTP request. You can either pass your JS inline with the request or store reusable functions on the CustomJS platform, which is perfect for keeping your logic clean and secure. To learn more about their differences and tradeoffs, see Inline vs. Stored JavaScript.
Aside from enabling native JS execution, the CustomJS API includes powerful helpers available in both inline and stored executions to make automation easier:
The HTML to PDF conversion helps you convert HTML to PDF.
The Website Screenshot node helps you interact with and gather data from live websites.
The Web Scraping node helps you interact with and gather data from live websites.
Create, merge, compress, and convert files with our ready-to-use PDF API endpoints. Build your own PDF generation API that fits your needs.
curl -X POST 'https://e.customjs.io/__js1-YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-H 'customjs-origin: inline/pdf-generator' \
--data-raw '{"input":{"html":"Hello World"},"code":"const { HTML2PDF } = require(\"./utils\"); return HTML2PDF(input.html);","returnBinary":"true"}' \
> customjs-output.pdf