Key type
Jump to navigation
Jump to search
Key types to be used with data items.
Available types
- well-known values (Q8) – A key with a well defined list of values, e.g., highway, wheelchair, or religion. Used with P9 (key type).
- boolean values (Q21937) – The key is of type boolean and expects a value of either "yes" (Yes, True) or "no" (No, False). Used with P9 (key type).
- only/yes/no choice (Q23555) – The key expects a value of either "only", "yes", or "no". Used with P9 (key type).
- designated/yes/limited/no choice (Q23598) – The key expects a value of either "designated", "yes", "limited", or "no". Used with P9 (key type).
- country code (Q23568) – A ISO 3166-1 alpha-2 two letter country code. For other country code keys, use key type (P9) = well-known values (Q8).
- infinite values (Q23617) – A key with an infinite possibility of values (e.g. key:name).
- opening hours (Q23551) – A key describing opening hours, e.g., opening_hours. Used with P9 (key type).
- phone number (Q23581) – A valid telephone number (including the country code) following the ITU-T E.123/DIN 5008 or RFC 3966/NANP pattern.
- email address (Q23615) – A valid email address.
How to create a new key type
Create a new data item and set instance of (P2)=key type (Q23552). Set subclass of (P3)=well-known values (Q8)/infinite values (Q23617) if appropriate.
Useful other properties are value validation regex (P13), formatter URL (P8), and Wikidata concept (P12)/Wikidata equivalent (P7),