urltojson REST API
Programmatically transform any target webpage into high-fidelity structured JSON using your saved extractors. Fast, deterministic, and built on high-performance Cloudflare Edge architecture.
Overview & Architecture
The urltojson pipeline consists of three core components:
Extractor Template
Defines the schema rules, required fields, and data types (string, number, array) via visual selection or JSON-LD.
Edge Fetch Worker
Fetches target HTML with anti-bot resistance, smart headers, and clean DOM deserialization.
Extractor Engine
Deterministic hierarchical extraction with microsecond fallback, returning typed JSON payloads.
Authentication
All REST API calls require an API key passed in the standard HTTP Authorization header with the Bearer prefix.
Code Examples
/v1/extractors/:id/runsExecute extraction on a given URL using the extractor template specified by :id. Deducts 1 credit upon successful extraction.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | The full HTTP/HTTPS URL of the target webpage to extract. |
curl -X POST "https://u2j-api.jjajj.xyz/v1/extractors/{EXTRACTOR_ID}/runs" \
-H "Authorization: Bearer u2j_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/target-article"
}'Response Body (200 OK)
{
"run_id": "run_948a7856-351c-4036-856f-e4ef68d08fd1",
"status": "success",
"extractor_id": "71f4d211-936f-45b1-8603-53b3b439c4bf",
"version": 1,
"data": {
"title": "Example Article Headline",
"author": "Sarah Jenkins",
"published_at": "2026-09-12T14:30:00Z",
"content": "Full extracted article content body here..."
},
"warnings": [],
"meta": {
"method": "fast_jsonld",
"duration_ms": 138,
"http_status": 200
},
"created_at": "2026-09-14T07:18:50.120Z",
"updated_at": "2026-09-14T07:18:50.258Z"
}/v1/runs/:idRetrieve the historical output, execution timing, warnings, and result payload for an existing run by ID.
curl -X GET "https://u2j-api.jjajj.xyz/v1/runs/{RUN_ID}" \
-H "Authorization: Bearer u2j_YOUR_API_KEY"/creditsCheck current available credits balance for your authenticated account.
curl -X GET "https://u2j-api.jjajj.xyz/credits" \ -H "Authorization: Bearer u2j_YOUR_API_KEY"
{
"credits": 20019
}Error Codes & Responses
urltojson uses conventional HTTP response codes to indicate success or failure.
| Code | Status | Description & Action |
|---|---|---|
| 200 | OK | Extraction completed successfully. Data payload returned. |
| 400 | Bad Request | Missing required parameters (e.g. target URL not provided). |
| 401 | Unauthorized | Invalid or missing API key in the Authorization header. |
| 402 | Payment Required | Insufficient credits. Top up via Dashboard or Pricing page. |
| 404 | Not Found | The specified extractor ID or run ID does not exist. |
| 422 | Unprocessable Entity | Target website blocked access or required fields were absent. No credits deducted. |
| 500 | Internal Server Error | An internal error occurred. Please retry or contact support. |
API Usage & Credits
Credit Usage
- • One credit per successful extraction
- • Failed or blocked extractions do not consume credits
- • HTTP 429 when your credit balance is exhausted
Starter & Growth
- • One-time purchases of 10,000 or 35,000 credits
- • Full REST API access and API key management
- • Save and reuse extractors in your dashboard
Developer Community & Support
Need help crafting custom extraction schemas, reporting anti-bot hurdles, or suggesting features? Connect with our team and community directly!