Python client for the Echo Nest API



Tap into The Echo Nest's Musical Brain for the best music search, information, recommendations and remix tools on the web.

Pyechonest is an open source Python library for the Echo Nest API. With Pyechonest you have Python access to the entire set of API methods including:

  • artist - search for artists by name, description, or attribute, and get back detailed information about any artist including audio, similar artists, blogs, familiarity, hotttnesss, news, reviews, urls and video.
  • song - search songs by artist, title, description, or attribute (tempo, duration, etc) and get detailed information back about each song, such as hotttnesss, audio_summary, or tracks.
  • track - upload a track to the Echo Nest and receive summary information about the track including key, duration, mode, tempo, time signature along with detailed track info including timbre, pitch, rhythm and loudness information.


There are a few different ways you can install pyechonest:

  • Use setuptools: easy_install -U pyechonest
  • Download the zipfile from the releases page and install it.
  • Checkout the source: git clone git:// and install it yourself.

Getting Started

  • Install Pyechonest
  • Get an API key - to use the Echo Nest API you need an Echo Nest API key. You can get one for free at
  • Set the API key - you can do this one of two ways:
  • set an environment variable named ECHO_NEST_API_KEY to your API key
  • Include this snippet of code at the beginning of your python scripts:
    from pyechonest import config
  • Check out the docs and examples below.


All examples assume you have already setup your api key!

Find artists that are similar to 'Bikini Kill':

from pyechonest import artist
bk = artist.Artist('bikini kill')
print "Artists similar to: %s:" % (,)
for similar_artist in bk.similar: print "\t%s" % (,)

Search for artist:

from pyechonest import artist
weezer_results ='weezer')
weezer = weezer_results[0]
weezer_blogs = weezer.blogs
print 'Blogs about weezer:', [blog.get('url') for blog in weezer_blogs]

Get an artist by name:

from pyechonest import artist
a = artist.Artist('lady gaga')

Get an artist by Musicbrainz ID:

from pyechonest import artist
a = artist.Artist('musicbrainz:artist:a74b1b7f-71a5-4011-9441-d0b5e4122711')

Get the top hottt artists:

from pyechonest import artist
for hottt_artist in artist.top_hottt():
print, hottt_artist.hotttnesss

Search for songs:

from pyechonest import song
rkp_results ='radiohead', title='karma police')
karma_police = rkp_results[0]
print karma_police.artist_location
print 'tempo:',karma_police.audio_summary['tempo'],'duration:',karma_police.audio_summary['duration']

Get a song's audio_url and analysis_url:

from pyechonest import song
ss_results ='the national', title='slow show', buckets=['id:7digital-US', 'tracks'], limit=True)
slow_show = ss_results[0]
ss_tracks = slow_show.get_tracks('7digital-US')
print ss_tracks[0].get('preview_url')

