- Previous: API Documentation
- Up: API Documentation
- Next: The Vehicle API V1
The Editorial API V1
The Editorial API provides full access to Edmunds.com's rich and wide range of content that spans many different automotive categories from the Editor vehicle reviews to vehicle-specific articles. Learn more about the people behind the content:
Before you start using this API, please note the following Special Requirements:
|
Edmunds.com’s Editorial Content consists of articles (“Articles”) that are the copyright property of Edmunds.com, Inc., and we have special requirements for the use of the Articles.
|
URL Stub
http://api.edmunds.com/{version}/content/?fmt={json|xml}&api_key={Editorial API Key}
JSON Format of Response
In order to get a JSON object back, you need to set fmt=json in your API call. The response object will have the following format:
[
{
link: "URL",
title: "STRING",
published: "YYY-MM-DD",
content: "TEXT IN HTML FORMAT"
},
{
link: "URL",
title: "STRING",
published: "YYY-MM-DD",
content: "TEXT IN HTML FORMAT"
},
{
link: "URL",
title: "STRING",
published: "YYY-MM-DD",
content: "TEXT IN HTML FORMAT"
},
{
link: "URL",
title: "STRING",
published: "YYY-MM-DD",
content: "TEXT IN HTML FORMAT"
}, ....
]
XML (feed) Format of Response
In order to get an XML feed object back, you need to specify fmt=xml in your API call. The response object will have the following format:
<feed xmlns="http://www.w3.org/2005/Atom">
<entry>
<link href="/URL" />
<published>YYY-MM-DD</published>
<title>TITLE</title>
<content type="html">HTML</content>
</entry>
<entry>
<link href="/URL" />
<published>YYY-MM-DD</published>
<title>TITLE</title>
<content type="html">HTML</content>
</entry>
<entry>
<link href="/URL" />
<published>YYY-MM-DD</published>
<title>TITLE</title>
<content type="html">HTML</content>
</entry>
<entry>
<link href="/URL" />
<published>YYY-MM-DD</published>
<title>TITLE</title>
<content type="html">HTML</content>
</entry>
</feed>
The core properties of the response object are:
- link: The article's URL on Edmunds.com
- title: The title of the article
- published: The date the article was published
- content: The full article
API Filters
There are five distinct ways through which you can get content using this API. We call them filters:
| FILTER | URL STRUCTURE |
|---|---|
| category-only | api.edmunds.com/v1/content/?category=xxxx&fmt=json |
| model-only | api.edmunds.com/v1/content/?make=xxxx&model=xxxx |
| vehicle-only | api.edmunds.com/v1/content/?make=xxxx&model=xxxx |
| model with category | api.edmunds.com/v1/content/?make=xxxx&model=xxxx |
| vehicle with category | api.edmunds.com/v1/content/?make=xxxx&model=xxxx |
Available Categories
The following categories could be passed in the &category= parameter in the API call:
| CATEGORY | DESCRIPTION |
|---|---|
| reviews | Editor Reviews articles |
| car+news | Care News articles |
| road+tests | Road Tests articles |
| car+buying | Car Buying articles |
| auto+finance | Auto Finance articles |
| insurance | Insurance-related articles |
| warranties | Warranties-related articles |
| car+technology | Car Technology articles |
| driving | All driving-related articles |
| fuel+economy | Fuel Economy articles |
| how-to | How-To articles |
| vehicle+safety | Vehicle Safety and Safety Ratings articles |
| maintenance+%26+repair | Maintenance and Repair articles |
Pagination
We have a lot of articles. A lot. Therefore, it doesn't really make a whole lot of sense for us to send them all in one response object. Your systems (and ours) won't be able to handle it.
So we made it so that by default we always send be the latest 30 articles. To get more or less articles, you should use the &limit paramter in your call.
Here's how it works:
api.edmunds.com/v1/content/?fmt=json&api_key=xxxx&limit=[article index],[# of articles]
Let's say you don't want to get all the latest 30 articles all at once. Let's say you just need the last 5 articles in Editor Reviews. Here's the call you should make:
api.edmunds.com/v1/content/?category=reviews&fmt=json&api_key=xxxx&limit=0,5
What if you want to get the five articles but starting with the 50th most recent article? Here's the call for that:
api.edmunds.com/v1/content/?category=reviews&fmt=json&api_key=xxxx&limit=50,5
Pagination gives you the power to get what you want when you want it.
API Sample Calls
| URL | DESCRIPTION |
|---|---|
api.edmunds.com/v1/content/?make=bmw&model=m6 |
Get the latest 30 articles from any category related to BMW M6 2012 and give me the results in JSON format. |
api.edmunds.com/v1/content/?category=reviews |
Get the latest 30 editor reviews. |
api.edmunds.com/v1/content/?category=reviews |
Get the latest 10 editor reviews. |
api.edmunds.com/v1/content/?category=reviews |
Get three editor review articles starting with the 11th latest article. |
api.edmunds.com/v1/content/?category=car+news |
Get the latest three Car News articles. |
- Previous: API Documentation
- Up: API Documentation
- Next: The Vehicle API V1
0 Comments
Please sign in to post a comment.