docs-api-reference-namespaces-get-users-namespaces-or-search-namespaces.md
GET
/
namespaces
Try it
JavaScript
JavaScript
import Smithery from '@smithery/api';
const client = new Smithery({
apiKey: process.env['SMITHERY_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const namespaceListResponse of client.namespaces.list()) {
console.log(namespaceListResponse.name);
}
curl --request GET \
--url https://api.smithery.ai/namespaces \
--header 'Authorization: Bearer <token>'
import requests
url = "https://api.smithery.ai/namespaces"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smithery.ai/namespaces",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.smithery.ai/namespaces"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.get("https://api.smithery.ai/namespaces")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.smithery.ai/namespaces")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body
200
401
500
{
"namespaces": [
{
"name": "anthropic"
}
],
"pagination": {
"currentPage": 0,
"pageSize": 0,
"totalPages": 0,
"totalCount": 0
}
}
{
"error": "Unauthorized"
}
{
"error": "Unauthorized"
}
[
](#authorization-authorization)
Authorization
string
header
required
Smithery API key as Bearer token
[
](#parameter-q)
q
string
Text search query (prefix match on name)
[
](#parameter-owner-id)
ownerId
string
Filter by owner ID
[
](#parameter-has-servers)
hasServers
enum<string>
Filter namespaces with servers
Available options:
0,
1,
true,
false
[
](#parameter-has-skills)
hasSkills
enum<string>
Filter namespaces with skills
Available options:
0,
1,
true,
false
[
](#parameter-page)
page
integer
Required range: 1 <= x <= 9007199254740991
[
](#parameter-page-size)
pageSize
integer
Required range: 1 <= x <= 50
[
](#parameter-fields)
fields
string
Comma-separated list of fields to include in response
200
application/json
Successful response
[
](#response-namespaces)
namespaces
object[]
required
Show child attributes
[
](#response-pagination)
pagination
object
required
Show child attributes
Was this page helpful?
YesNo
⌘I
JavaScript
JavaScript
import Smithery from '@smithery/api';
const client = new Smithery({
apiKey: process.env['SMITHERY_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const namespaceListResponse of client.namespaces.list()) {
console.log(namespaceListResponse.name);
}
curl --request GET \
--url https://api.smithery.ai/namespaces \
--header 'Authorization: Bearer <token>'
import requests
url = "https://api.smithery.ai/namespaces"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smithery.ai/namespaces",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.smithery.ai/namespaces"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.get("https://api.smithery.ai/namespaces")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.smithery.ai/namespaces")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body
200
401
500
{
"namespaces": [
{
"name": "anthropic"
}
],
"pagination": {
"currentPage": 0,
"pageSize": 0,
"totalPages": 0,
"totalCount": 0
}
}
{
"error": "Unauthorized"
}
{
"error": "Unauthorized"
}