Is there a glottolog API?

That’s the Tweet!

In my unlikely dreamworld, this would be possible:

let query = "Cherokee"
let url = ""
let response = await fetch(url)
let info = await response.json()
document.body.innerHTML = `<h1>WOW</h1><pre></pre>`
document.querySelector('pre').textContent = JSON.stringify(info, null, 2)

And then depending on the search params, info could contain different stuff, like:

  • Family tree breadcrumbs
  • Glottocodes (and maybe those decrepit ISO-369-3 codes too :skull: )
  • Alternate names
  • Other stuff?

Glottolog all the things.

There’s GitHub - glottolog/glottolog-cldf: Glottolog data as CLDF StructureDataset and GitHub - glottolog/glottolog: Collaborative data curation for Glottolog and GitHub - glottolog/pyglottolog: Python API to access glottolog/glottolog
But if I can avoid it, I won’t build (and host and maintain) HTTP APIs anymore :slight_smile:


Oh, and given Glottolog’s license, you are free to ship/host copies of any of this data yourself, too, possibly making the whole cross-domain request thing go away.


So, if I desperately wanted to have a HTTP API for Glottolog data, my first try would be

This will get you an API as described here Pages and API endpoints - Datasette documentation

1 Like

I was going to say the same thing… why not just integrate the data directly? — just set up a cron job to slurp the newest data…

Do cron jobs have cronies?

Good news: there’s a new R package called “glottospace” that provides full access to Glottolog data! CRAN - Package glottospace

Full disclosure: I was one of the reviewers for this package.


Very cool! Hey @lneyens you might be interested in this.