Glasser Team6 min read
Free Website Traffic APIs: Can You Check Competitors?
See which APIs report your own website traffic and which estimate competitors. Compare GA4, Search Console, and DataForSEO, with a sample GA4 request.

Start with ownership and the traffic metric you need
For a website you manage, start with an authorized analytics or Search Console connection. For another company's website, choose a source that explicitly provides external-domain estimates. These access paths measure different things and need different credentials.
Google provides a standard, free version of Analytics, while the Search Console API is free with usage limits. Both require access to the relevant property. Entering a competitor's domain does not grant access to its private analytics.
For an external domain's search-traffic estimate, inspect the DataForSEO operations available through Glasser. Match the operation to the required metric before running it: an organic-search estimate covers a different scope from total visits across all channels.
Official documentation was checked on October 10, 2026. The examples below illustrate measurement and request structure; we have not queried a live GA4 property or benchmarked traffic-estimation accuracy.
Keep visits, search clicks, and estimates in separate fields
A field named traffic hides too much information. Preserve the measurement source, exact metric, reporting period, country, device scope, and retrieval time alongside the value.
Consider these fictional records for the same website and month:
| Source and metric | Illustrative value | What the record represents |
|---|---|---|
GA4 sessions | 12,400 | Sessions recorded under the property's measurement setup |
| Search Console clicks | 7,100 | Clicks from the selected Google Search performance scope |
| SEO provider's organic traffic estimate | 9,000 | A model's estimate of organic search traffic |
These three numbers can coexist. Adding them would count overlapping activity and mix observations with a modeled figure. Comparing each with the same metric from the previous month is more meaningful, provided the measurement setup and scope stayed consistent.
Google's GA4 metric schema defines sessions, activeUsers, and screenPageViews separately. Choose the one that answers your report's question. A user can participate in multiple sessions, and a session can include multiple page views.
For external-domain enrichment, use a record such as:
domain | source | metric_name | value | measurement_basis
period_start | period_end | country | device_scope | retrieved_at
This is a suggested storage format for your application. Keep a separate missing-data reason instead of converting every absent record into a zero.
Choose a free or trial access path
GA4 Data API for a property you can access
The Google Analytics quickstart documents authenticated access and runReport. This path fits a dashboard built from the property's collected data. Confirm that the property has the required measurement setup and that the calling identity has access.
The Data API has property quotas, including token and concurrency limits. Plan report shapes and refresh frequency around those limits; a small number of complex reports can consume more resources than simple requests.
Search Console API for Google Search performance
Use the Search Analytics API when your question concerns search clicks, impressions, or query/page performance. It returns authorized property data and supports filters and dimensions. Its documented row limitations matter when you need a complete query-level export.
Keep this report labeled as Google Search performance. It does not describe direct visits, email campaigns, or every other source of activity recorded by a website analytics tool.
DataForSEO for external-domain search estimates
The Bulk Traffic Estimation endpoint derives estimates using keyword search volumes and click-through-rate assumptions. It distinguishes result categories such as organic and paid search. The method can support domain comparisons when you keep the source, market, and category consistent.
Direct DataForSEO accounts receive a documented $1 trial balance. Its dummy-data sandbox helps with response handling; live trial data is needed to assess coverage.
For supported operations through Glasser, follow the search, inspect, and run workflow. Glasser's endpoint terms determine its price. The GA4 instructions in this guide concern a direct Google integration; they do not establish a Glasser connection to private analytics properties.
Read a small GA4 report for a property you can access
Start with one completed reporting day and two metrics. Use Google's current quickstart to configure your Cloud project, enable the Data API, and authorize a user or service account with access to the GA4 property.
For a user-account setup, the quickstart documents Application Default Credentials with the Cloud and Analytics read-only scopes. In your own environment, follow those authentication steps and obtain an access token. Keep credentials out of source files and browser code.
Then send this request body to POST https://analyticsdata.googleapis.com/v1beta/properties/PROPERTY_ID:runReport, replacing PROPERTY_ID with the numeric GA4 property ID:
{
"dateRanges": [
{"startDate": "2026-10-01", "endDate": "2026-10-01"}
],
"dimensions": [{"name": "date"}],
"metrics": [
{"name": "sessions"},
{"name": "activeUsers"}
],
"returnPropertyQuota": true
}
Use an Authorization: Bearer ACCESS_TOKEN header and Content-Type: application/json. Follow the quickstart's quota-project configuration, including x-goog-user-project where required by your credential setup. Adjust the date to a completed day for which your property has data.
Read dimensionHeaders and metricHeaders alongside the corresponding row values. Retain the metric names when saving the result; array position alone becomes fragile when you later change the requested report.
Compare the response with the same date and metrics in the Analytics interface. If it differs, inspect the property, filters, reporting timezone, and data availability before changing your parser. This request was checked against the documented method and schema; no real-property result is claimed here.
For an external domain, choose a documented estimation operation instead of modifying this GA4 property's identifier. Its required domain and market inputs come from that operation's own contract.
Validate coverage and recurring cost before scaling
Use a small domain sample that reflects your actual workflow. Include a large site, a smaller site, a subdomain if relevant, and a domain for which a missing result would be plausible. Review returned metric definitions and coverage before calculating growth rates.
A missing record can reflect source coverage, target formatting, or the requested market. A failed request is a separate execution problem. Preserve those distinctions so a temporary outage does not look like a business losing all its visitors.
For modeled data, compare direction and relative scale under the same source and scope. Keep a methodology or source change visible in the series. Even an apparently precise returned number remains an estimate when the source calculates it from rankings and search demand.
For recurring enrichment, count domains, reporting periods, market/device splits, and refresh frequency. Determine whether the operation charges per request, task, or returned result. Through Glasser, inspect the selected DataForSEO endpoint before scaling the batch.
If you use a website's traffic estimate to prioritize accounts, retain the uncertainty beside the company record. The company-information API guide covers basic company data; neither record alone establishes a prospect's budget or willingness to buy.
Questions about website traffic APIs
Can a free API tell me any website's exact traffic?
Exact private analytics requires authorization to the underlying property. External-domain services may supply estimates or other public indicators, with coverage and methods specific to the source.
Does zero traffic mean the website has no visitors?
Check whether the source returned a measured zero, an estimate of zero, or no data. The requested period, metric, filters, and measurement setup all affect that interpretation.
Can I refresh a monthly estimate every minute?
Frequent requests help only when the underlying data can change at that frequency. Check the source's update schedule and choose a refresh interval that supports your reporting task.
Related posts
View more
7 min read
How to Look Up Company Information with a Free API
Need company records from an API? Compare Companies House, SEC, and OpenCorporates, check free access, and test coverage for the companies you need.

13 min read
Lead Enrichment: How to Fill Missing Data in Your CRM
Missing job titles, work emails, or company details in your CRM? Learn how to choose enrichment tools, resolve conflicts, and measure cost per usable lead.
Make your agent
work with real data.
Search, inspect, and run data APIs through one Glasser key. Turn your next question into a result you can use.
Get started with Glasser