Skip to content

JSON-LD for your pages

Ask for an object as application/ld+json and ObjectsGrid answers a finished Schema.org JSON-LD document: the object's fields, the objects it references, and every address on your own domain. Put it in your page as <script type="application/ld+json"> and search engines and AI agents understand what the page is about.

GET https://apis.objectsgrid.com/products/p-123?lang=en
Accept: application/ld+json
{
  "@context": "https://schema.org",
  "@type": "Product",
  "@id": "https://shop.example.com/products/A-1#product",
  "url": "https://shop.example.com/products/A-1",
  "sku": "A-1",
  "name": "Trail shoe",
  "brand": {"@type": "Brand", "@id": "https://shop.example.com/brands/b-9", "url": "https://shop.example.com/brands/b-9", "name": "Acme"},
  "offers": [{"@type": "Offer", "@id": "https://shop.example.com/offers/o-5", "url": "https://shop.example.com/offers/o-5", "price": 89, "priceCurrency": "EUR",
              "availability": ["https://schema.org/InStock"], "itemOffered": {"@type": "Product", "@id": "https://shop.example.com/products/A-1#product"}}],
  "aggregateRating": {"@type": "AggregateRating", "ratingValue": 4.6, "reviewCount": 31},
  "review": [{"@type": "Review", "reviewBody": "Fits well", "author": {"@type": "Person"},
              "itemReviewed": {"@type": "Product", "@id": "https://shop.example.com/products/A-1#product"}}]
}

Your stored objects don't change: their at_id stays the API address, and your domain is applied only to the document.

Give your pages' addresses

Tell ObjectsGrid where each type's pages are, in your Organization Account's jsonLdAddresses: a template per type. {field} is replaced by the object's top-level field of that name, such as {id} or {sku}.

