Written and maintained by CASRAI Editorial Board
Last updated
A knowledge graph is a way of storing facts as a network: things are the nodes, and the relationships between them are the edges. In the W3C’s RDF model, each fact is a three-part statement called a triple, and a set of triples can be drawn as a connected graph. This guide ties the general idea to the standard behind it and to open research resources you can use today.
What a knowledge graph is
The W3C RDF 1.1 Primer states that “an RDF statement expresses a relationship between two resources.” The subject and object are the two resources being related, and the predicate is the nature of their relationship. Because a statement has three elements, it is called a triple. In the Primer’s words, “we can visualize triples as a connected graph,” and the subjects and objects of the triples make up the nodes of that graph.
Resources are named with IRIs. The Primer says an IRI identifies a resource, and that IRIs identify things such as documents, people, physical objects and abstract concepts. That is why identifiers matter in research: two systems can only be joined into one graph if they point at the same thing with the same identifier. See persistent identifiers (PIDs) for the research-side vocabulary.
Knowledge graph, knowledge base, ontology, database
These terms overlap and definitions vary between vendors and communities. Wikidata, for example, describes itself as a “free, collaborative, multilingual, secondary knowledge base”, and its data is a graph of items linked by statements. This page uses “knowledge graph” for data expressed as nodes and labelled edges, with the RDF triple as the common underlying model. The RDF graph model is, per the Primer, independent of any particular concrete syntax, so the same graph can be written out in different file formats.
What it is used for in research
- Linking records across systems. Items and statements let a person, institution or paper in one source be connected to the same entity in another. See Wikidata identifiers as a hub for research entities.
- Describing papers in structured form. The Open Research Knowledge Graph states that it “aims to describe research papers in a structured manner.”
- Cataloguing the research system. OpenAlex calls itself “the open catalog of the global research system” and “a comprehensive index of the world’s research.”
- Modelling a domain. Shared conceptual models sit behind graph data; see CIDOC CRM (ISO 21127) and the VIVO open-source CRIS platform.
Access it: official sources only
- Wikidata: Wikidata:Introduction. Its data is published under the Creative Commons Public Domain Dedication 1.0 (CC0).
- Wikidata Query Service: query.wikidata.org, the public instance run by Wikimedia.
- Open Research Knowledge Graph: orkg.org.
- OpenAlex: help.openalex.org.
Step by step: reading one statement in Wikidata
Wikidata’s introduction describes items, properties and statements. An item has a label, a description and optional aliases, and its identifier is the letter Q followed by a number. A property has an identifier made of P followed by a number; the introduction’s example is “educated at” (P69). A statement pairs a property with a value.
- Open the Wikidata item for any person, institution or paper you care about.
- Find a statement on the item, for example one that uses the property “educated at” (P69).
- Read it as a triple: the item is the subject, the property is the predicate, and the value is the object.
- Follow the value, which is itself an item, to see the next node in the graph.
Step by step: querying the graph with the Wikidata Query Service
The MediaWiki Wikidata Query Service User Manual describes the web application at the home page of query.wikidata.org as a place to edit and submit SPARQL queries, with results shown as an HTML table. The manual’s example uses parking area (Q6501349) and the property “topic’s main category” (P910); the query below is the triple pattern from that example:
SELECT * WHERE {
wd:Q6501349 wdt:P910 ?category .
}
- Go to query.wikidata.org.
- Paste the query into the edit window. Each query has its own URL; per the manual, opening that URL puts the query in the window but does not run it.
- Click “Execute”.
- Read the result table. Each row is one match for the variable
?category.
To query something else, replace the item (wd:Q…) and property (wdt:P…) with identifiers copied from the Wikidata pages for the things you are studying. The pattern is the triple again: a known subject, a known predicate, and a variable for the object.
Output and how to read it
Each row of a result is a set of nodes that satisfied the pattern you wrote. A variable beginning with a question mark stands for a node you did not name. According to the manual, the SPARQL endpoint returns XML by default and can also return JSON, TSV or CSV, chosen with an Accept header or the format query parameter, which is useful when you want to load the table into an analysis tool.
Troubleshooting
- The query stops or is refused. The manual states a hard query deadline of 60 seconds on the public service, 60 seconds of processing time per 60 seconds for each client, and HTTP 429 throttling for clients that exceed limits. Narrow the pattern or add a LIMIT.
- Too many error queries. A client is allowed 30 error queries per minute, so fix syntax in small steps.
- Two things share one label. Labels are not identifiers. Work from the Q and P numbers, not the words.
- The same thing has different identifiers in two sources. A graph can only join what is identified consistently. The OpenAIRE graph and the Microsoft Academic Graph are research examples of large scholarly graphs.
- Definitions differ between sources. Check which model a source uses before comparing counts across systems.
Alternatives: open knowledge graph resources
| Resource | What its own pages say | Source |
|---|---|---|
| Wikidata | A free, collaborative, multilingual, secondary knowledge base; data under CC0 1.0 | Wikidata:Introduction |
| Wikidata Query Service | Public SPARQL web application and endpoint with a 60-second query limit | WDQS User Manual |
| Open Research Knowledge Graph | Aims to describe research papers in a structured manner | ORKG introduction |
| OpenAlex | The open catalog of the global research system | OpenAlex help |
FAQ
What is a knowledge graph in simple terms?
It is data stored as things and the labelled relationships between them. In RDF each relationship is a subject-predicate-object triple, and the triples together form a graph.
Is a knowledge graph the same as a graph database?
Not necessarily. A knowledge graph describes the data model; a graph database is one kind of software that can store it. The RDF model is independent of any concrete syntax. Related reading: linked data fragments.
Why do identifiers matter?
An IRI identifies a resource, so every triple that uses the same IRI attaches to the same node. Without shared identifiers, graphs from different sources cannot be merged.
Sources
- W3C, RDF 1.1 Primer, checked 2026-10-29.
- Wikidata:Introduction, checked 2026-10-29.
- MediaWiki, Wikidata Query Service/User Manual, checked 2026-10-29.
- Open Research Knowledge Graph, introduction, checked 2026-10-29.
- OpenAlex help, checked 2026-10-29.







