﻿---
title: Copy results and share links to documents in Discover
description: Copy results from Discover as text, JSON, or Markdown, or send a link that reopens the same view or the same document in Discover.
url: https://www.elastic.co/docs/explore-analyze/discover/copy-and-share-documents
products:
  - Elastic Documentation
  - Kibana
applies_to:
  - Elastic Cloud Serverless: Generally available
  - Elastic Stack: Generally available
---

# Copy results and share links to documents in Discover
If you want to paste results into another tool, or show a teammate exactly what you're looking at, copy the results or send a link that reopens the same view or document.

## Before you begin

Open **Discover** and run a query that returns results.

## Copy results as text, JSON, or Markdown

To paste results into another tool, copy the rows you need from the table.
1. Select the rows you want to copy.
2. Open the **Selected** menu in the table toolbar, and select one of the available formats:
   - **Copy selection as text**.
   - **Copy documents as JSON**, or **Copy results as JSON** if you're in ES|QL mode.
   - <applies-to>Elastic Stack: Generally available since 9.3</applies-to> **Copy selection as Markdown**: Selected results are copied as a Markdown table.

**Result:** The text and Markdown formats copy the columns that are in the table. If you haven't added columns, they copy every field of the selected rows. The JSON format copies each selected document in full, whatever columns the table shows.
<tip>
  To copy the content of a single cell, use the quick actions that appear when you hover over the cell.
</tip>

<applies-to>Elastic Cloud Serverless: Generally available</applies-to> <applies-to>Elastic Stack: Planned</applies-to> In **JSON** view, you can also copy a field, a nested object, or the whole document from the tree. Refer to [View documents as JSON](/docs/explore-analyze/discover/document-explorer#document-explorer-view-mode).

## Share a link to the current view

To send someone to the view you're looking at, select `share` **Share** in the application menu and copy the link. For the link options, refer to [Reporting and sharing](https://www.elastic.co/docs/explore-analyze/report-and-share).
The link holds your query, not the results. Whoever opens it signs in to Kibana and sees only the data that their role can access. If the session has unsaved changes, the link is temporary, so save the session first to get a permanent one.
In classic mode, you can also open a document on its own page, which you can bookmark. Refer to [Open a document on its own page](/docs/explore-analyze/discover/inspect-documents#open-single-document).

### Share a link to a document

<applies-to>
  - Elastic Cloud Serverless: Generally available
  - Elastic Stack: Planned
</applies-to>

If you are investigating a result, you can copy a link that reopens **Discover** with that document's [flyout](/docs/explore-analyze/discover/inspect-documents#look-inside-a-document) open. Recipients land on the same document instead of only the surrounding query.
In ES|QL mode, your query must return the `_id` and `_index` metadata fields. Add `METADATA _id, _index` on the `FROM` or `TS` line, run the query again, and open the document before you copy the link. For example:
```esql
FROM kibana_sample_data_logs METADATA _id, _index
```

1. In the document table, select `maximize` **View details** on the document's row.
2. In the flyout header, select `link` **Copy link**.
   ![Copy link tooltip in the flyout header](https://www.elastic.co/docs/explore-analyze/images/kibana-discover-copy-document-link.png)

**Result:** Anyone who opens the link sees **Discover** with the same document flyout open. The link uses the absolute time range of the results on screen, so the document stays in that range.
If you open a document from a grouped ES|QL result, the link keeps the grouping with [`INLINE STATS`](https://docs-demo.elastic.dev/docs/reference/query-languages/esql/commands/inlinestats-by).
**Share** includes the open document when **Copy link** can copy it. If **Copy link** can't copy the document, the dialog says the link won't include it.
**Copy link** always uses an absolute time range. **Share** can keep a relative one, but then its dialog warns you to use an absolute time range so the document stays in the results.
**Copy link** stays available and shows a warning when it can't link to an individual result:
- If the query transforms rows, for example with `STATS` or `KEEP`, you can't copy a link to an individual result.
- If the query starts with a source command other than `FROM` or `TS`, such as `ROW`, you can't copy a link to an individual result.
- If `_id` and `_index` are missing, add `METADATA _id, _index` and run the query again.


## Next steps

- [Use Discover sessions in dashboards](https://www.elastic.co/docs/explore-analyze/discover/use-sessions-in-dashboards): Keep the results next to your other panels.
- [Export results and sessions from Discover](https://www.elastic.co/docs/explore-analyze/discover/export-discover-session): Take the results or the session definition elsewhere.


## Related pages

- [Inspect documents and requests in Discover](https://www.elastic.co/docs/explore-analyze/discover/inspect-documents)
- [Save and manage Discover sessions](https://www.elastic.co/docs/explore-analyze/discover/save-open-search)