"jsonLdAddresses": {
  "Product": "https://shop.example.com/products/{sku}#product",
  "Brand": "https://shop.example.com/brands/{id}",
  "Offer": "https://shop.example.com/offers/{id}",
  "Organization": "https://example.com/companies/{id}#organization"
}
  • An object gets the whole address as @id, and the address without its fragment (#product) as url.
  • A template without a {field} gives every object of its type the same address: use one only for a type you have a single page for, such as your own company's.
  • Each template is an https address without a query, at most 512 characters; up to 50 types.
  • An object of a type you don't list, or whose field is missing or empty, gets no @id.
  • Only an administrator changes jsonLdAddresses, with PUT /organizationaccounts/{id}; a replacement that doesn't mention them keeps them. Allow up to a minute before every document has the new addresses.

What a document holds

  • Schema.org names. at_type becomes @type, or the object's additionalType when it names a Schema.org subtype: a Place whose additionalType is Store, Restaurant or another LocalBusiness is that type, and an Event whose additionalType is MusicEvent is a MusicEvent, as Google's local business and event results expect. The address template is still the stored type's (Place, Event). ObjectsGrid's own fields, id (and identifier, which repeats it), meta and tags, and the API addresses are left out.
  • Referenced objects, embedded. A reference, such as a Product's brand, is replaced by the referenced object's own fields, one level deep. Deeper references are {"@type", "@id"} when their type has an address, and left out when it has none. A reference to a page outside ObjectsGrid keeps its URL as @id.
  • Computed lists, embedded. The lists that grow as other objects are created are filled in: a Product's or Service's offers (up to 50) and review (the newest 10), an Organization's department, member and hasMemberProgram, a Place's containsPlace, a ProductGroup's hasVariant, an Event's offers (its tickets) and subEvent, a MemberProgram's hasTiers, a Course's hasCourseInstance and offers, an Organization's or local business's makesOffer. They come from search, so an object created a moment ago appears within seconds.
  • One language, or all. With ?lang=en, text in several languages is a plain string in that language, or the first one when it has none; Google's rich results read plain strings. Without lang, each text is a list of {"@value", "@language"}.
  • No personal data. A Person is never in a document: a reference to one, such as a review's author, is {"@type": "Person"}.
  • What the reader may read. Your access policy decides every object of the document, as for any read: a referenced object the caller may not read is left out, and hidden fields are removed.

The answer has Content-Type: application/ld+json, an ETag that changes when anything in the document changes, and counts as one request. ?version= reads an earlier version, as for JSON.

Orders, Invoices, Reservations, Permits, ReturnActions, ProgramMemberships, EmployeeRoles, JSONObjects, AppConfigurations, FeatureFlags, Carts, PayActions, Inventories, Persons, log events, Enums and GenericObjects have no document: asked for one, GET answers 406 Not Acceptable. Lists answer JSON.

Put it in your page

Fetch the document where you render the page, on your server or in your build, and write it into the page's HTML:

<script type="application/ld+json">
  {"@context": "https://schema.org", "@type": "Product", "@id": "https://shop.example.com/products/A-1#product", ...}
</script>

Search engines read it from the HTML. A page can also fetch it in the browser with a public API key that its access policy lets read these types; search engines that run your page's JavaScript read that too, but HTML is read by more of them.

From GraphQL

The types with a document have a jsonLd field, the same document as the REST read, so a page gets its data and its markup in one request:

query {
  product(id: "p-123") {
    name { at_value }
    jsonLd(lang: "en")
  }
}
  • jsonLd is a JSON value: write JSON.stringify(data.product.jsonLd) into the <script> tag.
  • It is the document of the version the object holds: with product(id: "p-123", version: "…"), that version's.
  • It works on referenced objects too, such as product { offers { ... on Offer { jsonLd } } }.
  • Types without a document, such as Order, Invoice, Reservation, Permit, ReturnAction, ProgramMembership and EmployeeRole, have no jsonLd field: a query that asks for it doesn't validate.
  • Each jsonLd costs 25 of a query's 500 (QUERY_TOO_COMPLEX), and one query reads at most 20 documents, however many items a list returns: the others are null, with a QUERY_TOO_COMPLEX error at their path.
  • A GraphQL request counts as one request, its documents included. GraphQL answers aren't cached by HTTP caches: for a page that needs the ETag or a CDN, fetch the document over REST.

Examples by type

Each type's document holds its own fields; these show what each embeds. An @id appears where the type has a template.

ProductGroup: its variants, the Products whose isVariantOf points to it.

{"@context": "https://schema.org", "@type": "ProductGroup", "@id": "https://shop.example.com/groups/G-1#group", "url": "https://shop.example.com/groups/G-1",
 "name": "Trail shoe", "sku": "G-1",
 "hasVariant": [{"@type": "Product", "@id": "https://shop.example.com/products/A-1#product", "sku": "A-1",
                 "isVariantOf": {"@type": "ProductGroup", "@id": "https://shop.example.com/groups/G-1#group"}}]}

Organization: its departments, and its members that are Organizations.

{"@context": "https://schema.org", "@type": "Organization", "@id": "https://example.com/companies/o-1#organization", "url": "https://example.com/companies/o-1",
 "name": "Acme", "logo": "https://example.com/logo.png",
 "department": [{"@type": "Organization", "@id": "https://example.com/companies/o-2#organization", "url": "https://example.com/companies/o-2", "name": "Acme Repairs"}]}

Place: the places it contains.

{"@context": "https://schema.org", "@type": "Place", "@id": "https://example.com/stores/s-1", "url": "https://example.com/stores/s-1",
 "name": "Acme Berlin", "address": {"@type": "PostalAddress", "addressLocality": "Berlin", "addressCountry": "DE"},
 "containsPlace": [{"@type": "Place", "@id": "https://example.com/stores/s-2", "name": "Acme Berlin service desk"}]}

Service: its provider, offers and reviews.

{"@context": "https://schema.org", "@type": "Service", "@id": "https://example.com/services/v-1", "url": "https://example.com/services/v-1",
 "name": "Bike repair", "provider": {"@type": "Organization", "@id": "https://example.com/companies/o-1#organization", "name": "Acme"}}

Review: what it reviews and its rating; its author is never named.

{"@context": "https://schema.org", "@type": "Review", "@id": "https://shop.example.com/reviews/r-1", "url": "https://shop.example.com/reviews/r-1",
 "reviewBody": "Fits well", "datePublished": "2026-11-25T10:00:00Z", "author": {"@type": "Person"},
 "itemReviewed": {"@type": "Product", "@id": "https://shop.example.com/products/A-1#product", "name": "Trail shoe"},
 "reviewRating": {"@type": "Rating", "ratingValue": 5, "bestRating": 5}}

Offer: what it offers.

{"@context": "https://schema.org", "@type": "Offer", "@id": "https://shop.example.com/offers/o-5", "url": "https://shop.example.com/offers/o-5",
 "price": 89, "priceCurrency": "EUR", "availability": ["https://schema.org/InStock"],
 "itemOffered": {"@type": "Product", "@id": "https://shop.example.com/products/A-1#product", "name": "Trail shoe"}}

Brand

{"@context": "https://schema.org", "@type": "Brand", "@id": "https://shop.example.com/brands/b-9", "url": "https://shop.example.com/brands/b-9",
 "name": "Acme", "slogan": "Built to last", "logo": "https://shop.example.com/acme.png"}

Rating: what it rates; its author is never named.

{"@context": "https://schema.org", "@type": "Rating", "ratingValue": 4, "bestRating": 5, "author": {"@type": "Person"},
 "itemReviewed": {"@type": "Brand", "@id": "https://shop.example.com/brands/b-9", "name": "Acme"}}

OfferCatalog: its offers.

{"@context": "https://schema.org", "@type": "OfferCatalog", "@id": "https://shop.example.com/catalogs/c-1", "url": "https://shop.example.com/catalogs/c-1",
 "name": "Winter sale",
 "itemListElement": [{"@type": "Offer", "@id": "https://shop.example.com/offers/o-5", "price": 79, "priceCurrency": "EUR"}]}

ServiceChannel: the service it provides.

{"@context": "https://schema.org", "@type": "ServiceChannel", "@id": "https://example.com/channels/h-1", "url": "https://example.com/channels/h-1",
 "name": "Repair hotline", "servicePhone": {"@type": "ContactPoint", "telephone": "+49 30 1234567"},
 "providesService": {"@type": "Service", "@id": "https://example.com/services/v-1", "name": "Bike repair"}}

A Store (a Place with additionalType Store): its kind is its @type, with the LocalBusiness fields.

{"@context": "https://schema.org", "@type": "Store", "@id": "https://shop.example.com/stores/s-1#place", "url": "https://shop.example.com/stores/s-1",
 "name": "Northpeak Berlin Mitte", "priceRange": "$$", "currenciesAccepted": "EUR", "paymentAccepted": "Cash, Credit Card",
 "address": {"@type": "PostalAddress", "streetAddress": "Alexanderplatz 1", "postalCode": "10178", "addressLocality": "Berlin", "addressCountry": "DE"},
 "parentOrganization": {"@type": "Organization", "@id": "https://shop.example.com/about#organization", "name": "Northpeak"}}

Event: its venue, the festival it is part of and its tickets, the Offers whose itemOffered is the Event.

{"@context": "https://schema.org", "@type": "MusicEvent", "@id": "https://shop.example.com/events/e-1#event", "url": "https://shop.example.com/events/e-1",
 "name": "Jazz Night", "startDate": "2027-06-01T20:00:00+02:00", "eventStatus": "https://schema.org/EventScheduled",
 "eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
 "location": {"@type": "BarOrPub", "@id": "https://shop.example.com/stores/s-2#place", "name": "Blue Note Bar"},
 "superEvent": {"@type": "Festival", "@id": "https://shop.example.com/events/f-1#event", "name": "Jazz Days"},
 "offers": [{"@type": "Offer", "@id": "https://shop.example.com/offers/t-1", "price": 40, "priceCurrency": "EUR"}]}

A salon (a Place with additionalType HairSalon): its catalog of services and the offers it makes, here a membership billed monthly.

{"@context": "https://schema.org", "@type": "HairSalon", "@id": "https://shop.example.com/salons/h-1#place", "url": "https://shop.example.com/salons/h-1",
 "name": "Studio Mitte", "priceRange": "$$",
 "hasOfferCatalog": [{"@type": "OfferCatalog", "@id": "https://shop.example.com/salons/h-1/services", "name": "Hair services"}],
 "makesOffer": [{"@type": "Offer", "@id": "https://shop.example.com/offers/m-1", "name": "Membership", "price": 29, "priceCurrency": "EUR",
   "priceSpecification": [{"@type": "UnitPriceSpecification", "price": 29, "priceCurrency": "EUR", "billingDuration": "P1M",
     "priceComponentType": "https://schema.org/Subscription"}]}]}

Course: its provider and its runs, the Events whose additionalType is CourseInstance, with their schedule.

{"@context": "https://schema.org", "@type": "Course", "@id": "https://shop.example.com/courses/c-1#course", "url": "https://shop.example.com/courses/c-1",
 "name": "German for beginners (A1)", "courseCode": "DE-A1",
 "provider": {"@type": "LocalBusiness", "@id": "https://shop.example.com/schools/s-1#place", "name": "Sprachschule Mitte"},
 "hasCourseInstance": [{"@type": "CourseInstance", "@id": "https://shop.example.com/events/e-7#event", "startDate": "2027-03-01T18:00:00+01:00",
   "courseMode": "onsite", "courseSchedule": {"@type": "Schedule", "byDay": ["https://schema.org/Monday", "https://schema.org/Wednesday"],
     "repeatFrequency": "P1W", "startTime": "18:00:00", "scheduleTimezone": "Europe/Berlin"}}]}

A bundle (a Product with additionalType ProductCollection): its contents.

{"@context": "https://schema.org", "@type": "ProductCollection", "@id": "https://shop.example.com/products/KIT-1#product", "url": "https://shop.example.com/products/KIT-1",
 "name": "Travel kit", "sku": "KIT-1",
 "includesObject": [{"@type": "TypeAndQuantityNode", "amountOfThisGood": 2, "unitCode": "C62",
   "typeOfGood": {"@type": "Product", "@id": "https://shop.example.com/products/SH-1#product", "name": "Shampoo"}}]}

A price range (an Offer with additionalType AggregateOffer), for a product several sellers sell. Google's price drop enhancement needs single Offers, so a shop with one price keeps an Offer.

{"@context": "https://schema.org", "@type": "AggregateOffer", "@id": "https://shop.example.com/offers/r-1", "priceCurrency": "EUR",
 "lowPrice": 649, "highPrice": 799, "offerCount": 5}

Member prices: an Offer's priceSpecification holds a price before a sale and a member price, which points to a MemberProgramTier; a MemberProgram's document embeds its tiers.

{"@context": "https://schema.org", "@type": "Offer", "@id": "https://shop.example.com/offers/o-7", "price": 79, "priceCurrency": "EUR",
 "priceSpecification": [
   {"@type": "UnitPriceSpecification", "price": 99, "priceCurrency": "EUR", "priceType": "https://schema.org/StrikethroughPrice"},
   {"@type": "UnitPriceSpecification", "price": 69, "priceCurrency": "EUR",
    "validForMemberTier": [{"@type": "MemberProgramTier", "@id": "https://shop.example.com/club/gold#tier"}]}],
 "shippingDetails": {"@type": "OfferShippingDetails", "shippingRate": {"@type": "MonetaryAmount", "value": 4.9, "currency": "EUR"},
   "shippingDestination": [{"@type": "DefinedRegion", "addressCountry": "DE"}]}}