> For the complete documentation index, see [llms.txt](https://academy.gopersonal.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://academy.gopersonal.ai/developers/api-reference/search.md).

# Search

Mediante la api de search se pueden realizar búsquedas de items para un proyecto.

* Version: 1.0
* Base URL: <https://go-discover.goshops.com>
* API body: `application/json`
* API response: `application/json`

## Búsqueda de items mediante texto para un poryecto

<mark style="color:blue;">`GET`</mark> `/search/:project`

#### Path Parameters

| Name                                      | Type   | Description     |
| ----------------------------------------- | ------ | --------------- |
| project<mark style="color:red;">\*</mark> | String | Id del proyecto |

#### Headers

| Name                                        | Type   | Description                                                       |
| ------------------------------------------- | ------ | ----------------------------------------------------------------- |
| x-api-key<mark style="color:red;">\*</mark> | String | Api key para autorizar el llamado. Lo puedes obtener en el admin. |

{% tabs %}
{% tab title="200: OK Devuelve el id de la búsqueda y los items" %}

```javascript
{
    searchId : "ID de la busqueda",
    items:[
    
    ]
}
```

{% endtab %}

{% tab title="401: Unauthorized api key inválido o ausente" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="400: Bad Request Proyecto inválido" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Búsqueda de items mediante imagen

<mark style="color:green;">`POST`</mark> `/image-search/:project`

#### Path Parameters

| Name                                      | Type   | Description     |
| ----------------------------------------- | ------ | --------------- |
| project<mark style="color:red;">\*</mark> | String | Id del proyecto |

#### Headers

| Name                                        | Type   | Description                                                       |
| ------------------------------------------- | ------ | ----------------------------------------------------------------- |
| x-api-key<mark style="color:red;">\*</mark> | String | Api key para autorizar el llamado. Lo puedes obtener en el admin. |

#### Request Body

| Name                                             | Type   | Description |
| ------------------------------------------------ | ------ | ----------- |
| uploaded\_file<mark style="color:red;">\*</mark> | String | Imagen      |

{% tabs %}
{% tab title="200: OK Devuelve el id de la búsqueda y los items" %}

```javascript
{
    searchId : "ID de la busqueda",
    items:[
    
    ]
}
```

{% endtab %}

{% tab title="400: Bad Request Proyecto o imagen inválido" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized api key inválido o ausente" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}
