Sub topic 9
Structured Data: Organization Markup and sameAs
This chapter assumes you can read HTML and JSON, and that you know what an entity is and why consistent naming matters (covered in earlier chapters). It shows how to turn those ideas into machine-readable markup that ties your pages to one entity.
What structured data does and does not do
Structured data is markup that describes a page's content in a fixed vocabulary, so software does not have to infer it from prose. The most widely used vocabulary is schema.org. The most common syntax is JSON-LD (JSON for Linked Data), a <script> block that sits in the page and is separate from the visible text.
For entity work, structured data does three jobs:
- It states the entity's preferred name and known alternate names.
- It gives the entity a stable identifier, so every page can point to the same node.
- It links the entity to the same entity's records elsewhere on the web, such as a LinkedIn page, a Wikidata item, or a GitHub organization.
It does not guarantee anything about AI answers. No AI vendor has published a rule that says "we read your Organization markup and change our output." What is reasonable to claim is narrower. Search engines and crawlers parse schema.org markup. Retrieval systems that sit on top of search indexes may see the same pages. Knowledge graph builders use such markup as one input among many. Treat the markup as a low-cost clarification of facts you already publish, not as a lever.
Anatomy of Organization markup
Here is a complete example.
{
"@context": "https://schema.org",
"@type": "Organization",
"@id": "https://www.example.com/#organization",
"name": "Example Analytics",
"alternateName": "ExampleAI",
"url": "https://www.example.com/",
"logo": "https://www.example.com/logo.png",
"sameAs": [
"https://www.linkedin.com/company/example-analytics",
"https://github.com/example-analytics"
]
}Each property has a purpose.
| Property | Role | Common mistake |
|---|---|---|
| `@context` | Tells the parser that the keys come from schema.org. | Using `http://` in some pages and `https://` in others. Pick one. |
| `@type` | Declares what kind of thing this is. | Using `Organization` when a more specific subtype such as `Corporation` or `NGO` fits. Both are valid, but the subtype is more precise. |
| `@id` | A stable identifier for this node. | Changing it between pages, or leaving it out. |
| `name` | The preferred name. | Using a different form on each page. |
| `alternateName` | Other names people and sources use. | Listing guesses or marketing slogans. |
| `url` | The canonical home page. | Pointing at a redirecting or non-canonical URL. |
| `logo` | An image URL. | Using a URL that returns an error or a tiny file. |
| `sameAs` | URLs of other pages that identify the same entity. | Linking to pages about something else (see below). |
The `@id` is an identifier, not a page
The value https://www.example.com/#organization looks like a URL, but its job is to be a name. The fragment (#organization) makes it distinct from the home page itself, which avoids saying "the organization is the web page." You do not have to serve anything at that address. You only have to use the exact same string every time you refer to the organization.
This matters because JSON-LD blocks on different pages can refer to the same node. A product page, for example, can say who makes the product without repeating every detail:
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Example Dashboard",
"brand": { "@id": "https://www.example.com/#organization" }
}A consumer that merges the markup from both pages sees one organization with one set of facts. If you change the @id on one page, you create a second, unconnected entity.
What `sameAs` means
sameAs says: "the thing at this URL is the same thing I am describing." It is an identity claim, not a "related to" or "follow us" link. The difference has consequences.
Good sameAs targets:
- Your official profile on a professional network or code host.
- Your Wikidata item or Wikipedia article, if one exists.
- Your entry in a business registry or standards body that issues an identifier for you.
- Official profiles on major social platforms.
Poor sameAs targets:
- A page about your founder. That is a different entity.
- A review site listing that mixes you with similarly named companies.
- A press article. It is about you, but it is not you.
- A parent company or product page, unless you are describing that entity instead.
A wrong sameAs link does more harm than a missing one. It asserts an identity that a parser may take at face value, and it can merge your entity with another.
Placing the markup
Put the full Organization block on one canonical page, usually the home page or an "About" page. Other pages can reference it by @id, as in the product example above. Some sites repeat the full block on every page. That works, but it raises the chance that copies drift apart.
JSON-LD goes in a script tag:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"@id": "https://www.example.com/#organization",
"name": "Example Analytics",
"url": "https://www.example.com/"
}
</script>The markup should be present in the HTML that crawlers receive. If your site builds the script tag only in the browser with JavaScript, some crawlers will not see it. Check the raw response, not just the rendered page.
The markup should also match the visible page. Search engines have guidelines against marking up content that users cannot see. Your name, logo, and links in the markup should be the ones a visitor would see on the site.
Connecting markup to the rest of your entity record
Markup is one side of a two-way check. Parsers that care about identity tend to look for agreement:
- Your site says "I am the entity at this LinkedIn URL."
- The LinkedIn profile links back to your site.
- The name in both places matches.
When the links run in both directions and the names agree, the identity claim is well supported. When only your site makes the claim, it is weaker. So after adding sameAs, visit each target profile and confirm that it lists your canonical URL and your preferred name.
If your organization has a Wikidata item, its identifier (such as https://www.wikidata.org/wiki/Q42, with your own item number) is among the more valuable sameAs entries. Wikidata is a public knowledge graph that other systems reuse. Do not create an item for an organization that does not meet Wikidata's notability and sourcing policies. Such items get deleted, and doing so repeatedly can reflect poorly on you.
Checking your markup
Validate in two ways. First, check syntax and vocabulary. The Schema Markup Validator at validator.schema.org accepts a URL or a pasted snippet and reports errors. Google's Rich Results Test checks the subset of markup that Google uses for search features. Second, check content: does every URL resolve, and does each one describe your organization?
You can also check programmatically. This script extracts JSON-LD from a page and lists the sameAs URLs with their HTTP status:
import json
import re
import urllib.request
def fetch(url):
req = urllib.request.Request(url, headers={"User-Agent": "markup-check/1.0"})
with urllib.request.urlopen(req, timeout=10) as resp:
return resp.read().decode("utf-8", errors="replace")
def extract_jsonld(html):
pattern = r'<script[^>]*type="application/ld\+json"[^>]*>(.*?)</script>'
blocks = re.findall(pattern, html, flags=re.DOTALL | re.IGNORECASE)
return [json.loads(b) for b in blocks]
def status(url):
req = urllib.request.Request(url, method="HEAD", headers={"User-Agent": "markup-check/1.0"})
try:
with urllib.request.urlopen(req, timeout=10) as resp:
return resp.status
except Exception as exc:
return str(exc)
page = fetch("https://www.example.com/")
for block in extract_jsonld(page):
if block.get("@type") == "Organization":
print("Organization:", block.get("name"), block.get("@id"))
for link in block.get("sameAs", []):
print(" ", status(link), link)Some sites reject HEAD requests or block scripts, so a failure here means "look at it by hand," not "the link is broken." Replace the example URL with your own.
Edge cases and failure modes
- Several
@typevalues or@graph. Sites often combine nodes (Organization, WebSite, WebPage) in one@grapharray. The script above only handles a top-level object. Adapt it if your site uses@graph. - Duplicate blocks that disagree. A theme and an SEO plugin may each emit an Organization block with different names or logos. Search the page source for every
ld+jsonblock and remove the conflicts. - Name variants. Put only real, documented variants in
alternateName. Variants help a parser connect "ExampleAI" in a press article to your entity, but invented variants add noise. - Rebrands and mergers. Keep the old name in
alternateName, keep the same@idif the legal entity continues, and updatesameAsprofiles. Redirect old URLs. - Ambiguous names. If another company shares your name,
sameAsand a precisedescriptionare your main disambiguation tools in markup. They do not fix confusion in third-party content, which you cannot edit. - Local and multi-brand businesses. Use
LocalBusinesssubtypes for physical locations, and give each location its own@idlinked to the parent withparentOrganization.
Limits
Markup helps machines read what you already say. It does not create notability, and it does not replace independent sources. A model or retrieval system that decides what to say about you weighs many signals, and the later chapters on corroboration and measurement cover those. A reasonable expectation is that clean markup removes avoidable confusion. It will not promote a brand that has little presence elsewhere.
Checklist
- Choose one preferred name and one canonical URL.
- Write one Organization block with a fixed
@id. - Add
alternateNameonly for documented variants. - Add
sameAsfor profiles you control that describe the same entity. - Confirm each profile links back to your site and uses the same name.
- Reference the
@idfrom other pages instead of redefining the organization. - Validate syntax, then check every URL by hand.
- Review the markup whenever you rebrand or change profiles.
Exercise
A product page's JSON-LD contains "brand": {"@type": "Organization", "name": "Example Analytics"}, with no @id. The home page defines the organization with @id https://www.example.com/#organization and a sameAs list. What problem can this cause, and how do you fix it?
Show answer
Without the @id, a parser may treat the product page's brand as a separate, anonymous organization that has no sameAs links or other facts, so the two descriptions are not merged into one entity. Fix it by replacing the inline object with "brand": {"@id": "https://www.example.com/#organization"}, using exactly the same identifier string as the home page.
Exercise
You are adding sameAs links. Your candidates are your official LinkedIn company page, a news article about your funding round, your CEO's personal profile, and your GitHub organization. Which belong in sameAs, and what should you check afterward?
Show answer
Include the LinkedIn company page and the GitHub organization, since each is an official profile of the same organization. Leave out the news article (it is about you, not you) and the CEO's profile (a different entity). Afterward, check that each included profile links back to your site and uses the same name, and that the URLs resolve.
Exercise
Your Python script that lists sameAs links prints nothing for a site, though the page source shows an Organization block. Name two likely causes.
Show answer
The block may be nested inside a @graph array, so the top-level @type check never matches. Alternatively, the script tag may use different attribute formatting (for example single quotes around application/ld+json) that the regular expression does not match. A third possibility is that the block is injected by JavaScript and absent from the raw HTML the script fetched.