---
id: "slug"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["internet", "identifiers"]
langs: ["common"]
quality: 80
url: "https://registry.apicrafter.io/datatype/slug"
---

# URL slug (`slug`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Readable part of a URL that names a page or a record, written in lowercase Latin letters and digits joined by hyphens, such as model-gruzovogo-parohoda-donec. Content management systems and web frameworks make it from the title, transliterated when the title is not in Latin script, and add a number when the slug is already taken (kochedyk-10). APIs and exports keep it in a field named slug. Some frameworks also allow underscores and uppercase letters; the regular expression covers only the common lowercase form. A lowercase word without hyphens is also a valid slug, so the value alone is weak evidence.

- Personal data (PII): no
- Categories: Internet (internet), Universal unique identifiers (identifiers)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^[a-z0-9]+(?:-[a-z0-9]+)*$
```

## Examples

- `model-gruzovogo-parohoda-donec` — transliterated Russian title of a museum object
- `kochedyk-10` — number added to keep the slug unique
- `oil-on-canvas`
- `Model Donec` (invalid example) — uppercase letters and a space
- `model--donec` (invalid example) — two hyphens in a row
- `-donec` (invalid example) — starts with a hyphen

## Translations

- ru: Слаг (человекопонятная часть URL)

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Clean_URL#Slug>
- doc: <https://docs.djangoproject.com/en/stable/ref/models/fields/#slugfield>

## Quality

Score 80/100. Missing: mapping (Wikidata, Schema.org, ...), detector coverage.

JSON: <https://registry.apicrafter.io/api/v1/datatypes/slug.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/internet/slug.yaml>
