The Google Street View Image API lets you embed a static (non-interactive) Street View panorama or thumbnail into your web page, without the use of JavaScript.
Reque
It seems like google uses a json endpoint behind the scenes. I think this is what you are looking for http://andresmartinezsoto.wordpress.com/category/computing/google-maps-api/
It returns empty object ({}) when there is no image available.
Previously, I used a HEAD request to get the content-length and compared that to know if a image exists or not.