Does OpenSEO Offer API Access? A Technical Guide to Internal Endpoints and Third-Party Integrations

OpenSEO does not provide a standalone public API for external developers, but exposes internal HTTP endpoints under src/routes/api/ that power its React frontend and can be invoked programmatically with valid session authentication, while also integrating with third-party SEO data providers like DataForSEO and Google Search Console.

If you are evaluating the every-app/open-seo repository for programmatic capabilities, understanding how OpenSEO API access works requires looking at its internal route architecture. Rather than offering a documented developer API, OpenSEO implements server-side HTTP handlers that its own frontend consumes via fetch, which you can leverage for custom integrations if you manage authentication correctly.

How OpenSEO Handles API Requests

OpenSEO's approach to API design centers on internal server routes rather than a public-facing REST specification. These endpoints handle everything from user authentication to OAuth callbacks for Google services.

Internal Routes vs. Public API

According to the source code in src/routes/api/, OpenSEO does not expose a traditional public API with OpenAPI documentation. Instead, the application provides REST-like handlers for authentication, health checks, and service integrations that the frontend calls directly. These are standard HTTP endpoints that return JSON responses, meaning they can be called from any HTTP client if you possess valid session credentials or API keys.

The internal API infrastructure relies on server-side functions located in src/serverFunctions/ (such as keywords.ts and rank-tracking.ts) to execute core business logic. These functions act as a proxy layer between the OpenSEO interface and external SEO data providers.

Third-Party Data Provider Architecture

When OpenSEO retrieves SERP data or analytics, it does not generate this data internally. Instead, it communicates with external services through dedicated client modules:

These wrappers require API keys stored in environment variables, as documented in docs/DATAFORSEO_API_KEY.md and docs/SELF_HOSTING_DOCKER.md.

Accessing OpenSEO's Internal Endpoints

You can interact with OpenSEO programmatically by calling its internal routes, provided you handle authentication appropriately.

Authentication Flow

Before accessing protected data, you must authenticate through the route defined in src/routes/api/auth/$.ts. This endpoint accepts credentials and establishes a session that subsequent requests must include.

const login = async (email: string, password: string) => {
  const resp = await fetch('/api/auth/login', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ email, password })
  });
  if (!resp.ok) throw new Error('Login failed');
  const data = await resp.json();
  return data;
};

Health Monitoring

For deployment verification, OpenSEO exposes a health check endpoint at src/routes/api/health.ts. This route typically returns system status, version information, and environment details, which you can fetch without authentication depending on your configuration.

const response = await fetch('https://app.openseo.so/api/health');
const status = await response.json();
console.log(status); // { ok: true, version: '…', env: 'production' }

Integrating Third-Party SEO APIs Through OpenSEO

Since OpenSEO functions as an integration layer for external SEO services, you can leverage its wrapped endpoints to interact with these providers using OpenSEO's authentication context.

DataForSEO SERP Queries

To fetch search engine results, OpenSEO uses DataForSEO's API through an authenticated wrapper. You must configure your DATAFORSEO_API_KEY in the environment variables as specified in the documentation.

import { getAuth } from '@/lib/auth';

const fetchSerp = async (keyword: string, locationId: string) => {
  const auth = getAuth();
  const result = await auth.api.serpGoogle({
    keyword,
    location: locationId,
  });
  return result;
};

Google Search Console OAuth

For connecting Google Search Console accounts, OpenSEO implements OAuth callback handling in src/routes/api/gsc/oauth/callback.ts. This route exchanges authorization codes for access tokens through the client logic in src/server/lib/gscClient.ts.

const callback = async (request: Request) => {
  const url = new URL(request.url);
  const code = url.searchParams.get('code');
  const tokens = await getAuth().api.exchangeGscCode({ code });
  // Store tokens in the user's session
};

Summary

  • OpenSEO does not expose a standalone public REST API, but provides internal HTTP endpoints under src/routes/api/ that respond to standard HTTP requests.
  • Authentication is managed through src/routes/api/auth/$.ts, requiring valid sessions or API keys for access to protected routes.
  • The platform integrates with DataForSEO, Google Search Console, and Google Analytics through server-side wrappers in src/serverFunctions/ and src/server/lib/ rather than exposing these third-party APIs directly to clients.
  • Configuration for third-party services requires environment variables documented in docs/DATAFORSEO_API_KEY.md and docs/SELF_HOSTING_DOCKER.md.

Frequently Asked Questions

Does OpenSEO provide a REST API for external developers?

No, OpenSEO does not offer a standalone public REST API or OpenAPI specification. Instead, it exposes internal endpoints in src/routes/api/ that are designed for the application's own frontend but can be called programmatically if you authenticate with valid session cookies or API keys obtained through the auth routes.

How do I authenticate against OpenSEO's internal API endpoints?

You must use the authentication routes defined in src/routes/api/auth/$.ts. Send a POST request with user credentials to /api/auth/login to receive a session cookie, which you must include in subsequent requests to protected endpoints handling keyword data or Google Search Console integrations.

Can I use OpenSEO to access DataForSEO or Google Search Console data without my own API keys?

No. OpenSEO acts as a proxy and integration layer, but you must provide your own API keys for DataForSEO and configure Google OAuth credentials. The application stores these in environment variables and consumes them through the server-side clients in src/server/lib/gscClient.ts and related service files.

Is there a health check endpoint to monitor OpenSEO status?

Yes. The application includes a health check endpoint implemented in src/routes/api/health.ts that returns JSON data including the application version and environment status. You can fetch this endpoint via standard HTTP requests to verify that your OpenSEO instance is running properly.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →