Search Get
import requests
url = "https://api.example.com/v1/search"
headers = {"X-Valet-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"id":"ab178130-3d07-452c-bde0-1135545145de",
"data":{
"answer_text":"The next solar eclipse that will be visible from Europe occurs on 12 August 2026, when a high‑magnitude partial eclipse (covering about 90 % of the Sun) will be observable across much of the continent.",
"sources":[
{
"url":"https://www.timeanddate.com/eclipse/list.html?region=europe&type=total-solar",
"title":"Total Solar Eclipses in Europe – Next 10 Years - Time and Date"
},
{
"url":"https://www.timeanddate.com/eclipse/europe.html",
"title":"Solar and Lunar Eclipses in Europe – Next 10 Years - Time and Date"
},
{
"url":"https://en.wikipedia.org/wiki/Solar_eclipse_of_August_12,_2026",
"title":"Solar eclipse of August 12, 2026 - Wikipedia"
},
{
"url":"https://www.rmg.co.uk/stories/space-astronomy/solar-eclipses-explained",
"title":"Solar eclipses explained: dates, types, how to see safely"
},
{
"url":"https://nso.edu/for-public/eclipse-map-2026/",
"title":"August 12, 2026 Solar Eclipse Map - NSO"
},
{
"url":"https://nationaleclipse.com/maps_upcoming.html",
"title":"Upcoming Eclipse Maps"
},
{
"url":"https://www.exploratorium.edu/eclipse/2026-total-solar-eclipse-guide",
"title":"Guide to the 2026 Total Solar Eclipse - Exploratorium"
},
{
"url":"https://science.nasa.gov/eclipses/future-eclipses/",
"title":"Future Eclipses - NASA Science"
}
]
},
"error":null,
"request":{
"method":"GET",
"params":{
"query":"When is the next solar eclipse visible from Europe?"
},
"payload":[
],
"endpoint":"/v1/search",
"served_at":"2025-11-08T13:27:18.006Z",
"cache_info":{
"cached_at":null,
"is_cached":false,
"expires_at":null
},
"elapsed_ms":4285,
"status_code":200,
"requested_at":"2025-11-08T13:27:13.721Z"
},
"success":true,
"uapi_version":"1.2.5",
"schema_version":"v1",
"deprecation_warnings":[
]
}
Endpoints
/v1/search
GET
/
v1
/
search
Search Get
import requests
url = "https://api.example.com/v1/search"
headers = {"X-Valet-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"id":"ab178130-3d07-452c-bde0-1135545145de",
"data":{
"answer_text":"The next solar eclipse that will be visible from Europe occurs on 12 August 2026, when a high‑magnitude partial eclipse (covering about 90 % of the Sun) will be observable across much of the continent.",
"sources":[
{
"url":"https://www.timeanddate.com/eclipse/list.html?region=europe&type=total-solar",
"title":"Total Solar Eclipses in Europe – Next 10 Years - Time and Date"
},
{
"url":"https://www.timeanddate.com/eclipse/europe.html",
"title":"Solar and Lunar Eclipses in Europe – Next 10 Years - Time and Date"
},
{
"url":"https://en.wikipedia.org/wiki/Solar_eclipse_of_August_12,_2026",
"title":"Solar eclipse of August 12, 2026 - Wikipedia"
},
{
"url":"https://www.rmg.co.uk/stories/space-astronomy/solar-eclipses-explained",
"title":"Solar eclipses explained: dates, types, how to see safely"
},
{
"url":"https://nso.edu/for-public/eclipse-map-2026/",
"title":"August 12, 2026 Solar Eclipse Map - NSO"
},
{
"url":"https://nationaleclipse.com/maps_upcoming.html",
"title":"Upcoming Eclipse Maps"
},
{
"url":"https://www.exploratorium.edu/eclipse/2026-total-solar-eclipse-guide",
"title":"Guide to the 2026 Total Solar Eclipse - Exploratorium"
},
{
"url":"https://science.nasa.gov/eclipses/future-eclipses/",
"title":"Future Eclipses - NASA Science"
}
]
},
"error":null,
"request":{
"method":"GET",
"params":{
"query":"When is the next solar eclipse visible from Europe?"
},
"payload":[
],
"endpoint":"/v1/search",
"served_at":"2025-11-08T13:27:18.006Z",
"cache_info":{
"cached_at":null,
"is_cached":false,
"expires_at":null
},
"elapsed_ms":4285,
"status_code":200,
"requested_at":"2025-11-08T13:27:13.721Z"
},
"success":true,
"uapi_version":"1.2.5",
"schema_version":"v1",
"deprecation_warnings":[
]
}
Returns sourced, structured answers to natural-language questions.
API key used for authentication.
Optional cache lifetime hint in seconds for successful GETs. Valid range is 0–3600. Set to 0 to disable caching for this response.
Natural-language question to answer. Always URL-encode when calling via raw HTTP.
Recommended usage (SDKs)
Use the official SDKs whenever possible. They handle base URLs, retries, timeouts, and typed responses for you.import os
from uapi import uAPI
client = uAPI(api_key=os.environ.get("UAPI_API_KEY"))
resp = client.search(
query="When is the next solar eclipse visible from Europe?"
)
print(resp.data.answer_text)
for src in resp.data.sources:
print("-", src.title, src.url)
Example response
{
"id":"ab178130-3d07-452c-bde0-1135545145de",
"data":{
"answer_text":"The next solar eclipse that will be visible from Europe occurs on 12 August 2026, when a high‑magnitude partial eclipse (covering about 90 % of the Sun) will be observable across much of the continent.",
"sources":[
{
"url":"https://www.timeanddate.com/eclipse/list.html?region=europe&type=total-solar",
"title":"Total Solar Eclipses in Europe – Next 10 Years - Time and Date"
},
{
"url":"https://www.timeanddate.com/eclipse/europe.html",
"title":"Solar and Lunar Eclipses in Europe – Next 10 Years - Time and Date"
},
{
"url":"https://en.wikipedia.org/wiki/Solar_eclipse_of_August_12,_2026",
"title":"Solar eclipse of August 12, 2026 - Wikipedia"
},
{
"url":"https://www.rmg.co.uk/stories/space-astronomy/solar-eclipses-explained",
"title":"Solar eclipses explained: dates, types, how to see safely"
},
{
"url":"https://nso.edu/for-public/eclipse-map-2026/",
"title":"August 12, 2026 Solar Eclipse Map - NSO"
},
{
"url":"https://nationaleclipse.com/maps_upcoming.html",
"title":"Upcoming Eclipse Maps"
},
{
"url":"https://www.exploratorium.edu/eclipse/2026-total-solar-eclipse-guide",
"title":"Guide to the 2026 Total Solar Eclipse - Exploratorium"
},
{
"url":"https://science.nasa.gov/eclipses/future-eclipses/",
"title":"Future Eclipses - NASA Science"
}
]
},
"error":null,
"request":{
"method":"GET",
"params":{
"query":"When is the next solar eclipse visible from Europe?"
},
"payload":[
],
"endpoint":"/v1/search",
"served_at":"2025-11-08T13:27:18.006Z",
"cache_info":{
"cached_at":null,
"is_cached":false,
"expires_at":null
},
"elapsed_ms":4285,
"status_code":200,
"requested_at":"2025-11-08T13:27:13.721Z"
},
"success":true,
"uapi_version":"1.2.5",
"schema_version":"v1",
"deprecation_warnings":[
]
}
data.answer_text is your directly usable answer. data.sources is a structured list of citations you can display, log, or validate against.⌘I