GET
/
v1
/
viral-library
/
facets
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

const client = new OctosparkClient({
  token: process.env.OCTOSPARK_TOKEN
})

const response = await client.viralLibrary.getViralLibraryFacets()
{
  "postCount": 123,
  "platforms": [
    {
      "value": "<string>",
      "count": 123
    }
  ],
  "formats": [
    {
      "value": "<string>",
      "count": 123
    }
  ],
  "categories": [
    {
      "value": "<string>",
      "count": 123
    }
  ],
  "origins": [
    {
      "value": "<string>",
      "count": 123
    }
  ],
  "kinds": [
    {
      "value": "<string>",
      "count": 123
    }
  ],
  "monetizations": [
    {
      "value": "<string>",
      "count": 123
    }
  ],
  "adSignals": [
    {
      "value": "<string>",
      "count": 123
    }
  ],
  "sponsored": [
    {
      "value": "<string>",
      "count": 123
    }
  ],
  "languages": [
    {
      "value": "<string>",
      "count": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

Success

postCount
number
required

Posts in the library.

platforms
object[]
required

Post counts per platform, largest first.

formats
object[]
required

Post counts per format, largest first.

categories
object[]
required

Post counts per category slug, largest first; uncategorised posts are not listed.

origins
object[]
required

Post counts per source corpus, largest first.

kinds
object[]
required

Post counts per platform kind (photo, video, text), largest first.

monetizations
object[]
required

Post counts per monetisation label, largest first; unlabelled posts are not listed.

adSignals
object[]
required

Post counts per advert classification (ad, likely_ad, none), largest first.

sponsored
object[]
required

Post counts for sponsored (true) and not sponsored (false) creators, largest first; unknown sponsorship is not listed.

languages
object[]
required

Post counts for the twenty most common detected languages, largest first; posts without a detected language are not listed.