Linking Serpstat as a source

Let AI connect your sources for you

Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

Learn more
PostHog Wizard hedgehog

Contents

The Serpstat connector syncs your SEO rank tracking, domain analysis, and backlink data into the PostHog data warehouse, so you can analyze search performance alongside your product data.

Prerequisites

  • A Serpstat account on the Team plan or higher (required for API access).
  • An API token from your Serpstat profile.

Adding a data source

  1. In PostHog, go to the Sources tab of the data pipeline section.
  2. Click + New source and click Link next to this source.
  3. Enter your credentials (see Configuration below) and click Next.
  4. Select the tables you want to sync, choose a sync method and frequency, then click Import.

Once the syncs are complete, you can start querying this data in PostHog.

When linking Serpstat, you'll need:

  • API token – create one on your Serpstat profile page.
  • Project ID – copy from the URL of your Serpstat Rank Tracker report.
  • Project region ID – use the region ID from the Serpstat getProjectRegions method.

Optional fields

These fields are required only if you want to sync the domain and backlink tables (domain_info, domain_history, domain_keywords, backlinks):

  • Domain – the domain to analyze (e.g., example.com). You can paste a full URL like https://Example.com/path and PostHog normalizes it to example.com.
  • Search engine database – the Serpstat database code (e.g., g_us for Google US). Defaults to g_us if left blank. See the database list.

API credit usage

Syncs use your Serpstat account's API units when Serpstat applies a charge:

  • Project tables (projects, project_keywords, project_positions) are free of API credit charges.
  • Domain and backlink tables (domain_info, domain_history, domain_keywords, backlinks) use API credits for each returned row.

Paginated tables include up to 500 records per sync. Position data covers the last seven days for one project region.

Sync modes

Each table can be synced in one of several modes, depending on what the source supports:

  • Webhook (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes.
  • Incremental – only new or updated rows are synced on each run, using a cursor field (such as an updated_at timestamp). Cheaper than a full refresh, but deletes aren't captured.
  • Append only – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs.
  • Full refresh – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected.

See sync methods for a full explanation of how each mode works and how to choose between them.

Most Serpstat tables use full refresh, which reloads all data on each sync. The domain_history table also supports incremental sync on its date field, syncing only new records since the last run.

Configuration

OptionDescription
API token
Type: password
Required: True
Project ID
Type: text
Required: True

Copy the project ID from the URL of your Serpstat Rank Tracker report.

Project region ID
Type: text
Required: True

Use the region ID from the Serpstat getProjectRegions method.

Domain
Type: text
Required: False

The domain to analyze for the domain and backlink tables.

Search engine database
Type: text
Required: False

The Serpstat database code for the domain tables, for example g_us for Google US. Leave blank to use g_us. See the database list.

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
projects

Projects available to the Serpstat account.

Full refresh—project_id
project_keywords

Keywords configured for the selected Rank Tracker project.

Full refresh—project_id, id
project_regions

Search regions and their status for the selected Rank Tracker project.

Full refresh—project_id, id
project_tags

Tags created in the selected Rank Tracker project.

Full refresh—project_id, tag_uuid
project_positions

Keyword positions for the configured project region during the last seven days, grouped by keyword.

Full refresh—project_id, keyword_id
domain_info

Summary SEO metrics for the configured domain in the selected search engine database.

Full refresh—domain
domain_history

Historical keyword counts, visibility, and traffic for the configured domain.

Incremental, Full refreshdatedomain, date
domain_keywords

Organic keywords for which the configured domain ranks in the Google top 100.

Full refresh—domain, keyword, url
backlinks

Active backlinks to the configured domain and its subdomains, most recently found first.

Full refresh—url_from, url_to, link_type, link_text

Troubleshooting

  • If domain tables fail with a "domain required" error, add a domain in the source configuration. The domain and backlink tables cannot sync without one.
  • If you get an authorization error, your API token may be invalid, expired, or your Serpstat plan may not include API access. Create a new token on your Serpstat profile, then reconnect.
  • If domain tables return no data, Serpstat may have no data for that domain in the selected search engine database. Try a different database code or verify the domain has visibility in Serpstat.
  • If you hit API credit limits, reduce the number of domain or backlink tables you sync, or upgrade your Serpstat plan.

If your sync is failing or data looks wrong, see the Data warehouse troubleshooting guide. If that doesn't help, contact support – we're happy to help.

Still have questions?

Was this page useful?