// api reference
Every CustomJS capability is a single authenticated HTTP request. This is the index. Auth, rate limits, and every endpoint, each linking to its full reference.
Base URL
https://e.customjs.ioAll requests require the x-api-key header and Content-Type: application/json. Get your key from the API Key guide.
curl -X POST 'https://e.customjs.io/html2pdf' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{ "input": { "html": "<h1>Hello</h1>" } }' > output.pdfEvery response includes your current usage in the rate-limit headers.
| Header | Description |
|---|---|
| x-ratelimit-limit | Maximum requests allowed in the current window |
| x-ratelimit-used | Requests used in the current window |
| x-ratelimit-remaining | Requests remaining in the current window |
| Endpoint | Description | Reference |
|---|---|---|
| POST /html2pdf | Convert HTML or Nunjucks templates to PDF | HTML to PDF → |
| POST /markdown2pdf | Convert Markdown to PDF | PDF docs → |
| POST /screenshot | Capture website screenshots with automation | Screenshot API → |
| POST /scraper | Scrape HTML content from websites | Web Scraper API → |
| POST /__js1- | Execute custom JavaScript code | JS Execution → |
| POST /pages/page/upload-html | Host and deploy HTML pages | HTML Pages API → |
Run arbitrary JavaScript with input data and the built-in helpers. Send the code inline, or save it as a stored function and call it by ID. Full details in the JS Execution reference.
curl -X POST 'https://e.customjs.io/__js1-' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"input": "{\"name\":\"Jon Doe\"}",
"code": "return input.name"
}'Available in both inline and stored execution. Need another one? Just ask.
// Available in inline & stored execution
const cheerio = require('cheerio');
const { v4: uuidv4 } = require('uuid');
const axios = require('axios').default;
const AWS = require('@aws-sdk/client-s3');
const jsrsasign = require('jsrsasign');
const forge = require('node-forge');
const jsonwebtoken = require('jsonwebtoken');
const crypto = require('crypto');
const { Configuration, OpenAIApi } = require('openai');
const firebaseAdmin = require('firebase-admin');
const { PDFDocument, rgb } = require('pdf-lib');
const mysql2 = require('mysql2');
const nodemailer = require('nodemailer');
const converter = require('json-2-csv');
const moment = require('moment');
const { getJson } = require('serpapi');
const { Storage } = require('@google-cloud/storage');
const hubspot = require('@hubspot/api-client');
const pipedrive = require('pipedrive');
const { GoogleAuth } = require('google-auth-library');
const googleDrive = require('@googleapis/drive');
const googleDocs = require('@googleapis/docs');
// ...and more| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad request. Invalid parameters |
| 401 | Unauthorized. Invalid API key |
| 500 | Internal server error |