Thumbnails

Retrieving small versions of data stored in Evernote


The Evernote service can produce thumbnail images for notes and individual resources. Thumbnails will be of type PNG, JPEG, or GIF (indicated by the response "Content-Type" header) and will fit within a 300x300 pixel square without requiring you to crop or scale them manually. One or both dimensions of an image may be less than the size of the box, so the image should be centered with an appropriate background and/or frame. For example, if you request the thumbnail for an image resource that's only 64x64 in the original format, the service will simply return the original image.

Thumbnails are not accessed through the Cloud API. Instead, you simply make an HTTP POST request to the Evernote service. To retrieve the thumbnail for a note, use the URL:

https://host.evernote.com/shard/shardId/thm/note/GUID

Where host is the Evernote service hostname, such as sandbox.evernote.com, shardId is the shardId that you received during authentication, and GUID is the note GUID.

To retrieve a thumbnail for a single resource, use the URL:

https://host.evernote.com/shard/shardId/thm/res/GUID

Where GUID is the resource GUID.

Optional parameters

You can specify the image format that you want by appending .jpg, .gif, .bmp or .png to the GUID.

You can request a smaller thumbnail by passing the size POST parameter with a value from 1 to 299, indicating the desired size of the bounding box in pixels. The server will return an image that will fit within this box, but one or both dimensions may be less than the requested value. The image will look best if the size is an even multiple of 300, such as 150 or 75.

Examples

The following examples access thumbnails for an Evernote account on shard s1 of sandbox.evernote.com. Note that no authentication is required for these examples because the are in a public notebook, and that we're using GET instead of POST to simplify the example.

Get a full-size thumbnail for the note with the GUID e669c090-d8b2-4324-9eae-56bd31c64af7:
https://sandbox.evernote.com/shard/s1/thm/note/e669c090-d8b2-4324-9eae-56bd31c64af7

Get a 75x75 thumbnail for the same note in JPEG format:
https://sandbox.evernote.com/shard/s1/thm/note/e669c090-d8b2-4324-9eae-56bd31c64af7.jpg?size=75

Get a full-size thumbnail for an image resource with GUID 8528dddd-1d71-4e4d-9006-377be7517dfb:
https://sandbox.evernote.com/shard/s1/thm/res/8528dddd-1d71-4e4d-9006-377be7517dfb

Here's how the authenticated POST request might look in the real world:

Note the inclusion of the auth POST parameter; this valid authentication token—a developer token would also work here—must be included if the requested note or resource is not shared publicly. Again, for public notes and notebooks, the auth parameter is not required and should be omitted.

Stay on top of what's happening in the Evernote developer community.