| Time | Status | User Agent |  |
| :-- | :-- | :-- | :-- |
| Make a request to see history. |

#### URL Expired

The URL for this request expired after 30 days.

**This is a BETA API -- This API may change unexpectedly.**

In this api, you can ask a question and the Happeo Search AI will try to find an answer based on the data that is inside Happeo. The api response is a stream providing updates on the thinking process.

This api is only accessible with an OAuth 2.0 client. It responds with an ndjson stream.

The api expects these headers:

- Authorization: Bearer your_access_token
- Accept: application/x-ndjson

### Response

The AI Search API streams ndjson with multiple different objects that are added to the response during the streaming process. The final response object contains all objects before it, so you can rely on the last ndjson chunk to contain all the information.

#### Response parts

**sessionId** \- This contains a unique id to identify the AI session

**searchId** \- This contains a unique id to identify the search session

**queryAnalysis** \- This contains an analysis of the query. It hold information like date filters, query fixes, intent analysis and other similar fields.

**searchResults** \- This contains the retrieval with all the search results & context.

**resultsEvaluation** \- This contains a filtered list of search results where a potential answer can be found.

**answer** \- This contains the AI answer and related fields.

**answerEvaluation** \- This contains an AI evaluation of the answer.

q

string

required

The search query for AI search.

accept

string

enum

Defaults to application/json

Generated from available response content types

application/jsonapplication/x-ndjson

Allowed:

`application/json``application/x-ndjson`

# `200      Successful streaming response with AI search results. Each line contains a JSON object with progressively more complete information.

# `400      Bad request, e.g., missing query parameter 'q'.

``401

Unauthorized - missing or invalid authentication token.

``500

Internal Server Error.

Updated 3 months ago

* * *

ShellNodeRubyPHPPython

Bearer

Base URL

https://api.happeo.com/beta/search/ai

```

xxxxxxxxxx

curl --request GET \

--url https://api.happeo.com/beta/search/ai \

--header 'accept: application/json'
```

Click `Try It!` to start a request and see the response here! Or choose an example:

application/x-ndjson

``200 - streamExample

application/json

``400

Updated3 months ago

* * *
