Testing the Tumblr API

Just testing the Tumblr API. I’ve been pulling content in to my personal site) via the JSON API using the search parameter.

Looking up by slug for each article works for all except Open Tech 2009. For some reason it doesn’t seem to be in the search index, as it’s not even picked up when searching for the term “open”.

Possibly explanations

  1. Large articles aren’t indexed for the search API - My open tech post was ~3,500 words.
  2. That article is missing from the index due to a bug, possibly a caching error.

The former sounds a little unlikely. While Tumblr is intended for short snappy posts I’m sure there are much longer posts, and ~3,500 is not that big.

Equally, i’m not sure it’s a caching bug as i’ve edited it a couple of times in an attempt to invalid the cache. No joy there.

I’ve contacted one of the Tumblr developers, hoping they can shed some light on the problem - or at least explain the search nuances I may be missing.

I also asked for a new API parameter, getBySlug. I wouldn’t need to be mucking around with search if there was a simple method to look up an article by it’s public slug (not the semi-private internal post ID).

A short term fix for me will be caching a map of slug => id of the last 50 articles I added to my Tumble log (the most you can get form the API in one page) and using that to do the API lookup. It feels pretty kludgey requiring stateful information between requests to do this (or worse, make two requests per page).