Evernote API

Evernote API

Documents & Productivity

User information comes in all shapes and sizes. As an Evernote partner, you have the opportunity to give your users a unique view of their own memories, regardless of format. Because you're building with Evernote, you're building on a rock-solid platform designed to store all types of user data from images and audio to web pages and PDFs — and it's all available through our API.

Visit API

📚 Documentation & Examples

Everything you need to integrate with Evernote API

🚀 Quick Start Examples

Evernote API Javascript Examplejavascript
// Evernote API API Example
const response = await fetch('https://dev.evernote.com/doc/', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

Evernote Public API Documentation

Evernote offers public APIs that allow developers to create applications that can access and manipulate Evernote data. The Evernote Development Center provides comprehensive documentation for these APIs, including sample codes in different programming languages like JavaScript.

Getting Started with Evernote API

Before writing code to access Evernote, you must have Evernote API key and token. All the API details are available on https://dev.evernote.com/doc/.

To get started, you need to:

  • Sign up for an Evernote account
  • Register your application in the Evernote developer center
  • Request access to user accounts
  • Obtain OAuth authentication details

JavaScript API Examples

Below are some of the most common Evernote API calls in JavaScript:

Authentication

const consumerKey = ''; // Evernote API Consumer Key
const consumerSecret = ''; // Evernote API Consumer Secret

const oauth = new OAuth(Evernote.oauthRequestTokenUrl(),
  Evernote.oauthAccessTokenUrl(),
  consumerKey,
  consumerSecret,
  '1.0',
  null,
  'HMAC-SHA1'
);

oauth.setAccessToken(token, secret);

This code snippet sets up access to the Evernote API using OAuth.

Creating a Note

const noteStore = client.getNoteStore();
const note = new Evernote.Note();

note.title = "New Note";
note.content = '<?xml version="1.0" encoding="UTF-8"?>' +
  '<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">' +
  '<en-note>Hello, world!</en-note>';

noteStore.createNote(authToken, note, function(err, note) {
  if (err) {
    console.log(err);
  }
});

This code snippet creates a new Evernote note.

Retrieving Notebook List

const noteStore = client.getNoteStore();
noteStore.listNotebooks(authToken, function (err, notebooks) {
  if (err) {
    console.log(err);
  }
  else {
    for (let i in notebooks) {
      console.log(notebooks[i].name);
    }
  }
});

This code snippet retrieves a list of notebooks.

Searching Notes

const filter = new Evernote.NoteFilter();
filter.words = "search keyword";

const offset = 0;
const maxNotes = 20;

const spec = new Evernote.NotesMetadataResultSpec({
  includeTitle: true,
  includeUpdated: true,
  includeAttribute: true,
  includeTagGuids: true,
  includeContentLength: true
});

noteStore.findNotesMetadata(filter, offset, maxNotes, spec, function (err, noteList) {
  if (err) {
    console.log(err);
  }
  else {
    console.log(noteList);
  }
});

This code snippet searches for notes based on a specific keyword.

Updating a Note

const noteStore = client.getNoteStore();
const note = new Evernote.Note();

noteStore.getNote(authToken, noteId, true, false, false, false, function (err, note) {
  if (err) {
    console.log(err);
  }
  else {
    note.title = "Updated Title";
    note.content = '<?xml version="1.0" encoding="UTF-8"?>' +
      '<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">' +
      '<en-note>Hello, updated world!</en-note>';

    noteStore.updateNote(authToken, note, function(err, note) {
      if (err) {
        console.log(err);
      }
      else {
        console.log(note);
      }
    });
  }
});

This code snippet updates an Evernote note.

Conclusion

The Evernote Public API provides developers with the tools to easily integrate Evernote capabilities into their own applications. By using JavaScript, developers can take advantage of the powerful Evernote API functions to build innovative, cross-platform applications.

📊 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

Jun 12Jun 14Jun 16Jun 18Jun 20Jun 22Jun 24Jun 26Jun 28Jun 30Jul 2Jul 4Jul 6Jul 8Jul 1104008001440Minutes
Online
Offline

Related APIs in Documents & Productivity