PHPackages                             evabee/schema-org-json-ld - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. evabee/schema-org-json-ld

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

evabee/schema-org-json-ld
=========================

library for generating json-ld rich results

v1.0.2(2mo ago)123[4 issues](https://github.com/EvaLok/schema-org-json-ld/issues)[3 PRs](https://github.com/EvaLok/schema-org-json-ld/pulls)MITRustPHP &gt;=8.1.0

Since Apr 10Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/EvaLok/schema-org-json-ld)[ Packagist](https://packagist.org/packages/evabee/schema-org-json-ld)[ RSS](/packages/evabee-schema-org-json-ld/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (6)Versions (687)Used By (0)

schema-org-json-ld
==================

[](#schema-org-json-ld)

PHP and TypeScript/JavaScript library for generating schema.org JSON-LD structured data for Google Rich Results. Covers **all 31 Google Search Gallery categories** backed by **89 schema classes/modules** (**88 primary schema types + 1 additional sub-type**), with type-safe constructor-promoted properties and automatic serialization.

Validated against the [Google Rich Results Test](https://search.google.com/test/rich-results) via the [schema-org-json-ld-qc](https://github.com/EvaLok/schema-org-json-ld-qc) validation suite.

[![Tests](https://github.com/EvaLok/schema-org-json-ld/actions/workflows/main.yml/badge.svg)](https://github.com/EvaLok/schema-org-json-ld/actions/workflows/main.yml)[![PHP 8.1](https://camo.githubusercontent.com/d70e266076e28598d8ae3aeda67a004e4dc1f764f0d54e97ef142b529889496f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://github.com/EvaLok/schema-org-json-ld/actions/workflows/main.yml)[![PHP 8.2](https://camo.githubusercontent.com/6dab1427c2636572a765f9e0f332c0665ce863cbc46cece88aa44f747132c260/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://github.com/EvaLok/schema-org-json-ld/actions/workflows/main.yml)[![PHP 8.3](https://camo.githubusercontent.com/2bace8bb56a21d62a4c1c2e2018eb2e83eff46e07cab21c26ca42feda0bdd46e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://github.com/EvaLok/schema-org-json-ld/actions/workflows/main.yml)[![PHP 8.4](https://camo.githubusercontent.com/cf871f594e557c5b9ae8715a2b7207b9b73686ee83156cd0308489979d0d84e5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e342d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://github.com/EvaLok/schema-org-json-ld/actions/workflows/main.yml)[![PHP 8.5](https://camo.githubusercontent.com/38189c74fa19d38a84282702897dcd5bf0e54f8ee6be5cb02aa9a3a1f5711862/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e352d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://github.com/EvaLok/schema-org-json-ld/actions/workflows/main.yml)[![TypeScript CI](https://github.com/EvaLok/schema-org-json-ld/actions/workflows/ci-ts.yml/badge.svg)](https://github.com/EvaLok/schema-org-json-ld/actions/workflows/ci-ts.yml)[![Node 20](https://camo.githubusercontent.com/0b22cb852719be4393d106d0408c042e106ad78ddea6c2971bacd940fad38478/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4e6f64652d32302d3333393933333f6c6f676f3d6e6f64652e6a73266c6f676f436f6c6f723d7768697465)](https://github.com/EvaLok/schema-org-json-ld/actions/workflows/ci-ts.yml)[![Node 22](https://camo.githubusercontent.com/1fd067190f46294dbab358d5f4d6cfb26197dc4b1bcf32b28b0afdcf79d3fea6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4e6f64652d32322d3333393933333f6c6f676f3d6e6f64652e6a73266c6f676f436f6c6f723d7768697465)](https://github.com/EvaLok/schema-org-json-ld/actions/workflows/ci-ts.yml)[![Node 24](https://camo.githubusercontent.com/2e3692ca4882ada393b510b4223bfe6f0a7a0dc33518768b1be25b45eb5ab35c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4e6f64652d32342d3333393933333f6c6f676f3d6e6f64652e6a73266c6f676f436f6c6f723d7768697465)](https://github.com/EvaLok/schema-org-json-ld/actions/workflows/ci-ts.yml)[![npm](https://camo.githubusercontent.com/78712fad4b2772c5bef309b7b4da519c115ea5757dd40c958c8dec2cb0b63fe2/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f406576616265652f736368656d612d6f72672d6a736f6e2d6c64)](https://www.npmjs.com/package/@evabee/schema-org-json-ld)[![License: MIT](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](LICENSE)

---

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Quick Start](#quick-start)
- [Supported Types](#supported-types)
- [Usage Examples](#usage-examples)
    - [Article](#article)
    - [Breadcrumb](#breadcrumb)
    - [Carousel](#carousel)
    - [Course](#course)
    - [Dataset](#dataset)
    - [Discussion Forum](#discussion-forum)
    - [Education Q&amp;A](#education-qa)
    - [Employer Aggregate Rating](#employer-aggregate-rating)
    - [Event](#event)
    - [FAQ](#faq)
    - [Image Metadata](#image-metadata)
    - [Job Posting](#job-posting)
    - [Local Business](#local-business)
    - [Math Solver](#math-solver)
    - [Movie](#movie)
    - [Organization](#organization)
    - [Product](#product)
    - [Profile Page](#profile-page)
    - [Q&amp;A](#qa)
    - [Recipe](#recipe)
    - [Review Snippet](#review-snippet)
    - [Software App](#software-app)
    - [Speakable](#speakable)
    - [Subscription / Paywalled Content](#subscription--paywalled-content)
    - [Vacation Rental](#vacation-rental)
    - [Video](#video)
- [API Reference](#api-reference)
- [Testing](#testing)
- [Known Validator Limitations](#known-validator-limitations)
- [Contributing](#contributing)
- [License](#license)

---

Installation
------------

[](#installation)

### TypeScript / JavaScript

[](#typescript--javascript)

```
npm install @evabee/schema-org-json-ld
# or
yarn add @evabee/schema-org-json-ld
# or
bun add @evabee/schema-org-json-ld
```

### PHP

[](#php)

```
composer require evabee/schema-org-json-ld
```

> **Note:** The vendor name `evabee` is intentional. Due to Packagist requiring excessive GitHub permissions, the default `evalok` vendor namespace is unavailable. The package is otherwise identical.

---

Quick Start
-----------

[](#quick-start)

### PHP

[](#php-1)

```
