title: How to combine entity type searches in apple itunes search api
body: <p>In the itunes search api <a href="https://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html" rel="nofollow">doc</a> there is an example of searching for an artist called <em>maroon</em> and the url is like so:</p>
  
  <pre><code>https://itunes.apple.com/search?term=maroon&amp;entity=allArtist&amp;attribute=allArtistTerm
  </code></pre>
  
  <p>This returns over 50 results that start like this:</p>
  
  <pre><code>{
      "resultCount": 50,
      "results": [
          {
              "wrapperType": "artist",
              "artistType": "Artist",
              "artistName": "Maroon 5",
              "artistLinkUrl": "https://itunes.apple.com/us/artist/maroon-5/id1798556?uo=4",
              "artistId": 1798556,
              "amgArtistId": 529962,
              "primaryGenreName": "Pop",
              "primaryGenreId": 14,
              "radioStationUrl": "https://itunes.apple.com/station/idra.1798556"
          },
          {
              "wrapperType": "artist",
              "artistType": "Software Artist",
              "artistName": "MaroonEntertainment",
              "artistLinkUrl": "https://itunes.apple.com/us/artist/maroonentertainment/id537029262?uo=4",
              "artistId": 537029262,
              "radioStationUrl": "https://itunes.apple.com/station/idra.537029262"
          },
  </code></pre>
  
  <p>Which is nice.  However here is my problem: I would like to create a search query that is as specific as possible by combining the search for both an artist and a song name and an album name.. </p>
  
  <p>So for example I got this song:</p>
  
  <ul>
  <li><strong>song:</strong> Across the Great Divide</li>
  <li><strong>album:</strong> Great Divide</li>
  <li><strong>Artist:</strong> Semisonic</li>
  </ul>
  
  <p>I can search for the artist name only:</p>
  
  <pre><code>https://itunes.apple.com/search?term=Semisonic&amp;entity=allArtist&amp;attribute=allArtistTerm
  </code></pre>
  
  <p>I can search for the song term only:</p>
  
  <pre><code>https://itunes.apple.com/search?term=Across the Great Divide&amp;entity=song&amp;attribute=songTerm
  </code></pre>
  
  <p>I can search for the album name only:</p>
  
  <pre><code>https://itunes.apple.com/search?term=Great Divide&amp;entity=album&amp;attribute=albumTerm
  </code></pre>
  
  <p>However none of these guys give me the result i want (i can find the result i'm looking for amongst maybe 50 others.. but i just want the search query to be specific enough to avoid any client side filtering kind of thing).</p>
  
  <p>How can I combine these searches? if I simply add two searches together (in this example i'm searching for both song <em>and</em> artist):</p>
  
  <pre><code>https://itunes.apple.com/search?term=Across the Great Divide&amp;entity=song&amp;attribute=songTerm&amp;term=Semisonic&amp;entity=allArtist&amp;attribute=allArtistTerm
  </code></pre>
  
  <p>then apple will simply ignore the first search type (ie song) and return the results for artist only). </p>
  
  <p>ideas?</p>