API setup

Google Programmable Search: Get an API Key and Engine ID (CX)

By Zubair Hussain · 2026-09-16

Google Programmable Search is a secondary source in LeadGen. It needs two values: an API key and a Search Engine ID (CX).

1. Create the search engine (CX)

  1. Open programmablesearchengine.google.com and create a new engine.
  2. Copy the Search engine ID — this is your GOOGLE_CX.

2. Enable the API and create a key

  1. In Google Cloud Console, enable the Custom Search API.
  2. Create an API key — this is your GOOGLE_API_KEY.
GOOGLE_API_KEY=your_key_here
GOOGLE_CX=your_engine_id_here

Free quota

The Custom Search JSON API includes a free daily query allowance. Beyond it, calls are billed, so check current pricing in the Google Cloud console.

Try the LeadGen demo →