Create a New Expert Search
Create a search to find experts relevant to a natural language query.
POST /api/search
Parameters
| query | Required — natural language or keyword query |
Request Example
curl -X POST "https://rolli.ai/api/search" \
-H "X-ROLLI-TOKEN: your_token" \
-H "X-ROLLI-USER-ID: your_user_id" \
-H "Content-Type: application/json" \
-d '{
"query": "AI ethics"
}'
fetch("https://rolli.ai/api/search", {
method: "POST",
headers: {
"X-ROLLI-TOKEN": "your_token",
"X-ROLLI-USER-ID": "your_user_id",
"Content-Type": "application/json"
},
body: JSON.stringify({"query":"AI ethics"})
})
.then(res => res.json())
.then(console.log);
require "net/http"
require "uri"
require "json"
uri = URI("https://rolli.ai/api/search")
req = Net::HTTP::Post.new(uri)
req["X-ROLLI-TOKEN"] = "your_token"
req["X-ROLLI-USER-ID"] = "your_user_id"
req["Content-Type"] = "application/json"
req.body = {"query":"AI ethics"}.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(req)
end
puts res.body
import requests
import json
url = "https://rolli.ai/api/search"
headers = {
"X-ROLLI-TOKEN": "your_token",
"X-ROLLI-USER-ID": "your_user_id",
"Content-Type": "application/json"
}
payload = {
"query": "AI ethics"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
Response Example
{
"id": 1241,
"query": "AI ethics",
"created_at": "2023-10-01T12:00:00Z",
"search_url": "https://rolli.ai/search/1241"
}
If a return_url was configured, Rolli will POST the same search result payload to that URL once the search completes.