Api documentation

Api documentation

Get Edmunds Editor Review by Car Make/Model/Year

Editor Reviews
 
 
v1
 
 

Description

This resource offers access to the Edmunds Editor Reviews including the pros, cons, and Edmunds Says. Make sure to see the Special Requirements for displaying Edmunds editorial content.

URL

  1. https://api.edmunds.com/v1/content/editorreviews?make={car make}&model={car model}&year={car year}&fmt=json&api_key={your API key}

Code Example

You need the Javascript SDK to run this example.

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset=utf-8>
  5. <title>Edmunds API Example</title>
  6. </head>
  7. <body>
  8. <div id="results-body"></div>
  9. <script>
  10. window.sdkAsyncInit = function() {
  11. // Instantiate the SDK
  12. var res = new EDMUNDSAPI('YOUR API KEY');
  13. // Optional parameters
  14. var options = {
  15. "make": "honda",
  16. "model": "accord",
  17. "year": "2011"
  18. };
  19. // Callback function to be called when the API response is returned
  20. function success(res) {
  21. var body = document.getElementById('results-body');
  22. body.innerHTML = res.editorial.body;
  23. }
  24. // Oops, Houston we have a problem!
  25. function fail(data) {
  26. console.log(data);
  27. }
  28. // Fire the API call
  29. res.api('/v1/content/editorreviews', options, success, fail);
  30. // Additional initialization code such as adding Event Listeners goes here
  31. };
  32. // Load the SDK asynchronously
  33. (function(d, s, id){
  34. var js, sdkjs = d.getElementsByTagName(s)[0];
  35. if (d.getElementById(id)) {return;}
  36. js = d.createElement(s); js.id = id;
  37. js.src = "path/to/sdk/file";
  38. sdkjs.parentNode.insertBefore(js, sdkjs);
  39. }(document, 'script', 'edmunds-jssdk'));
  40. </script>
  41. </body>
  42. </html>