Item
The Item API allows you to query, add, modify, and manage items in the Eagle library.
Endpoints Overview
GET
/api/v2/item/get
List items with filters
POST
/api/v2/item/get
List items with filters (body)
POST
/api/v2/item/query
Full-text search
GET
/api/v2/item/countAll
Count all items
POST
/api/v2/item/add
Add a new item
POST
/api/v2/item/update
Update an item
POST
/api/v2/item/setCustomThumbnail
Set a custom thumbnail
POST
/api/v2/item/refreshThumbnail
Refresh item thumbnail
GET /api/v2/item/get
List items with optional filtering. Returns paginated results.
Query Parameters
idstring (optional) — Return a single item by IDidsstring (optional) — Comma-separated item IDsisSelectedboolean (optional) — Return currently selected itemsisUntaggedboolean (optional) — Return items without tagsisUnfiledboolean (optional) — Return items not in any folderkeywordsstring (optional) — Filter by keywords (comma-separated)tagsstring (optional) — Filter by tags (comma-separated)foldersstring (optional) — Filter by folder IDs (comma-separated)extstring (optional) — Filter by file extension (e.g.,jpg,png)annotationstring (optional) — Filter by annotation textratinginteger (optional) — Filter by rating (0–5)urlstring (optional) — Filter by source URLshapestring (optional) — Filter by shape:square,portrait,panoramic-portrait,landscape,panoramic-landscapefieldsstring (optional) — Comma-separated list of fields to return (improves performance)offsetinteger (optional) — Pagination offset, default0limitinteger (optional) — Pagination limit, default50, max1000
Response
Examples
POST /api/v2/item/get
Same as GET, but accepts filter parameters in the JSON body. Useful for complex queries with arrays.
Request Body
idstring (optional) — Item IDidsstring[] (optional) — Array of item IDsisSelectedboolean (optional) — Currently selected itemsisUntaggedboolean (optional) — Items without tagsisUnfiledboolean (optional) — Items not in any folderkeywordsstring[] (optional) — Keywords to matchtagsstring[] (optional) — Tags to matchfoldersstring[] (optional) — Folder IDs to matchextstring (optional) — File extensionannotationstring (optional) — Annotation textratinginteger (optional) — Rating (0–5)urlstring (optional) — Source URLshapestring (optional) — Image shapefieldsstring[] (optional) — Fields to returnoffsetinteger (optional) — Pagination offset, default0limitinteger (optional) — Pagination limit, default50, max1000
Examples
Performance Tip: Use the fields parameter to return only the data you need. This significantly improves response time when working with large libraries.
POST /api/v2/item/query
Full-text search across item names, tags, annotations, URLs, folder names, and more. Supports advanced query syntax. Returns paginated results.
Request Body
querystring — Search query stringoffsetinteger (optional) — Pagination offset, default0limitinteger (optional) — Pagination limit, default50, max1000
Query Syntax
word
Must contain word
cat
a b
Must contain both (AND)
cat dog
a OR b
Contains either (OR)
cat OR dog
a || b
Contains either (OR)
cat || dog
-word
Must NOT contain
cat -dog
"phrase"
Exact phrase match
"orange cat"
(a OR b) c
Grouping
(cat OR dog) cute
Examples
GET /api/v2/item/countAll
Returns the total number of items in the library.
Response
Example
POST /api/v2/item/add
Add a new item to Eagle. Supports adding from URL, Base64 data, local file path, or bookmark.
Request Body
idstring (optional) — Custom item IDnamestring (optional) — Item nametagsstring[] (optional) — Tags to assignfoldersstring[] (optional) — Folder IDs to add the item toannotationstring (optional) — Item annotationwebsitestring (optional) — Source website URL
Plus one of the following:
urlstring — Image URL to downloadbase64string — Base64 encoded image datapathstring — Local file path to importbookmarkURLstring — URL to add as a bookmark
Examples
Batch Mode
Pass an items array to add multiple items at once (up to 1000). Each object in the array follows the same format as single mode, and you can mix path, url, bookmarkURL, and base64.
Response
Single mode returns the new item's ID:
Batch mode returns all new item IDs:
POST /api/v2/item/update
Update an existing item's metadata. Only the fields you include will be modified.
Request Body
idstring (required) — The item ID to update
Modifiable fields:
namestring (optional) — New nametagsstring[] (optional) — Replace tagsfoldersstring[] (optional) — Replace folder assignmentsannotationstring (optional) — New annotationurlstring (optional) — New source URLstarinteger (optional) — Rating,0–5modificationTimeinteger (optional) — Modification timestampnoThumbnailboolean (optional) — Mark as having no thumbnailnoPreviewboolean (optional) — Mark as not previewableisDeletedboolean (optional) — Move to / restore from trash
Response
Returns the updated item object.
Examples
POST /api/v2/item/setCustomThumbnail
Set a custom thumbnail for an item from a local image file.
Request Body
itemIdstring (required) — The item IDfilePathstring (required) — Path to the thumbnail image
Example
This operation is asynchronous. The API waits up to 10 seconds for the thumbnail to be generated before responding.
POST /api/v2/item/refreshThumbnail
Regenerate the thumbnail for an item, updating file size, dimensions, and color palette.
Request Body
itemIdstring (required) — The item ID
Example
Item Properties
Items returned by the API contain the following properties:
id
string
Unique item ID
name
string
Item name
ext
string
File extension
width
integer
Image width in pixels
height
integer
Image height in pixels
url
string
Source URL
isDeleted
boolean
Whether the item is in trash
annotation
string
Item annotation/notes
tags
string[]
Array of tag names
folders
string[]
Array of folder IDs
palettes
Object[]
Color palette information
size
integer
File size in bytes
star
integer
Rating (0–5)
modificationTime
integer
Last modification timestamp
noThumbnail
boolean
Whether the file has no thumbnail
noPreview
boolean
Whether double-click preview is disabled
Last updated