Utility
Usage
API endpoint for retrieving usage information
Authorization
AuthorizationRequiredBearer <token>In: header
Response Body
Usage data
TypeScript Definitions
Use the response body type in TypeScript.
usageintegerThe remaining credits
Format:
"int32"Unexpected error
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredintegerFormat:
"int32"messageRequiredstringcurl -X GET "https://api.search1api.com/usage" \
-H "Authorization: Bearer <token>"fetch("https://api.search1api.com/usage", {
headers: {
"Authorization": "Bearer <token>"
}
})package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.search1api.com/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://api.search1api.com/usage"
response = requests.request("GET", url, headers = {
"Authorization": "Bearer <token>"
})
print(response.text){
"usage": 0
}{
"error": 0,
"message": "string"
}