×

Keyboard Database External Access

The keyboard database supports external access so that your website or application can pull data on a particular keyboard or multiple keyboards in a standardised format. This page will detail how to make a request for such data and what format(s) the data will be provided in.

Constructing a request

The API can be utilised by accessing the request URL https://sharktastica.co.uk/kb_db_req.php with some GET parametres. Any request will need to have two required parametres; the dat return data type and a specific search parametre. The dat parametre specifies what the returned data format should be, which at present includes JSON (stable) or XML (beta) support. As an example of implementing this with JSON as the chosen data type:
https://sharktastica.co.uk/kb_db_req.php?dat=JSON.

The specific search parametre specifies what data you want. A search can be made by using a field name (possible fields listed below) as a parametre name and giving it the search term value. For example, if you specifically want to see details belonging to part number 1391401, such as request would look like:
https://sharktastica.co.uk/kb_db_req.php?dat=JSON&pn=1391401.

An optional parametre you can specify is the fields filtering parametre. This will allow you to control what parts of the data should be returned to you by listing out the field names wanted (possible fields listed below). The order of the list will dictate the order of the fields returned. For example, if you want data on part number 1391401 but only want to see its part number, full name, type, first appeared date, OEMs and branding data, you could specify what fields you want in a comma-separated list like:
https://sharktastica.co.uk/kb_db_req.php?dat=JSON&pn=1391401&fields=pn,name,type,date,oem,branding.

Possible fields

These field names are used for specifying a search parametre or for filtering what fields of data should be returned. Fields correspond to specific data on keyboards, which is explained in the key below.

Field
Description
Example Output
pn
The part number.
1391401
fru
The field replacement unit (FRU) part number.
04Y1518
name
The full known marketed name.
IBM Enhanced Keyboard
model
Keyboard's marketing model number.
SK-8845
type
Keyboard's full type description.
Model F Functional Key Keyboard
nickname
Keyboard's community lingo nickname.
Unsaver
shorthand
Compacted version of Keyboard's type description.
F122
oem
One or more known keyboard's manufacturers.
IBM
switches
Name of the switch technology employed.
IBM membrane buckling springs
date
Date and possibly quarter of the keyboard's first appearance.
1981 Q3
keycaps
Keycap material and legends printing methods.
PBT with dye-sublimated legends
case
The colour of the original body casing.
White
branding
One or more known types of branding used.
IBM blue oval badge
feet
The style of flip-out feet the keyboard employs.
Triple-setting Model F-style riser feet
protocol
The scancode language outputted.
Set 1/XT
connection
The type of connection or wireless technology used.
Bluetooth
cable
Describes the cable the keyboard uses if applicable.
Grey coiled detachable SDL to PS/2
keys
Number of keys originally fitted.
101
formfactor
The keyboard type's layout form factor.
Tenkeyless
layout
The language and/or standardised layout originally configured.
UK ISO
mouse
The integrated pointing device attached.
TrackPoint IV
price
The earliest available pricing.
$270 USD in 1984
notes
Additional notes about the keyboard.
-

Handling the output

Regardless of the amount of matched results, the items will be provided to you in an array format. So if you were expecting a single item to be returned, simply access it as the first item an the array.

If your request was unsuccessful, an array is still returned with a single item inside containing a single field - the success field. This boolean field will always be present in successful or unsuccessful requests as a way to test the result, especially in cases where you're expecting multiple items where some operations differently may or may not have failed.

Example output

A successful single result JSON request (kb_db_req.php?pn=1391401&dat=JSON&fields=pn,name,type,date)

[
    {
        "success": true,
        "pn": "1391401",
        "name": "IBM Enhanced Keyboard",
        "type": "Model M Enhanced Keyboard",
        "date": "1987 Q1"
    }
]

A successful multiple result JSON request (kb_db_req.php?model=3320&dat=JSON&fields=pn,name,type,date)

[
    {
         "success": true,
         "pn": "92F6320",
         "name": "IBM Retail POS Keyboard w\/ Card Reader",
         "type": "Model M7 POS MSR Keypad",
         "date": "1993 Q2"
    },
    {
         "success": true,
         "pn": "7431818",
         "name": "Toshiba POS System Keyboard w\/ Card Reader",
         "type": "Model M7 POS MSR Keypad",
         "date": "2012 Q2"
    },
    {
         "success": true,
         "pn": "41J7248",
         "name": "IBM Retail POS Keyboard w\/ Card Reader",
         "type": "Model M7 POS MSR Keypad",
         "date": "2006"
    }
]

An unsuccessful JSON request (kb_db_req.php?pn=9999999&dat=JSON)

[
    {
        "success": false
    }
]