Linked Data: Principles, the 5-Star Model & Why It Matters

Linked data is a method of publishing structured data on the web so that each thing is identified by an HTTP URI, each URI returns useful data when looked up, and that data links to other URIs on other sites. The term and its four principles come from a 2006 design note by Tim Berners-Lee, and they are the practical publishing recipe behind the semantic web and most open knowledge graphs. When the data is also released under an open license, it is called linked open data.

The four linked data principles

Berners-Lee’s 2006 note “Linked Data” stated four rules. Each one solves a specific problem.

1. Use URIs as names for things. A URI is a globally unique identifier. If the Eiffel Tower is http://www.wikidata.org/entity/Q243, two datasets that both use that URI are talking about the same thing without any string matching. This applies to people, places, concepts, properties, and classes, not only documents.

2. Use HTTP URIs so that people can look those names up. Other identifier schemes exist (URNs, DOIs, ISBNs), but only HTTP URIs can be resolved by any web client without special infrastructure.

3. When someone looks up a URI, provide useful information, using the standards (RDF, SPARQL). Dereferencing http://www.wikidata.org/entity/Q243 should return data about the Eiffel Tower in a format a machine can parse: RDF for the data, SPARQL for querying. An HTML page alone satisfies a human but not a program.

4. Include links to other URIs, so that they can discover more things. The Eiffel Tower’s data should say that it is located in http://www.wikidata.org/entity/Q90 (Paris) and that it is the same thing as http://dbpedia.org/resource/Eiffel_Tower. Each link is a path a crawler can follow. Without this rule, the result is many isolated datasets; with it, the result is one graph.

The principles are deliberately modest. They do not require OWL, reasoning, or any specific vocabulary. They ask publishers to do with data what the web already did with documents: give things addresses and link them.

The 5-star open data scheme

In 2010 Berners-Lee added a rating scheme to encourage governments and institutions publishing open data to move toward linked data incrementally. Each star adds one requirement, and each level is useful on its own.

StarsRequirementExample
★Available on the web, in any format, under an open licenseA PDF of a budget report on a government site
★★Available as machine-readable structured dataThe same budget as an Excel file
★★★Machine-readable and in a non-proprietary formatThe same budget as CSV
★★★★Uses open W3C standards (RDF, SPARQL) and URIs to identify thingsThe budget as RDF, with each department and line item given a URI
★★★★★All of the above, and linked to other people’s data for contextDepartment URIs link to the Wikidata or official register entry for that department; currency links to a shared vocabulary

The point of the scheme is that a publisher does not have to reach five stars immediately. Moving from a PDF to a CSV is real progress. The fourth and fifth stars are where the data becomes linked data in the strict sense, because that is where URIs and cross-dataset links appear.

The Linked Open Data cloud

When many publishers reach four or five stars, the result is a web of interlinked datasets. The Linked Open Data (LOD) cloud diagram, maintained since 2007, shows these datasets as bubbles with lines between those that link to each other. It has grown from a dozen datasets to well over a thousand. Several act as hubs:

  • DBpedia extracts structured data from Wikipedia infoboxes and publishes it as RDF. It was the original center of the LOD cloud, and dbpedia.org/resource/... URIs remain among the most linked identifiers on the web.
  • Wikidata is a collaboratively edited knowledge base with over 100 million items, each identified by a Q-ID. It has largely replaced DBpedia as the central hub because it is edited directly rather than extracted, publishes a full RDF dump, and runs a public SPARQL endpoint.
  • GeoNames provides URIs and coordinates for millions of geographic features and is the usual target for place links.
  • The Library of Congress publishes name authorities and subject headings as linked data at id.loc.gov.
  • VIAF, the Getty vocabularies, Europeana, and life-sciences databases such as UniProt publish substantial linked datasets in their domains.

The defining feature of these datasets is that they use each other’s URIs. A Wikidata item for a painter carries a VIAF ID, a Getty ULAN ID, a GeoNames ID for the birthplace, and a link to the DBpedia resource. An application that starts anywhere in the cloud can follow links to everywhere else.

Dereferencing and content negotiation

A single URI serves two audiences: a person with a browser who wants HTML, and a program that wants RDF. Linked data servers handle this with HTTP content negotiation. The client states what formats it accepts in the Accept header, and the server responds with the best match, usually via a redirect from the entity URI to a format-specific document URI.

The following request asks Wikidata for the Eiffel Tower in Turtle.

curl -L -H "Accept: text/turtle" http://www.wikidata.org/entity/Q243

Wikidata responds with a 303 See Other redirect to https://www.wikidata.org/wiki/Special:EntityData/Q243.ttl, and curl -L follows it. The body is Turtle containing every statement about Q243. Requesting Accept: application/ld+json returns the same data as JSON-LD; a browser gets the human-readable item page.

The 303 redirect is deliberate. The URI http://www.wikidata.org/entity/Q243 identifies the tower itself, which cannot be sent over HTTP; the redirect points to a document about the tower. This distinction was debated at length in the semantic web community (the “httpRange-14” issue), and the 303 pattern was the W3C’s resolution. The alternative is the hash URI pattern (http://example.org/data#eiffel), where the fragment identifies the thing and the part before it identifies the document, so no redirect is needed.

Linked data on ordinary websites

Linked data is usually discussed in terms of large public datasets, but the same mechanism operates on any website that embeds JSON-LD with entity identifiers.

Consider the official site of a landmark carrying this markup:

