If you are just looking for ideas, as opposed to some pre-packaged API, the
June Newsletter Puzzle had to do with searching for values in a Grid (well, really it was looking for words in a wordsearch grid). Several different people had various ideas about how to implement this, and you might find something in there that's of interest to you.