DEV Community

Marrakech Transport
Marrakech Transport

Posted on

Schema.org for Transport Services: How We Built a Rich Entity Graph That Google Actually Reads

Most transport booking sites slap a basic LocalBusiness schema on their homepage and call it done. We went deeper — building a connected entity graph that links our operator, services, vehicles, and routes across 633 pages in 8 languages. Here's what we learned.

The Problem with Basic Schema

A typical transport site might have this on their homepage:

{
  "@type": "LocalBusiness",
  "name": "Some Transfer Company",
  "telephone": "+1234567890"
}
Enter fullscreen mode Exit fullscreen mode

This tells Google almost nothing useful. It doesn't describe what you do, where you operate, what vehicles you use, or how your services connect to the places you serve.

For navetteforyou.com, a private transfer service in Marrakech, we needed Google to understand:

  1. Who operates the service (Serenity Morocco Tours — a registered business)
  2. What the service does (private airport transfers, day trips, intercity travel)
  3. Where it operates (Marrakech, with routes to Essaouira, Imlil, Ouarzazate, etc.)
  4. How to book (website, WhatsApp, phone)
  5. That all 8 language versions describe the same entity

The Entity Graph Architecture

Instead of isolated schema blocks, we built a connected graph where every entity references others by @id:

{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "Organization",
      "@id": "https://www.serenitymoroccotours.com/#organization",
      "name": "Serenity Morocco Tours",
      "url": "https://www.serenitymoroccotours.com",
      "sameAs": [
        "https://www.wikidata.org/wiki/Q142170383",
        "https://www.google.com/maps?cid=16071804274271650522",
        "https://www.instagram.com/serenity_morocco_tours/"
      ]
    },
    {
      "@type": "WebSite",
      "@id": "https://www.navetteforyou.com/#website",
      "name": "Marrakech Transport",
      "url": "https://www.navetteforyou.com",
      "publisher": { "@id": "https://www.serenitymoroccotours.com/#organization" }
    },
    {
      "@type": "TaxiService",
      "provider": { "@id": "https://www.serenitymoroccotours.com/#organization" },
      "areaServed": {
        "@type": "City",
        "name": "Marrakech",
        "addressCountry": "MA"
      }
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

The key insight: @id creates a persistent, referenceable identity. When the Organization appears on the homepage, a route page, and a guide page, they all point to the same @id — Google understands it's one entity, not three.

sameAs: Connecting Your Entity Across the Web

The sameAs array is where entity recognition gets powerful. We link to every authoritative profile where our operator exists:

export const OPERATOR_SAME_AS = [
  "https://www.wikidata.org/wiki/Q142170383",
  "https://www.google.com/maps?cid=16071804274271650522",
  "https://www.instagram.com/serenity_morocco_tours/",
  "https://linktr.ee/marrakechtransport",
  "https://medium.com/@navetteforyou2026",
  "https://dev.to/navetteforyou",
  // ... more profiles
];
Enter fullscreen mode Exit fullscreen mode

Wikidata is especially valuable — it's a structured knowledge base that Google actively reads. Having a Wikidata entity (Q142170383) with matching claims (instance of: business, country: Morocco, industry: transport) strongly reinforces entity recognition.

Route-Level Schema

Each route page carries its own structured data describing the specific transfer:

{
  "@type": "TaxiService",
  "name": "Private Transfer: Marrakech Airport to Medina",
  "provider": { "@id": "https://www.serenitymoroccotours.com/#organization" },
  "areaServed": { "@type": "City", "name": "Marrakech" },
  "availableChannel": {
    "@type": "ServiceChannel",
    "serviceUrl": "https://www.navetteforyou.com/en/airport-transfer",
    "servicePhone": "+212 701 664 704"
  }
}
Enter fullscreen mode Exit fullscreen mode

This means each of our 633 pages carries contextually relevant schema — not a copy-pasted block, but data generated from the actual route parameters.

Multilingual Schema with hreflang

Every page emits schema in the page's own language, and the hreflang tags handle the cross-language references. We don't duplicate schema across languages — instead, each locale's page has its own schema with localised names and descriptions, while the @id references remain constant.

This is important: the Organization @id is language-agnostic. Whether you're on the French page or the Arabic page, the operator entity is the same.

Validation and Testing

We validate schema in three ways:

  1. Build-time: Our Astro build generates the JSON-LD and TypeScript catches malformed objects
  2. Lighthouse: Every deploy runs Lighthouse checks — structured data validation is part of the SEO audit
  3. Rich Results Test: We manually check key pages in Google's Rich Results Test after major schema changes

The result: Google Search Console shows our structured data as valid across all page types, with no errors or warnings.

Automated Price Validation

One detail that matters for transport sites: our pre-deploy script (static-price-check.ts) scans all 633 generated pages and validates 17,113 price points. This ensures no pricing error ships to production — crucial when schema data includes price ranges that Google might surface in search results.

The Stack

Built with Astro, hosted on Vercel, with schema generated at build time from TypeScript source data. The entity graph is maintained in src/content/site.ts — a single source of truth for all brand constants, contact details, and profile URLs.

Operated by Serenity Morocco Tours — visit navetteforyou.com to see the schema in action (inspect any page's source), or reach us on WhatsApp at +212 701 664 704.


If you're building a service-oriented site and want Google to actually understand what you do, invest in a proper entity graph. The days of keyword-stuffed meta descriptions are over — structured data is how you tell search engines your story.

Top comments (0)