Search1API
Utility

Usage

API endpoint for retrieving usage information

GET
/usage

Authorization

AuthorizationRequiredBearer <token>

In: header

Response Body

Usage data

TypeScript Definitions

Use the response body type in TypeScript.

usageinteger

The remaining credits

Format: "int32"

Unexpected error

TypeScript Definitions

Use the response body type in TypeScript.

errorRequiredinteger
Format: "int32"
messageRequiredstring
curl -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"
}