The Edmunds API JavaScript SDK
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Edmunds API JavaScript SDK

A simple wrapper to help you make API calls against the Edmunds API. The SDK is all open-source on GitHub, and all are welcome to contribute. Except as otherwise noted, the Edmunds API JavaScript SDK is licensed under the Apache 2.0 License.

Before using the SDK, it's highly recommended that you check out the following:

  1. The API Documentation
  2. The API Console

Quick Start

Add the SDK asynchronously to your page:

// Load the SDK asynchronously
(function(d, s, id){
   	var js, sdkjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) {return;}
    js = d.createElement(s); = id;
 	js.src = "../../edmunds.api.sdk.js";
	sdkjs.parentNode.insertBefore(js, sdkjs);
}(document, 'script', 'edmunds-jssdk'));

You also need to define the sdkAsyncInit function that the SDK calls when done loading on your page. Here's an example to get the top 5 articles in the Awards category of Edmunds Articles

window.sdkAsyncInit = function() {
	// Instantiate the SDK

	// Get articles
	var options = {
		"category": "awards",
		"limit": "0,5"

	// Callback function to be called when the API response is returned
	function success(reviews) {
		var len = reviews.length;
		var html = [];
		for (i=0; i<len; i++) {
			html.push('<a href="'+reviews[i].link+'"><h2>'+reviews[i].title+'</h2></a>');
			html.push(	'<div class="body">'+reviews[i].content+'</div>');
		var body = document.getElementById('review-body');
		body.innerHTML = html.join('');

	// Oops, Houston we have a problem
	function fail() {

	// Fire the API call
	res.api('/v1/content/', options, success, fail);

    // Additional initialization code goes here


What's Here

  • examples/: HTML examples of how to use the SDK. Still a work in progress!
  • .gitignore: Runtime files and folders that do not need to be part of this repository
  • LICENSE: License agreement for using this SDK
  • NOTICE: A reference to the License Agreement
  • A version history
  • Info about the developers and how to contribute!
  • You're looking at it :)

SDK Status

This is a beta release. We have opened sourced it at this stage to guide the development of the library and allow you to freely inspect and use the source.


The API documentation is available here.