curl --request POST \
--url https://app.spyglass.so/api/v1/brands/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mode": "brand_name",
"brandNames": [
"Nike"
],
"type": "BRAND",
"count": 3
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({mode: 'brand_name', brandNames: ['Nike'], type: 'BRAND', count: 3})
};
fetch('https://app.spyglass.so/api/v1/brands/search', 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/search"
payload = {
"mode": "brand_name",
"brandNames": ["Nike"],
"type": "BRAND",
"count": 3
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"count": 123,
"brands": [
{
"id": "<string>",
"name": "<string>",
"summary": "<string>",
"category": "<string>",
"verified": true,
"pageAlias": "<string>",
"likes": 123,
"igUsername": "<string>",
"igFollowers": 123,
"igEngagementRate": 123,
"tiktokUsername": "<string>",
"tiktokFollowers": 123,
"thumbnailUrl": "<string>"
}
],
"unmatchedIds": [
"<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>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}Search brands and creators
Resolve brands by id, by name, or by a natural-language query. Exactly one shape is valid per mode, and these rules are enforced by the API but cannot be expressed in JSON Schema, so a generated client will not catch them for you:
mode: "ids"requiresbrandIds.mode: "brand_name"requiresbrandNamesandtype.mode: "smart"requiresqueryandtype, and rejectssortBybecause results are ordered by relevance.
count (default 10, max 100) bounds how many rows brand_name
and smart return, and therefore what the call costs. It is
ignored for mode: "ids", which returns one row per id that
matches a brand. Ids matching nothing are omitted from brands
and listed in unmatchedIds, which is present only for that mode.
Limited to 120 requests per minute for this endpoint.
Costs 2,500 microdollars ($0.0025) per brand returned, charged against your plan’s monthly credits. The count field is what you were charged for.
With mode: "smart" the call runs a language model, so it bills a
minimum of one row even when nothing matches. In that case count
is 0 but you are charged for one row.
curl --request POST \
--url https://app.spyglass.so/api/v1/brands/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mode": "brand_name",
"brandNames": [
"Nike"
],
"type": "BRAND",
"count": 3
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({mode: 'brand_name', brandNames: ['Nike'], type: 'BRAND', count: 3})
};
fetch('https://app.spyglass.so/api/v1/brands/search', 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/search"
payload = {
"mode": "brand_name",
"brandNames": ["Nike"],
"type": "BRAND",
"count": 3
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"count": 123,
"brands": [
{
"id": "<string>",
"name": "<string>",
"summary": "<string>",
"category": "<string>",
"verified": true,
"pageAlias": "<string>",
"likes": 123,
"igUsername": "<string>",
"igFollowers": 123,
"igEngagementRate": 123,
"tiktokUsername": "<string>",
"tiktokFollowers": 123,
"thumbnailUrl": "<string>"
}
],
"unmatchedIds": [
"<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>"
}
]
}
}{
"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
ids, brand_name, smart 100Spyglass brand id, either a uuid or a numeric platform id. May be given as a string or a number.
2001003 - 200500BRAND, CREATOR 1 <= x <= 1000 <= x <= 21474836470 <= x <= 2147483647NAME, MOST_FOLLOWERS, LEAST_FOLLOWERS, MOST_VIEWS, HIGHEST_ENGAGEMENT, MOST_ACTIVE_ADS White, Black, Asian, Hispanic, Middle Eastern, Indigenous, Pacific Islander male, female, other 0-18, 18-24, 25-34, 35-44, 45-54, 55-64, 65+ English, Spanish, French, German, Italian, Portuguese, Russian, Chinese, Cantonese, Japanese, Korean, Arabic, Hindi, Dutch, Polish, Turkish, Vietnamese, Thai, Burmese, Khmer, Lao, Indonesian, Hebrew, Swedish, Norwegian, Danish, Finnish, Farsi, Fijian, Greek, Czech, Hungarian, Romanian, Ukrainian, Malay, Tagalog, Filipino, Bengali, Serbian, Croatian, Bulgarian, Slovak, Slovenian, Estonian, Latvian, Lithuanian, Persian, Swahili, Amharic, Assamese, Urdu, Afrikaans, Basque, Catalan, Icelandic, Georgian, Albanian, Armenian, Azerbaijani, Bosnian, Galician, Gujarati, Haitian Creole, Kannada, Kazakh, Kyrgyz, Latin, Macedonian, Malayalam, Marathi, Mizo, Montenegrin, Nepali, Sinhala, Tamil, Telugu, Tulu, Punjabi, Welsh, Irish, Maltese, Yoruba, Zulu, ASL, Asturian, Bambara, Belarusian, Bhojpuri, Bisaya, Bodo, Cebuano, Chechen, Cherokee, Chichewa, Coptic, Cornish, Dari, Dhivehi, Esperanto, Ewe, Faroese, Frisian, Guarani, Hausa, Hawaiian, Hiligaynon, Hmong, Igbo, Ilocano, Jamaican Patois, Javanese, Kashmiri, Kikuyu, Kinyarwanda, Konkani, Kurdish, Lingala, Luxembourgish, Luganda, Malagasy, Manipuri, Maori, Mongolian, Nigerian Pidgin, Nyanja, Odia, Oromo, Papiamento, Pashto, Quechua, Samoan, Sanskrit, Scottish Gaelic, Sepedi, Shona, Sindhi, Somali, Sotho, Sundanese, Tajik, Tamazight, Tetum, Tibetan, Tongan, Tsonga, Tswana, Twi, Uzbek, Wolof, Xhosa, Khasi