---
title: "Search a space"
---

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

# Search a space

Path: CloudRaker Paperwork API › Spaces

`GET /v1/spaces/{spaceId}/search`

Semantic search over every file in the space. Files uploaded to a space are indexed as they are parsed, which is what makes this work — files in the default hidden workspace are not.

`q` is the query in plain words; `limit` caps the matches (1–100, default 20). Each match carries where it came from: the file, and the page, box or timecode span when the file was indexed with grounding.

**Learn more:** [Spaces](https://docs.cloudraker.com/paperwork/developers/spaces)

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `spaceId` (`spaceSearch.path.spaceId`; string, required)

## Query parameters

- `q` (`spaceSearch.query.q`; string, required)
  - minLength 1
- `limit` (`spaceSearch.query.limit`; integer, optional)
  - min 1; max 100

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.cloudraker.com/v1/spaces/<spaceId>/search?q=string' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/v1/spaces/<spaceId>/search?q=string';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/v1/spaces/<spaceId>/search?q=string"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Ranked matches.

#### Example

```json
{
  "matches": [
    {
      "id": "string",
      "namespace": "space/3f1c…/file_01J…",
      "tags": [
        "string"
      ],
      "score": 0,
      "metadata": {
        "property1": null,
        "property2": null
      }
    }
  ]
}
```

- `matches` (`spaceSearch.response.200.matches`; array<object>, required) — Ranked by relevance. No cursor.
  - `id` (`spaceSearch.response.200.matches.id`; string, required) — Chunk id of the match.
  - `namespace` (`spaceSearch.response.200.matches.namespace`; string, required)
    - example `"space/3f1c…/file_01J…"`
  - `tags` (`spaceSearch.response.200.matches.tags`; array<string>, required)
  - `score` (`spaceSearch.response.200.matches.score`; number, required) — Relevance; higher is closer.
  - `metadata` (`spaceSearch.response.200.matches.metadata`; map<unknown>, optional) — File grounding when the source was indexed with it: file id, page, bbox, and/or audio timecode.

### 400

Invalid request (`invalid_request`).

### 404

Unknown, archived or expired space.

### 429

Rate limited. The `/v1` API allows at least **67 requests per minute per organization** (about 1,000 requests per 15 minutes) — a guaranteed floor, enforced per edge location, so a geographically spread caller may get more. Wait for the `Retry-After` interval and retry — the error is `retryable`.

#### Example

```json
{
  "code": "rate_limited",
  "message": "string",
  "retryable": true,
  "requestId": "string",
  "docUrl": "string"
}
```

- `code` (`spaceSearch.response.429.code`; string, required)
  - one of `"rate_limited"`
- `message` (`spaceSearch.response.429.message`; string, required)
- `retryable` (`spaceSearch.response.429.retryable`; boolean, required)
  - one of `true`
- `requestId` (`spaceSearch.response.429.requestId`; string, required)
- `docUrl` (`spaceSearch.response.429.docUrl`; string, optional)


Source: https://docs.cloudraker.com/paperwork/api/spaces/space-search/index.md
