Instructions for adding a new search extension can be found here.
The API for libglobalsearch can be found here.