Free API for webmasters

Our API allows webmasters to query our scale database to find the ones that fit a specific chord progression. You'll get scale charts, formulas, images or link to us for more info. All you need is a valid API key (+ a link back to https://ukulelescales.com), get one for free!

How does it work?

Here is how to access ukulelescales.com's data

  • API URL: ukulelescales.com/get?
  • Parameters : ak (your API key), crd (your chord progression) and uke (Tuning)
  • All parameters are compulsory except uke (Soprano by default)
  • crd are chords, comma separated (minimum 3!)
  • Each chord has 2 parameters: a root note and a type, separated by a vertical bar (ex: C|m for a Cm)
  • The root note can be set to "A", "Bb", "B" , "C", "Db", "D", "Eb", "E", "F", "Gb", "G" and "Ab"
  • Type can be set to "major", "m", "aug, "dim", "7", "m7", "maj7", "m7b5", "sus2", "sus4", "7sus4", "5", "6", "m6", "add9", "m9", "9", "11", or "13".
  • uke can be set to "baritone", "d-tuning", "slack-key" or "soprano"
  • Example: to query a C,G,Dm,Asus2 chord progression, call our API: "https://ukulelescales.com/get?ak=your_api_key&crd=C|major,F|major,D|m,A|sus2"

Output (XML format)

  • name Name of the scale
  • formula The scale formula
  • intervals Scale intervals in WH format
  • notes Notes in the scale
  • img Full fretboard image of the scale (returns "false" if we don't have the photo)
  • url Link to UkuleleScales.com for more infos

Working PHP example

Don't know how to use our API? Here is a working example using the SimpleXML extension (native since PHP 5.0).
Let's say you'd like to get scales that fit a "C, F, Dm, Asus2" chord progression in Slack-Key tuning:

//XML file to load
$api_url 'https://ukulelescales.com/get?ak=YOUR_API_KEY&crd=C|major,F|major,D|m,A|sus2&uke=slack-key';
//converts the specified XML file into a SimpleXMLElement object
$xml simplexml_load_file($api_url);
//Navigate through the tree to get the scales
//scale[0] returns the "main scale" that fits. For other scales, use a foreach() loop.
$res $xml->scale[0]->img;
//print the result (in this case the scale chart)
echo '<img src="'$res .'" alt="" width="90" height="130" />';

Please contact us or visit our Facebook Page if you need help using our API.

© 2012-2017 Ukulelescales.com