Get a List of Articles Based on a Word in the URL

This is the Source of an article that generates a list of all articles with "events" in the URL. Fancy stuff!

<ul class="list-unstyled article-list">
    <li class="hide dummy-li"><a> </a></li>
</ul>
<script>
$(function(){
  //base for all API calls
  var endpoint = 'https://app.knowledgeowl.com/api/head/';
  var urlPath = '/help/article/link/';
  
  //base data you will most likely be using for all calls
  var stdData = {
    _authbykey: '[Your API Key]',
    project_id: '[Your Project ID]'
  }

  var artData = stdData;
  artData["url_hash"] = {'$regex' : '.*events.*'};
  //only return the fields we need
  artData["_fields"] = ['url_hash', 'name'];
  
  //Return list of articles
  $.ajax({
    url: endpoint + 'article.jsonp',
    type: 'GET',
    dataType: 'jsonp',
    data: artData
  }).success(function(data){
    //returned article data
    if(data && data.data && data.data.length > 0) {
      $.each(data.data, function(index, article){
        var liClone = $('.article-list .dummy-li').clone();
        liClone.find('a').attr('href', urlPath + article.url_hash).html(article.name);
        liClone.toggleClass('hide').toggleClass('dummy-li');
        $('.article-list').append(liClone);
      });
    }
  }).error(function(error){
  //handle errors
  });
});
</script>