---
title: Linked data
summary: The linkedData feature — the files, links, texts and identifiers linked to an object on the version queried, their count, and per item its kind, family, extension, category, title, validity and state; in WHERE, objects with or without linked data and by what is linked.
order: 225
since: 3.0
terms: [linked-data]
see-also: [explanation/linked-data, how-to/api/link-data, reference/bql/where, reference/bql/get]
---

# Linked data

`linkedData` reads the [[term:linked-data|linked data]] of an object on the version a query runs on: the files, web links, texts and identifiers people linked to it in BIM.works ([[page:explanation/linked-data]]). It is not in the IFC file, so it is read from the server, as the list in the features panel shows it: an orphaned link is on no object, and a deleted item is not there. The feature is read-only.

A query that uses `linkedData` needs the `links:read` [[term:scope|scope]], as the linked data calls do.

## GET features {#features}

| Path | Value |
|---|---|
| `linkedData` | One record per item: `item_uuid`, `kind`, `title`, `category`, `family`, `extension`, `validUntil`, `state`. No value when nothing is linked. |
| `linkedData.any` | `true` when something is linked to the object, else `false`. |
| `linkedData.count` | How many items are linked to the object; `0` when none. |
| `linkedData.kind` | `FILE`, `URL`, `TEXT` or `IDENTIFIER`. |
| `linkedData.family` | A file's family: `PDF`, `IMAGES`, `DOCUMENTS`, … ([[page:reference/linked-data-file-types]]). |
| `linkedData.extension` | A file's extension: `pdf`, `jpg`, … |
| `linkedData.category` | The category: `Datasheet`, `Certificate`, … as the instance names them. |
| `linkedData.title` | The title. |
| `linkedData.validUntil` | The date until which the item is valid, `yyyy-mm-dd`. |
| `linkedData.expiresInDays` | The days from today (UTC) to `validUntil`; negative once it has passed. |
| `linkedData.state` | `OK`, or `CHECK` when BIM.works is not certain the link is on the right object ([[page:explanation/linked-data#check-and-orphaned]]). |

The per-item paths give the distinct values over the object's items, as a list; an object whose items have none gets no value.

```bql {#linked-data-get}
GET attribute.Name, linkedData.count, linkedData.category WHERE type = IFCDOOR
```

## Conditions {#conditions}

`linkedData.any` and `linkedData.count` have one value per object, also on objects without linked data, so they find those too. A per-item path holds when one of the object's items satisfies the comparison; `!=` and `NOT IN` hold when none does. Without a comparator a path asks whether the object has an item with a value for it.

| Condition | Selects |
|---|---|
| `linkedData`, `linkedData.any` | The objects something is linked to. |
| `NOT linkedData.any`, `linkedData.count = 0` | The objects nothing is linked to. |
| `linkedData.count >= 2` | The objects with two or more items. |
| `linkedData.category = "Certificate"` | The objects with a certificate. |
| `linkedData.kind = "FILE" AND linkedData.family = "PDF"` | The objects with a file and a PDF — not necessarily the same item. |
| `linkedData.expiresInDays < 90` | The objects with an item that expires within 90 days or has expired. |
| `linkedData.validUntil STARTS_WITH "2026"` | The objects with an item valid until a date in 2026. |
| `linkedData.state = "CHECK"` | The objects with a link to check. |

BQL has no `<` or `>` on text, so dates are compared through `expiresInDays`, or as text with `=`, `IN` and `STARTS_WITH`.

```bql {#linked-data-without}
GET attribute.Name, niceType WHERE type = IFCDOOR AND NOT linkedData.any
```

```bql {#linked-data-expiring}
GET attribute.Name, linkedData.title, linkedData.validUntil WHERE linkedData.category = "Certificate" AND linkedData.expiresInDays < 90
```

Links added in later versions ([[page:explanation/linked-data#links-added-later]]) are not part of `linkedData`: it reads the links of the version itself.
