DataForSEO icon

DataForSEO

DataForSEO

Overview

The "Get Historical Traffic Stats" operation in the Labs resource of this node fetches historical traffic statistics for specified domains or subdomains. It allows users to analyze how web traffic has changed over time for their target websites, segmented by location, language, and types of search results (organic, paid, featured snippet, local pack).

This node is beneficial for digital marketers, SEO specialists, and analysts who want to track trends in website traffic historically, compare performance across different regions or languages, and understand the impact of various search result types on traffic.

Practical examples:

  • An SEO analyst tracking the organic traffic growth of a client’s domain over the past year in the United States.
  • A marketing team comparing paid search traffic trends for multiple subdomains in different countries.
  • A business evaluating how featured snippets have influenced their site visits historically in a specific language market.

Properties

Name Meaning
Target Domains or Subdomains One or more domains or subdomains to retrieve historical traffic stats for. Domains should be specified without https:// or www. prefixes. Multiple targets can be added.
Location The full name of the geographic location for which to get traffic data. Supported locations are defined externally and linked in the property hint.
Language The full name of the language for which to get traffic data. Supported languages are defined externally and linked in the property hint.
Item Types Types of search results to include in the response. Options are: Organic, Paid, Featured Snippet, and Local Pack. Multiple types can be selected to filter the traffic data accordingly.

Output

The node outputs an array of JSON objects where each object corresponds to the historical traffic statistics for one of the requested target domains/subdomains. The structure typically includes:

  • Traffic metrics over time (e.g., daily, weekly, or monthly traffic counts).
  • Breakdown by item types selected (organic, paid, etc.).
  • Metadata such as the target domain, location, and language used for the query.

If binary data were involved (not indicated here), it would represent files or media related to the traffic stats, but this operation focuses on JSON data output.

Dependencies

  • Requires an active API key credential for the DataForSEO service.
  • The node makes POST requests to the DataForSEO API endpoint at https://api.dataforseo.com/v3.
  • Users must ensure that the location and language values correspond to those supported by DataForSEO, as referenced in their documentation.
  • No additional external dependencies beyond the configured API credentials and internet access.

Troubleshooting

  • Common issues:

    • Invalid or unsupported location or language names may cause the API to return errors or empty results. Verify these values against the official DataForSEO supported locations and languages list.
    • Incorrectly formatted target domains (including https:// or www.) might lead to failed queries or unexpected results.
    • Missing required parameters like targets, location, or language will cause validation errors.
  • Error messages:

    • "Something went wrong": This generic error indicates an issue during execution, possibly due to network problems, invalid parameters, or API errors. Check the input parameters and API connectivity.
    • Credential-related errors if the API key is missing or invalid; ensure the API key credential is properly configured in n8n.

Links and References

Discussion