Getting a cx ID for custom search, Google API - Python

Paul picture Paul · Jul 3, 2011 · Viewed 44.8k times · Source

How can I get a generic cx ID for using the custom search API in Python? http://code.google.com/p/google-api-python-client/source/browse/samples/customsearch/main.py

From what I have read I understand that this cx ID is for certain sites only(when creating a custom search engine it asks me for specific sites), but I want it to search on google, so I can get the first 3-5 results from a google-search.

So I want to search on GOOGLE using Custom Search API, I already got a Developer Key, I just need to find how can I get an cx ID for searching on google, not a personal site, or something like that.

Answer

name-it picture name-it · Dec 20, 2012

As of 2020

  1. Go to https://cse.google.com/all
  2. Select your search engine or Create one and go into that
  3. You can find the CX id titled as "Search engine ID"
  4. Public URL also has the cx id in the Query param as ?cx=**

2012 Answer could be 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