This is an awesome Python 2 wrapper for the Edmunds.com API. The Edmunds.com API provides automative data including vehicle specs, pricing, media, reviews, and more. There are also Edmunds API endpoints for dealership information and Edmunds editorial content.
Enter your Edmunds API key:
from edmunds import Edmunds
api = Edmunds('YOUR API KEY') # use Edmunds('YOUR API KEY', True) for debug mode
Make API calls to any endpoint, get a JSON object returned. For example, get the style details for the 2011 Lexus RX 350:
>>> response = api.make_call('/api/vehicle/v2/lexus/rx350/2011/styles')
>>> response
{u'styles': [{u'id': 101353967,
u'make': {u'id': 200001623, u'name': u'Lexus', u'niceName': u'lexus'},
u'model': {u'id': u'Lexus_RX_350',
u'name': u'RX 350',
u'niceName': u'rx-350'},
u'name': u'4dr SUV (3.5L 6cyl 6A)',
u'submodel': {u'body': u'SUV', u'modelName': u'RX 350 SUV'},
u'trim': u'Base',
u'year': {u'id': 100533091, u'year': 2011}},
{u'id': 101353968,
u'make': {u'id': 200001623, u'name': u'Lexus', u'niceName': u'lexus'},
u'model': {u'id': u'Lexus_RX_350',
u'name': u'RX 350',
u'niceName': u'rx-350'},
u'name': u'4dr SUV AWD (3.5L 6cyl 6A)',
u'submodel': {u'body': u'SUV', u'modelName': u'RX 350 SUV'},
u'trim': u'Base',
u'year': {u'id': 100533091, u'year': 2011}}],
u'stylesCount': 2}
Get photos for the style ID 3883 (1990 Honda Civic 2dr Hatchback):
>>> response = api.make_call('/v1/api/vehiclephoto/service/findphotosbystyleid', comparator='simple', styleId='3883')
>>> response
[{u'authorNames': [u'American Honda Motor Company, Inc.'],
u'captionTranscript': u'1991 Honda Civic 2 Dr Si Hatchback',
u'photoSrcs': [u'/honda/civic/1991/oem/1991_honda_civic_2dr-hatchback_si_fq_oem_1_131.jpg',
u'/honda/civic/1991/oem/1991_honda_civic_2dr-hatchback_si_fq_oem_1_396.jpg',
u'/honda/civic/1991/oem/1991_honda_civic_2dr-hatchback_si_fq_oem_1_300.jpg',
u'/honda/civic/1991/oem/1991_honda_civic_2dr-hatchback_si_fq_oem_1_400.jpg',
u'/honda/civic/1991/oem/1991_honda_civic_2dr-hatchback_si_fq_oem_1_500.jpg',
u'/honda/civic/1991/oem/1991_honda_civic_2dr-hatchback_si_fq_oem_1_185.jpg',
u'/honda/civic/1991/oem/1991_honda_civic_2dr-hatchback_si_fq_oem_1_175.jpg',
u'/honda/civic/1991/oem/1991_honda_civic_2dr-hatchback_si_fq_oem_1_196.jpg',
u'/honda/civic/1991/oem/1991_honda_civic_2dr-hatchback_si_fq_oem_1_423.jpg',
u'/honda/civic/1991/oem/1991_honda_civic_2dr-hatchback_si_fq_oem_1_276.jpg',
u'/honda/civic/1991/oem/1991_honda_civic_2dr-hatchback_si_fq_oem_1_87.jpg',
u'/honda/civic/1991/oem/1991_honda_civic_2dr-hatchback_si_fq_oem_1_150.jpg',
u'/honda/civic/1991/oem/1991_honda_civic_2dr-hatchback_si_fq_oem_1_98.jpg'],
u'shotTypeAbbreviation': u'FQ',
u'subType': u'exterior',
u'type': u'PHOTOS'}]
The Edmunds API Python wrapper requires the amazing requests library. Here are the installation instructions and the source code.
sdk-python/
.gitignore
AUTHORS.md # Info about development and how to contribute
HISTORY.md # Version history
LICENSE
README.md # You're looking at it!
requirements.txt
edmunds/
examples/ # Examples of using the SDK
README.md
media_photos.py
spec_make.py
__init__.py
edmunds.py # The source code for the SDK
tests.py
Please submit any problems, requests, and comments here.
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 Edmunds API documentation can be found here.
Licensed under the Apache v2 License.