sameAs and identifiers
Two schema.org properties connect an item to the rest of the web. sameAs points to a page that "unambiguously indicates the item's identity," and identifier holds "any kind of identifier for any kind of Thing."[1][2] Both are defined on Thing, so every type can use them.[3] This page gives the property-level definitions; it does not cover strategy for building an entity's presence.
sameAs
Schema.org defines sameAs as the "URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or official website." Its expected value is a URL.[1] One of schema.org's own examples uses Wikidata "as a source of URIs for entities in a sameAs relationship."[1]
Google lists sameAs as a recommended Organization property: "the URL of a page on another website with additional information about your organization," such as a profile on a social media or review site, and several URLs may be given.[4] For authors, Google says sameAs can be used as an alternative to url and that it "can understand both sameAs and url when disambiguating authors."[5] Google's introduction says it can make general use of sameAs beyond specific features.[6]
"sameAs": [
"https://www.wikidata.org/wiki/Q00000000",
"https://www.example-social-site.com/exampleplumbing"
]
The identifiers in the example are placeholders. sameAs is different from the JSON-LD @id keyword, which identifies a node inside the markup; see @context, @id and @graph.[7]
identifier and its sub-properties
Schema.org describes identifier as representing "any kind of identifier for any kind of Thing, such as ISBNs, GTIN codes, UUIDs etc.," and notes that it provides dedicated properties for many of them.[2] Its values can be PropertyValue, Text or URL.[2] Its sub-properties include accountId, duns, globalLocationNumber, gtin, isbn, issn, leiCode, orderNumber, productID, serialNumber, sku, taxID and usNPI.[2]
Identifiers commonly used for organizations:
| Property | Schema.org definition |
|---|---|
| taxID | The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US[8] |
| vatID | The value-added tax ID with national prefix, which can also be described as iso6523Code[8] |
| leiCode | An identifier that uniquely identifies a legal entity as defined in ISO 17442[8] |
| duns | The Dun & Bradstreet DUNS number for identifying an organization or business person[8] |
| globalLocationNumber | The 13-digit Global Location Number (GLN) of an organization, person or place[9] |
Google's Organization documentation recommends duns, globalLocationNumber, iso6523Code, leiCode, naics, taxID and vatID where applicable, and says taxID must match the country in the address.[4]
Names and disambiguation
Thing also provides alternateName, "an alias for the item," and disambiguatingDescription, "a short description of the item used to disambiguate from other, similar items."[3] Schema.org notes that other properties, in particular name, may be needed for the disambiguating description to be useful.[3] Google recommends alternateName for another common name of an organization, and for social media handles on profile pages.[4][10]
Choosing sameAs targets
The definition sets the test: the page must "unambiguously" indicate the item's identity.[1] Schema.org names three kinds of target, the item's Wikipedia page, its Wikidata entry and its official website, and Google's Organization documentation adds profile pages "on a social media or review site."[1][4] A target passes the test when it is about this exact entity: the business's own profile, not a directory category page; the person's own author page, not a page that lists many people; the Wikidata item for this company, not one for a company with a similar name.[1]
Schema.org's data model note separates sameAs from neighboring properties. sameAs "relates a thing to a page that indirectly identifies it" and "emphasises well known pages"; url "should be reserved to refer to more official or authoritative web pages, such as the item's official website"; and mainEntityOfPage marks pages whose main subject is the item, "including those not recognized as authoritative for that entity."[11] In practice, a business's own site goes in url, and sameAs lists other well-known pages that identify the same business.[11][4]
PropertyValue identifiers
When an identifier needs its scheme named, schema.org uses PropertyValue, "a property-value pair."[12] Its propertyID is "a commonly used identifier for the characteristic represented by the property," which can be a prefixed string, a site-specific string, or "a URL indicating the type of the property."[13] Schema.org's identifier page gives two examples: a Book with an identifier whose propertyID is "OCoLC" and a LocalBusiness with an identifier whose propertyID is "Company Number."[2]
The data model's background note adds guidance. Because every schema.org syntax already has a way to state a URI identifier (itemid in Microdata, resource in RDFa, @id in JSON-LD), "generally it is preferable to use these unless there is a specific requirement to explicitly state the kind of identifier, or to provide additional / alternative identifiers." A PropertyValue name-identifier pair "can be used when a standard URI form of the identifier is unavailable," and for naming schemes "there is a conventional short name for most identifier schemes (which should be used in lowercase form)."[11] PropertyValue's own definition warns: "Always use specific schema.org properties when a) they exist and b) you can populate them."[12] So taxID, vatID, leiCode or duns come before a generic PropertyValue for the same number.[8]
Wikidata identifiers
A Wikidata item has a QID, such as Q42 in schema.org's own sameAs example for Douglas Adams, and an entity URL built from it.[1] Two forms carry it:
- sameAs with the entity URL, which schema.org's definition and example both use.[1]
- identifier as a PropertyValue, with a lowercase scheme name and the QID as value, which fits the background note's guidance for stating an identifier's kind.[11][2]
The sameAs form is the one schema.org documents directly. Google's documentation does not mention Wikidata QIDs, and it does not say whether Google reads identifier PropertyValues on an Organization; it lists the specific identifier properties instead.[4] The QID should be the item for this exact entity, created and checked against its own sources, not a similarly named item.
Common mistakes
- Unverified targets. A link to an external knowledge-base page, a product-ontology class or a directory entry that has not been checked may describe a different or more general thing than the item.[1]
- Class pages as sameAs. sameAs identifies this item, not its category; a category or class URI belongs in additionalType if anywhere. See additionalType.[14]
- The item's own site in sameAs only. Schema.org's background note reserves url for the official site.[11]
- Generic PropertyValues where a specific property exists. Use taxID, vatID, leiCode, duns or iso6523Code.[12][4]
- Profiles of someone else. Linking an organization to profiles it does not control misrepresents ownership, which Google's guidelines prohibit.[15]
A fuller example
A fictional company with official profiles, a Wikidata item and a company registration number. All identifiers are placeholders.
{
"@context": "https://schema.org",
"@type": "Organization",
"@id": "https://www.example.com/#organization",
"name": "Example Plumbing",
"url": "https://www.example.com/",
"sameAs": [
"https://www.wikidata.org/wiki/Q00000000",
"https://www.example-social-site.com/exampleplumbing"
],
"identifier": [
{ "@type": "PropertyValue", "propertyID": "wikidata", "value": "Q00000000" },
{ "@type": "PropertyValue", "propertyID": "Company Number", "value": "00000000" }
],
"taxID": "00-0000000"
}
Common questions
What should sameAs point to?
Schema.org gives the examples of a Wikipedia page, a Wikidata entry or an official website.[1]
Is taxID a kind of identifier?
Yes. Schema.org lists taxID among the sub-properties of identifier.[2]
Should the Wikidata QID go in sameAs or identifier?
Schema.org's sameAs definition and example use the Wikidata URL in sameAs; an identifier PropertyValue can state the QID as well.[1][11]
Is url the same as sameAs?
No. Schema.org reserves url for official or authoritative pages such as the official site.[11]
Related topics
- Names and disambiguation
- Entity graphs on business websites
- additionalType
- Organization
- @context, @id and @graph
References
- ^ "sameAs (property)". Schema.org.
- ^ "identifier (property)". Schema.org.
- ^ "Thing (type)". Schema.org.
- ^ "Organization (Organization) structured data". Google Search Central.
- ^ "Article (Article, NewsArticle, BlogPosting) structured data". Google Search Central.
- ^ "Introduction to structured data markup in Google Search". Google Search Central.
- ^ "JSON-LD 1.1: A JSON-based Serialization for Linked Data (W3C Recommendation, 16 July 2020)". World Wide Web Consortium (W3C).
- ^ "Organization (type)". Schema.org.
- ^ "Person (type)". Schema.org.
- ^ "Profile page (ProfilePage) structured data". Google Search Central.
- ^ "Data model: background notes on mainEntity(OfPage) and identifier". Schema.org.
- ^ "PropertyValue (type)". Schema.org.
- ^ "propertyID (property)". Schema.org.
- ^ "additionalType (property)". Schema.org.
- ^ "General structured data guidelines". Google Search Central.