New API Integration: IFTTT!

We’re excited to announce that as of today, Genius is available as a Channel on IFTTT! IFTTT (If This Then That) — pronounced like “gift” without the “g” — is a tool for wiring together accounts and services. This builds on our existing developer API and continues expanding the ways you can get creative with Genius as a platform.

We’re starting off with two actions to take and two triggers to which you can respond.

The actions are following annotations on a web page or on a song with your Genius account. These make it easy to start hearing about annotations on things that matter to you.

For example, if you’re a SoundCloud user:

IFTTT Recipe: Follow SoundCloud songs you like on Genius connects soundcloud to genius

Or if you want to keep up with music that’s getting press instead:

IFTTT Recipe: Follow music articles from Entertainment Weekly on Genius connects entertainment-weekly to genius

The triggers are for new annotations created by you with Genius Beta on any web page or new annotations by anyone on a specific web page. These can be used in Recipes that respond to annotation activity from across the web.

Using Genius as a research tool?

IFTTT Recipe: Save your Genius web page annotations to Evernote connects genius to evernote

Or maybe there’s a site you want to keep tabs on:

IFTTT Recipe: Get a daily email digest of Genius annotations on a web page connects genius to email-digest

Want to let Genius control your lighting?

IFTTT Recipe: Blink your lights when a web page is annotated with Genius connects genius to lifx

Okay, that one might just be for the extreme fans. But plenty of our other published Recipes can really expand your Genius experience.

Maybe what’s most exciting is that this integration multiplies the potential for apps built directly on our API. Now when your client creates new annotations, that can be linked up to trigger actions on other services.

So give it a try! We’re excited to see how you use IFTTT with Genius and what new Recipes you come up with.

— Daniel Luxemburg (@dluxemburg), engineer in test at Genius

Posted on July 13, 2015 .

Introducing the Genius API!

At Genius we rise and shine driven by an ambitious mission: to annotate the world. 

We’re powered by an incredibly insightful, funny, and passionate community annotating millions of texts both on our site and now elsewhere on the Internet, thanks to our new Genius Beta tool. Whether we’re debating a reference on the new A$AP Rocky album or annotating Shakespeare’s Hamlet line by line, the vibe of Genius is one of playful yet sharp collective exchange that feels like a conversation among friends. 

It’s exactly in this spirit of collaboration that we make a big announcement: 

We’ve released the first public Genius API. 

We’re incredibly excited about this. There are four primary — and undeniably Genius — things you can do with the Genius API:

1. Create, Manage & View Annotations — Add, edit, and view annotations on any piece of text on the Internet, or on any song hosted on Genius.com.

2. Upvote & Downvote Annotations — Vote on annotations and earn Genius IQ in the process. 

3. Go Behind Your Favorite Artists & Songs — Build products that bring Genius’s millions of lyrics-based annotations to life. 

4. Search Our Musical Metadata — Dive into Genius’s rich library of musical metadata about artists, albums, and tracks to help power interactive experiences through any connected app or service. 

We’ve seen how easily Genius can be integrated with reading tools like Instapaper — which we’re proud to announce as an early release partner — in a smart and instantly shareable way. We truly can’t wait to interact with other platforms and apps… especially the ones that have yet to be created. 

If you’re interested in integrating your app, site, or service with the new Genius API, sign up here for more information. 

We’re excited to see what you all build along with us. 

— John Crepezzi (@john), engineer at Genius 

Posted on June 5, 2015 .

PSA: Internet Explorer requires all four arguments to document.createTreeWalker

If you, like me, typically use the Mozilla Developer Network documentation as the source of truth for the browser JavaScript interface, you may be forgiven for assuming that only the first argument to document.createTreeWalker is required. As it turns out, Internet Explorer requires all four arguments to be passed explicitly. For a cross-browser-friendly tree walker with the defaults, create it like this:

document.createTreeWalker(someElement, NodeFilter.SHOW_ALL, null, false);

IE's implementation is consistent with DOM Level 2, which specifies four arguments, all of them required. Mozilla's is consistent with the DOM Living Standard, which specifies three arguments, only the first of which is required (Mozilla still allows the fourth argument, but it's marked obsolete).

Posted on April 6, 2015 .