As of 2020
- Go to https://cse.google.com/all
- Select your search engine or Create one and go into that
- You can find the CX id titled as “Search engine ID”
- Public URL also has the cx id in the Query param as ?cx=**
2012 Answer outdated.
here you can find the cx id http://www.google.com/cse/manage/all. look for My search engines then choose from the list