Welcome to Pargitaru.co.cc - Guitar Chord API

Here you can retrieve guitar chords information by providing chord names like C, C#, etc, chord modifications like major, minor, sus, etc or any frets on strings used in chord like string E fret 1 and string A fret 3

To use this API you need to make GET requests to this page

Remember to url encode your sent values

For example in PHP use urlencode($value)

Contents

Request data

Response data

Possible errors

Response structure

Example requests

Code examples

Latest changes

Contact info

Request data

You can request chord data using parameters below

Parameter name Description Possible values Default value
request Specify whether it is a simple chord or special chord

special - for special chords

chords - for simple chords

Default value: chords
type(optional) Specify how data should be outputted

json - for json structure

xml - for xml structure

Default value: json
chord (optional) chord name

chords - C, C#, Db, D, D#, Eb, E, F, F#, Gb, G, G#, Ab, A , A#, Bb, B

special chords - A/C#,A/E,A/F,A/G,A/G#,Am/C,Am/E,Am/F,Am/F#,Am/G,Am/G#,C/E,C/F,C/G,D/A,D/B,D/Bb,D/C,D/F#,E/B,E/C#,E/D,E/D#,E/F,E/F#,E/G,E/G#,Em/B,Em/C#,Em/D,Em/D#,Em/F,Em/F#,Em/G,Em/G#,F/A,F/C,F/D,F/D#,F/E,F/G,Fm/C,G/B,G/D,G/E,G/F,G/F#

Default value: none
modf (optional) chord modifier like major, minor, dim, aug, etc minor, major, aug, dim, sus, add9, m6, m7, m9, maj7, maj9, mmaj7, -5, 11, 13, 5, 6, 6add9, 7, 7-5, 7maj5, 7sus4, 9 Default value none
e2 (optional) e string fret Values from 0 to 15, x - if string is not used in chord Default value none
b (optional) b string fret Values from 0 to 15, x - if string is not used in chord Default value none
g (optional) g string fret Values from 0 to 15, x - if string is not used in chord Default value none
d (optional) D string fret Values from 0 to 15, x - if string is not used in chord Default value none
a (optional) A string fret Values from 0 to 15, x - if string is not used in chord Default value none
e (optional) E string fret Values from 0 to 15, x - if string is not used in chord Default value none
callback (optional) Callback function for jsonp using json type Name of the callback function Default value none

Response data

For chord request you'll get chords array of this structure

Parameter name Description
chord chord name
modf chord modifier
e2 e string
b b string
g g string
d D string
a A string
e E string

For special chord request you'll get chords array of this structure

Parameter name Description
chord chord name
e2 e string
b b string
g g string
d D string
a A string
e E string

Possible errors

You'll get a chords structure with error value like "No chords found"

Error Description
No chords found There are no chords with specified values in database
None or invalid request parameters provided You didn't provide any parameters for search or you provided invalid parameter name(possibly mistyped parameter name)

Response structure

Example json response with data:

{ "chords": [{ "chord": "C", "modf": "major", "e2": "0", "b": "1", "g": "0", "d": "2", "a": "3", "e": "x" },{ "chord": "C", "modf": "major", "e2": "3", "b": "5", "g": "5", "d": "5", "a": "3", "e": "x" }]}

Example json response with error:

{ "chords": "No chords found" }

Example xml reponse with data:

<?xml version="1.0"?> <chords> <chord_data> <chord>C</chord> <modf>major</modf> <e2>0</e2> <b>1</b> <g>0</g> <d>2</d> <a>3</a> <e>x</e> </chord_data> <chord_data> <chord>C</chord> <modf>major</modf> <e2>3</e2> <b>5</b> <g>5</g> <d>5</d> <a>3</a> <e>x</e> </chord_data> </chords>

Example xml response with error:

<?xml version="1.0"?> <chords>No chords found</chords>

Example requests

Request URL Description
http://pargitaru.co.cc/api/?request=chords&chord=C Request json structure with all C chords with all modifications
http://pargitaru.co.cc/api/?request=chords&chord=C%23&modf=minor Request json structure with all C# or Db minor chords
http://pargitaru.co.cc/api/?request=chords&e2=1&type=xml Request xml with all chords where e2 string (thinnest one) fret is 1
http://pargitaru.co.cc/api/?request=sp_chords&e=x&type=xmll Request xml with all special chords where e string (thickest one) is not used
http://pargitaru.co.cc/api/?request=special&chord=C%2FE Request json with all special chords where chord name contains C/E
http://pargitaru.co.cc/api/?request=chords&e=1&a=3 Request json with all chords where e string fret is 1 and a string fret is 3
http://pargitaru.co.cc/api/?request=special&e=1&a=3 Request json with all special chords where e string fret is 1 and a string fret is 3c and callback function for jsonp named myfunc
http://pargitaru.co.cc/api/?request=special&chord=C Request json with all special chords where chord name contains C

Code examples

PHP code example:

Request chord info by chord name and modification

Guitar Chord API class

Latest changes

Contact info

You can use this contact form, to contact us for any questions, suggestions and error reports related to Guitar Chord API