Are you talking about this?
http://www.google.com/apis
Or what do you mean by "implement good search fields"? 'cause if you want to do just that, you can just make a HTML form, name the fields the same way Google does, and point the form action to the Google search script. This way your site visitors can search Google from your website...If you want to get PHP involved in this, I assumed you're talking about something more advanced so I posted the link to Google's APIs.
Diego