Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 606
Paul Avatar asked Jul 03 '11 09:07

Paul


People also ask

How do I get a custom search engine ID?

Find your search engine IDOn the Custom Search home page, click the search engine you want. Click Setup. On the Basics tab, in the Details section, click Search engine ID.

What is CX in Google API?

Create Programmable Search Engine Once it is created, you can find the engine's ID in the Setup > Basics > Search Engine ID section of the Control Panel. This is the cx parameter used by the API.

How do I get a Google Custom Search API key?

You can get an API key by visiting https://code.google.com/apis/console and clicking "API Access". You will then need to switch on the custom search API on the "Services" tab.


1 Answers

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 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

like image 177
name-it Avatar answered Sep 19 '22 09:09

name-it