I had a rough week last week, stomach issues kept me in bed for almost six days. Finally got some relief yesterday, and am now catching up on work and pumping out some ideas I had while I was out of action (starting with SearchLink).

As a regular part of doing show notes for Overtired, I need authoritative links for TV, movie, and actor information. I always create links in my show notes using SearchLink, so having an accurate search for a given link type saves me a lot of time.

Thus far I’ve always used a custom search (!imdb) that just did a site-specific search of IMDb (this is included as an example custom search in default installs). This works well enough, but I recently discovered an alternative database that provides an actual API for more accurate results.

The Movie Database (TMDb) provides a complete search API, and it’s free for non-commercial use. And believe me, as cool as I think SearchLink is, it definitely fits the non-revenue-generating clause of the agreement. So I’ve added 4 new searches to SearchLink.

A Quick Tip Before We Roll

Just in case you’ve been using SearchLink (or want to get started) but didn’t know about this handy trick: you can quickly see a list of all available searches, including any custom searches you’ve defined, by typing help, selecting it, and running SearchLink on it. A popup will be displayed listing all your options.

Hollywood Searches

!tmdb general search query
This runs a “multi” search across people, tv shows, and movies. This would be similar to a site-specific search of imdb.com using Google or DuckDuckGo, but is less vulnerable to ambiguity.
!tmdba actor name
Actor search. See notes below regarding spelling.
!tmdbt tv show name
TV search. Links to the main TMDb landing page for a matching television show title. This page includes the cast and episode lists.
!tmdbm movie title
Movie search. Links to the TMDb page for a matching movie.


The end result of these searches is a link to an info page on themoviedb.org. These appear to be as accurate as IMDb, and have the info I most want (studio/network, cast and crew, air date, season/episode list for tv shows). I don’t see any major difference between the TMDb and IMDb info, at least for my uses. It’s just presented a little differently (and I think I like TMDb’s presentation better).

The API does not like fuzzy matching. If you misspell a title or name, you’ll get no results. It’s perfect if you know exactly what you want to link, but not great if you’re guessing. It is good at ignoring punctuation, so “enders game” will match Ender’s Game.

Tip: TMDb search handles partials better than incorrect spellings, so if you know the first part of an actor’s name, spell out as much as you know and it will probably get you the right result.

[%](!tmdba jason mantz) 
	=> [Jason Mantzoukas](https://www.themoviedb.org/person/111683)

Neither the API nor TMDb site search will return results for episode titles. IMDb also can’t do this directly, but a site specific search will abstract to using Google/DuckDuckGo results and will typically find an exact episode. For this reason, if no result is returned by The Movie Database, search will fall back to using DuckDuckGo to search IMDB.com. It still might occasionally get you the wrong results, but it seems to work in my test cases. (I would have stuck to TMDB for the site search, but it kept returning “discussion” pages for episodes and I haven’t figured out a good way to exclude those from the results.)

[Trouble with Tribbles](!tmdb star trek trouble with tribbles) 
=> [Trouble with Tribbles](https://www.imdb.com/title/tt0708480/)

As you can see above, the correct IMDb page was linked for the search. Your mileage may vary.

A Few More Things

I put a couple other hours into SearchLink yesterday and early this morning.

Gather Integration

SearchLink does its best to retrieve page titles when it can, but it lacks the processing power of something like Gather. So, if you have Gather installed (using the PKG download or Homebrew), SearchLink 2.2.28+ will locate it and use it instead of the internal routines, offering better, faster page titling.

Mastodon Linking

I also added Mastodon profile linking. Previously, if you selected @ttscoff and ran SearchLink, it would assume a Twitter handle and give you [ttscoff on Twitter](https://twitter.com/ttscoff). Now, if the handle includes an @ in the middle, it’s parsed as a Mastodon handle instead: @ttscoff@nojack.easydns.ca becomes [ttscoff@nojack.easydns.ca on Mastodon](https://nojack.easydns.ca/@ttscoff). As always, the string template for the text link wording is customizable in settings. You can also force a Mastodon conversion using m@handle or !@m handle.

Pinboard Improved

Lastly, I completely revamped Pinboard searching. It’s now tokenized and fuzzy (within reason), so you no longer need an exact string match to find a bookmark, which is handy when you remember the topic but not the title/description you used. This is actually the biggest change of all, so I put more time into documenting it than I did into announcing it — see the Pinboard section of the docs for details.

And an Aside

The TMDb API can do a lot more than search, and if you’re looking for a way to search things like “What’s the most popular movie Nick Cage has been in” or get a thumbnail for “Black Mirror” for embedding, there are a lot of possibilities here. Discovery, episode thumbnails, cast info, all queryable. I don’t know who might need this right now, but if you do, check it out. It’s the API I’ve always wished IMDb had.

Check the SearchLink project page for more details, or just grab the latest version below.

SearchLink v2.3.65

Generate Markdown links from web searches without leaving your editor.

Published 11/10/14.

Updated 01/16/24. Changelog

DonateMore info…