Extract JSON-LD
web.extract_json_ld
Overview
You send HTML you already have and we find every <script type="application/ld+json"> block in it, check each one parses as JSON, hand back the parsed content, and surface the @type it declares. No script ever runs and nothing is fetched, so a hostile page cannot make us do anything. This is extraction rather than schema.org review, which web.validate_json_ld covers. Accepts file input via file_ref — no need to extract file content first.
Fishing script blocks out with a regular expression breaks on real pages, and you want the content read without a browser anywhere near it.
Reliability
Same markup and same options always give the same answer, and nothing leaves the platform. Two behaviours often surprise people: a block that fails to parse is reported in errors and still returned, so a broken page never fails the whole call; and turning off both validateJson and compact means we never parse at all, so validJson comes back true and type comes back null for every block. Blocks past maxBlocks are dropped with a warning rather than an error. Bad input is rejected outright and retrying will not help — sending neither html nor file_ref, a file reference we cannot read for you, maxBlocks outside 1 to 10000, or content beyond 2097152 bytes.
Context footprint
Each block's parsed content comes back in full, so a page with large product feeds returns a lot — set compact to false, or lower maxBlocks, to shrink it. A successful call costs 1 execution credit.
When to use it
When you hold some HTML and want its structured-data blocks, parsed and listed.
When the page still needs fetching, when a remote @context has to be resolved, or when you need schema.org rules applied to the result.
Runs on jsoup for the markup and Jackson for the JSON inside each block.
Scope
Non-goals
- Does not run any script on the page
- Does not fetch the page, or resolve the @context it points at
- Does not check schema.org rules, which web.validate_json_ld does
- Does not merge, reshape, or deduplicate the blocks it finds
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
File limits
Constraints this skill applies to your input and generated files. The “Limited by” column shows the static source of each cap; none of these can be raised by upgrading your plan.
| Limit | Value | Limited by |
|---|---|---|
| Maximum size per input file | 2 MiB | Skill maximum |
How we handle your data
What this means
This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response does not contain submitted content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| html | string | No | Bounded inline source. Required unless file_ref is provided. |
| file_ref | string | No | Tenant-scoped opaque file reference. Omit it when inline source is supplied. |
| baseUrl | string | No | Optional absolute base URL for relative identifiers; omit it to preserve relative values. |
| validateJson | boolean | No | Whether malformed JSON blocks become errors; omit it for true. |
| compact | boolean | No | Whether parsed blocks are compacted; omit it for false. |
| maxBlocks | integer | No | Block cap; omit it for one hundred. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| blocks | array | Yes | Bounded array of parsed JSON-LD block receipts in document order. The item shape is defined by the nested schema and the array contains from 0 through 10000 items. |
| blockCount | integer | Yes | Returned JSON-LD block count. |
| errors | array | Yes | Bounded array of malformed-block error strings. The item shape is defined by the nested schema and the array contains from 0 through 20000 items. |
| warnings | array | No | Bounded array of non-fatal safe warning strings. The item shape is defined by the nested schema and the array contains from 0 through 20000 items. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"web.extract_json_ld","input":{"html":"<script type=\"application/ld+json\">{}</script>"}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("web.extract_json_ld", {"html":"<script type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"Organization\",\"name\":\"Acme\"}</script>"});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not run any script on the page
- Does not fetch the page, or resolve the @context it points at
- Does not check schema.org rules, which web.validate_json_ld does
- Does not merge, reshape, or deduplicate the blocks it finds
- Fetching the page — bring the markup with you
- Judging whether the structured data satisfies schema.org
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "web.extract_json_ld",
"input": {
"html": "<script type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"Organization\",\"name\":\"Acme\"}</script>"
}
}Examples
One Organization block extracted
{
"html": "<script type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"Organization\",\"name\":\"Acme\"}</script>"
}{
"blocks": [
{
"index": 0,
"validJson": true,
"rawLength": 70,
"type": "Organization",
"json": {
"name": "Acme",
"@type": "Organization",
"@context": "https://schema.org"
}
}
],
"warnings": [],
"blockCount": 1,
"errors": []
}Malformed block reported without failing the call
{
"validateJson": true,
"html": "<script type=\"application/ld+json\">{not json}</script>"
}{
"blocks": [
{
"index": 0,
"rawLength": 10,
"validJson": false,
"type": null
}
],
"warnings": [],
"blockCount": 1,
"errors": [
"Block 0 is not valid JSON."
]
}Recommended use cases
- Pull the structured data out of a page you have already saved
- Audit schema.org markup before you publish it
- Feed the blocks you find into web.validate_json_ld
Avoid for
- Fetching the page — bring the markup with you
- Judging whether the structured data satisfies schema.org
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.