DESCRIBE
Explore entities by retrieving their descriptions. DESCRIBE returns an RDF graph containing useful information about specified resources.
Understanding DESCRIBE
DESCRIBE queries return an RDF graph that "describes" one or more resources. Unlike SELECT which returns specific bindings or CONSTRUCT which uses a template, DESCRIBE leaves the exact output to the SPARQL endpoint.
Typical DESCRIBE output includes:
- All properties of the described resource (outgoing triples)
- Sometimes incoming references (triples where the resource is the object)
- Labels and other metadata
The exact content varies by endpoint — each implementation decides what constitutes a useful description.
Basic DESCRIBE Examples
DESCRIBE wd:Q42
The simplest DESCRIBE query just names an entity. This returns whatever the Wikidata endpoint considers a useful description of Douglas Adams (Q42) — typically including labels, descriptions, and key properties.
DESCRIBE wd:Q90 wd:Q84 wd:Q64
You can describe multiple entities in a single query. This returns combined descriptions of Paris (Q90), London (Q84), and Berlin (Q64).
DESCRIBE with WHERE Clause
DESCRIBE ?country
WHERE {
?country wdt:P31 wd:Q6256 ;
wdt:P30 wd:Q49 .
}
LIMIT 5
DESCRIBE can use a WHERE clause to find entities dynamically. This query describes five countries (Q6256) located in North America (Q49).
DESCRIBE ?capital
WHERE {
wd:Q142 wdt:P36 ?capital .
}
This query finds France's capital (P36) and then describes that entity. It's useful when you want to explore an entity that you found through a relationship.
DESCRIBE for Exploration
DESCRIBE wdt:P31
DESCRIBE works on properties too, not just entities. This returns information about the "instance of" property (P31), including its label, description, and constraints.
DESCRIBE ?city
WHERE {
?city wdt:P31 wd:Q515 ;
wdt:P1082 ?population .
}
ORDER BY DESC(?population)
LIMIT 1
Combine DESCRIBE with sorting to explore specific entities. This finds and describes the city with the highest recorded population in Wikidata.
DESCRIBE vs SELECT vs CONSTRUCT
Each query form serves different purposes:
| Query | Best For | Output Control |
|---|---|---|
SELECT | Specific data extraction | You specify exactly what you want |
CONSTRUCT | Data transformation | You define the output structure |
DESCRIBE | Exploration and discovery | Endpoint decides what's useful |
Use DESCRIBE when you want to explore an entity without knowing exactly what properties it has, or when you want a quick overview of what information is available.
Key Entities Used in Examples
| Entity | Description |
|---|---|
wd:Q42 | Douglas Adams |
wd:Q49 | North America |
wd:Q64 | Berlin |
wd:Q84 | London |
wd:Q90 | Paris |
wd:Q142 | France |
wd:Q515 | City |
wd:Q6256 | Country |
wdt:P30 | Continent |
wdt:P31 | Instance of |
wdt:P36 | Capital |
wdt:P1082 | Population |