# Retrieve Data

You can access various data stored in the Eagle application through methods provided by the Eagle Plugin API, such as `files`, `folders`, `libraries`, etc. Here are some simple examples:

## **Example 1: Get the currently selected file in the application**

```javascript
let selected = await eagle.item.getSelected();
console.log(selected);
```

## **Example 2: Get files by specified conditions**

```javascript
let items = await eagle.item.get({
    ids: [],
    isSelected: true,
    isUnfiled: true,
    isUntagged: true,
    keywords: [""],
    ext: "",
    tags: [],
    folders: [],
    shape: "square",
    rating: 5,
    annotation: "",
    url: ""
});
```

## **Example 3: Get the currently selected folder in the application**

```javascript
let folders = await eagle.folder.getSelected();
```

In addition to the above, the Eagle Plugin API provides many different APIs for getting information. Please click the link below to view the complete information:

* [Library](/plugin-api/api/library.md)
* [Item](/plugin-api/api/item.md)
* [Folder](/plugin-api/api/folder.md)
* [App](/plugin-api/api/app.md)
* [Operating System](/plugin-api/api/os.md)
* [Notification](/plugin-api/api/notification.md)
* [Dialog](/plugin-api/api/dialog.md)
* [Clipboard](/plugin-api/api/clipboard.md)
* [Log](/plugin-api/api/log.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.eagle.cool/plugin-api/tutorial/get-eagle-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