-alt text

  • Migrate to Spotify | API key not allowed

    Migrate to Spotify | API key not allowed

    I expect that due to the migration of Echonest API to Spotify API, I'm now getting an error when I try to retrieve an audio_analysis object.

    But I'm not sure how or where to change the API I'm calling from the Echonest API to the Spotify API.

    The code is basically:

    from import AudioAnalysis

    Will pyechonest and remix still work? And if so, where do I need to make configuration changes?

    I imagine I am missing something obvious.

    opened by MikeiLL 6
  • Really just curious...

    Really just curious...

    Did you guys actually register to redirect to your projects README file?

    opened by bitops 5
  • Not working with Python 3.4

    Not working with Python 3.4


    It seems this code is meant for Python 2.7, is that right? Any advice for people using Python 3.4?

    opened by NathanWailes 4
  • Removed print statements

    Removed print statements

    It's inappropriate for a library to be printing to stdout.

    opened by alex 3
  • Can't get an Echo Nest API key

    Can't get an Echo Nest API key

    The URL in the is not available?

    opened by wowandwow 2
  • minor doc fix

    minor doc fix

    opened by sebpiq 2
  • Visiting redirected me here

    Visiting redirected me here

    Some wysiwyg editors today auto-links xxx.yyy and that's the reason why I was brought here (Gmail in my case).

    I just thought that it would be very cool if it instead redirects you to a random readme page in Github.

    opened by yowmamasita 2
  • Badge Badge

    Merge this to receive a badge indicating the number of issues in the ready column on your board at

    This was requested by a real person on, we're not trying to spam you.

    opened by waffleio 2
  • Last Example in the Readme

    Last Example in the Readme

    The last example isn't working for me.

    Traceback (most recent call last): File "", line 5, in slow_show = ss_results[0] IndexError: list index out of range

    opened by eudaimonious 1
  • Can't get api key from

    Can't get api key from

    Site seems down.

    opened by TZubiri 1
  • Proposing a PR to fix a few small typos

    Proposing a PR to fix a few small typos

    Issue Type

    [x] Bug (Typo)

    Steps to Replicate and Expected Behaviour

    • Examine pyechonest/ and observe ingteger, however expect to see integer.
    • Examine pyechonest/ and observe hotttest, however expect to see hottest.


    Semi-automated issue generated by

    To avoid wasting CI processing resources a branch with the fix has been prepared but a pull request has not yet been created. A pull request fixing the issue can be prepared from the link below, feel free to create it or request @timgates42 create the PR.


    opened by timgates42 0
  • Import Error about inconsistent indentation.

    Import Error about inconsistent indentation.

    >>> from pyechonest import catalog
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "...\Python\Python37\lib\site-packages\pyechonest\", line 327
        if since:
    TabError: inconsistent use of tabs and spaces in indentation```
    opened by alegend4u 1
  • link redirect link redirect

    I think that the link "" should NOT redirect to this repo's readme.

    1. it's pointless
    2. causes confusion
    3. should be avoided, is a common filename and should now be a url.
    opened by haze 0
  • Syntax error into util module

    Syntax error into util module

    Line 206 in util module is broken, and command

    easy_install pyechonest

    fails on it, after that the code doesn't work as the import util fails

    opened by VMAtm 0
  • DynamicPlaylist instances are created, but no songs generated (Python 2.7)

    DynamicPlaylist instances are created, but no songs generated (Python 2.7)

    I'm having trouble getting the Dynamic Playlist object to work. I really want to be able to use a seed_catalog to generate the playlist, but any method to fetch songs e.g. get_lookahead_songs() returns None.

    standard_playlist1 = playlist.Playlist(seed_catalog=u'CAZZOPK15261351B73')
    print standard_playlist1
    >> <Dynamic Playlist - 96d0aed056df4e64997a16c670eae817>
    print standard_playlist1.get_lookahead_songs()
    >> None

    I have tried simple using an artist_id or artist argument, but it's not working.

    On the other hand, the static playlist works great through any generation method (artist, artist_id or seed catalog). Based on the documentation and the existence of a deprecated dynamic playlist, is this still something of a work in progress?

    opened by LiYChristopher 0
  • Song's foreign_id cache not filled properly, Song.get_foreign_id() not based on tracks

    Song's foreign_id cache not filled properly, Song.get_foreign_id() not based on tracks


    Thank you very much for the pyechonest library!!! It is awesome so far : )

    To reproduce: call Playlist.static(..., bucket=['id:spotify', 'tracks']) then find that someResultSong.get_foreign_id() returns None although someResultSong.cache['tracks'][0]['foreign_id'] is already filled.

    I also noticed that someResultSong.get_foreign_id() also tries to find the foreign_id using only bucket=['id:spotify'](ie.the catalog space) and looking into Song objects... Whereas the right for me would be to have bucket=['id:spotify','tracks'] and look into Song.tracks...

    Have a nice day!!! : )

    opened by myselfhimself 0
  • adding .copy() to locals() preventing kwargs to be sent … adding .copy() to locals() preventing kwargs to be sent …

    …over HTTP

    Both static() and basic() functions use kwargs = locals() in order to retrieve the long list of keyword arguments as a dictionary. This is practical, however in python 2.7.6, the actual "kwargs" variable does get scanned by locals() and added as a reference to that dictionary. This ends in kwargs == {...variables key-value pairs..., "kwargs": {the same key-value pairs as before}} and that ugly variable is then sent online to the Echo Nest API.. Using kwargs = locals().copy() removes that kwargs=>kwargs embedded key-value pair.

    This also occurs in Let us check that later.

    opened by myselfhimself 1
  • Review documentation for mode and key

    Review documentation for mode and key

    Per this Stack Overflow question, the pyechonest documentation does not appear to correctly correspond with the API docs. Please double-check e.g. the descriptions of the possible values of key and mode.

    opened by textbook 0
  • Implement wrapper for Genre API

    Implement wrapper for Genre API

    Resolves #26

    opened by zythosec 0
  • Backwards compatible support for python 3

    Backwards compatible support for python 3

    Initial pass done by 2to3, further refinement added to preserve backwards compatibility and to use six where possible.

    I didn't see any unittests but running all of the examples from gave exactly the same results.

    opened by jsbronder 4
Beyonic API Python official client library simplified examples using Flask, Django and Fast API.

Beyonic API Python official client library simplified examples using Flask, Django and Fast API.

Harun Mbaabu Mwenda 45 Nov 18, 2021
Python API Client for Twitter API v2

?? Python Client For Twitter API v2 ?? Why Twitter Stream ? a python API client for Twitter API v2 now supports FilteredStream, Samp

Twitivity 17 Jan 4, 2022
Drcom-pt-client - Drcom Pt version client with refresh timer

drcom-pt-client Drcom Pt version client with refresh timer Pt版本客户端 可用于网页认

null 3 Jan 4, 2022
Official Python client for the MonkeyLearn API. Build and consume machine learning models for language processing from your Python apps.

MonkeyLearn API for Python Official Python client for the MonkeyLearn API. Build and run machine learning models for language processing from your Pyt

MonkeyLearn 148 Dec 14, 2021
🖥️ Python - P1 Monitor API Asynchronous Python Client

??️ Asynchronous Python client for the P1 Monitor

Klaas Schoute 2 Jan 10, 2022
Python API Client for Close

Close API A convenient Python wrapper for the Close API. API docs: Support: [email protected] Installation pip install clos

Close 51 Jan 30, 2021
Python client for CoinPayments API

pyCoinPayments - Python API client for CoinPayments Updates This library has now been converted to work with python3 This is an unofficial client for

James 24 Jan 14, 2022
DEPRECATED - Official Python Client for the Discogs API

⚠️ DEPRECATED This repository is no longer maintained. You can still use a REST client like Requests or other third-party Python library to access the

Discogs 488 Jan 7, 2022
The Foursquare API client for Python

foursquare Python client for the foursquare API. Philosophy: Map foursquare's endpoints one-to-one Clean, simple, Pythonic calls Only handle raw data,

Mike Lewis 391 Dec 2, 2021
Python Client for Instagram API

This project is not actively maintained. Proceed at your own risk! python-instagram A Python 2/3 client for the Instagram REST and Search APIs Install

Facebook Archive 2.9k Jan 11, 2022
A Python Client for News API

newsapi-python A Python client for the News API. License Provided under MIT License by Matt Lisivick. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRAN

Matt Lisivick 234 Jan 9, 2022
SmartFile API Client (Python).

A SmartFile Open Source project. Read more about how SmartFile uses and contributes to Open Source software. Summary This library includes two API cli

SmartFile 19 Jan 11, 2022
Python client for the Socrata Open Data API

sodapy sodapy is a python client for the Socrata Open Data API. Installation You can install with pip install sodapy. If you want to install from sour

Cristina 342 Dec 30, 2021
A Python Tumblr API v2 Client

PyTumblr Installation Install via pip: $ pip install pytumblr Install from source: $ git clone $ cd pytumblr $

Tumblr 644 Jan 16, 2022
A super awesome Twitter API client for Python.

birdy birdy is a super awesome Twitter API client for Python in just a little under 400 LOC. TL;DR Features Future proof dynamic API with full REST an

Inueni 260 Jan 18, 2022
Cord Python API Client

Cord Python API Client The data programming platform for AI ?? Features Minimal low-level Python client that allows you to interact with Cord's API Su

Cord 46 Jan 10, 2022
Pure Python 3 MTProto API Telegram client library, for bots too!

Telethon ⭐️ Thanks everyone who has starred the project, it means a lot! Telethon is an asyncio Python 3 MTProto library to interact with Telegram's A

LonamiWebs 5.9k Jan 12, 2022
Python client library for Google Maps API Web Services

Python Client for Google Maps Services Description Use Python? Want to geocode something? Looking for directions? Maybe matrices of directions? This l

Google Maps 3.5k Jan 12, 2022
A very simple REST API client for Python

Simple Salesforce Simple Salesforce is a basic REST API client built for Python 3.5, 3.6, 3.7 and 3.8. The goal is to provide a very lo

simple salesforce 1.2k Jan 18, 2022