http://localhost:41595/api/v2/// Local access — no token needed
await fetch("http://localhost:41595/api/v2/library/info").then(r => r.json());// Remote access with token
const TOKEN = "f366c476-7533-4f33-b454-2bc720a1d0ea";
await fetch(`http://192.168.1.100:41595/api/v2/library/info?token=${TOKEN}`)
.then(r => r.json());
// Also works with POST requests
await fetch(`http://192.168.1.100:41595/api/v2/item/get?token=${TOKEN}`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ tags: ["design"], limit: 20 })
}).then(r => r.json());{
"status": "success",
"data": { ... }
}{
"status": "error",
"message": "Error description"
}{
"status": "success",
"data": {
"data": [ ... ],
"total": 8500,
"offset": 100,
"limit": 50
}
}// Page 1: items 0-49
const page1 = await fetch("http://localhost:41595/api/v2/item/get?limit=50").then(r => r.json());
// Page 2: items 50-99
const page2 = await fetch("http://localhost:41595/api/v2/item/get?offset=50&limit=50").then(r => r.json());
// Continue until data.data.length < limit (last page)// Check if Eagle is running
await fetch("http://localhost:41595/api/v2/app/info").then(r => r.json());
// Get library info
await fetch("http://localhost:41595/api/v2/library/info").then(r => r.json());
// List first 50 items
await fetch("http://localhost:41595/api/v2/item/get").then(r => r.json());
// Search items by tag
await fetch("http://localhost:41595/api/v2/item/get", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ tags: ["design"] })
}).then(r => r.json());
// Full-text search
await fetch("http://localhost:41595/api/v2/item/query", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ query: "sunset landscape" })
}).then(r => r.json());
// AI semantic search
await fetch("http://localhost:41595/api/v2/aiSearch/searchByText", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ query: "an orange cat", options: { limit: 10 } })
}).then(r => r.json());GM_xmlhttpRequest({
method: "GET",
url: "http://localhost:41595/api/v2/item/get",
onload: function (response) {
const data = JSON.parse(response.responseText);
console.log(data);
}
});