APIs
Google Search Console API
In shortGoogle's API for pulling Search Console performance data (clicks, impressions, CTR, position) and URL index status into your own tools.
The Google Search Console API gives programmatic access to a property’s Search Console data. Its most used part, Search Analytics, returns clicks, impressions, CTR and average position, broken down by query, page, country, device and date. It also includes the URL Inspection API, which reports a URL’s index status, and resources for managing sitemaps and sites.
How it works
You enable the Search Console API in a Google Cloud project and authenticate either with OAuth (your own Google login) or with a service account whose email address you add as a user on the Search Console property. Requests then come from Python, Apps Script or a connector.
A Search Analytics query names a date range, the dimensions to group by (country, device, page, query, searchAppearance, date and, for recent data, hour) and optional filters. Each response holds up to 25,000 rows; you page through larger results with the startRow parameter. You can choose the search type (web, image, video, news, Discover or Google News) and whether to include fresh, not-yet-final data.
How it’s used in SEO and marketing
- Exporting page and query together, which the Performance report interface cannot give you in one export.
- Feeding your own queries into a keyword universe, rank tracking or a Looker Studio dashboard.
- Matching each URL’s top queries against its title and meta description to improve CTR.
- Finding striking-distance queries for internal linking anchors.
- Checking indexation of submitted URLs at scale with the URL Inspection API.
Example
In MLforSEO’s internal linking workflow, the first step is exporting page and query data (clicks, impressions, position) through the API, the Search Analytics for Sheets add-on or the BigQuery bulk export. The script keeps striking-distance queries: positions 4 to 20, at least 50 impressions by default, and 2 to 7 words long so the query can work as anchor text. The Fuzzy Booster tutorial uses the same API to pull the top queries for each URL by clicks, then scores how well the existing metadata matches them.
Limitations and things to watch
- Google says the API does not guarantee all rows, only the top ones, and its guide mentions a maximum of 50,000 rows per day per search type. Anonymised queries are never included.
- Data typically arrives 2 to 3 days late. Google recommends querying one day at a time.
- Quotas apply: Search Analytics allows 1,200 queries per minute per site, and URL Inspection allows 2,000 inspections per day per property. Page and query queries over long ranges use more of the load quota.
- The URL Inspection API reports the indexed version only; it cannot test a live URL or request indexing. For large sites, the BigQuery bulk export avoids row limits on stored data.
Learn it on MLforSEO
- 10 Ways to Automate Internal Linking with AI
- How to Automatically Optimize your SEO Metadata with FuzzyWuzzy and OpenAI in Google Colab
- The Ultimate Guide to the IndexNow API uses the URL Inspection API for indexation checks.
- The Semantic ML-enabled Keyword Research course uses Search Console data to build a keyword universe.
Where Google Search Console API shows up on MLforSEO
Read about it on the blog
Sources and further reading
- Google: Search Analytics query (Search Console API reference)
- Google: Search Console API usage limits
- Google: Getting all your data from the Search Analytics API
- Google: URL Inspection API reference
- 10 Ways to Automate Internal Linking with AI MLforSEO
- How to Automatically Optimize your SEO Metadata with FuzzyWuzzy and OpenAI in Google Colab MLforSEO
Other terms from APIs
- Amazon ComprehendAWS's pre-trained NLP API that extracts entities, key phrases, sentiment, language and personal data from text…
- API (Application Programming Interface)A set of rules that lets one piece of software request data or functions from another, such as pulling Search…
- API KeyA secret code that identifies your project when a script or tool calls an API, so the provider can authorise t…
- DataForSEO APIA pay-as-you-go suite of SEO data APIs for SERPs, keywords, backlinks, on-page data and AI search mentions, us…
- Google Autocomplete APIsGoogle endpoints that return autocomplete predictions for Search, YouTube and Places queries, used to collect…
- Google Cloud Natural Language API (Google NLP API)Google Cloud's pre-trained NLP API for entity analysis, sentiment, syntax, text classification and content mod…
- Google Knowledge Graph Search APIGoogle's read-only API for looking up entities in its Knowledge Graph, returning names, types, descriptions an…
- IBM Watson NLU (Natural Language Understanding)IBM's NLP API for entities, sentiment, emotion, relations, keywords and categories; deprecated in July 2026 an…
- IndexNowAn open protocol that lets sites instantly notify Bing, Yandex and other participating engines when URLs are a…


