Scales-Chords API for Webmasters

Our chord API is simple, clear and free. Just include a single javascript file in your html code and you'll be able to show to your visitors any chord charts and chord sounds.


Chord Images

  • Guitar
  • Piano
  • Configurable image size
  • Any chord name as input

Chord Sounds

  • Support for all major browsers
  • MP3, M4A and AAC support
  • No Plug-ins, fast response
  • Any chord name as input



Index




Code Examples


Just Place The API code before the in your document head section, or at the end of your HTML page (Asynchronous Code).

<script async type="text/javascript" src="https://www.scales-chords.com/api/scales-chords-api.js"></script>

Insert this code where you want a chord image to be inserted (D#m maj9 in this example):

<ins class="scales_chords_api" chord="D#m(maj9)"></ins>

This will be the result:



The API returns chord charts by default, if you want piano charts just add instrument="piano"

<ins class="scales_chords_api" chord="D#m(maj9)" instrument="piano"></ins>

This will be the result:



To get a chord sound from the API, you just add output="sound" to the request. This works for piano or guitar chord requests.

<ins class="scales_chords_api" chord="D#m(maj9)" instrument="piano" output="sound"></ins>

This will be the result:





FAQ


Why are you providing the API for free ?

Just want to help.

Do I need to somehow register or let you know I'm using the API ?

No. The API does not require activation of any kind, you can just start using it. We do suggest that you inform us (contact form) when you start to use it, so that we can get in touch with you if we detect abnormal use.

Do I need to backlink to your website ?

No attribution or backlink is required. We would appreciate it of course.

Why an API ? Can't you just release the source code ?

It's just not practical. Scales-chords.com hosts more than 500.000 chord images and sound files.

Do I need to encode the parameters (#,/,etc) ?

No. The API will handle the encoding.

Do I need to use the exact chord expression in the chord parameter ?

No. The API is smart enough to decode most chord denominations. Please try to keep it under control.

Do you provide support ?

Yes and no. We do not sell support services. We will try to help you on a "best effort" basis.

Is there a limit on the number of API requests ?

No. We do reserve the right to block requests originating from domains that are using our API for questionable goals.

I have a website with huge volume, will the API work ?

Contact us. We'll solve that problem together.





Reference


Full Syntax:
<ins class="scales_chords_api" chord="chord name" instrument="piano or guitar" output="sound or image" width="100px;" height="150px;" nolink="true or false"></ins>
Required field: chord="chord name"

This is the only required field for the API: name the chord that you want to receive data for.
Example: chord="D#m\E"

Optional field: output="sound or image"

This field defines if you want to include in your page a link to play the chord sound, or the chart of the chord (image). If this field is not defined it defaults to output="image"
Example: output="sound"

Optional field: instrument="guitar or piano"

This field defines if the image (chord chart) or sound that you want is por piano or guitar. If this field is not defined it defaults to instrument="guitar"
Example: instrument="piano"

Optional fields: width="w in pixels" and height="h in pixels"

Theses fields define the width/height for the output images. If the output="sound" option is used, these fields are ignored. To keep the images aspect ratio you should only use either width or height, but not both at the same time.
Example: width="75px"

Optional field: nolink="true or false"

If nolink is not defined it defaults to false, meaning that chord images/charts will have a link (with a target="_blank" tag) to the chord information page on www.scales-chords.com. If the output="sound" option is used together with nolink, this field is ignored.
Example: nolink="true"





Bug Reports and Feature Requests


Please use the contact form to let us know if the API is not working for your, or if you want to suggest new features.





Version History



  • 12/Aug/2016 Launched version 1.0 for guitar chord images
  • 02/Sep/2016 Version 1.1 integrated with chord translator for better interpretation of misspelled chord names.
  • 14/Nov/2016 Version 1.2 introduced piano chord images and minor bug corrections
  • 06/Dec/2016 Version 1.3 introduced chord sounds for piano and guitar




New Release Roadmap (Jan-Jun 2017)

  • 1.4 Multiview options: enable several chords to be requested within the same <ins>
  • 2.0 Request chords based on notes. Chord namer interface (return chord name based on notes). New option to return results in json format.
  • 2.1 Optional custom output formating for chord images and sound player buttons
  • 3.0 PHP Restful API




Terms and Conditions


    Permission

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

      - The software will not be used in a way that overwhelms scales-chords servers.

      - The software will not be used to harm scales-chords reputation in any way.

    "As Is"

    The software and associated API service is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the service and software or the use or other dealings in the service and software.

    Special conditions

    Scales-chords may engage the user or the usufructuary of the API to negotiate special access conditions if the server load requires the deployment of extra resources to meet the user or usufructuary traffic load.

    Suspension

    Scales-chords may suspend the service or software distribution at any time, without prior notice or explanation, to all or to a particular domain or person.


We use cookies to personalize content and ads, social media features and to evaluate our traffic.     Learn More