Webflow Developers von Webflow
Pages API: JSON-LD-Schema-Markup lesen und schreiben
Die Data API bietet nun Endpunkte zum Verwalten des JSON-LD-Schema-Markups einer Seite, bisher nur einzeln im Designer bearbeitbar; die Endpunkte sind locale-bewusst und unterstützen sekundäre Locales.
The Data API now exposes endpoints for managing the JSON-LD schema markup attached to a page. Schema markup powers rich search results such as FAQ snippets, breadcrumbs, organization cards, and product listings. Previously, schema markup could be edited only one page at a time in the Designer.
New endpoints
All four endpoints are available under the /v2/beta/ prefix.
Method
Path
Required scope
GET
/pages/{page_id}/schema-markup
pages:read
PUT
/pages/{page_id}/schema-markup
pages:write
POST
/sites/{site_id}/pages/schema-markup/query
pages:read
PATCH
/sites/{site_id}/pages/schema-markup
pages:write
Locale-aware reads and writes
Each endpoint accepts an optional localeId to target a secondary locale. When a secondary locale has no schema markup of its own, the response returns the primary locale's schema markup and sets isInherited to true.