RankParse

Schema Markup

Real-time extraction of schema.org JSON-LD structured data from any URL, including entities nested inside @graph arrays.

GET /v1/schema-markup

Fetches the target URL in real time and extracts every schema.org JSON-LD block (<script type="application/ld+json">), including entities nested inside @graph arrays. Malformed blocks are skipped and reported individually rather than failing the whole request. Costs 2 credits.

Parameters

ParameterTypeRequiredDescription
urlstringYesThe full URL to analyze

Request

curl "https://api.rankparse.com/v1/schema-markup?url=https://stripe.com/about" \
  -H "X-API-Key: rp_your_key"

Response

{
  "data": [
    {
      "type": ["Organization"],
      "id": "https://stripe.com/#organization",
      "block_index": 0,
      "source": "graph",
      "properties": {
        "@context": "https://schema.org",
        "@type": "Organization",
        "@id": "https://stripe.com/#organization",
        "name": "Stripe",
        "url": "https://stripe.com",
        "logo": "https://stripe.com/img/logo.png"
      }
    },
    {
      "type": ["WebPage"],
      "id": null,
      "block_index": 0,
      "source": "graph",
      "properties": {
        "@type": "WebPage",
        "name": "About Us",
        "url": "https://stripe.com/about"
      }
    }
  ],
  "final_url": "https://stripe.com/about",
  "status_code": 200,
  "response_time_ms": 287,
  "has_schema_markup": true,
  "types": ["Organization", "WebPage"],
  "block_count": 2,
  "valid_block_count": 2,
  "invalid_block_count": 0,
  "invalid_blocks": [],
  "credits_used": 2
}

Response fields

FieldDescription
dataOne entry per schema.org entity found, flattened across blocks and @graph arrays
data[].typeNormalized @type(s) — always an array, even when the block declared a single string
data[].idThe entity's @id, or null if absent
data[].block_index0-based index of the <script> block the entity came from
data[].sourcetop_level for a block's own object or array item, graph for an entity nested inside @graph
data[].propertiesThe full parsed JSON-LD object, including @context/@type/@id and all fields
final_urlThe URL after following redirects
has_schema_markuptrue when at least one entity was successfully extracted
typesUnique schema.org types across every entity, sorted alphabetically
block_countTotal <script type="application/ld+json"> blocks found on the page
invalid_blocksMalformed blocks, each with its index and JSON parse error

Notes

  • A malformed JSON-LD block never fails the request: it is skipped and reported in invalid_blocks with its parse error
  • A page with no JSON-LD returns 200 with data: [] and has_schema_markup: false, not an error
  • Returns 503 with code: fetch_failed if the target URL is unreachable

On this page