***

title: search
slug: /reference/typescript/rest/datasphere/search
description: Perform a semantic search across all documents.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[ref-datasphere]: /docs/server-sdks/reference/typescript/rest/datasphere

Perform a semantic search across all documents in the [Datasphere][ref-datasphere].

<EndpointSchemaSnippet endpoint="POST /api/datasphere/documents/search" />

## **Response Example**

<EndpointResponseSnippet endpoint="POST /api/datasphere/documents/search" />

## **Example**

```typescript {9}
import { RestClient } from "@signalwire/sdk";

const client = new RestClient({
  project: "your-project-id",
  token: "your-api-token",
  host: "your-space.signalwire.com"
});

const results = await client.datasphere.documents.search({
    query_string: "How do I reset my password?",
    count: 5,
});
for (const chunk of results.data ?? []) {
    console.log(chunk.text, "score:", chunk.score);
}
```