Genius · Schema

GeniusReferent

A referent is a fragment of text on a page (most commonly a song lyric line) that one or more annotations are attached to.

MusicLyricsAnnotationsCrowdsourcedReference DataPublic APIs

Properties

Name Type Description
id integer
annotator_id integer
annotator_login string
api_path string
classification string
fragment string The exact text being annotated.
is_description boolean
path string
range object DOM range locating the fragment on the source page.
song_id integernull
url string
verified_annotator_ids array
annotatable object
annotations array
View JSON Schema on GitHub

JSON Schema

genius-referent-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/api-evangelist/genius/blob/main/json-schema/genius-referent-schema.json",
  "title": "GeniusReferent",
  "description": "A referent is a fragment of text on a page (most commonly a song lyric line) that one or more annotations are attached to.",
  "type": "object",
  "required": ["id", "fragment"],
  "properties": {
    "id":                      { "type": "integer" },
    "annotator_id":            { "type": "integer" },
    "annotator_login":         { "type": "string" },
    "api_path":                { "type": "string" },
    "classification":          { "type": "string", "enum": ["accepted","unreviewed","verified","deleted"] },
    "fragment":                { "type": "string", "description": "The exact text being annotated." },
    "is_description":          { "type": "boolean" },
    "path":                    { "type": "string" },
    "range":                   { "type": "object", "additionalProperties": true, "description": "DOM range locating the fragment on the source page." },
    "song_id":                 { "type": ["integer","null"] },
    "url":                     { "type": "string", "format": "uri" },
    "verified_annotator_ids":  { "type": "array", "items": { "type": "integer" } },
    "annotatable": {
      "type": "object",
      "properties": {
        "id":        { "type": "integer" },
        "type":      { "type": "string", "enum": ["song","web_page","album","article"] },
        "title":     { "type": "string" },
        "url":       { "type": "string", "format": "uri" },
        "api_path":  { "type": "string" },
        "image_url": { "type": "string", "format": "uri" },
        "context":   { "type": "string" }
      }
    },
    "annotations": { "type": "array", "items": { "$ref": "genius-annotation-schema.json" } }
  }
}