title: Filtering json reponse from website API with Python Requests
body: <p>I need to query a betting exchange webstie using their API. I can get a list of event names and ids with Python Requests using the following code:</p>
  
  <pre><code>r15 = s.get('https://www.matchbook.com/edge/rest/events/?sport-ids=24735152712200&amp;category-ids=10812641776701')
  data1 = r15.json()
  for event in data1['events']:
      print(event['name'])
      print(event['id'])
  </code></pre>
  
  <p>I now know the numbers I need to filter by category-id and sport-id, but I don't know how to filter the json response for just the names of the runners. How do I filter the json reponse with Requests so it only shows me the runners names, and not the entire stream of json data?</p>
  
  <p>An example of a json response for a similar request is given below:</p>
  
  <pre><code>&lt;events-response&gt;
  &lt;offset&gt;0&lt;/offset&gt;
  &lt;per-page&gt;1&lt;/per-page&gt;
  &lt;total&gt;38&lt;/total&gt;
  &lt;events&gt;
  &lt;event&gt;
  &lt;id&gt;393986311580028&lt;/id&gt;
  &lt;name&gt;12:50 Gowran Park&lt;/name&gt;
  &lt;sport-id&gt;24735152712200&lt;/sport-id&gt;
  &lt;start&gt;2017-01-26T12:50:00Z&lt;/start&gt;
  &lt;in-running-flag&gt;false&lt;/in-running-flag&gt;
  &lt;allow-live-betting&gt;false&lt;/allow-live-betting&gt;
  &lt;category-id&gt;
  &lt;category-id&gt;10812641776701&lt;/category-id&gt;
  &lt;category-id&gt;24735152712200&lt;/category-id&gt;
  &lt;category-id&gt;24735153536300&lt;/category-id&gt;
  &lt;category-id&gt;393798405520028&lt;/category-id&gt;
  &lt;/category-id&gt;
  &lt;status&gt;open&lt;/status&gt;
  &lt;volume&gt;938.65922&lt;/volume&gt;
  &lt;markets&gt;...&lt;/markets&gt;
  &lt;meta-tags&gt;
  &lt;meta-tag id="10812641776701"&gt;
  &lt;name&gt;Ireland&lt;/name&gt;
  &lt;type&gt;COUNTRY&lt;/type&gt;
  &lt;url-name&gt;ireland&lt;/url-name&gt;
  &lt;/meta-tag&gt;
  &lt;meta-tag id="24735152712200"&gt;
  &lt;name&gt;Horse Racing&lt;/name&gt;
  &lt;type&gt;SPORT&lt;/type&gt;
  &lt;url-name&gt;horse-racing&lt;/url-name&gt;
  &lt;/meta-tag&gt;
  &lt;meta-tag id="24735153536300"&gt;
  &lt;name&gt;Gowran Park&lt;/name&gt;
  &lt;type&gt;LOCATION&lt;/type&gt;
  &lt;url-name&gt;gowran-park&lt;/url-name&gt;
  &lt;/meta-tag&gt;
  &lt;meta-tag id="393798405520028"&gt;
  &lt;name&gt;2017-01-26&lt;/name&gt;
  &lt;type&gt;DATE&lt;/type&gt;
  &lt;url-name&gt;2017-01-26&lt;/url-name&gt;
  &lt;/meta-tag&gt;
  &lt;/meta-tags&gt;
  &lt;/event&gt;
  &lt;/events&gt;
  &lt;/events-response&gt;
  </code></pre>
  
  <p>an xml example with the same structure as the json response I get (i.e. featuring the 'runners' tag) is given at;</p>
  
  <p><a href="https://www.matchbook.com/edge/rest/events/?sport-ids=24735152712200&amp;category-ids=10812638253700" rel="nofollow noreferrer">https://www.matchbook.com/edge/rest/events/?sport-ids=24735152712200&amp;category-ids=10812638253700</a></p>