---
name: skos-explorer
description: "SKOS Explorer and Validator via devops.majbase.com's free public API, no key required. Reads a SKOS vocabulary (thesaurus, taxonomy, classification) in Turtle, RDF/XML, JSON-LD, N-Triples or TriG, returns its hierarchy, explains the SKOS terms it uses and checks it against the integrity rules of the W3C SKOS Reference. Keywords: skos validator, check skos thesaurus, skos integrity conditions, explain skos prefLabel broader narrower, taxonomy rdf, thesaurus checker."
---

# SKOS Explorer and Validator

Calls devops.majbase.com's free public API — no API key or authentication required.

It checks the structure of a vocabulary against the W3C SKOS Reference (https://www.w3.org/TR/skos-reference/). It does not judge whether the concepts are placed sensibly, and it never fetches anything from the network.

## Endpoint

```
POST https://devops.majbase.com/skos-explorer/api
```

## Request

Either a multipart form with the vocabulary as `file`, or a JSON body (or form field) with it as `text`. Up to 1024 KB and 60,000 statements.

| Field | Meaning |
|---|---|
| `file` or `text` | The vocabulary |
| `format` | Optional: `turtle`, `xml`, `json-ld`, `nt`, `trig`, `nquads`. Detected when left out |
| `lang` | Optional: language tag for the labels returned, default `en` |

```bash
curl -sS -X POST https://devops.majbase.com/skos-explorer/api -F "file=@vocabulary.ttl"

curl -sS -X POST https://devops.majbase.com/skos-explorer/api \
    -H "Content-Type: application/json" \
    -d '{"text": "@prefix skos: <http://www.w3.org/2004/02/skos/core#> . <http://e/a> a skos:Concept ; skos:prefLabel \"a\"@en ."}'
```

## Response

JSON. The fields to read first:

| Field | Meaning |
|---|---|
| `verdict` | `violations`, `warnings`, `clean` or `no_skos` |
| `issue_totals` | Number of findings by severity: `violation`, `warning`, `info` |
| `issues` | One entry per kind of finding: `code`, `severity`, `rule`, `title`, `explain`, `count`, up to 10 `examples` (`label`, `uri`, `detail`) |
| `summary` | Counts: statements, concepts, concept schemes, collections, hierarchy links, depth, related links, mappings, labels |
| `languages` | Number of labels per language tag |
| `trees` | The hierarchy, one tree per concept scheme: nested nodes with `label`, `uri`, `notation`, `children`, `severity` (its own worst finding: `violation`, `warning` or null) and `below` (the worst one further down the branch) |
| `concepts` | By URI: labels by language, notes, notation, broader, related, mappings, schemes, and `issues` (the findings about this one concept: `code`, `severity`, `title`, `detail`) |
| `collections` | Collections with their members |
| `terms_used` | Each SKOS term found in the file, how often, and what it means |
| `validator_version`, `processing_time_ms` | The version of the tool that produced the report, and how long reading and checking took |

How to read `severity`:

- `violation`: breaks one of the six integrity conditions the SKOS Reference states formally. `rule` gives its number: S9 (concept scheme that is also a concept), S13 (one label used as two kinds of label), S14 (two preferred labels in one language), S27 (related to an ancestor), S37 (collection that is also a concept), S46 (exact match that is also a broader or related match).
- `warning`: allowed by SKOS but nearly always a mistake, such as a hierarchy that loops, a misspelled `skos:` term or a concept with no preferred label.
- `info`: a convention worth knowing about.

## Errors

- `400`: nothing sent, not readable as RDF, too large, or a JSON-LD document whose `@context` is a web address (it is never fetched; put the context inline). The body is `{"error": "..."}`.
- `429`: more than 60 requests in an hour from one address.

## Comparing two versions

`POST https://devops.majbase.com/skos-explorer/diff/api` compares two versions of a vocabulary by meaning (statement order, prefixes, format and the direction a relation is written in are not changes).

```bash
curl -s -X POST https://devops.majbase.com/skos-explorer/diff/api \
  -F "old_file=@old.ttl" -F "new_file=@new.ttl"
```

Or JSON: `{"old": "...", "new": "...", "old_format": "turtle", "new_format": "turtle", "lang": "en"}` (formats optional).

| Field | Meaning |
|---|---|
| `verdict` | `identical`, `changed`, or `regression` (the new version has more integrity violations than the old one) |
| `summary` | `added`, `removed`, `changed`, `unchanged` resources; `statements_added`, `statements_removed`; `new_violations`, `fixed_violations` |
| `added`, `removed`, `changed` | Per resource: `uri`, `label`, `kind`, and its `added` / `removed` statements (`property`, `value`, `lang`, `label`); at most 500 per list, `truncated` says when cut |
| `checks` | Checks whose count differs: `code`, `severity`, `title`, `before`, `after` |
| `old`, `new` | Format, size and verdict of each version |

Only resources with a URI and only SKOS properties are compared. A machine-readable description of both APIs is at `https://devops.majbase.com/skos-explorer/openapi.json`.

## Validating against SHACL shapes

`POST https://devops.majbase.com/skos-explorer/shacl/api` checks a vocabulary against SHACL Core shapes — the built-in SKOS quality rules, or your own.

```bash
curl -s -X POST https://devops.majbase.com/skos-explorer/shacl/api \
  -F "file=@vocabulary.ttl" -F "shapes_file=@rules.ttl"     # leave shapes_file out for the built-in rules
```

Or JSON: `{"text": "...", "shapes": "...", "format": "turtle", "shapes_format": "turtle", "lang": "en"}` (only `text` is required).

| Field | Meaning |
|---|---|
| `verdict` | `violations`, `warnings` or `conforms` |
| `ruleset` | `skos-quality` (built-in) or `custom` |
| `totals` | Results by severity: `violation`, `warning`, `info` |
| `rules` | One entry per kind of result: `severity`, `rule` (the shape's `sh:name`), `message`, `path`, `constraint`, `count`, up to 10 `examples` (`focus`, `value`) |

Only SHACL Core is run, with no inference: shapes that use SPARQL, rules, functions, JavaScript or `owl:imports` are refused (400). A validation that takes longer than 45 seconds is stopped (422). 503 means the validation service is down; the other two endpoints do not depend on it.

## Notes

- No API key or authentication required.
- The vocabulary is not stored.
- Full interactive tool, with a plain-language glossary of every SKOS term: https://devops.majbase.com/skos-explorer/