{
  "@context": "https://schema.org",
  "@type": "LandmarksOrHistoricalBuildings",
  "@id": "https://www.toureiffel.paris/#landmark",
  "name": "Eiffel Tower",
  "sameAs": [
    "https://www.wikidata.org/wiki/Q243",
    "https://en.wikipedia.org/wiki/Eiffel_Tower"
  ]
}

Measured against the four principles, this page does most of what linked data asks. The @id gives the landmark an HTTP URI (principles 1 and 2). The page itself is what a client receives on dereferencing that URI, and the JSON-LD is standard RDF (principle 3). The sameAs array links the entity to Wikidata and Wikipedia URIs (principle 4). A search engine that crawls this page can merge everything it says about https://www.toureiffel.paris/#landmark with everything Wikidata says about Q243, because the page has asserted that they are the same thing.

This is how the semantic web arrived on mainstream websites: through schema.org JSON-LD and sameAs links to shared identifiers rather than through SPARQL endpoints. It is four-star data with a fifth-star link, embedded in HTML. The application to search is covered in sameAs schema and entity SEO.

Linked data vs adjacent terms

Linked data vs semantic web. The semantic web is the broader program and its standards stack. Linked data is the publishing method, emphasizing practical publishing over the reasoning and agent scenarios that had dominated earlier discussion.

Linked data vs linked open data. Linked data can be private. A company can publish RDF with HTTP URIs and links entirely inside its firewall. Linked open data adds an open license (CC0, CC BY, ODbL, or similar). The five-star scheme is specifically about open data; the four principles apply to both.

Linked data vs knowledge graph. A knowledge graph is the data structure; linked data is one way to publish and interconnect knowledge graphs. Many knowledge graphs, including those in labeled property graph (LPG) databases and Google’s own, are not published as linked data.

For developers

Consuming linked data requires an RDF library and an understanding of content negotiation. In Python, rdflib can parse a dereferenced URI directly:

from rdflib import Graph, URIRef, RDFS

g = Graph()
g.parse("http://www.wikidata.org/entity/Q243", format="turtle")

for label in g.objects(URIRef("http://www.wikidata.org/entity/Q243"), RDFS.label):
    if label.language in ("en", "fr"):
        print(label, label.language)

Wikidata’s Turtle output per item is large, so production code should query the Wikidata Query Service with SPARQL rather than dereferencing items one at a time.

Publishing linked data has three parts: choose a URI scheme (slash URIs with 303 redirects or hash URIs), serve RDF via content negotiation or embedded JSON-LD, and reuse existing vocabularies and identifiers rather than minting new ones. Minting a new URI for Paris when wd:Q90 exists breaks the link that makes the data useful. For the storage layer see graph databases; for construction see knowledge graph in Python.

For SEOs

Search engines apply linked data principles when they read structured data. The @id property gives an entity a stable URI across pages; using the same @id for an organization on every page tells Google those statements are about one thing. The sameAs property links that entity to external identifiers, and Wikidata Q-IDs are the most useful targets because Google’s Knowledge Graph reconciles against Wikidata and Wikipedia; see how to get a knowledge panel.

Two rules follow. sameAs should point to pages about the same entity, never to related things; linking a company to its founder’s Wikipedia page asserts that the two are identical. And the URI in @id should be one the site controls and keeps stable, typically the canonical home page URL with a fragment such as #organization.

Common mistakes

Minting URIs for things that already have them. New identifiers for well-known entities create islands. Reuse Wikidata, GeoNames, and domain registries.

Non-resolvable URIs. A URI that returns a 404 fails the second and third principles.

Publishing without links. Four-star RDF that references nothing outside itself is structured, standard, and isolated. The fifth star makes it linked.

Related pages

FAQ

What is linked data in simple terms?

Linked data is a way of publishing information on the web so that each thing has its own web address, looking up that address returns structured facts about the thing, and those facts point to the addresses of related things on other sites. It lets separate databases connect to each other the way web pages connect through hyperlinks.

What are the four principles of linked data?

Tim Berners-Lee’s 2006 principles are: use URIs as names for things; use HTTP URIs so those names can be looked up; return useful information in standard formats (RDF, SPARQL) when a URI is looked up; and include links to other URIs so that more things can be discovered. Together they turn isolated datasets into one connected graph.

What is 5-star linked open data?

The 5-star scheme rates open data by how reusable it is. One star: available on the web under an open license. Two: machine-readable. Three: in a non-proprietary format such as CSV. Four: uses RDF and URIs to identify things. Five: linked to other datasets for context. Only four- and five-star data is linked data in the strict sense.

Is schema.org JSON-LD a form of linked data?

Yes, when it uses identifiers. JSON-LD is an RDF serialization, @id gives an entity an HTTP URI, and sameAs links it to Wikidata, Wikipedia, or other external URIs. A web page with this markup is publishing linked data embedded in HTML, which is how search engines reconcile entities on websites with their own knowledge graphs.

Sources and further reading

  • Berners-Lee, “Linked Data” design note (2006, updated 2009): https://www.w3.org/DesignIssues/LinkedData.html
  • 5-star Open Data: https://5stardata.info/
  • The Linked Open Data Cloud: https://lod-cloud.net/
  • Heath and Bizer, “Linked Data: Evolving the Web into a Global Data Space” (free online edition): http://linkeddatabook.com/
  • W3C, “Cool URIs for the Semantic Web”: https://www.w3.org/TR/cooluris/
  • Wikidata: Data access documentation: https://www.wikidata.org/wiki/Wikidata:Data_access
  • Google Search Central, structured data introduction: https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data