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.

Answer from Wilfred Hughes on Stack Overflow
🌐
Google
developers.google.com › webmaster-tools
Search Console API | Google for Developers
The Search Console API provides programmatic access to the most popular reports and actions in your Search Console account.
🌐
Google Support
support.google.com › googleapi › answer › 6158862
Setting up API keys - API Console Help
If your client application does not use OAuth 2.0, then it must include an API key when it calls an API that's enabled within a Google Cloud Platform project. The application passes this key into all API requests as a key=API_key parameter. ... Go to the API Console.
🌐
Google
docs.cloud.google.com › application development › google cloud sdk › authentication › manage api keys
Manage API keys | Authentication | Google Cloud Documentation
The API key ID is used by Google Cloud administrative tools to uniquely identify the key. The key ID can't be used to access APIs. The key ID can be found in the URL of the key's edit page in the Google Cloud console.
🌐
Google
developers.google.com › programmable search engine › custom search json api
Custom Search JSON API | Programmable Search Engine | Google for Developers
Custom Search JSON API requires the use of an API key. Get a Key · Custom Search JSON API provides 100 search queries per day for free. If you need more, you may sign up for billing in the API Console.
🌐
Positional
positional.com › blog › google-search-console-api
Google Search Console API: Beginner’s Guide to Get Started
First, you’ll need to log into your Google Account and then visit the Google Cloud Console. Assuming you haven’t already, create a Project for your new application. Next, click “API & Services” in the Quick access menu and then “Credentials” on the left hand side menu.
Find elsewhere
🌐
Google AI Studio
aistudio.google.com › app › apikey
Google AI Studio API Key
Sign in · Use your Google Account · Not your computer? Use Guest mode to sign in privately. Learn more about using Guest mode · Create account
🌐
Google AI
ai.google.dev › gemini api › using gemini api keys
Using Gemini API keys | Google AI for Developers
November 5, 2025 - Search for "Environment Variables" in the search bar. Choose to modify System Settings. You may have to confirm you want to do this. In the system settings dialog, click the button labeled Environment Variables. Under either User variables (for the current user) or System variables (applies to all users who use the machine), click New... Specify the variable name as GEMINI_API_KEY.
🌐
Google
developers.google.com › programmable search engine › custom search json api: introduction
Custom Search JSON API: Introduction | Programmable Search Engine | Google for Developers
After you have an API key, your application can append the query parameter key=yourAPIKey to all request URLs. The API key is safe for embedding in URLs, it doesn't need any encoding. There is only one method to invoke in the Custom Search JSON API:
🌐
Coupler.io Blog
blog.coupler.io › home › how to leverage google search console api for custom seo dashboards
Google Search Console API For Reporting | Coupler.io Blog
August 5, 2025 - Go to APIs & Services > Library, ... Credentials > + Create Credentials. For API Key: Select API Key, and it will automatically generate a unique identifier for your project....
🌐
Google
search.google.com › search-console › about
Google Search Console
Search Console tools and reports help you measure your site's Search traffic and performance, fix issues, and make your site shine in Google Search results
🌐
Google Cloud
console.cloud.google.com › apis › library › apikeys.googleapis.com
API Keys API – APIs and services
Google Cloud Console has failed to load JavaScript sources from www.gstatic.com. Possible reasons are:www.gstatic.com or its IP addresses are blocked by your network administratorGoogle has temporarily blocked your account or network due to excessive automated requestsPlease contact your network ...
🌐
Rollout
rollout.com › integration-guides › google-search-console › api-essentials
Google Search Console API Essentials
August 3, 2024 - Monitor your API usage on the new Google Search Console API page in Google Cloud Console [2]. If you have API key restrictions, make sure the Search Console API is not restricted [2].
🌐
SerpApi
serpapi.com
SerpApi: Google Search API
SerpApi is a real-time API to access Google search results. We handle proxies, solve captchas, and parse all rich structured data for you.
🌐
Google Support
support.google.com › googleapi › answer › 6158841
Enable and disable APIs - API Console Help
If the APIs & services page isn't already open, open the console left side menu and select APIs & services, and then select Library. Click the API you want to enable. If you need help finding the API, use the search field.