Links

Search

Search in GitBook is the entity for searches made across organizations, spaces, and pages.

GET search results from all spaces for the current user

GET search results from a specific organization

GET search results from a specific space

GitBook Lens API

POST AI Ask question on all content accessible by the authenticated user

post
https://api.gitbook.com/v1
/search/ask
Ask a question to an AI across spaces that is accessible by the currently authenticated target.
Parameters
No parameters
Body
Example
Schema
{
"query": "string",
"previousQueries": [
"string"
]
}
Responses
200: OK
OK
default
Unexpected Error

POST AI Ask question in a specific space

post
https://api.gitbook.com/v1
/spaces/{spaceId}/search/ask
Ask a question to an AI within the context of the space.
Parameters
Path
spaceId*
string
The unique id of the space
Body
Example
Schema
{
"query": "string",
"previousQueries": [
"string"
]
}
Responses
200: OK
OK
default
Unexpected Error

POST AI Get recommended questions in a space

post
https://api.gitbook.com/v1
/search/questions
Get a list of questions recommended by AI for a list of content.
Parameters
No parameters
Body
Example
Schema
{
"documents": [
"string"
]
}
Responses
200: OK
OK
default
Unexpected Error