0

I'm trying to work with the GraceNote web API and I'm getting unexpected results. For example, when I run a query to get the track info for Green Day/Dookie/She I get everything I'm asking for, yet if I change the album_title to AMERICAN IDIOT, I still get a response saying that 24 tracks were found and my track is #21, while there is no song titled "she" on American Idiot (so nothing should be returned). Here's a copy of my query:

<QUERIES>
  <LANG>eng</LANG>
  <AUTH>
    <CLIENT>MyClientID</CLIENT>
    <USER>MyUserID</USER>
  </AUTH>
  <QUERY CMD="ALBUM_SEARCH">
    <MODE>SINGLE_BEST_COVER</MODE>
    <TEXT TYPE="ARTIST">green day</TEXT>
    <TEXT TYPE="ALBUM_TITLE">american idiot</TEXT>
    <TEXT TYPE="TRACK_TITLE">she</TEXT>
    <RANGE>
        <START>1</START>
        <END>1</END>
    </RANGE>
    <OPTION>
        <PARAMETER>SELECT_EXTENDED</PARAMETER>
        <VALUE>COVER,LINK,ARTIST_BIOGRAPHY</VALUE>  
      </OPTION>
      <OPTION>
        <PARAMETER>COVER_SIZE</PARAMETER>
        <VALUE>THUMBNAIL</VALUE>
      </OPTION>
  </QUERY>
</QUERIES>

Can someone please explain why I get a result?

I'm experiencing other anomalies as well, but I'll post them as separate questions.

Ben_G
  • 770
  • 2
  • 8
  • 30

1 Answers1

1

The Gracenote database is really comprehensive, and contains almost every CD ever made in the world. What you've stumbled upon is probably a "gray market" compilation CD, which contains all of American Idiot, plus a bunch of B-sides and other hits. From our stats, it's actually a fairly popular compilation in certain countries, though I can't find any links to that product online.

If you do an ALBUM_FETCH on the Album GN_ID you got from your ALBUM_SEARCH, you can see the list of all 24 tracks on this CD.

<QUERIES>
  <LANG>eng</LANG>
  <AUTH>
    <CLIENT>YourClientID</CLIENT>
    <USER>YourUserID</USER>
  </AUTH>
  <QUERY CMD="ALBUM_FETCH">
    <GN_ID>72313663-EEE803E4BAB5BE208EA8278B77321863</GN_ID>
  </QUERY>
</QUERIES>

If you do your original query without the ALBUM_TITLE field, you will get the correct version of "She" on "Dookie".

cweichen
  • 493
  • 3
  • 5