# get\_document

The function `get_document(document_id, collection_name)`retrieves a single document from a collection.

**Input -**&#x20;

* <mark style="color:purple;">document\_id</mark> (str)- Specifies the identifier of the document in the database
* <mark style="color:purple;">collection\_name</mark> (str)– Specifies the name of the Collection that contains the data to be searched.

**Example –**

{% tabs %}
{% tab title="Python" %}
{% code lineNumbers="true" %}

```python
document = hyperspace_client.get_document(document_id='47',
                                            collection_name=collection_name)
```

{% endcode %}
{% endtab %}

{% tab title="Java" %}
{% code lineNumbers="true" %}

```java
Object document = hyperspaceClient.getDocument(document_id='47',
                                            collection_name=collection_name)
```

{% endcode %}
{% endtab %}

{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```javascript
const document = hyperspaceClient.getDocument(document_id='47',
                                            collection_name=collection_name)
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# 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://docs.hyper-space.io/hyperspace-docs/api-documentation/hyperspace-client/get_document.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.
