Index a brand by website URL
curl --request POST \
--url https://app.spyglass.so/api/v1/brands/index \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"websiteUrl": "https://www.nike.com"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({websiteUrl: 'https://www.nike.com'})
};
fetch('https://app.spyglass.so/api/v1/brands/index', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.spyglass.so/api/v1/brands/index"
payload = { "websiteUrl": "https://www.nike.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"brandId": "<string>",
"status": "already_exists"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}Indexing
Index a brand by website URL
Look up a brand by website URL, or start indexing it if we do not
have it yet. Pass a single websiteUrl. Instagram and TikTok
profile URLs are accepted and resolved as creators.
This endpoint does not consume credits. An existing brand returns
status: "already_exists". A new brand is created and sync is
queued, returning status: "indexing" and the new brandId.
Limited to 50 requests per minute for this endpoint. This call is free.
POST
/
brands
/
index
Index a brand by website URL
curl --request POST \
--url https://app.spyglass.so/api/v1/brands/index \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"websiteUrl": "https://www.nike.com"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({websiteUrl: 'https://www.nike.com'})
};
fetch('https://app.spyglass.so/api/v1/brands/index', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.spyglass.so/api/v1/brands/index"
payload = { "websiteUrl": "https://www.nike.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"brandId": "<string>",
"status": "already_exists"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}Authorizations
An API key from Settings → API, prefixed sg_live_.
Body
application/json
Required string length:
1 - 2048