Skip to content

Clips that contain a word

GET/v1/words/{word}/clips

Returns the clips whose transcript contains word, each with the timestamp where the word is spoken. This is the primary endpoint of the API.

The lookup is tolerant: the input is normalised (lowercased, accents folded), then matched against the catalogue, then against inflected forms (running matches run), then by trigram similarity (recieve matches receive). The word that was actually used is always returned in matchedWord, so a caller can show it back to the user.

Parameters

NameInTypeDefaultRequiredDescription
wordpathstringyesThe word to look up. Case and accents are folded before matching.
languagequerystringennoLanguage of the clips, as a two-letter code. Only languages listed by /corpus return results.
glossqueryen | es | ja | pt | ru | tr | zhennoLanguage for word meanings in the response. Falls back to English when a meaning is missing in the requested language.
levelquerystringnoRestrict to these CEFR levels, comma separated. Omit for all levels.
matchquerystrict | forms | fuzzyfuzzynoHow hard to try when the word is not in the catalogue. strict matches the exact form only, forms also accepts inflections, fuzzy also accepts near spellings.
orderqueryrecent | randomrecentnorecent returns the newest clips first and pages with cursor. random samples the word's clips instead, which is what you want when showing a handful on a page and not always the same handful; it ignores cursor and returns nextCursor: null.
limitqueryinteger20noItems per page.
cursorquerystringnoThe nextCursor of the previous page. Opaque; do not construct it yourself.

Response

FieldTypeDescription
querystringThe word as it was sent.
matchedWordstringThe catalogue word the results are for. Differs from query after a form or fuzzy match.
matchTypeexact | forms | fuzzy
didYouMeanstring[]Other close candidates, best first. Empty on an exact match.
wordobject
word.wordstring
word.wordIdinteger
word.levelA1 | A2 | B1 | B2 | C1 | C2CEFR level assigned during screening.
word.meaningstringMeaning in the requested gloss language.
word.clipCountinteger
clipsobject[]
clips[].clipIdstring (uuid)Stable Vocaflare id for the clip.
clips[].videoIdstringYouTube video id, for the embed.
clips[].titlestring
clips[].languagestring
clips[].levelA1 | A2 | B1 | B2 | C1 | C2CEFR level assigned during screening.
clips[].durationSintegerClip length in seconds. The corpus holds clips up to 180 s.
clips[].channelobject
clips[].channel.idstringSource channel id.
clips[].channel.namestringChannel name, for the attribution line.
clips[].embedUrlstringReady-to-use embed URL. Playback happens in the caller's player.
clips[].watchUrlstringCanonical watch URL, for the required attribution link.
clips[].occurrencesobject[]Where the word is spoken in this clip. The index currently stores the first occurrence per clip, so this array holds one item; it is an array because later index versions will list repeats without a breaking change.
clips[].occurrences[].tStartnumberSeconds from the start of the clip. Seek here to hear the word.
clips[].occurrences[].captionIdxintegerIndex of the cue that contains the word, matching /transcript.
clips[].occurrences[].textstringThe cue text, so a result list can show context without a second call.
totalCountinteger
nextCursorstring

Errors

StatusCodeWhen
400invalid_requestA parameter is missing or malformed.
401invalid_keyThe key is missing, unknown or disabled.
404not_foundNo such clip, or the word is not in the catalogue.
429rate_limitedToo many requests, or the plan quota is spent. Retry-After carries the wait in seconds.

Example

bash
curl https://clips.vocaflare.com/v1/words/receive/clips \
  -H "Authorization: Bearer $VOCAFLARE_API_KEY"
json
{
  "query": "recieve",
  "matchedWord": "receive",
  "matchType": "fuzzy",
  "didYouMean": [
    "receive",
    "relieve"
  ],
  "word": {
    "word": "receive",
    "wordId": 4127,
    "level": "B1",
    "meaning": "almak",
    "clipCount": 9
  },
  "clips": [
    {
      "clipId": "0f2a6c1e-88d7-4f0a-9f0b-1b7a2c3d4e5f",
      "videoId": "FinOIdu21XA",
      "title": "How to sound natural when you say 'receive'",
      "language": "en",
      "level": "B1",
      "durationS": 47,
      "channel": {
        "id": "UCxxxxxxxxxxxxxxxxxxxxxx",
        "name": "BBC Learning English"
      },
      "embedUrl": "https://www.youtube.com/embed/FinOIdu21XA?playsinline=1",
      "watchUrl": "https://www.youtube.com/watch?v=FinOIdu21XA",
      "occurrences": [
        {
          "tStart": 12.34,
          "captionIdx": 7,
          "text": "you receive the confirmation email"
        }
      ]
    }
  ],
  "totalCount": 9,
  "nextCursor": null
}

Metadata only. Playback runs on YouTube, through your own embed.