title: How to get results from udemy api with search
body: <p>I have the same problem as here <a href="https://stackoverflow.com/questions/56661604/how-to-get-results-from-udemy-api-with-search">How to get results from Udemy Api with search?</a> which unfortunately doesn't have an answer.</p>
  <p>I'm able to retrieved the title etc, from this URL for example, <a href="https://www.udemy.com/api-2.0/courses/238934/?fields%5Bcourse%5D=@all" rel="nofollow noreferrer">https://www.udemy.com/api-2.0/courses/238934/?fields[course]=@all</a> (you'll see the results in your browser) this URL works as well <a href="https://www.udemy.com/api-2.0/search-suggestions?q=java" rel="nofollow noreferrer">https://www.udemy.com/api-2.0/search-suggestions?q=java</a> but not this one <a href="https://www.udemy.com/api-2.0/courses/?search=java" rel="nofollow noreferrer">https://www.udemy.com/api-2.0/courses/?search=java</a></p>
  <p>As mentioned here <a href="https://www.udemy.com/developers/affiliate/methods/get-courses-list/" rel="nofollow noreferrer">https://www.udemy.com/developers/affiliate/methods/get-courses-list/</a></p>
  <p><strong>get /api-2.0/courses/?search=java</strong> <em>should work?</em></p>
  <p>Here is my code:</p>
  <pre><code>$url = &quot;https://www.udemy.com/api-2.0/courses/?search=java&quot;;
  
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_URL,$url);
      $c_id = base64_encode('XXX');
      $c_sid = base64_encode('XXX');
  
      curl_setopt($ch,CURLOPT_HTTPHEADER,array('X-Udemy-Client-Id: '.$c_id.'','X-Udemy-Client-Secret: '.$c_sid.'',&quot;Authorization: base64 encoded value of client-id:client-secret&quot;,&quot;Accept: application/json, text/plain, */*&quot;));
      curl_setopt($ch, CURLINFO_HEADER_OUT, true);
      $result=curl_exec($ch);
  
      curl_close($ch);
  
      $result = json_decode($result);
  
      $title = $result-&gt;title;
  </code></pre>
  <p>If someone could please shed some light on this.</p>