---
title: "Căutare | Documentație | AI Assistant by R&D Copilot"
description: "Caută pasaje în documentele pe care le poate citi clientul."
canonical: "https://ai.rdcopilot.com/ro/docs/api-reference/search/"
language: ro
updated: 2026-11-22
---

# Căutare

Caută pasaje în documentele pe care le poate citi clientul.

## Caută în pasajele accesibile

GET `/ai/v1/search`

### Parametri

| Nume | În | Tip | Obligatoriu | Descriere |
| --- | --- | --- | --- | --- |
| `limit` | query | `integer` | Nuopțional | Implicit `100` Interval `1` – `500` |
| `cursor` | query | `string` | Nuopțional |  |
| `question` | query | `string` | Daobligatoriu |  |
| `scope` | query | `string` | Daobligatoriu | Una dintre `all`, `sales`, `contracts` |
| `language` | query | `string` | Daobligatoriu | Una dintre `en`, `ro` |

### Răspunsuri

| Stare | Descriere | Corp |
| --- | --- | --- |
| `200` | Rezultatul curent. | `CitationPage` |
| `400` | Cererea nu poate fi citită sau încalcă contractul: JSON greșit, un câmp lipsă sau necunoscut, un tip greșit. `fields` numește fiecare câmp. | `Error` |
| `401` | Tokenul lipsește, a expirat sau nu este al nostru. | `Error` |
| `403` | Tokenul nu dă acces la această societate sau operație. | `Error` |
| `429` | Prea multe cereri. `Retry-After` indică secundele. | `Error` |
| `503` | Serviciul nu poate răspunde acum. | `Error` |

### Cerere

curl

```bash
curl "$RDC_BASE_URL/ai/v1/search?question=What%20payment%20term%20did%20we%20agree%20with%20Hanul%20Ozana%3F&scope=all&language=en" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/ai/v1/search?question=What%20payment%20term%20did%20we%20agree%20with%20Hanul%20Ozana%3F&scope=all&language=en`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
  },
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'GET',
    f'{os.environ["RDC_BASE_URL"]}/ai/v1/search?question=What%20payment%20term%20did%20we%20agree%20with%20Hanul%20Ozana%3F&scope=all&language=en',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/ai/v1/search?question=What%20payment%20term%20did%20we%20agree%20with%20Hanul%20Ozana%3F&scope=all&language=en');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
    ],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/ai/v1/search?question=What%20payment%20term%20did%20we%20agree%20with%20Hanul%20Ozana%3F&scope=all&language=en");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

### Răspuns `200`

JSON

```json
{
  "items": [
    {
      "id": "account",
      "system": "CRM",
      "title": "Hanul Ozana account notes",
      "owner": "Andrei Pop",
      "changed": "2026-11-17T15:40:00Z",
      "path": "/sales/hanul-ozana",
      "scope": "sales",
      "passage": "Hanul Ozana pays by bank transfer at the end of the month after delivery.",
      "number": 1,
      "canRead": true
    },
    {
      "id": "contract",
      "system": "DMS",
      "title": "Payment terms",
      "owner": "Ioana Marin",
      "changed": "2026-09-03T10:30:00Z",
      "path": "/contracts/payment",
      "scope": "contracts",
      "passage": "Clause 6.2 of the contract sets the last day of the month after delivery as the due date.",
      "number": 2,
      "canRead": true
    },
    {
      "id": "annex",
      "system": "DMS",
      "title": "Payment annex",
      "owner": "Ana Rusu",
      "changed": "2026-10-21T13:10:00Z",
      "path": "/contracts/payment-annex",
      "scope": "contracts",
      "passage": "On orders delivered in parts, the period starts with the last delivery.",
      "number": 3,
      "canRead": true
    }
  ],
  "nextCursor": null
}
```
