indexing

Validate Parsing Script

Validate a JavaScript parsing script without running it against real data.

Upload your .js file as multipart/form-data under the file field. The endpoint runs the same V8 sandbox that json_handler uses at indexing time, so a script that validates here will work when you index files.

Checks:

  1. JavaScript syntax parses cleanly
  2. Script exports a default function

Returns HTTP 200 for both valid and invalid scripts — valid: false is a business-logic result, not an HTTP error. 4xx/5xx responses indicate auth failures, malformed requests, or service unavailability.

post/v2/parsing-scripts/validate

Headers

authorizationstring nullable

Response

Successful Response

errorstring nullable

Human-readable error message when valid=false. Null when valid=true.

error_typestring nullable

Error category when valid=false: 'syntax_error', 'no_export'. Null when valid=true.

validboolean required

True if the script passes all validation checks

Changes