Skip to content

Batch create URLs

POST
/api/v1/urls/batch
curl -X POST 'https://dashboard.justcrawl.io/api/v1/urls/batch' \
-H 'Authorization: Bearer $JUSTCRAWL_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"urls":[{"url":"https://example.com/a"},{"url":"https://example.com/b","priority":5}]}'

Adds up to 1000 URLs per request. Invalid URLs (bad scheme, private-address, missing field) are silently filtered out and counted in the invalid field of the response — the call does not fail on partial validity, so callers can dump a noisy list and trust the gateway to keep only the good ones. Unverified-email accounts are capped at 5 URLs total (403 with error: 'EMAIL_NOT_VERIFIED' when the cap would be exceeded). Duplicates within the org are counted in duplicates rather than returned as 409s — batch semantics are best-effort upsert. For CSV uploads use POST /api/v1/urls/upload.

Media type application/json
object
urls
required
Array<object>
<= 1000 items
object
url
required
string
priority
integer
tags
Array<string>
Example generated
{
"urls": [
{
"url": "example",
"priority": 1,
"tags": [
"example"
]
}
]
}

Batch creation result. created is the count of new URLs persisted; duplicates were skipped because the URL already exists in the org; invalid is present and non-zero only when some input rows failed validation.

Media type application/json
object
created
integer
duplicates
integer
invalid
integer
nullable
Example generated
{
"created": 1,
"duplicates": 1,
"invalid": 1
}

Validation failed — request body or query is missing/invalid

Media type application/json
object
error
string
Example
{
"error": "Missing or invalid \"url\" field"
}

Missing or invalid authentication token

Media type application/json
object
error
string
Example
{
"error": "Missing or invalid authentication token"
}

Insufficient permissions for this operation

Media type application/json
object
error
string
Example
{
"error": "No organization. Complete onboarding first."
}

Unexpected server error. Logs and PostHog $exception capture

Media type application/json
object
error
string
Example
{
"error": "Something went wrong"
}