> ## Documentation Index
> Fetch the complete documentation index at: https://docs.landing.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Find, Crop, and View

> Search parsed documents locally, crop elements as evidence images, and open a viewer that highlights exact spots.

After a parse, you can answer "where does the document say that?" without another API call. Three commands run on your machine and consume no credits:

* `ade find`: Search everything the parse found.
* `ade crop`: Save any element's region of the page as an image.
* `ade view`: Open the document in your browser with every element outlined.

Each command takes a job item ID, which comes from parse output or `ade history list`. If you don't have a parse yet, start with the [Quickstart](./quickstart).

## Find Elements

Use `ade find` to search a parse. Give it a job item ID and a search term:

```bash Command theme={null}
ade find 8d1e "Jordan" --json
```

```json Output theme={null}
[
  {
    "job_item_id": "8d1ec099225c7f34",
    "element_id": "table-0",
    "type": "table",
    "page": 1,
    "box": {
      "xmin": 0.08,
      "ymin": 0.28,
      "xmax": 0.92,
      "ymax": 0.55
    },
    "text": "<table>\n<tr><td>Full name</td><td>Jordan Rivera</td></tr>\n<tr><td>Date of birth</td><td>1988-04-12</td></tr>\n<tr><td>Country of residence</td><td>Spain</td></tr>\n</table>\n"
  },
  {
    "job_item_id": "8d1ec099225c7f34",
    "element_id": "table_cell-1",
    "type": "table_cell",
    "page": 1,
    "box": {
      "xmin": 0.46,
      "ymin": 0.3,
      "xmax": 0.9,
      "ymax": 0.35
    },
    "text": "Jordan Rivera"
  }
]
```

### Read a Match

Each match is an **element**: one piece of the parsed document, such as a text block, a table, a single table cell, or a signature region. The API documentation calls elements blocks. A term can match at more than one level, so searching for "Jordan" matches both the table and the one cell inside it, and you can work with whichever fits your task.

### Narrow the Search

The search term matches as a case-insensitive substring, and matches always come back in document order. To adjust what comes back:

* Use `--regex` to treat the term as a regular expression.
* Use `--type` to keep only certain element types, `--page` to keep one page, and `--limit` to cap the count. Filters combine freely.
* Omit the search term to list every element.
* Add `--id-only` to print just the element IDs for piping.

## Crop Elements as Images

Use `ade crop` to save an element's region of the original page as a PNG image. The image is **evidence**: proof you can point at, showing exactly where in the document a value came from.

Crop one element by ID, or a whole selection at once using the same filters `ade find` takes (`--type`, `--page`, `--all`). Images render at 300 dpi by default and land in the job item's `crops` folder.

```bash Command theme={null}
ade crop 8d1e --element-id table_cell-1 --json
```

```json Output theme={null}
{
  "status": "cropped",
  "job_item_id": "8d1ec099225c7f34",
  "count": 1,
  "directory": "/Users/you/.ade/jobs/8d1ec099225c7f34/crops",
  "crops": [
    {
      "element_id": "table_cell-1",
      "type": "table_cell",
      "page": 1,
      "box": {
        "xmin": 0.46,
        "ymin": 0.3,
        "xmax": 0.9,
        "ymax": 0.35
      },
      "dpi": 300,
      "path": "/Users/you/.ade/jobs/8d1ec099225c7f34/crops/table_cell-1@300dpi.png",
      "width": 1122,
      "height": 165
    }
  ]
}
```

## View the Document in Your Browser

Use `ade view` to see the parse laid over the original document. The command builds one HTML file: the document's pages with every element outlined, next to the parsed markdown. Select an element on either side and the other side highlights to match. On a terminal, the file opens in your browser automatically.

To return to the exact spot a value came from, pass `--element-id`. The output includes a `deep_link` URL that opens the viewer on this machine with that element already highlighted. To show someone else, send them the `view.html` file itself: it is self-contained, and the same `#element=` ending works on their copy. The viewer builds once and rebuilds only when the parse changes, which is why this example reports `"built": false` for an unchanged job item.

```bash Command theme={null}
ade view 8d1e --element-id table_cell-1 --json
```

```json Output theme={null}
{
  "status": "viewed",
  "job_item_id": "8d1ec099225c7f34",
  "kind": "parse",
  "path": "/Users/you/.ade/jobs/8d1ec099225c7f34/view.html",
  "built": false,
  "pages_embedded": null,
  "note": null,
  "url": null,
  "serve_error": null,
  "deep_link": "file:///Users/you/.ade/jobs/8d1ec099225c7f34/view.html#element=table_cell-1",
  "history_items": 1,
  "sidebar_sync": false
}
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Scripting and Automation" icon="code" href="./scripting-automation">
    Pipe find results, batch crops, and run the CLI from agents and pipelines.
  </Card>

  <Card title="CLI Reference" icon="book" href="./reference">
    Every flag these commands take, with their payload keys.
  </Card>
</CardGroup>
