Get Cat Breed Information
curl --request POST \
--url https://api.aisa.one/apis/v1/api-ninjas/get-cats \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"family_friendly": 3,
"grooming": 3,
"max_life_expectancy": 1,
"max_weight": 1,
"min_life_expectancy": 1,
"min_weight": 1,
"name": "persian",
"offset": 0,
"other_pets_friendly": 3,
"playfulness": 3,
"shedding": 3
}
'import requests
url = "https://api.aisa.one/apis/v1/api-ninjas/get-cats"
payload = {
"family_friendly": 3,
"grooming": 3,
"max_life_expectancy": 1,
"max_weight": 1,
"min_life_expectancy": 1,
"min_weight": 1,
"name": "persian",
"offset": 0,
"other_pets_friendly": 3,
"playfulness": 3,
"shedding": 3
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
family_friendly: 3,
grooming: 3,
max_life_expectancy: 1,
max_weight: 1,
min_life_expectancy: 1,
min_weight: 1,
name: 'persian',
offset: 0,
other_pets_friendly: 3,
playfulness: 3,
shedding: 3
})
};
fetch('https://api.aisa.one/apis/v1/api-ninjas/get-cats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/api-ninjas/get-cats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'family_friendly' => 3,
'grooming' => 3,
'max_life_expectancy' => 1,
'max_weight' => 1,
'min_life_expectancy' => 1,
'min_weight' => 1,
'name' => 'persian',
'offset' => 0,
'other_pets_friendly' => 3,
'playfulness' => 3,
'shedding' => 3
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/api-ninjas/get-cats"
payload := strings.NewReader("{\n \"family_friendly\": 3,\n \"grooming\": 3,\n \"max_life_expectancy\": 1,\n \"max_weight\": 1,\n \"min_life_expectancy\": 1,\n \"min_weight\": 1,\n \"name\": \"persian\",\n \"offset\": 0,\n \"other_pets_friendly\": 3,\n \"playfulness\": 3,\n \"shedding\": 3\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/api-ninjas/get-cats")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"family_friendly\": 3,\n \"grooming\": 3,\n \"max_life_expectancy\": 1,\n \"max_weight\": 1,\n \"min_life_expectancy\": 1,\n \"min_weight\": 1,\n \"name\": \"persian\",\n \"offset\": 0,\n \"other_pets_friendly\": 3,\n \"playfulness\": 3,\n \"shedding\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/api-ninjas/get-cats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"family_friendly\": 3,\n \"grooming\": 3,\n \"max_life_expectancy\": 1,\n \"max_weight\": 1,\n \"min_life_expectancy\": 1,\n \"min_weight\": 1,\n \"name\": \"persian\",\n \"offset\": 0,\n \"other_pets_friendly\": 3,\n \"playfulness\": 3,\n \"shedding\": 3\n}"
response = http.request(request)
puts response.read_body{
"details": [
{
"name": "<string>",
"children_friendly": 123,
"family_friendly": 123,
"general_health": 123,
"grooming": 123,
"image_link": "<string>",
"intelligence": 123,
"length": "<string>",
"max_life_expectancy": 123,
"max_weight": 123,
"min_life_expectancy": 123,
"min_weight": 123,
"origin": "<string>",
"other_pets_friendly": 123,
"playfulness": 123,
"shedding": 123
}
]
}API Ninjas
Get Cat Breed Information
Get Cat Breed Information
POST
https://api.aisa.one
/
apis
/
v1
/
api-ninjas
/
get-cats
Get Cat Breed Information
curl --request POST \
--url https://api.aisa.one/apis/v1/api-ninjas/get-cats \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"family_friendly": 3,
"grooming": 3,
"max_life_expectancy": 1,
"max_weight": 1,
"min_life_expectancy": 1,
"min_weight": 1,
"name": "persian",
"offset": 0,
"other_pets_friendly": 3,
"playfulness": 3,
"shedding": 3
}
'import requests
url = "https://api.aisa.one/apis/v1/api-ninjas/get-cats"
payload = {
"family_friendly": 3,
"grooming": 3,
"max_life_expectancy": 1,
"max_weight": 1,
"min_life_expectancy": 1,
"min_weight": 1,
"name": "persian",
"offset": 0,
"other_pets_friendly": 3,
"playfulness": 3,
"shedding": 3
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
family_friendly: 3,
grooming: 3,
max_life_expectancy: 1,
max_weight: 1,
min_life_expectancy: 1,
min_weight: 1,
name: 'persian',
offset: 0,
other_pets_friendly: 3,
playfulness: 3,
shedding: 3
})
};
fetch('https://api.aisa.one/apis/v1/api-ninjas/get-cats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/api-ninjas/get-cats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'family_friendly' => 3,
'grooming' => 3,
'max_life_expectancy' => 1,
'max_weight' => 1,
'min_life_expectancy' => 1,
'min_weight' => 1,
'name' => 'persian',
'offset' => 0,
'other_pets_friendly' => 3,
'playfulness' => 3,
'shedding' => 3
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/api-ninjas/get-cats"
payload := strings.NewReader("{\n \"family_friendly\": 3,\n \"grooming\": 3,\n \"max_life_expectancy\": 1,\n \"max_weight\": 1,\n \"min_life_expectancy\": 1,\n \"min_weight\": 1,\n \"name\": \"persian\",\n \"offset\": 0,\n \"other_pets_friendly\": 3,\n \"playfulness\": 3,\n \"shedding\": 3\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/api-ninjas/get-cats")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"family_friendly\": 3,\n \"grooming\": 3,\n \"max_life_expectancy\": 1,\n \"max_weight\": 1,\n \"min_life_expectancy\": 1,\n \"min_weight\": 1,\n \"name\": \"persian\",\n \"offset\": 0,\n \"other_pets_friendly\": 3,\n \"playfulness\": 3,\n \"shedding\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/api-ninjas/get-cats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"family_friendly\": 3,\n \"grooming\": 3,\n \"max_life_expectancy\": 1,\n \"max_weight\": 1,\n \"min_life_expectancy\": 1,\n \"min_weight\": 1,\n \"name\": \"persian\",\n \"offset\": 0,\n \"other_pets_friendly\": 3,\n \"playfulness\": 3,\n \"shedding\": 3\n}"
response = http.request(request)
puts response.read_body{
"details": [
{
"name": "<string>",
"children_friendly": 123,
"family_friendly": 123,
"general_health": 123,
"grooming": 123,
"image_link": "<string>",
"intelligence": 123,
"length": "<string>",
"max_life_expectancy": 123,
"max_weight": 123,
"min_life_expectancy": 123,
"min_weight": 123,
"origin": "<string>",
"other_pets_friendly": 123,
"playfulness": 123,
"shedding": 123
}
]
}请求规范
- 方法与路径: POST /apis/v1/api-ninjas/get-cats
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/api-ninjas/get-cats
{
"operationId": "api-ninjas.get-cats",
"method": "POST",
"path": "/apis/v1/api-ninjas/get-cats",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"family_friendly": {
"description": "Family friendliness level on a scale of 1-5, where 1 is less family-friendly and 5 is very family-friendly.",
"maximum": 5,
"minimum": 1,
"type": "integer"
},
"grooming": {
"description": "Grooming needs on a scale of 1-5, where 1 requires maximum grooming effort and 5 requires minimum grooming effort.",
"maximum": 5,
"minimum": 1,
"type": "integer"
},
"max_life_expectancy": {
"description": "Maximum life expectancy in years. Must be greater than min_life_expectancy if both are specified.",
"minimum": 0,
"type": "integer"
},
"max_weight": {
"description": "Maximum weight in pounds. Must be greater than min_weight if both are specified.",
"minimum": 0,
"type": "integer"
},
"min_life_expectancy": {
"description": "Minimum life expectancy in years. Must be less than max_life_expectancy if both are specified.",
"minimum": 0,
"type": "integer"
},
"min_weight": {
"description": "Minimum weight in pounds. Must be less than max_weight if both are specified.",
"minimum": 0,
"type": "integer"
},
"name": {
"description": "Cat breed name to search for (e.g., 'persian', 'siamese'). Partial matches are supported.",
"examples": [
"persian",
"siamese"
],
"type": "string"
},
"offset": {
"description": "Number of results to offset for pagination. Use this to paginate through results by setting offset to multiples of the result limit (e.g., 0, 20, 40).",
"examples": [
0,
20,
40
],
"minimum": 0,
"type": "integer"
},
"other_pets_friendly": {
"description": "Pet friendliness level on a scale of 1-5, where 1 is less friendly with other pets and 5 is very friendly with other pets.",
"maximum": 5,
"minimum": 1,
"type": "integer"
},
"playfulness": {
"description": "Playfulness level on a scale of 1-5, where 1 is less playful and 5 is very playful.",
"maximum": 5,
"minimum": 1,
"type": "integer"
},
"shedding": {
"description": "Shedding level on a scale of 1-5, where 1 is minimal shedding and 5 is heavy shedding.",
"maximum": 5,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
}
}
},
"required": false
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
按实际用量收费。 默认请求预估费用:$0.00089 USD。 最终费用以实际用量为准。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。授权
请求体
application/json