From ae61676570110f72c65cecb424bb3d416021733c Mon Sep 17 00:00:00 2001 From: Mikhail Liubushkin Date: Wed, 18 Nov 2026 13:54:15 +0100 Subject: [PATCH] Refresh the OpenAPI specs from the public API docs (DAT-1175) Regenerate data-api from the current documentation and add specs for the Project API, Local Marketing API and SE Visible API, so the repo covers all four APIs served from api.seranking.com. - data-api 2.0.0: 86 operations with typed parameters, request body and response schemas, documented errors, curl samples and a link to each docs section. operationIds are unchanged; tags follow the docs sections. - project-api (121 operations), local-marketing-api (15) and se-visible-api (36): new. - Authentication is described as security schemes (Authorization: Token header, or the apikey query parameter) instead of a Postman apikey parameter. - Shared 401/402/403/429 responses with the gateway's error body. - CI lints all four specs and checks JSON/YAML sync for each. - README lists the four specs and explains authentication. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Hqw2DQwrLyJXtdtoxsUQVB --- .github/workflows/validate.yml | 30 +- README.md | 69 +- openapi/data-api.json | 16979 +++++++++++++++++++++++------ openapi/data-api.yaml | 14982 ++++++++++++++++++++----- openapi/local-marketing-api.json | 3253 ++++++ openapi/local-marketing-api.yaml | 2511 +++++ openapi/project-api.json | 15267 ++++++++++++++++++++++++++ openapi/project-api.yaml | 12416 +++++++++++++++++++++ openapi/se-visible-api.json | 6896 ++++++++++++ openapi/se-visible-api.yaml | 6238 +++++++++++ 10 files changed, 72131 insertions(+), 6510 deletions(-) create mode 100644 openapi/local-marketing-api.json create mode 100644 openapi/local-marketing-api.yaml create mode 100644 openapi/project-api.json create mode 100644 openapi/project-api.yaml create mode 100644 openapi/se-visible-api.json create mode 100644 openapi/se-visible-api.yaml diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index c9d69ee..4bb00ca 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -25,8 +25,13 @@ jobs: - name: Install Redocly CLI run: npm install -g @redocly/cli - - name: Lint Data API (YAML) - run: redocly lint openapi/data-api.yaml + - name: Lint specs (YAML) + run: | + redocly lint \ + openapi/data-api.yaml \ + openapi/project-api.yaml \ + openapi/local-marketing-api.yaml \ + openapi/se-visible-api.yaml - name: Validate JSON matches YAML run: | @@ -34,13 +39,18 @@ jobs: node -e " const fs = require('fs'); const yaml = require('js-yaml'); - const yamlSpec = yaml.load(fs.readFileSync('openapi/data-api.yaml', 'utf8')); - const jsonSpec = JSON.parse(fs.readFileSync('openapi/data-api.json', 'utf8')); - const yamlStr = JSON.stringify(yamlSpec, null, 2); - const jsonStr = JSON.stringify(jsonSpec, null, 2); - if (yamlStr !== jsonStr) { - console.error('ERROR: JSON and YAML specs are out of sync'); - process.exit(1); + let failed = false; + for (const name of ['data-api', 'project-api', 'local-marketing-api', 'se-visible-api']) { + const yamlSpec = yaml.load(fs.readFileSync('openapi/' + name + '.yaml', 'utf8')); + const jsonSpec = JSON.parse(fs.readFileSync('openapi/' + name + '.json', 'utf8')); + const yamlStr = JSON.stringify(yamlSpec, null, 2); + const jsonStr = JSON.stringify(jsonSpec, null, 2); + if (yamlStr !== jsonStr) { + console.error('ERROR: ' + name + ' JSON and YAML specs are out of sync'); + failed = true; + } else { + console.log(name + ': JSON and YAML specs are in sync'); + } } - console.log('JSON and YAML specs are in sync'); + if (failed) process.exit(1); " diff --git a/README.md b/README.md index cd6ab02..84f115c 100644 --- a/README.md +++ b/README.md @@ -18,42 +18,73 @@ See [GitHub Releases](https://github.com/seranking/openapi/releases) for a histo ### `/openapi` -| File | Description | -| ----------------- | ------------------------------------------------ | -| `data-api.yaml` | SE Ranking Data API specification (YAML format) | -| `data-api.json` | SE Ranking Data API specification (JSON format) | +| API | YAML | JSON | Documentation | +| -------------------- | -------------------------- | -------------------------- | ------------------------------------------------------------------ | +| Data API | `data-api.yaml` | `data-api.json` | [seranking.com/api/data](https://seranking.com/api/data/) | +| Project API | `project-api.yaml` | `project-api.json` | [seranking.com/api/project](https://seranking.com/api/project/) | +| Local Marketing API | `local-marketing-api.yaml` | `local-marketing-api.json` | [seranking.com/api/local-marketing-api](https://seranking.com/api/local-marketing-api/) | +| SE Visible API | `se-visible-api.yaml` | `se-visible-api.json` | [seranking.com/api/se-visible](https://seranking.com/api/se-visible/) | -Both files contain the same specification. Use whichever format your tooling prefers. +The YAML and JSON file of each API contain the same specification. Use whichever format your tooling prefers. + +The specs follow the public API documentation: every endpoint, parameter and response field described there is in +the spec, with the documented request and response examples. Each operation links back to its documentation section. ## Available APIs ### Data API -SEO data API providing programmatic access to: +SEO data for any domain, URL or keyword: + +- **Backlinks**: backlink profiles, referring domains, anchors, authority scores and historical trends +- **Domain Analysis**: organic and paid keyword rankings, competitors, traffic estimates and domain overviews +- **Keyword Research**: search volume, keyword difficulty, similar, related, question and long-tail keywords +- **AI Search**: brand and domain visibility in AI-generated answers, leaderboards and prompt-level data +- **SERP**: search engine results pages collected on demand +- **Website Audit**: technical SEO audits with crawl data, issues and page-level analysis +- **Account System**: subscription and credit balance + +### Project API + +The SE Ranking projects in your account: projects and project groups, keywords and rankings, search engines, +competitors, URL tags, Google Search Console data, the marketing plan, website audits, Backlink Checker and +AI Results Tracker. + +### Local Marketing API + +Read-only data for your Local Marketing locations: location profiles and overviews, local rankings, Google Business +Profile reports, business listings, reviews and Local Marketing audits. -- **Backlinks**: Backlink profiles, referring domains, anchors, authority scores, and historical trends -- **Domain Analysis**: Organic/paid keyword data, competitor research, traffic estimates, and domain authority -- **Keyword Research**: Search volume, keyword difficulty, related and long-tail keywords, SERP features -- **AI Search**: AI Overview analysis, brand monitoring in AI-generated answers, prompt-level insights -- **SERP Results**: Real-time and on-demand search engine results with full feature parsing -- **Website Audit**: Technical SEO audits with crawl data, issue detection, and page-level analysis -- **Account & System**: API key validation, rate limits, and available database regions +### SE Visible API + +Brand visibility in AI engines: SE Visible projects, brands, topics and prompts, prompt results, sources, engines, +locations and the subscription. ## Authentication -All SE Ranking API endpoints require an API key passed as a query parameter: +All four APIs are served from `https://api.seranking.com` and use the same SE Ranking API key. Send it in the +`Authorization` header with the `Token` scheme (recommended): + +```bash +curl 'https://api.seranking.com/v1/account/subscription' \ + -H 'Authorization: Token YOUR_API_KEY' +``` + +or as the `apikey` query parameter: ``` -https://api.seranking.com/v1/endpoint?apikey=YOUR_API_KEY +https://api.seranking.com/v1/account/subscription?apikey=YOUR_API_KEY ``` -Get your API key from the [SE Ranking dashboard](https://online.seranking.com/dashboard.html). +Create a key on the [API Dashboard](https://online.seranking.com/admin.api.dashboard.html). See +[Getting API access](https://seranking.com/api/how-to-get-api/), [API rate limits](https://seranking.com/api/rate-limits/) +and the [API credit system](https://seranking.com/api/api-credits-system/). ## Usage Examples ### Import in Swagger UI -Point Swagger UI at the raw spec URL: +Point Swagger UI at the raw spec URL, for example: ``` https://raw.githubusercontent.com/seranking/openapi/main/openapi/data-api.yaml @@ -70,10 +101,10 @@ openapi-generator-cli generate \ -o ./seranking-python-client ``` -### Validate the Spec +### Validate the Specs ```bash -npx @redocly/cli lint openapi/data-api.yaml +npx @redocly/cli lint openapi/*.yaml ``` ## OpenAPI Version diff --git a/openapi/data-api.json b/openapi/data-api.json index feb08b2..3a4d1a2 100644 --- a/openapi/data-api.json +++ b/openapi/data-api.json @@ -1,65 +1,65 @@ { - "openapi": "3.0.0", + "openapi": "3.0.3", "info": { "title": "SE Ranking Data API", - "description": "SEO data API for keywords, domains, backlinks, AI Search, SERP, and site audit.", - "version": "1.0.0", + "version": "2.0.0", + "description": "The Data API returns SEO data for any domain, URL or keyword: backlink profiles, domain traffic and keyword rankings, keyword research, AI search visibility, SERP results and website audits. Requests are billed in API credits.\n\n## Authentication\n\nAll endpoints are served from `https://api.seranking.com` and use one SE Ranking API key, the same key for the Data API, the Project API, the Local Marketing API and the SE Visible API. Send it in the `Authorization: Token YOUR_API_KEY` header (recommended) or as the `apikey` query parameter. See [Getting API access](https://seranking.com/api/how-to-get-api/).\n\nRate limits: [API rate limits](https://seranking.com/api/rate-limits/). Credits: [API credit system](https://seranking.com/api/api-credits-system/).", "contact": { "name": "SE Ranking API Support", - "url": "https://seranking.com/api" + "url": "https://seranking.com/api/", + "email": "api@seranking.com" + }, + "license": { + "name": "MIT", + "url": "https://github.com/seranking/openapi/blob/main/LICENSE" } }, + "externalDocs": { + "description": "SE Ranking Data API documentation", + "url": "https://seranking.com/api/data/" + }, "servers": [ { "url": "https://api.seranking.com", "description": "Production" } ], - "components": { - "securitySchemes": { - "apikeyAuth": { - "type": "apiKey", - "in": "query", - "name": "apikey" - } - } - }, "security": [ { - "apikeyAuth": [] + "tokenAuth": [] + }, + { + "apikeyQuery": [] } ], "tags": [ { - "name": "backlinks", - "description": "# Backlinks API\n\nThis collection of requests allows you to conduct a comprehensive analysis of the backlink profile for any given target, whether it's a root domain, a specific host (subdomain), or a particular URL.\n\nYou can use these endpoints to retrieve high-level statistics, fetch detailed backlink lists, analyze historical trends, and check authority scores.\n\n### Summary & Core Metrics\n\nUse these endpoints to get a quick overview of a target's backlink profile. These requests support batching for up to 100 targets.\n\n- **`summary`**: Returns extended statistics, including the number of referring domains, IPs, top anchors, TLDs, and more.\n \n- **`metrics`**: Retrieves a set of key metrics, such as the total number of backlinks, referring domains, and dofollow/nofollow link counts.\n \n- **`count`**: Provides a simple count of the total number of live backlinks for a target.\n \n\n### Detailed Backlink Retrieval\n\nUse these endpoints to get lists of the actual backlinks pointing to a target.\n\n- **`all`**: Fetches a detailed list of backlinks with powerful filtering and sorting options. This is ideal for getting the \"top\" backlinks based on criteria like InLink Rank.\n \n- **`raw`**: Retrieves a complete, unfiltered list of all backlinks using efficient cursor-based pagination. This is best for fetching an entire dataset in batches.\n \n- **`export`**: Exports all backlinks for a target into a downloadable `.csv.gz` file. This process is asynchronous and designed for very large-scale data retrieval.\n \n\n### Historical Data & Trends\n\nTrack changes in a backlink profile over time.\n\n- **`history`**: Get a list of new and lost backlinks within a specified date range.\n \n- **`history/count`**: Returns the number of new or lost backlinks for each day in a given period.\n \n- **`history/cumulative`**: Provides the total number of live backlinks for each day in a given period.\n \n\n### Analyze Specific Backlink Aspects\n\nDive deeper into specific components of the backlink profile.\n\n- **`anchors`**: Returns information about the anchor texts used in links pointing to a target.\n \n- **`refdomains`**: Provides details on the unique referring domains, including their authority and the number of links from each.\n \n- **`referring-ips`** **&** **`subnets`**: Analyzes the network distribution of backlinks by IP address and C-class subnets.\n \n- **`indexed-pages`**: Lists the pages on the target site that have received one or more backlinks.\n \n\n### Authority Scores\n\nCheck the calculated authority of a target based on its backlink profile.\n\n- **`authority`**: Retrieves both the InLink Rank (Page Authority) and Domain InLink Rank (Domain Authority).\n \n- **`authority/domain`**: Focuses specifically on Domain Authority, including its distribution and historical values.\n \n- **`authority/page`**: Focuses specifically on Page Authority and its historical values." + "name": "Backlinks", + "description": "**[Backlinks API](https://seranking.com/backlinks-api.html)** retrieves backlink data for a target domain, host, or URL. It provides aggregated metrics such as counts of backlinks, referring domains, IPs, and subnets, as well as anchor texts, top pages, TLDs, and countries. The API includes endpoints for summary metrics, historical data, raw backlink lists, export options, and authority scores. Data is refreshed on a monthly basis.\n\nUsing the API, you can:\n\n- retrieve backlink summary metrics, including counts of backlinks, referring domains, IPs, subnets, top anchors, TLDs, and countries\n\n- retrieve key backlink metrics in batch for multiple targets\n\n- list all backlinks for a single target\n\n- fetch backlinks in batches for large datasets\n\n- track new, lost, cumulative, and daily backlink changes\n\n- retrieve backlink anchor texts\n\n- access referring domains, including counts and new/lost domains\n\n- access referring IPs and subnets, including counts\n\n- list indexed pages with backlinks\n\n- retrieve page and domain authority metrics, including distributions, histograms, and historical values\n\n- export backlink data for large-scale analysis\n\nDocumentation: [Backlinks](https://seranking.com/api/data/backlinks/)" }, { "name": "Domain Analysis", - "description": "This collection of endpoints allows you to perform in-depth competitive analysis on any domain. Use these requests to uncover keyword strategies, traffic trends, and competitor performance in both organic and paid search.\n\n### Performance Overviews\n\nGet high-level statistics about a domain's search performance.\n\n- **Regional database**: Get detailed organic and paid stats for a domain within a single, selected regional database.\n \n- **Worldwide aggregate**: Aggregate a domain's global search performance metrics for the current month.\n \n- **History trends**: Track historical trends for keywords, traffic, and cost for organic or paid search within a specific region.\n \n\n### Keyword Analysis\n\nDive deep into the specific keywords a domain ranks for.\n\n- **Domain keywords**: Fetch a filterable and sortable list of all organic or paid keywords for a domain.\n \n- **Domain keywords comparison**: Compare two domains to find common keywords (overlap) or identify keyword gaps.\n \n\n### Competitor & Ad Analysis\n\nAnalyze the competitive landscape and paid advertising strategies.\n\n- **Competitors**: Discover a domain's top organic or paid competitors and see the number of keywords you have in common.\n \n- **Paid ads**: Analyze paid ads either by keyword (to see who is bidding) or by domain (to see what a specific domain is bidding on)." + "description": "**Domain Analysis API** provides detailed insights into a domain’s search performance. Data is refreshed on a monthly basis.\n\nUsing the API, you can:\n\n- query regional or worldwide data\n\n- retrieve keyword statistics, domain pages, and subdomains\n\n- analyze competitors to identify common keywords and keyword gaps\n\n- retrieve paid advertising data, including ad creatives, observed positions, and traffic\n\n- access historical data to track changes in rankings, traffic, and ad performance\n\n- filter and sort results by metrics such as search volume, CPC, competition, keyword difficulty, and ranking positions\n\nDocumentation: [Domain Analysis](https://seranking.com/api/data/domain-analysis/)" }, { "name": "Keyword Research", - "description": "This collection of endpoints is designed for comprehensive keyword analysis and discovery. Use these requests to retrieve performance metrics for large lists of keywords or to generate new keyword ideas based on a seed term.\n\nThis folder is divided into two main categories:\n\n### Bulk Keyword Metrics\n\n- **Export Keywords Metrics**: Submit a list of up to 5,000 keywords to get detailed data points for each, including search volume, CPC, competition score, keyword difficulty, and historical search volume trends. This is ideal for bulk analysis and data enrichment.\n \n\n### Keyword Discovery\n\nUse these endpoints to expand your keyword lists and uncover new ranking opportunities.\n\n- **Get Similar Keywords**: Find keywords that are semantically similar to your seed keyword, including synonyms and close variations.\n \n- **Get Related Keywords**: Discover keywords that are topically related, based on having a high number of overlapping URLs in their search results.\n \n- **Get Question Keywords**: Generate a list of keywords phrased as common user questions, perfect for content marketing and FAQ creation.\n \n- **Get Longtail Keywords**: Find longer, more specific keyword phrases that often have lower competition and higher conversion rates." - }, - { - "name": "AI search", - "description": "This collection of endpoints allows you to analyze a domain or brand's visibility and performance within various Large Language Model (LLM) results, such as ChatGPT, Gemini, and Perplexity. Use these tools to track your presence in AI-generated answers, discover the prompts that feature your brand or domain, and understand your overall AI search footprint.\n\n### Overview & Discovery\n\n- **Overview**: Get a high-level summary of a domain's performance and historical trends within a specific LLM, including metrics like link presence, average position, and AI-driven traffic.\n \n- **Discover Brand by URL**: A utility endpoint to identify the primary brand name associated with a target domain, useful for subsequent brand-based queries.\n \n\n### Prompt Analysis\n\n- **Get Prompts by Target**: Retrieve a list of all prompts where a specific domain, subdomain, or URL is featured as a link or mention in an LLM's answer.\n \n- **Get Prompts by Brand**: Find all prompts where a specific brand name is mentioned in an LLM's answer, allowing you to track brand visibility and context." + "description": "**[Keyword Research API](https://seranking.com/keyword-research-api.html)** provides programmatic access to keyword metrics and discovery. Data is refreshed on a monthly basis.\n\nUsing the API, you can:\n\n- retrieve keyword metrics such as search volume, CPC, competition, difficulty, and historical trends\n\n- discover similar keywords with the same user intent\n\n- find related keywords based on overlapping search results\n\n- get question keywords associated with a seed keyword\n\n- discover long-tail keywords that are lower-volume and more specific\n\nDocumentation: [Keyword Research](https://seranking.com/api/data/keyword-research/)" }, { - "name": "SERP Results", - "description": "This collection of endpoints allows you to retrieve the top 100 search engine results pages (SERPs) for any keyword in real-time, without needing an active project in SE Ranking. The API uses an asynchronous, task-based workflow.\n\n**Note:** Using the \u2018Add SERP Tasks\u2019 endpoint costs 10 credits per keyword: each keyword in `query` creates one task, so a request with 10 keywords costs 100 credits.\n\n### Workflow\n\n1. **Add SERP Tasks**: Submit one or more keywords to the processing queue to initiate a SERP scrape.\n \n2. **Get SERP Task Status and Results**: Use the `task_id` from the previous step to check if the task is complete and retrieve the SERP data.\n \n3. **List SERP Tasks**: View a list of all tasks you have submitted in the last 24 hours.\n \n\nResults include the URL, title, and snippet for each of the top 100 positions and are stored for 24 hours after collection." + "name": "AI Search", + "description": "**AI Search API** provides programmatic access to a domain’s performance in Large Language Model (LLM) results. Data is refreshed on a monthly basis.\n\nUsing the API, you can:\n\n- get an AI search overview with metrics like link presence, average position, AI traffic, and historical trends\n\n- compare a primary domain against competitors across multiple LLM engines and retrieve a share of voice leaderboard\n\n- discover the brand associated with a domain or URL\n\n- retrieve prompts by target, showing where a domain or URL appears in LLM responses\n\n- retrieve prompts by brand, showing where a brand is mentioned in LLM results\n\nDocumentation: [AI Search](https://seranking.com/api/data/ai-search/)" }, { - "name": "SERP Results > classic" + "name": "SERP", + "description": "The following limits apply to the SERP API:\n\n- Up to **1500 SERP tasks** can run in parallel.\n\n- Up to **10 keywords per task** can be submitted by default.\n\n- Up to **10 tasks per second** can be created.\n\nContact [api@seranking.com](mailto:api@seranking.com) to discuss your volume needs and custom limits.\n\n**SERP API** provides programmatic access to Google search engine results pages (SERPs) for specified keywords. Results are retrieved on demand.\n\nUsing the API, you can:\n\n- Submit SERP collection tasks for one or more keywords across specific locations, languages, and devices\n\n- Retrieve standard SERP results, including organic results, ads, and featured snippets\n\n- Retrieve advanced SERP results with full SERP items and features\n\n- Download raw HTML dumps of Google search results pages\n\n- List recent SERP tasks created within the last 24 hours\n\n- Retrieve available search locations\n\nDocumentation: [SERP](https://seranking.com/api/data/serp/)" }, { "name": "Website Audit", - "description": "This collection of endpoints provides a comprehensive suite of tools to programmatically manage the full lifecycle of your technical SEO audits. These requests allow you to launch new crawls, monitor their progress in real-time, and retrieve detailed reports and page-level data for in-depth analysis.\n\n**Note on Costs:** Audits are billed on a per-page basis.\n\n- **Standard Audits:** 2 credits per crawled page.\n \n- **Advanced Audits (with JavaScript rendering):** 20 credits per crawled page.\n \n\n### 1\\. Create & Manage Audits\n\nUse these endpoints to start new crawls, re-run previous ones, or manage your list of audits.\n\n- **Create Audits**: Launch a new **Standard** (HTML crawl) or **Advanced** (JavaScript rendering) audit with highly customizable settings.\n \n- **List Audits**: Retrieve a paginated list of all audits associated with your account.\n \n- **Update Audit Title**: Change the display title of an existing audit report.\n \n- **Delete Audit**: Permanently remove an audit and all of its associated data.\n \n- **Recheck Audit**: Initiate a new crawl for a completed audit using its original settings.\n \n\n### 2\\. Monitor & Retrieve Data\n\nOnce an audit is running or complete, use these endpoints to check its progress and pull detailed results.\n\n- **Get Audit Status**: Check the real-time progress of an ongoing audit.\n \n- **Get Audit Report**: Fetch the full, high-level report for a completed audit, including the overall health score and a summary of issues.\n \n- **Get Audit History**: Retrieve a historical snapshot of a specific audit run from a particular date.\n \n- **Get All Crawled Pages**: Return a complete, paginated list of every URL discovered during an audit.\n \n- **Get Audit Pages by Issue**: Get a list of all URLs affected by a single, specific issue.\n \n- **Get All Issues for a Specific URL**: Retrieve all errors, warnings, and notices found on a single page.\n \n- **Get All Found Links**: Fetch a complete list of every internal and external link discovered across the entire site during the audit." + "description": "**[Website Audit API](https://seranking.com/website-audit-api.html)** provides programmatic access to technical SEO audits. Results are retrieved on demand.\n\nUsing the API, you can:\n\n- Create website audits using standard HTML crawling or JavaScript-rendered crawling\n\n- Track audit execution by checking audit status, progress, and crawl statistics in real time\n\n- Retrieve audit results, including health scores and categorized issues\n\n- Analyze pages and audit issues, including page-level technical metrics and URLs affected by specific issues\n\n- Analyze link data, including internal and external links discovered during the crawl\n\n- Manage audits by listing, filtering, renaming, deleting, and accessing historical audit snapshots\n\nDocumentation: [Website Audit](https://seranking.com/api/data/website-audit/)" }, { - "name": "Account & system", - "description": "This collection contains endpoints for retrieving information about your account status, subscription details, and current credit and API unit balances. Use these requests to monitor your usage and plan details programmatically.\n\n### Endpoints\n\n- **Get Subscription Info**: Returns detailed information about your current API subscription plan, including its status (e.g., active, expired), validity dates, and the total and remaining API units available.\n \n- **Get Credit Balance**: Returns the current account-wide credit balance, showing the total limit and the amount of credits that have been used." + "name": "Account System", + "description": "**Account System API** provides programmatic access to your SE Ranking Data API subscription and usage information.\n\nUsing the API, you can:\n\n- Get subscription details, including plan status, start, and expiration dates\n\n- Check your remaining API balance (units left)\n\n- Monitor usage programmatically to manage quotas\n\nDocumentation: [Account System](https://seranking.com/api/data/account-system/)" } ], "paths": { @@ -67,2860 +67,6854 @@ "get": { "operationId": "getBacklinksSummary", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "summary", - "description": "Retrieves a comprehensive summary of backlink statistics for one or more targets.", + "summary": "Get backlink summary", + "description": "Returns extended statistics for a target, including the number of backlinks, referring domains, subnets, IPs, top anchors, top TLDs, and more. This endpoint supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format).\n\n**Cost:** 100 credits per target\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#summary" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`).", "schema": { - "type": "string", - "description": "Supports multiple targets by repeating this parameter." - }, - "example": "rubyonrails.org" + "type": "string" + } }, { "name": "mode", "in": "query", + "description": "Mode of operation: \n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL.", "schema": { "type": "string", - "enum": [ - "domain", - "host", - "url" - ], "default": "host" - }, - "example": "host" + } }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { "type": "string", - "enum": [ - "json", - "xml" - ], "default": "json" - }, - "example": "json" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} - } - } - } - }, - "post": { - "operationId": "createBacklinksSummary", - "tags": [ - "backlinks" - ], - "summary": "summary", - "description": "Retrieves a comprehensive summary of backlink statistics for one or more targets.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", + "application/json": { + "schema": { + "type": "object", + "properties": { + "summary": { + "type": "array", + "items": { + "type": "object", + "properties": { + "target": { + "type": "string", + "description": "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "backlinks": { + "type": "integer", + "description": "Number of live backlinks linking to the target." + }, + "refdomains": { + "type": "integer", + "description": "Number of unique domains linking to the target." + }, + "subnets": { + "type": "integer", + "description": "Number of unique subnets (C-blocks) linking to the target." + }, + "ips": { + "type": "integer", + "description": "Number of unique IP addresses linking to the target." + }, + "nofollow_backlinks": { + "type": "integer", + "description": "Number of backlinks classified as nofollow." + }, + "dofollow_backlinks": { + "type": "integer", + "description": "Number of backlinks classified as dofollow." + }, + "edu_backlinks": { + "type": "integer", + "description": "Number of backlinks originating from `.edu` domains." + }, + "gov_backlinks": { + "type": "integer", + "description": "Number of backlinks originating from .gov domains." + }, + "inlink_rank": { + "type": "integer", + "description": "Page Authority of the target URL." + }, + "domain_inlink_rank": { + "type": "integer", + "description": "Domain Authority of the target’s root domain." + }, + "from_home_page_backlinks": { + "type": "integer", + "description": "Number of backlinks originating from the home page of the referring domain." + }, + "dofollow_from_home_page_backlinks": { + "type": "integer", + "description": "Number of dofollow backlinks originating from the home page of the referring domain." + }, + "text_backlinks": { + "type": "integer", + "description": "Number of backlinks with text anchors." + }, + "dofollow_refdomains": { + "type": "integer", + "description": "Number of referring domains with at least one dofollow backlink." + }, + "from_home_page_refdomains": { + "type": "integer", + "description": "Number of referring domains linking from the home page." + }, + "edu_refdomains": { + "type": "integer", + "description": "Number of `.edu` referring domains." + }, + "gov_refdomains": { + "type": "integer", + "description": "Number of `.gov`referring domains." + }, + "anchors": { + "type": "integer", + "description": "Number of unique anchor texts used across all backlinks." + }, + "dofollow_anchors": { + "type": "integer", + "description": "Number of unique anchor texts used in dofollow backlinks." + }, + "pages_with_backlinks": { + "type": "integer", + "description": "Number of target pages that have at least one backlink." + }, + "top_anchors_by_backlinks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "anchor": { + "type": "string", + "description": "Anchor text used in backlinks (by total backlinks)." + }, + "backlinks": { + "type": "integer", + "description": "Number of backlinks using this anchor text." + } + }, + "description": "Top anchor texts sorted by number of backlinks (descending)." + }, + "description": "Top anchor texts sorted by number of backlinks (descending)." + }, + "top_anchors_by_refdomains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "anchor": { + "type": "string", + "description": "Anchor text used in backlinks (by referring domains)." + }, + "refdomains": { + "type": "integer", + "description": "Number of referring domains with at least one backlink using this anchor text." + } + }, + "description": "Top anchor texts sorted by number of referring domains (descending)." + }, + "description": "Top anchor texts sorted by number of referring domains (descending)." + }, + "top_pages_by_backlinks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL of the target page." + }, + "backlinks": { + "type": "integer", + "description": "Number of backlinks pointing to this page." + } + }, + "description": "Target pages sorted by number of backlinks (descending)." + }, + "description": "Target pages sorted by number of backlinks (descending)." + }, + "top_pages_by_refdomains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL of the target page." + }, + "refdomains": { + "type": "integer", + "description": "Number of referring domains pointing to this page." + } + }, + "description": "Target pages sorted by number of referring domains (descending)." + }, + "description": "Target pages sorted by number of referring domains (descending)." + }, + "top_tlds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "tld": { + "type": "string", + "description": "Top-level domain (e.g., `.com`)." + }, + "count": { + "type": "integer", + "description": "Number of backlinks originating from this TLD." + } + }, + "description": "Top-level domains (TLDs) sorted by number of backlinks (descending)." + }, + "description": "Top-level domains (TLDs) sorted by number of backlinks (descending)." + }, + "top_countries": { + "type": "array", + "items": { + "type": "object", + "properties": { + "country": { + "type": "string", + "description": "Country code." + }, + "count": { + "type": "integer", + "description": "Number of backlinks originating from this country." + } + }, + "description": "Top countries sorted by number of backlinks (descending)." + }, + "description": "Top countries sorted by number of backlinks (descending)." + } + } + } + } + } + }, "example": { - "target": [ - "https://www.seranking.com/", - "https://www.google.com/" - ], - "mode": "host" + "summary": [ + { + "target": "seranking.com", + "backlinks": 22407, + "refdomains": 2329, + "subnets": 1403, + "ips": 1961, + "nofollow_backlinks": 3718, + "dofollow_backlinks": 18689, + "edu_backlinks": 40, + "gov_backlinks": 0, + "inlink_rank": 24, + "domain_inlink_rank": 68, + "from_home_page_backlinks": 88, + "dofollow_from_home_page_backlinks": 60, + "text_backlinks": 21427, + "dofollow_refdomains": 1291, + "from_home_page_refdomains": 64, + "edu_refdomains": 6, + "gov_refdomains": 0, + "anchors": 720, + "dofollow_anchors": 522, + "pages_with_backlinks": 87, + "top_anchors_by_backlinks": [ + { + "anchor": "SE Ranking", + "backlinks": 1853 + }, + { + "anchor": "social listening", + "backlinks": 1542 + }, + { + "anchor": "seranking.com", + "backlinks": 1209 + }, + { + "anchor": "Buy SE Ranking tools - place secure order online", + "backlinks": 1157 + }, + { + "anchor": "Search Engine Optimization", + "backlinks": 890 + }, + { + "anchor": "the website", + "backlinks": 872 + }, + { + "anchor": "SEO", + "backlinks": 864 + }, + { + "anchor": "search bar (I’ve", + "backlinks": 849 + }, + { + "anchor": "the site", + "backlinks": 836 + }, + { + "anchor": "search bar (I have actually", + "backlinks": 831 + } + ], + "top_anchors_by_refdomains": [ + { + "anchor": "SE Ranking", + "refdomains": 454 + }, + { + "anchor": "seranking.com", + "refdomains": 192 + }, + { + "anchor": "SE Ranking", + "refdomains": 155 + }, + { + "anchor": "https://www.seranking.com/", + "refdomains": 116 + }, + { + "anchor": "SE Ranking Pro", + "refdomains": 111 + }, + { + "anchor": "seranking", + "refdomains": 106 + }, + { + "anchor": "SEO software tools for results-driven site owners.", + "refdomains": 66 + }, + { + "anchor": "", + "refdomains": 64 + }, + { + "anchor": "SEO software tools for results-driven site owners", + "refdomains": 56 + }, + { + "anchor": "Go Now", + "refdomains": 44 + } + ], + "top_pages_by_backlinks": [ + { + "url": "https://www.seranking.com/", + "backlinks": 16724 + }, + { + "url": "http://seranking.com/", + "backlinks": 1932 + }, + { + "url": "https://www.seranking.com/buy.html", + "backlinks": 1188 + }, + { + "url": "http://www.seranking.com/", + "backlinks": 900 + }, + { + "url": "https://www.seranking.com/rank-tracker/", + "backlinks": 356 + } + ], + "top_pages_by_refdomains": [ + { + "url": "https://www.seranking.com/", + "refdomains": 1235 + }, + { + "url": "http://www.seranking.com/", + "refdomains": 236 + }, + { + "url": "http://seranking.com/", + "refdomains": 221 + }, + { + "url": "https://www.seranking.com/rank-tracker/", + "refdomains": 172 + }, + { + "url": "https://www.seranking.com/site-audit/", + "refdomains": 88 + } + ], + "top_tlds": [ + { + "tld": "com", + "count": 1183 + }, + { + "tld": "pw", + "count": 112 + }, + { + "tld": "net", + "count": 96 + }, + { + "tld": "org", + "count": 65 + }, + { + "tld": "it", + "count": 63 + } + ], + "top_countries": [ + { + "country": "us", + "count": 1140 + }, + { + "country": "co", + "count": 166 + }, + { + "country": "sg", + "count": 124 + }, + { + "country": "de", + "count": 87 + }, + { + "country": "gb", + "count": 84 + } + ] + } + ] } } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } }, - "parameters": [ + "x-codeSamples": [ { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" + "lang": "Shell", + "label": "GET (single target)", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/summary?target=rubyonrails.org&mode=host&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" }, { - "name": "output", - "in": "query", - "schema": { - "type": "string" - }, - "example": "json" - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "lang": "Shell", + "label": "GET (multiple targets)", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/summary?target=https://www.seranking.com&target=https://www.seranking.com&mode=url&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" } - } - } - }, - "/v1/backlinks/metrics": { - "get": { - "operationId": "getBacklinksMetrics", + ] + }, + "post": { + "operationId": "createBacklinksSummary", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "metrics", - "description": "Retrieves key backlink statistics (e.g., backlink, referring domain, and IP counts) for one or more targets.", + "summary": "Get backlink summary", + "description": "Returns extended statistics for a target, including the number of backlinks, referring domains, subnets, IPs, top anchors, top TLDs, and more. This endpoint supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format).\n\n**Cost:** 100 credits per target\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#summary" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "target", - "in": "query", - "schema": { - "type": "string" - }, - "example": "target-rfunqmac.com" - }, - { - "name": "mode", - "in": "query", - "schema": { - "type": "string", - "enum": [ - "domain", - "host", - "url" - ], - "default": "host" - }, - "example": "domain" - }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { "type": "string", - "enum": [ - "json", - "xml" - ], "default": "json" - }, - "example": "json" - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} } } - } - }, - "post": { - "operationId": "createBacklinksMetrics", - "tags": [ - "backlinks" ], - "summary": "metrics", - "description": "Retrieves key backlink statistics (e.g., backlink, referring domain, and IP counts) for one or more targets.", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "type": "object", - "example": { - "target": [ - "https://www.seranking.com/", - "https://www.seranking.com/" - ], - "mode": "url" - } + "properties": { + "target": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "mode": { + "type": "string", + "description": "Mode of operation: \n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL." + } + }, + "required": [ + "target" + ] + }, + "example": { + "target": [ + "https://www.seranking.com/", + "https://www.seranking.com/" + ], + "mode": "host" } } } }, - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "output", - "in": "query", - "schema": { - "type": "string" - }, - "example": "json" - } - ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} - } - } - } - } - }, - "/v1/backlinks/all": { - "get": { - "operationId": "getBacklinksAll", - "tags": [ - "backlinks" - ], - "summary": "all", - "description": "Retrieves a detailed, filterable, and sortable list of backlinks pointing to a single target.", - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" + "application/json": { + "schema": { + "type": "object", + "properties": { + "summary": { + "type": "array", + "items": { + "type": "object", + "properties": { + "target": { + "type": "string", + "description": "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "backlinks": { + "type": "integer", + "description": "Number of live backlinks linking to the target." + }, + "refdomains": { + "type": "integer", + "description": "Number of unique domains linking to the target." + }, + "subnets": { + "type": "integer", + "description": "Number of unique subnets (C-blocks) linking to the target." + }, + "ips": { + "type": "integer", + "description": "Number of unique IP addresses linking to the target." + }, + "nofollow_backlinks": { + "type": "integer", + "description": "Number of backlinks classified as nofollow." + }, + "dofollow_backlinks": { + "type": "integer", + "description": "Number of backlinks classified as dofollow." + }, + "edu_backlinks": { + "type": "integer", + "description": "Number of backlinks originating from `.edu` domains." + }, + "gov_backlinks": { + "type": "integer", + "description": "Number of backlinks originating from .gov domains." + }, + "inlink_rank": { + "type": "integer", + "description": "Page Authority of the target URL." + }, + "domain_inlink_rank": { + "type": "integer", + "description": "Domain Authority of the target’s root domain." + }, + "from_home_page_backlinks": { + "type": "integer", + "description": "Number of backlinks originating from the home page of the referring domain." + }, + "dofollow_from_home_page_backlinks": { + "type": "integer", + "description": "Number of dofollow backlinks originating from the home page of the referring domain." + }, + "text_backlinks": { + "type": "integer", + "description": "Number of backlinks with text anchors." + }, + "dofollow_refdomains": { + "type": "integer", + "description": "Number of referring domains with at least one dofollow backlink." + }, + "from_home_page_refdomains": { + "type": "integer", + "description": "Number of referring domains linking from the home page." + }, + "edu_refdomains": { + "type": "integer", + "description": "Number of `.edu` referring domains." + }, + "gov_refdomains": { + "type": "integer", + "description": "Number of `.gov`referring domains." + }, + "anchors": { + "type": "integer", + "description": "Number of unique anchor texts used across all backlinks." + }, + "dofollow_anchors": { + "type": "integer", + "description": "Number of unique anchor texts used in dofollow backlinks." + }, + "pages_with_backlinks": { + "type": "integer", + "description": "Number of target pages that have at least one backlink." + }, + "top_anchors_by_backlinks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "anchor": { + "type": "string", + "description": "Anchor text used in backlinks (by total backlinks)." + }, + "backlinks": { + "type": "integer", + "description": "Number of backlinks using this anchor text." + } + }, + "description": "Top anchor texts sorted by number of backlinks (descending)." + }, + "description": "Top anchor texts sorted by number of backlinks (descending)." + }, + "top_anchors_by_refdomains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "anchor": { + "type": "string", + "description": "Anchor text used in backlinks (by referring domains)." + }, + "refdomains": { + "type": "integer", + "description": "Number of referring domains with at least one backlink using this anchor text." + } + }, + "description": "Top anchor texts sorted by number of referring domains (descending)." + }, + "description": "Top anchor texts sorted by number of referring domains (descending)." + }, + "top_pages_by_backlinks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL of the target page." + }, + "backlinks": { + "type": "integer", + "description": "Number of backlinks pointing to this page." + } + }, + "description": "Target pages sorted by number of backlinks (descending)." + }, + "description": "Target pages sorted by number of backlinks (descending)." + }, + "top_pages_by_refdomains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL of the target page." + }, + "refdomains": { + "type": "integer", + "description": "Number of referring domains pointing to this page." + } + }, + "description": "Target pages sorted by number of referring domains (descending)." + }, + "description": "Target pages sorted by number of referring domains (descending)." + }, + "top_tlds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "tld": { + "type": "string", + "description": "Top-level domain (e.g., `.com`)." + }, + "count": { + "type": "integer", + "description": "Number of backlinks originating from this TLD." + } + }, + "description": "Top-level domains (TLDs) sorted by number of backlinks (descending)." + }, + "description": "Top-level domains (TLDs) sorted by number of backlinks (descending)." + }, + "top_countries": { + "type": "array", + "items": { + "type": "object", + "properties": { + "country": { + "type": "string", + "description": "Country code." + }, + "count": { + "type": "integer", + "description": "Number of backlinks originating from this country." + } + }, + "description": "Top countries sorted by number of backlinks (descending)." + }, + "description": "Top countries sorted by number of backlinks (descending)." + } + } + } + } + } + }, + "example": { + "summary": [ + { + "target": "seranking.com", + "backlinks": 22407, + "refdomains": 2329, + "subnets": 1403, + "ips": 1961, + "nofollow_backlinks": 3718, + "dofollow_backlinks": 18689, + "edu_backlinks": 40, + "gov_backlinks": 0, + "inlink_rank": 24, + "domain_inlink_rank": 68, + "from_home_page_backlinks": 88, + "dofollow_from_home_page_backlinks": 60, + "text_backlinks": 21427, + "dofollow_refdomains": 1291, + "from_home_page_refdomains": 64, + "edu_refdomains": 6, + "gov_refdomains": 0, + "anchors": 720, + "dofollow_anchors": 522, + "pages_with_backlinks": 87, + "top_anchors_by_backlinks": [ + { + "anchor": "SE Ranking", + "backlinks": 1853 + }, + { + "anchor": "social listening", + "backlinks": 1542 + }, + { + "anchor": "seranking.com", + "backlinks": 1209 + }, + { + "anchor": "Buy SE Ranking tools - place secure order online", + "backlinks": 1157 + }, + { + "anchor": "Search Engine Optimization", + "backlinks": 890 + }, + { + "anchor": "the website", + "backlinks": 872 + }, + { + "anchor": "SEO", + "backlinks": 864 + }, + { + "anchor": "search bar (I’ve", + "backlinks": 849 + }, + { + "anchor": "the site", + "backlinks": 836 + }, + { + "anchor": "search bar (I have actually", + "backlinks": 831 + } + ], + "top_anchors_by_refdomains": [ + { + "anchor": "SE Ranking", + "refdomains": 454 + }, + { + "anchor": "seranking.com", + "refdomains": 192 + }, + { + "anchor": "SE Ranking", + "refdomains": 155 + }, + { + "anchor": "https://www.seranking.com/", + "refdomains": 116 + }, + { + "anchor": "SE Ranking Pro", + "refdomains": 111 + }, + { + "anchor": "seranking", + "refdomains": 106 + }, + { + "anchor": "SEO software tools for results-driven site owners.", + "refdomains": 66 + }, + { + "anchor": "", + "refdomains": 64 + }, + { + "anchor": "SEO software tools for results-driven site owners", + "refdomains": 56 + }, + { + "anchor": "Go Now", + "refdomains": 44 + } + ], + "top_pages_by_backlinks": [ + { + "url": "https://www.seranking.com/", + "backlinks": 16724 + }, + { + "url": "http://seranking.com/", + "backlinks": 1932 + }, + { + "url": "https://www.seranking.com/buy.html", + "backlinks": 1188 + }, + { + "url": "http://www.seranking.com/", + "backlinks": 900 + }, + { + "url": "https://www.seranking.com/rank-tracker/", + "backlinks": 356 + } + ], + "top_pages_by_refdomains": [ + { + "url": "https://www.seranking.com/", + "refdomains": 1235 + }, + { + "url": "http://www.seranking.com/", + "refdomains": 236 + }, + { + "url": "http://seranking.com/", + "refdomains": 221 + }, + { + "url": "https://www.seranking.com/rank-tracker/", + "refdomains": 172 + }, + { + "url": "https://www.seranking.com/site-audit/", + "refdomains": 88 + } + ], + "top_tlds": [ + { + "tld": "com", + "count": 1183 + }, + { + "tld": "pw", + "count": 112 + }, + { + "tld": "net", + "count": 96 + }, + { + "tld": "org", + "count": 65 + }, + { + "tld": "it", + "count": 63 + } + ], + "top_countries": [ + { + "country": "us", + "count": 1140 + }, + { + "country": "co", + "count": 166 + }, + { + "country": "sg", + "count": 124 + }, + { + "country": "de", + "count": 87 + }, + { + "country": "gb", + "count": 84 + } + ] + } + ] + } + } + } }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "POST (multiple targets)", + "source": "curl -X POST \\\n 'https://api.seranking.com/v1/backlinks/summary?output=json' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -d '{\n \"target\": [\n \"https://www.seranking.com/\",\n \"https://www.seranking.com/\"\n ],\n \"mode\": \"host\"\n }'" + } + ] + } + }, + "/v1/backlinks/metrics": { + "get": { + "operationId": "getBacklinksMetrics", + "tags": [ + "Backlinks" + ], + "summary": "Get backlink metrics", + "description": "Returns key statistics for a target, including the number of backlinks and referring domains. This endpoint supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format).\n\n**Cost:** 10 credits per target\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#metrics" + }, + "parameters": [ { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "http://accordconsultants.in/" + } }, { "name": "mode", "in": "query", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL.", "schema": { - "type": "string" - }, - "example": "url" + "type": "string", + "default": "host" + } }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { - "type": "string" - }, - "example": "json" + "type": "string", + "default": "json" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "metrics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "target": { + "type": "string", + "description": "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "backlinks": { + "type": "integer", + "description": "Number of live backlinks linking to the target." + }, + "refdomains": { + "type": "integer", + "description": "Number of unique domains linking to the target." + }, + "subnets": { + "type": "integer", + "description": "Number of unique subnets (C-blocks) linking to the target." + }, + "ips": { + "type": "integer", + "description": "Number of unique IP addresses linking to the target." + }, + "nofollow_backlinks": { + "type": "integer", + "description": "Number of backlinks classified as nofollow." + }, + "dofollow_backlinks": { + "type": "integer", + "description": "Number of backlinks classified as dofollow." + }, + "edu_backlinks": { + "type": "integer", + "description": "Number of backlinks originating from `.edu` domains." + }, + "gov_backlinks": { + "type": "integer", + "description": "Number of backlinks originating from `.gov` domains." + } + } + } + } + } + }, + "example": { + "metrics": [ + { + "target": "seranking.com", + "backlinks": 22402, + "refdomains": 2325, + "subnets": 1399, + "ips": 1957, + "nofollow_backlinks": 3717, + "dofollow_backlinks": 18685, + "edu_backlinks": 40, + "gov_backlinks": 0 + } + ] + } + } + } }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ { - "name": "limit", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 10000 + "lang": "Shell", + "label": "GET (single target)", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/metrics?target=https://www.seranking.com&mode=url&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" }, { - "name": "per_domain", + "lang": "Shell", + "label": "GET (multiple targets)", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/metrics?target=https://www.seranking.com&target=https://www.seranking.com&mode=url&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "post": { + "operationId": "createBacklinksMetrics", + "tags": [ + "Backlinks" + ], + "summary": "Get backlink metrics", + "description": "Returns key statistics for a target, including the number of backlinks and referring domains. This endpoint supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format).\n\n**Cost:** 10 credits per target\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#metrics" + }, + "parameters": [ + { + "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { - "type": "integer" - }, - "example": 1 + "type": "string", + "default": "json" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "target": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "mode": { + "type": "string", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL." + } + }, + "required": [ + "target" + ] + }, + "example": { + "target": [ + "https://www.seranking.com/", + "https://www.seranking.com/" + ], + "mode": "url" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "metrics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "target": { + "type": "string", + "description": "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "backlinks": { + "type": "integer", + "description": "Number of live backlinks linking to the target." + }, + "refdomains": { + "type": "integer", + "description": "Number of unique domains linking to the target." + }, + "subnets": { + "type": "integer", + "description": "Number of unique subnets (C-blocks) linking to the target." + }, + "ips": { + "type": "integer", + "description": "Number of unique IP addresses linking to the target." + }, + "nofollow_backlinks": { + "type": "integer", + "description": "Number of backlinks classified as nofollow." + }, + "dofollow_backlinks": { + "type": "integer", + "description": "Number of backlinks classified as dofollow." + }, + "edu_backlinks": { + "type": "integer", + "description": "Number of backlinks originating from `.edu` domains." + }, + "gov_backlinks": { + "type": "integer", + "description": "Number of backlinks originating from `.gov` domains." + } + } + } + } + } + }, + "example": { + "metrics": [ + { + "target": "seranking.com", + "backlinks": 22402, + "refdomains": 2325, + "subnets": 1399, + "ips": 1957, + "nofollow_backlinks": 3717, + "dofollow_backlinks": 18685, + "edu_backlinks": 40, + "gov_backlinks": 0 + } + ] + } + } + } }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ { - "name": "order_by", + "lang": "Shell", + "label": "POST (multiple targets)", + "source": "curl -X POST 'https://api.seranking.com/v1/backlinks/metrics?output=json' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"target\": [\n \"https://www.seranking.com/\",\n \"https://www.seranking.com/\"\n ],\n \"mode\": \"url\"\n}'" + } + ] + } + }, + "/v1/backlinks/all": { + "get": { + "operationId": "getBacklinksAll", + "tags": [ + "Backlinks" + ], + "summary": "List all backlinks", + "description": "Returns information about backlinks pointing to a target. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request.\n\n**Note:** The `inlink_rank` value in the response is based on background-processed data. It can be up to one month behind the real-time value shown in the [Get page and domain authority](https://seranking.com/api/data/backlinks/#authority) method.\n\n**Cost:** 1 credit per backlink\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#all" + }, + "parameters": [ + { + "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "inlink_rank" + } }, { - "name": "url_from_filter", + "name": "mode", "in": "query", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL.", "schema": { - "type": "string" - }, - "example": "unsam.edu.ar" + "type": "string", + "default": "host" + } }, { - "name": "url_to_filter", + "name": "limit", "in": "query", + "description": "Maximum number of results to return. Must be within the range: `[1, 10,000]`.", "schema": { - "type": "string" - }, - "example": ".jpg" + "type": "integer", + "default": 100 + } }, { - "name": "url_to_filter_mode", + "name": "per_domain", "in": "query", + "description": "Number of backlinks to return per referring domain. Must be within the range: `[1, 100]`. For example, when set to `1`, each returned backlink comes from a different referring domain.\n\nIf empty, all backlinks are returned.", "schema": { - "type": "string", - "enum": [ - "contains", - "does_not_contain" - ] - }, - "example": "does_not_contain" + "type": "integer" + } }, { - "name": "url_from_filter_mode", + "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { "type": "string", - "enum": [ - "contains", - "does_not_contain" - ], - "default": "contains" - }, - "example": "contains" + "default": "json" + } }, { - "name": "anchor_filter", + "name": "order_by", "in": "query", - "description": "Filter by anchor text. Max 2063 characters.", + "description": "Field by which results are sorted:\n• `date_found` – returns the most recent backlinks first.\n• `domain_inlink_rank` – returns backlinks with the highest Domain InLink Rank first.\n• `inlink_rank` – returns backlinks with the highest InLink Rank first.", "schema": { "type": "string", - "maxLength": 2063 + "default": "date_found" } }, { - "name": "anchor_filter_mode", + "name": "inlink_rank_from", "in": "query", + "description": "Minimum InLink Rank. Returns backlinks ≥ this value. Must be within the range: `[0, 100]`.", "schema": { - "type": "string", - "enum": [ - "contains", - "does_not_contain" - ], - "default": "contains" - }, - "example": "contains" + "type": "integer", + "default": 0 + } }, { - "name": "nofollow_filter", + "name": "inlink_rank_to", "in": "query", + "description": "Maximum InLink Rank. Returns backlinks ≤ this value. Must be within the range: `[0, 100]`.", "schema": { - "type": "string", - "enum": [ - "nofollow_only", - "dofollow_only" - ] + "type": "integer", + "default": 100 } }, { - "name": "inlink_rank_from", + "name": "domain_inlink_rank_from", "in": "query", - "description": "Minimum InLink Rank (0-100).", + "description": "Minimum Domain InLink Rank. Returns backlinks ≥ this value. Must be within the range: `[0, 100]`.", "schema": { "type": "integer", - "minimum": 0, - "maximum": 100 + "default": 0 } }, { - "name": "inlink_rank_to", + "name": "domain_inlink_rank_to", "in": "query", - "description": "Maximum InLink Rank (0-100).", + "description": "Maximum Domain InLink Rank. Returns backlinks ≤ this value. Must be within the range: `[0, 100]`.", "schema": { "type": "integer", - "minimum": 0, - "maximum": 100 + "default": 100 } }, { - "name": "domain_inlink_rank_from", + "name": "url_from_filter", "in": "query", - "description": "Minimum Domain InLink Rank (0-100).", + "description": "Text filter for referring page URL (e.g., `seo-software`). Maximum 2063 ASCII symbols.", "schema": { - "type": "integer", - "minimum": 0, - "maximum": 100 + "type": "string" } }, { - "name": "domain_inlink_rank_to", + "name": "url_from_filter_mode", "in": "query", - "description": "Maximum Domain InLink Rank (0-100).", + "description": "Filter mode:\n• `contains` – returns backlinks where `url_from` contains `url_from_filter` text.\n• `does_not_contain` – returns backlinks where `url_from` doesn’t contain `url_from_filter` text.\n\nIgnored if `url_from_filter` parameter is not set.", "schema": { - "type": "integer", - "minimum": 0, - "maximum": 100 + "type": "string", + "default": "contains" + } + }, + { + "name": "url_to_filter", + "in": "query", + "description": "Text filter for destination URL (e.g., `seranking.com/blog/`). Maximum 2063 ASCII symbols.", + "schema": { + "type": "string" + } + }, + { + "name": "url_to_filter_mode", + "in": "query", + "description": "Filter mode: \n• `contains` – returns backlinks where `url_to` contains `url_to_filter` text.\n• `does_not_contain` – returns backlinks where `url_to` doesn’t contain `url_to_filter` text.\n\nIgnored if `url_to_filter` parameter is not set.", + "schema": { + "type": "string", + "default": "contains" + } + }, + { + "name": "anchor_filter", + "in": "query", + "description": "Text filter for link anchor (e.g., `seo`). Maximum 2063 ASCII symbols.", + "schema": { + "type": "string" + } + }, + { + "name": "anchor_filter_mode", + "in": "query", + "description": "Filter mode:\n• `contains` – returns backlinks where `anchor` contains `anchor_filter` text.\n• `does_not_contain` – returns backlinks where `anchor` doesn’t contain `anchor_filter` text.\n\nIgnored if `anchor_filter` parameter is not set.", + "schema": { + "type": "string", + "default": "contains" + } + }, + { + "name": "nofollow_filter", + "in": "query", + "description": "Filter mode:\n• `nofollow_only` – returns only backlinks classified as nofollow.\n• `dofollow_only` – returns only backlinks classified as dofollow.\n\nIf empty, all backlinks are returned.", + "schema": { + "type": "string" } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "backlinks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url_from": { + "type": "string", + "description": "Referring page URL." + }, + "url_to": { + "type": "string", + "description": "Destination page URL." + }, + "title": { + "type": "string", + "description": "Referring page title." + }, + "anchor": { + "type": "string", + "description": "Link anchor text (or image alt text if the link contains an image)." + }, + "alt": { + "type": "string" + }, + "nofollow": { + "type": "boolean", + "description": "Indicates whether the backlink is noffolow." + }, + "image": { + "type": "boolean", + "description": "Indicates whether the backlink contains an image." + }, + "image_source": { + "type": "string", + "description": "Source URL of the image if present." + }, + "inlink_rank": { + "type": "integer", + "description": "Page Authority of the referring page." + }, + "domain_inlink_rank": { + "type": "integer", + "description": "Domain Authority of the referring page’s root domain." + }, + "first_seen": { + "type": "string", + "description": "Date the backlink was first found (YYYY-MM-DD)." + }, + "last_visited": { + "type": "string", + "description": "Date the referring page was last crawled (YYYY-MM-DD)." + } + } + } + } + } + }, + "example": { + "backlinks": [ + { + "url_from": "https://zoekmachine-optimalisatie-seo.beginthier.nl/", + "url_to": "https://www.seranking.com/", + "title": "Zoekmachine Optimalisatie (SEO)", + "anchor": "SEO software tools", + "alt": "", + "nofollow": false, + "image": false, + "image_source": "", + "inlink_rank": 67, + "domain_inlink_rank": 77, + "first_seen": "2021-11-05", + "last_visited": "2023-06-01" + }, + { + "url_from": "https://zoekmachine-optimalisatie.verzamelgids.nl/", + "url_to": "https://www.seranking.com/", + "title": "Zoekmachine Optimalisatie (SEO)", + "anchor": "SEO software tools", + "alt": "", + "nofollow": false, + "image": false, + "image_source": "", + "inlink_rank": 66, + "domain_inlink_rank": 75, + "first_seen": "2021-11-12", + "last_visited": "2023-06-01" + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "GET", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/all?target=seranking.com&mode=domain&limit=100&order_by=inlink_rank&per_domain=1&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] }, "post": { "operationId": "createBacklinksAll", "tags": [ - "backlinks" + "Backlinks" + ], + "summary": "List all backlinks", + "description": "Returns information about backlinks pointing to a target. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request.\n\n**Note:** The `inlink_rank` value in the response is based on background-processed data. It can be up to one month behind the real-time value shown in the [Get page and domain authority](https://seranking.com/api/data/backlinks/#authority) method.\n\n**Cost:** 1 credit per backlink\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#all" + }, + "parameters": [ + { + "name": "output", + "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", + "schema": { + "type": "string", + "default": "json" + } + } ], - "summary": "all", - "description": "Retrieves a detailed, filterable, and sortable list of backlinks pointing to a single target.", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "type": "object", - "example": { - "target": "https://www.seranking.com/", - "mode": "domain", - "limit": 10, - "per_domain": 1, - "order_by": "date_found" - } + "properties": { + "target": { + "type": "string", + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "mode": { + "type": "string", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL." + }, + "limit": { + "type": "integer", + "description": "Maximum number of results to return. Must be within the range: `[1, 10,000]`." + }, + "per_domain": { + "type": "integer", + "description": "Number of backlinks to return per referring domain. Must be within the range: `[1, 100]`. For example, when set to `1`, each returned backlink comes from a different referring domain.\n\nIf empty, all backlinks are returned." + }, + "order_by": { + "type": "string", + "description": "Field by which results are sorted:\n• `date_found` – returns the most recent backlinks first.\n• `domain_inlink_rank` – returns backlinks with the highest Domain InLink Rank first.\n• `inlink_rank` – returns backlinks with the highest InLink Rank first." + }, + "inlink_rank_from": { + "type": "integer", + "description": "Minimum InLink Rank. Returns backlinks ≥ this value. Must be within the range: `[0, 100]`." + }, + "inlink_rank_to": { + "type": "integer", + "description": "Maximum InLink Rank. Returns backlinks ≤ this value. Must be within the range: `[0, 100]`." + }, + "domain_inlink_rank_from": { + "type": "integer", + "description": "Minimum Domain InLink Rank. Returns backlinks ≥ this value. Must be within the range: `[0, 100]`." + }, + "domain_inlink_rank_to": { + "type": "integer", + "description": "Maximum Domain InLink Rank. Returns backlinks ≤ this value. Must be within the range: `[0, 100]`." + }, + "url_from_filter": { + "type": "string", + "description": "Text filter for referring page URL (e.g., `seo-software`). Maximum 2063 ASCII symbols." + }, + "url_from_filter_mode": { + "type": "string", + "description": "Filter mode:\n• `contains` – returns backlinks where `url_from` contains `url_from_filter` text.\n• `does_not_contain` – returns backlinks where `url_from` doesn’t contain `url_from_filter` text.\n\nIgnored if `url_from_filter` parameter is not set." + }, + "url_to_filter": { + "type": "string", + "description": "Text filter for destination URL (e.g., `seranking.com/blog/`). Maximum 2063 ASCII symbols." + }, + "url_to_filter_mode": { + "type": "string", + "description": "Filter mode: \n• `contains` – returns backlinks where `url_to` contains `url_to_filter` text.\n• `does_not_contain` – returns backlinks where `url_to` doesn’t contain `url_to_filter` text.\n\nIgnored if `url_to_filter` parameter is not set." + }, + "anchor_filter": { + "type": "string", + "description": "Text filter for link anchor (e.g., `seo`). Maximum 2063 ASCII symbols." + }, + "anchor_filter_mode": { + "type": "string", + "description": "Filter mode:\n• `contains` – returns backlinks where `anchor` contains `anchor_filter` text.\n• `does_not_contain` – returns backlinks where `anchor` doesn’t contain `anchor_filter` text.\n\nIgnored if `anchor_filter` parameter is not set." + }, + "nofollow_filter": { + "type": "string", + "description": "Filter mode:\n• `nofollow_only` – returns only backlinks classified as nofollow.\n• `dofollow_only` – returns only backlinks classified as dofollow.\n\nIf empty, all backlinks are returned." + } + }, + "required": [ + "target" + ] + }, + "example": { + "target": "https://www.seranking.com/", + "order_by": "date_found", + "mode": "domain", + "limit": 10, + "per_domain": 1 } } } }, - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "output", - "in": "query", - "schema": { - "type": "string" - }, - "example": "json" - } - ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "backlinks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url_from": { + "type": "string", + "description": "Referring page URL." + }, + "url_to": { + "type": "string", + "description": "Destination page URL." + }, + "title": { + "type": "string", + "description": "Referring page title." + }, + "anchor": { + "type": "string", + "description": "Link anchor text (or image alt text if the link contains an image)." + }, + "alt": { + "type": "string" + }, + "nofollow": { + "type": "boolean", + "description": "Indicates whether the backlink is noffolow." + }, + "image": { + "type": "boolean", + "description": "Indicates whether the backlink contains an image." + }, + "image_source": { + "type": "string", + "description": "Source URL of the image if present." + }, + "inlink_rank": { + "type": "integer", + "description": "Page Authority of the referring page." + }, + "domain_inlink_rank": { + "type": "integer", + "description": "Domain Authority of the referring page’s root domain." + }, + "first_seen": { + "type": "string", + "description": "Date the backlink was first found (YYYY-MM-DD)." + }, + "last_visited": { + "type": "string", + "description": "Date the referring page was last crawled (YYYY-MM-DD)." + } + } + } + } + } + }, + "example": { + "backlinks": [ + { + "url_from": "https://zoekmachine-optimalisatie-seo.beginthier.nl/", + "url_to": "https://www.seranking.com/", + "title": "Zoekmachine Optimalisatie (SEO)", + "anchor": "SEO software tools", + "alt": "", + "nofollow": false, + "image": false, + "image_source": "", + "inlink_rank": 67, + "domain_inlink_rank": 77, + "first_seen": "2021-11-05", + "last_visited": "2023-06-01" + }, + { + "url_from": "https://zoekmachine-optimalisatie.verzamelgids.nl/", + "url_to": "https://www.seranking.com/", + "title": "Zoekmachine Optimalisatie (SEO)", + "anchor": "SEO software tools", + "alt": "", + "nofollow": false, + "image": false, + "image_source": "", + "inlink_rank": 66, + "domain_inlink_rank": 75, + "first_seen": "2021-11-12", + "last_visited": "2023-06-01" + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "POST", + "source": "curl -X POST 'https://api.seranking.com/v1/backlinks/all?output=json' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"target\": \"https://www.seranking.com/\",\n \"order_by\": \"date_found\",\n \"mode\": \"domain\",\n \"limit\": 10,\n \"per_domain\": 1\n}'" + } + ] } }, "/v1/backlinks/raw": { "get": { "operationId": "getBacklinksRaw", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "raw", - "description": "Fetches the complete list of backlinks for a target in batches using cursor-based pagination.", + "summary": "Fetch backlinks in batches", + "description": "Returns all backlinks pointing to a target using cursor-based pagination. Backlinks are delivered in sequential batches. This method supports pagination and doesn’t provide sorting or filtering. Unlike the [List all backlinks](https://seranking.com/api/data/backlinks#all) method, which supports ordering (e.g., by InLink Rank or recency), this endpoint is designed for complete backlink retrieval, batch by batch.\n\nPagination is handled via a cursor (`next` parameter). The cursor marks a specific position in the dataset and remains valid unless the item is removed. Cursors are typically valid for up to 24 hours, even if new backlinks are added.\n\n- The `next` parameter must **not** be included when requesting the first page of data. Doing so will return an error.\n\n- If the response doesn’t return `next`, you have reached the last page of data.\n\n**Cost:** 1 credit per backlink", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#raw" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "teilon.com" + } }, { "name": "mode", "in": "query", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL.", "schema": { - "type": "string" - }, - "example": "host" + "type": "string", + "default": "host" + } }, { "name": "limit", "in": "query", + "description": "Maximum number of results to return in one page. Must be within the range: `[1, 100,000]`.\n\nDefault: 10,000", "schema": { "type": "integer" - }, - "example": 100 + } }, { "name": "next", "in": "query", + "description": "Cursor pointing to the end of the previously returned page. \n• Must not be included for the first page request.\n• Not returned in the last page of data.", "schema": { "type": "string" - }, - "example": "Pju9uZR4A2dylhvnUQ1UAu1NWfBjWoutYn_z2MHcVcZqH2eGVtT6Z6j2DjgyJKqyLem4yIj_it6xfHqasMXnj7/_zbLyBX93MmSekLiLxHa_gA9MRIrnPC2sxL4mDNzCzAsbK54U4UCScqvMexsrDx2obPcxHWZMl_yU7hQDa/9GJwcutpU0_v7TbtefRP9EVw/5eFZjvsNERYxl8jORIyNxL4N5t5LK75BaM51pYQ5q8bfuw/F42rIB8xKM0vD0i090_65JHrZPsDoAkKce/XELUwhGcoDqyRgG2P3AXAbZOe5RDFV/vz0YFTyI9tqynHJtP2olEKQ079f3hwroR6YML5AgTsVPwIynxNILAd_OHU5aFTReKIy686fBoIFZWR2dsyeGgN3r/n0jolcHNg==" + } }, { - "name": "output", + "name": "per_domain", "in": "query", + "description": "Number of sample backlinks to return per referring domain instead of all backlinks. Must be within the range: `[1, 100]`. For example, when set to `1`, each returned backlink comes from a different referring domain.\n\nIf empty, all backlinks are returned.", "schema": { - "type": "string" - }, - "example": "json" + "type": "integer" + } }, { - "name": "per_domain", - "in": "query", - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100 - }, - "example": 1 - }, - { - "name": "order_by", + "name": "output", "in": "query", + "description": "Response format (`json` or `xml`).", "schema": { "type": "string", - "enum": [ - "date_found", - "domain_inlink_rank", - "inlink_rank" - ], - "default": "date_found" - }, - "example": "date_found" + "default": "json" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "backlinks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url_from": { + "type": "string", + "description": "Referring page URL." + }, + "url_to": { + "type": "string", + "description": "Destination page URL." + }, + "title": { + "type": "string", + "description": "Referring page title." + }, + "anchor": { + "type": "string", + "description": "Link anchor text (or image alt text if the link contains an image)." + }, + "alt": { + "type": "string" + }, + "nofollow": { + "type": "boolean", + "description": "Indicates whether the backlink is nofollow." + }, + "image": { + "type": "boolean", + "description": "Indicates whether the backlink contains an image." + }, + "image_source": { + "type": "string", + "description": "Source URL of the image if present." + }, + "inlink_rank": { + "type": "integer", + "description": "Page Authority of the referring page." + }, + "domain_inlink_rank": { + "type": "integer", + "description": "Domain Authority of the referring page’s root domain." + }, + "first_seen": { + "type": "string", + "description": "Date the backlink was first found (YYYY-MM-DD)." + }, + "last_visited": { + "type": "string", + "description": "Date the referring page was last crawled (YYYY-MM-DD)." + } + } + } + }, + "next": { + "type": "string", + "description": "Cursor pointing to the end of the returned page of data. Not included if this is the last page." + } + } + }, + "examples": { + "example1": { + "summary": "Example 1", + "value": { + "backlinks": [ + { + "url_from": "https://www.pbmug.org/efficient-backlinks-checking.html", + "url_to": "https://seranking.com/backlinks-checker.html", + "title": "Backlinks Checker ", + "anchor": "", + "alt": "", + "nofollow": false, + "image": false, + "image_source": "", + "inlink_rank": 16, + "domain_inlink_rank": 45, + "first_seen": "2021-05-06", + "last_visited": "2021-05-06" + }, + { + "url_from": "https://www.pbmug.org/seranking-enterprise-6-40-8.html", + "url_to": "https:// seranking.com/themes/standard/images/index-scr-3-big.png", + "title": "The best SEO software - Pbmug.org", + "anchor": "", + "alt": "", + "nofollow": false, + "image": false, + "image_source": "", + "inlink_rank": 15, + "domain_inlink_rank": 45, + "first_seen": "2021-05-06", + "last_visited": "2021-05-06" + } + ], + "next": "ezDLWp6Peqx6tE77/mV9XtWGP92lrdwTI3ZZ2b24ZPMXA/NpRCJm45biWgPerwN_0uqT9iHmZTYjeS2VRiNL7ySiFgV0KFGv9O9Y=" + } + }, + "example2": { + "summary": "Example 2", + "value": { + "backlinks": [ + { + "url_from": "https://fity.club/lists/1/seo-software-tools-for-resultsdriven-site-owners/", + "url_to": "https://cdn.seranking.com/themes/standard/images/works-on.png", + "title": "Seo Software Tools For Resultsdriven Site Owners", + "anchor": "seranking.com", + "alt": "", + "nofollow": true, + "image": false, + "image_source": "", + "inlink_rank": 9, + "domain_inlink_rank": 13, + "first_seen": "2023-08-07", + "last_visited": "2023-08-07" + }, + { + "url_from": "https://www.bjskqx.com/11043.html", + "url_to": "https://cn.seranking.com/seranking.html", + "title": "seo外链发布有用吗,seo外链发布平台有哪些-帮发锚文本外链网", + "anchor": "SE Ranking", + "alt": "", + "nofollow": false, + "image": false, + "image_source": "", + "inlink_rank": 15, + "domain_inlink_rank": 38, + "first_seen": "2023-07-08", + "last_visited": "2023-07-08" + } + ], + "next": "sPpKCdfMEKN5zO3RsuyEZIMp7wHaJF5wuT/1tebFkazXfosEFuotIQYeHxV/beypHQ3a9DHFgCkNnh_f0cP9EoHBtcyYFuGA==" + } + } + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/raw?target=seranking.com&mode=domain&limit=50000&output=json&next=YYY' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/raw?target=seranking.com&mode=domain&limit=2&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/raw?target=seranking.com&mode=domain&limit=2&output=json&next=ezDLWp6Peqx6tE77/mV9XtWGP92lrdwTI3ZZ2b24ZPMXA/NpRCJm45biWgPerwN_0uqT9iHmZTYjeS2VRiNL7ySiFgV0KFGv9O9Y=' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] } }, "/v1/backlinks/count": { "get": { "operationId": "getBacklinksCount", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "count", - "description": "Returns the total number of live backlinks for one or more targets.", + "summary": "Get total backlinks count", + "description": "Returns the total number of backlinks for a target. This endpoint supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format).\n\n**Cost:** 2 credits per target\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#count" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`).", "schema": { - "type": "string", - "description": "Supports multiple targets by repeating this parameter." - }, - "example": "anandaioga.com" + "type": "string" + } }, { "name": "mode", "in": "query", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL.", "schema": { "type": "string", - "enum": [ - "domain", - "host", - "url" - ], "default": "host" - }, - "example": "url" + } }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { "type": "string", - "enum": [ - "json", - "xml" - ], "default": "json" - }, - "example": "json" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "metrics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "target": { + "type": "string", + "description": "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "backlinks": { + "type": "integer", + "description": "Total number of live backlinks pointing to the target." + } + } + } + } + } + }, + "example": { + "metrics": [ + { + "target": "seranking.com", + "backlinks": 22402 + }, + { + "target": "www.seranking.com", + "backlinks": 341415 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "GET (single target)", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/count?target=seranking.com&mode=host&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] }, "post": { "operationId": "createBacklinksCount", "tags": [ - "backlinks" + "Backlinks" + ], + "summary": "Get total backlinks count", + "description": "Returns the total number of backlinks for a target. This endpoint supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format).\n\n**Cost:** 2 credits per target\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#count" + }, + "parameters": [ + { + "name": "output", + "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", + "schema": { + "type": "string", + "default": "json" + } + } ], - "summary": "count", - "description": "Returns the total number of live backlinks for one or more targets.", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "type": "object", - "example": { - "target": [ - "https://www.seranking.com/", - "https://www.google.com/" - ], - "mode": "host" - } + "properties": { + "target": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "mode": { + "type": "string", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL." + } + }, + "required": [ + "target" + ] + }, + "example": { + "target": [ + "https://www.seranking.com/", + "https://www.seranking.com/" + ], + "mode": "host" } } } }, - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "output", - "in": "query", - "schema": { - "type": "string" - }, - "example": "json" - } - ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "metrics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "target": { + "type": "string", + "description": "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "backlinks": { + "type": "integer", + "description": "Total number of live backlinks pointing to the target." + } + } + } + } + } + }, + "example": { + "metrics": [ + { + "target": "seranking.com", + "backlinks": 22402 + }, + { + "target": "www.seranking.com", + "backlinks": 341415 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "POST (multiple targets)", + "source": "curl -X POST 'https://api.seranking.com/v1/backlinks/count?output=json' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"target\": [\n \"https://www.seranking.com/\",\n \"https://www.seranking.com/\"\n ],\n \"mode\": \"host\"\n}'" + } + ] } }, "/v1/backlinks/export": { "get": { "operationId": "getBacklinksExport", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "export", - "description": "Initiates an asynchronous task to export all backlinks for a target to a downloadable CSV file.", + "summary": "Export backlinks data", + "description": "Exports information about all backlinks pointing to a target. Due to the potentially large data volume, this endpoint works asynchronously and returns the complete dataset as a downloadable `.csv.gz` file once processing is complete.\n\n**Cost:** 1 credit per backlink", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#export" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "https://seranking.com" + } }, { "name": "mode", "in": "query", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL.", "schema": { "type": "string", - "enum": [ - "domain", - "host", - "url" - ], "default": "host" - }, - "example": "domain" + } }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`).", "schema": { "type": "string", - "enum": [ - "json", - "xml" - ], "default": "json" - }, - "example": "json" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "task_status": { + "type": "string", + "description": "Status of the export task:\n• `queued_for_processing` – task accepted and queued.\n• `processing` – task is running.\n• `complete` – export is ready for download.\n• `rejected` – another export task is already in progress.\n• `unknown` — task ID is invalid or inaccessible." + }, + "task_id": { + "type": "string", + "description": "Unique ID of the export task." + }, + "download_file": { + "type": "string", + "description": "Location of the generated `.csv.gz` file (available when status is `complete`)." + } + } + }, + "examples": { + "example1": { + "summary": "Example 1", + "value": { + "task_status": "queued_for_processing", + "task_id": "d1d2bb44-6c66-4791-a634-26103551e2da" + } + }, + "example2": { + "summary": "Example 2", + "value": { + "task_status": "complete", + "task_id": "d1d2bb44-6c66-4791-a634-26103551e2da", + "download_file": "http://116.202.112.205/export/b/seranking.com-1695672292259.csv.gz" + } + } + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/export?target=https://seranking.com&mode=domain&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] } }, - "/v1/backlinks/export/status": { + "/v1/backlinks/history": { "get": { - "operationId": "getBacklinksExportStatus", + "operationId": "getBacklinksHistory", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "export/status", - "description": "Status of the asynchronous task to export all backlinks for a target to a downloadable CSV file.", + "summary": "List new and lost backlinks", + "description": "Returns backlinks that were newly found or lost within a specified date range for a target. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 1 credit per backlink\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#history" + }, "parameters": [ { - "name": "apikey", + "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "{{secret_key_data}}" + } }, { - "name": "task_id", + "name": "mode", "in": "query", - "required": true, + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL.", "schema": { - "type": "string" - }, - "example": "1_878619" + "type": "string", + "default": "host" + } }, { - "name": "output", + "name": "new_lost_type", "in": "query", + "description": "Backlink status filter:\n• `new` – returns newly found backlinks.\n• `lost` – returns backlinks tagged as lost.\n\nIf empty, both are returned.", "schema": { "type": "string", - "enum": [ - "json", - "xml" - ], - "default": "json" - }, - "example": "json" - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "default": "“”" } - } - } - } - }, - "/v1/backlinks/history": { - "get": { - "operationId": "getBacklinksHistory", - "tags": [ - "backlinks" - ], - "summary": "history", - "description": "Returns a list of new or lost backlinks for a single target within a specified date range.", - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "target", - "in": "query", - "schema": { - "type": "string" - }, - "example": "https://www.seranking.com" - }, - { - "name": "mode", - "in": "query", - "schema": { - "type": "string" - }, - "example": "domain" - }, - { - "name": "new_lost_type", - "in": "query", - "schema": { - "type": "string", - "enum": [ - "new", - "lost" - ] - }, - "example": "new" }, { "name": "date_from", "in": "query", + "description": "Start date (`YYYY-MM-DD`), inclusive.", "schema": { - "type": "string" - }, - "example": "2024-01-14" + "type": "string", + "default": "yesterday" + } }, { "name": "date_to", "in": "query", + "description": "End date (`YYYY-MM-DD`), inclusive.", "schema": { - "type": "string" - }, - "example": "2025-08-28" + "type": "string", + "default": "today" + } }, { "name": "link_type", "in": "query", + "description": "Type of backlink:\n• `href` – returns standard hyperlinks.\n• `redirect` – returns redirect links.\n\nIf empty, all types are returned.", "schema": { "type": "string", - "enum": [ - "href", - "redirect" - ] - }, - "example": "href" + "default": "“”" + } }, { "name": "anchor_type", "in": "query", + "description": "Anchor type:\n• `text` – returns text links.\n• `image` – returns image links (if the anchor contains both text and an image, it is classified as image).\n• `undefined` – returns undefined links.\n\nIf empty, all types are returned.", "schema": { "type": "string", - "enum": [ - "text", - "image", - "undefined" - ] - }, - "example": "text" + "default": "“”" + } }, { "name": "dofollow", "in": "query", + "description": "Follow status (`dofollow`, `nofollow`, `undefined`).\n\nIf empty, all statuses are returned.", "schema": { "type": "string", - "enum": [ - "dofollow", - "nofollow", - "undefined" - ] - }, - "example": "dofollow" - }, - { - "name": "output", - "in": "query", - "schema": { - "type": "string", - "enum": [ - "json", - "xml" - ], - "default": "json" - }, - "example": "json" + "default": "“”" + } }, { "name": "url_from", "in": "query", - "description": "Filter by referring page URL.", + "description": "Referring domain filter (including subdomains).\nExample: `http://seo.jouwlinkhier.nl/path` returns backlinks originating from `seo.jouwlinkhier.nl/*`.\n\nIf empty, backlinks from all domains and subdomains are returned.", "schema": { - "type": "string" + "type": "string", + "default": "“”" } }, { "name": "limit", "in": "query", + "description": "Maximum number of results to return. Must be within the range: `[1, 10,000]`.", "schema": { "type": "integer", - "minimum": 1, - "maximum": 10000, "default": 100 - }, - "example": 100 + } }, { "name": "order_by", "in": "query", + "description": "Field by which results are sorted:\n• `new_lost_date` – returns new or lost backlinks ordered by the date they were found or lost (most recent first).\n• `domain_inlink_rank` – returns backlinks with the highest Domain InLink Rank first.\n• `inlink_rank` – returns backlinks with the highest InLink Rank first.", "schema": { "type": "string", - "enum": [ - "new_lost_date", - "domain_inlink_rank", - "inlink_rank" - ], "default": "new_lost_date" - }, - "example": "new_lost_date" + } + }, + { + "name": "output", + "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", + "schema": { + "type": "string", + "default": "json" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "new_lost_backlinks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "new_lost_date": { + "type": "string", + "description": "Date when the backlink was found or lost (YYYY-MM-DD)." + }, + "new_lost_type": { + "type": "string", + "description": "Backlink status:\n• `new` – newly found backlinks.\n• `lost` – backlinks that were lost." + }, + "url_from": { + "type": "string", + "description": "Referring page URL." + }, + "url_to": { + "type": "string", + "description": "Destination pag URL." + }, + "title": { + "type": "string", + "description": "Referring page title." + }, + "anchor": { + "type": "string", + "description": "Link anchor text (or image alt text if the link contains an image)." + }, + "alt": {}, + "link_type": { + "type": "string", + "description": "Type of backlink:\n• `href` – standard hyperlinks.\n• `redirect` – redirect links." + }, + "nofollow": { + "type": "boolean", + "description": "Indicates whether the backlink is classified as nofollow." + }, + "image": { + "type": "boolean", + "description": "Indicates whether the backlink is an image link." + }, + "image_source": { + "nullable": true, + "description": "Source URL of the image if present.", + "type": "string" + }, + "redirect_chain": { + "type": "boolean" + }, + "redirect_chain_urls": { + "type": "array", + "items": {} + }, + "reason_lost": { + "type": "string", + "nullable": true + }, + "inlink_rank": { + "type": "integer", + "description": "Page Authority of the referring page URL." + }, + "domain_inlink_rank": { + "type": "integer", + "description": "Domain Authority of the referring page’s root domain." + }, + "first_seen": { + "type": "string", + "description": "Date when the backlink was first found (YYYY-MM-DD)." + } + } + } + } + } + }, + "example": { + "new_lost_backlinks": [ + { + "new_lost_date": "2023-01-15", + "new_lost_type": "new", + "url_from": "https://agenciatgx.com.br/blog/melhores-ferramentas-de-seo-para-otimizar/", + "url_to": "http://www.seranking.com/", + "title": "Melhores Ferramentas de SEO Para Otimizar o Desempenho do Seu Site - Agência TGX", + "anchor": "SE Ranking", + "alt": null, + "link_type": "href", + "nofollow": false, + "image": false, + "image_source": null, + "redirect_chain": false, + "redirect_chain_urls": [], + "reason_lost": null, + "inlink_rank": 1, + "domain_inlink_rank": 18, + "first_seen": "2023-01-15" + }, + { + "new_lost_date": "2023-01-15", + "new_lost_type": "lost", + "url_from": "http://technicalproducts.org/category/seoandperformance", + "url_to": "https://www.seranking.com/", + "title": "SEO & Performance – Technical Products", + "anchor": "SE Ranking", + "alt": null, + "link_type": "href", + "nofollow": false, + "image": false, + "image_source": null, + "redirect_chain": false, + "redirect_chain_urls": [], + "reason_lost": "link_removed", + "inlink_rank": 1, + "domain_inlink_rank": 1, + "first_seen": "2023-01-15" + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "GET", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/history?target=https://www.seranking.com&mode=domain&new_lost_type=new&date_from=2023-01-15&date_to=2023-01-15&link_type=href&anchor_type=text&dofollow=dofollow&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] }, "post": { "operationId": "createBacklinksHistory", "tags": [ - "backlinks" + "Backlinks" + ], + "summary": "List new and lost backlinks", + "description": "Returns backlinks that were newly found or lost within a specified date range for a target. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 1 credit per backlink\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#history" + }, + "parameters": [ + { + "name": "output", + "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", + "schema": { + "type": "string", + "default": "json" + } + } ], - "summary": "history", - "description": "Returns a list of new or lost backlinks for a single target within a specified date range.", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "type": "object", - "example": { - "target": "https://www.seranking.com", - "mode": "domain", - "date_from": "2025-09-15", - "date_to": "2025-10-01" - } + "properties": { + "target": { + "type": "string", + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "mode": { + "type": "string", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL." + }, + "new_lost_type": { + "type": "string", + "description": "Backlink status filter:\n• `new` – returns newly found backlinks.\n• `lost` – returns backlinks tagged as lost.\n\nIf empty, both are returned." + }, + "date_from": { + "type": "string", + "description": "Start date (`YYYY-MM-DD`), inclusive." + }, + "date_to": { + "type": "string", + "description": "End date (`YYYY-MM-DD`), inclusive." + }, + "link_type": { + "type": "string", + "description": "Type of backlink:\n• `href` – returns standard hyperlinks.\n• `redirect` – returns redirect links.\n\nIf empty, all types are returned." + }, + "anchor_type": { + "type": "string", + "description": "Anchor type:\n• `text` – returns text links.\n• `image` – returns image links (if the anchor contains both text and an image, it is classified as image).\n• `undefined` – returns undefined links.\n\nIf empty, all types are returned." + }, + "dofollow": { + "type": "string", + "description": "Follow status (`dofollow`, `nofollow`, `undefined`).\n\nIf empty, all statuses are returned." + }, + "url_from": { + "type": "string", + "description": "Referring domain filter (including subdomains).\nExample: `http://seo.jouwlinkhier.nl/path` returns backlinks originating from `seo.jouwlinkhier.nl/*`.\n\nIf empty, backlinks from all domains and subdomains are returned." + }, + "limit": { + "type": "integer", + "description": "Maximum number of results to return. Must be within the range: `[1, 10,000]`." + }, + "order_by": { + "type": "string", + "description": "Field by which results are sorted:\n• `new_lost_date` – returns new or lost backlinks ordered by the date they were found or lost (most recent first).\n• `domain_inlink_rank` – returns backlinks with the highest Domain InLink Rank first.\n• `inlink_rank` – returns backlinks with the highest InLink Rank first." + } + }, + "required": [ + "target" + ] + }, + "example": { + "target": "https://www.seranking.com", + "mode": "domain", + "date_from": "2023-01-15", + "date_to": "2023-01-15" } } } }, - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "output", - "in": "query", - "schema": { - "type": "string" - }, - "example": "json" - } - ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "new_lost_backlinks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "new_lost_date": { + "type": "string", + "description": "Date when the backlink was found or lost (YYYY-MM-DD)." + }, + "new_lost_type": { + "type": "string", + "description": "Backlink status:\n• `new` – newly found backlinks.\n• `lost` – backlinks that were lost." + }, + "url_from": { + "type": "string", + "description": "Referring page URL." + }, + "url_to": { + "type": "string", + "description": "Destination pag URL." + }, + "title": { + "type": "string", + "description": "Referring page title." + }, + "anchor": { + "type": "string", + "description": "Link anchor text (or image alt text if the link contains an image)." + }, + "alt": {}, + "link_type": { + "type": "string", + "description": "Type of backlink:\n• `href` – standard hyperlinks.\n• `redirect` – redirect links." + }, + "nofollow": { + "type": "boolean", + "description": "Indicates whether the backlink is classified as nofollow." + }, + "image": { + "type": "boolean", + "description": "Indicates whether the backlink is an image link." + }, + "image_source": { + "nullable": true, + "description": "Source URL of the image if present.", + "type": "string" + }, + "redirect_chain": { + "type": "boolean" + }, + "redirect_chain_urls": { + "type": "array", + "items": {} + }, + "reason_lost": { + "type": "string", + "nullable": true + }, + "inlink_rank": { + "type": "integer", + "description": "Page Authority of the referring page URL." + }, + "domain_inlink_rank": { + "type": "integer", + "description": "Domain Authority of the referring page’s root domain." + }, + "first_seen": { + "type": "string", + "description": "Date when the backlink was first found (YYYY-MM-DD)." + } + } + } + } + } + }, + "example": { + "new_lost_backlinks": [ + { + "new_lost_date": "2023-01-15", + "new_lost_type": "new", + "url_from": "https://agenciatgx.com.br/blog/melhores-ferramentas-de-seo-para-otimizar/", + "url_to": "http://www.seranking.com/", + "title": "Melhores Ferramentas de SEO Para Otimizar o Desempenho do Seu Site - Agência TGX", + "anchor": "SE Ranking", + "alt": null, + "link_type": "href", + "nofollow": false, + "image": false, + "image_source": null, + "redirect_chain": false, + "redirect_chain_urls": [], + "reason_lost": null, + "inlink_rank": 1, + "domain_inlink_rank": 18, + "first_seen": "2023-01-15" + }, + { + "new_lost_date": "2023-01-15", + "new_lost_type": "lost", + "url_from": "http://technicalproducts.org/category/seoandperformance", + "url_to": "https://www.seranking.com/", + "title": "SEO & Performance – Technical Products", + "anchor": "SE Ranking", + "alt": null, + "link_type": "href", + "nofollow": false, + "image": false, + "image_source": null, + "redirect_chain": false, + "redirect_chain_urls": [], + "reason_lost": "link_removed", + "inlink_rank": 1, + "domain_inlink_rank": 1, + "first_seen": "2023-01-15" + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "POST", + "source": "curl -X POST 'https://api.seranking.com/v1/backlinks/history?output=json' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"target\": \"https://www.seranking.com\",\n \"mode\": \"domain\",\n \"date_from\": \"2023-01-15\",\n \"date_to\": \"2023-01-15\"\n}'" + } + ] } }, "/v1/backlinks/history/count": { "get": { "operationId": "getBacklinksHistoryCount", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "history/count", - "description": "Returns the daily count of new and lost backlinks for a target over a specified period.", + "summary": "Get daily count of new and lost backlinks", + "description": "Returns the daily count of newly found or lost backlinks for a specified target with the given date range. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 10 credits per target + 1 credit per date point returned\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#history-count" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "https://www.seranking.com" + } }, { "name": "mode", "in": "query", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL.", "schema": { - "type": "string" - }, - "example": "domain" + "type": "string", + "default": "host" + } }, { "name": "new_lost_type", "in": "query", + "description": "Backlink status filter:\n• `new` – counts newly found backlinks.\n• `lost` – returns backlinks tagged as lost.\n\nIf empty, both are returned.", "schema": { - "type": "string" - }, - "example": "new" + "type": "string", + "default": "“”" + } }, { "name": "date_from", "in": "query", + "description": "Start date (`YYYY-MM-DD`), inclusive.", "schema": { - "type": "string" - }, - "example": "2025-09-14" + "type": "string", + "default": "yesterday" + } }, { "name": "date_to", "in": "query", + "description": "End date (`YYYY-MM-DD`), inclusive.", "schema": { - "type": "string" - }, - "example": "2025-10-28" + "type": "string", + "default": "today" + } }, { "name": "link_type", "in": "query", + "description": "Type of backlink:\n• `href` – returns standard hyperlinks.\n• `redirect` – returns redirect links.\n\nIf empty, all types are counted.", "schema": { - "type": "string" - }, - "example": "href" + "type": "string", + "default": "“”" + } }, { "name": "anchor_type", "in": "query", + "description": "Anchor type:\n• `text` – returns text links.\n• `image` – returns image links (if the anchor contains both text and an image, it is classified as image).\n• `undefined` – returns undefined links.\n\nIf empty, all types are returned.", "schema": { - "type": "string" - }, - "example": "text" + "type": "string", + "default": "“”" + } }, { "name": "dofollow", "in": "query", + "description": "Follow status (`dofollow`, `nofollow`, `undefined`).\n\nIf empty, all statuses are counted.", "schema": { - "type": "string" - }, - "example": "dofollow" + "type": "string", + "default": "“”" + } }, { - "name": "output", + "name": "url_from", "in": "query", + "description": "Referring domain filter (including subdomains).\nExample: `http://seo.jouwlinkhier.nl/path` returns backlinks originating from `seo.jouwlinkhier.nl/*`.\n\nIf empty, backlinks from all domains and subdomains are returned.", "schema": { "type": "string", - "enum": [ - "json", - "xml" - ], - "default": "json" - }, - "example": "json" + "default": "“”" + } }, { - "name": "url_from", + "name": "output", "in": "query", - "description": "Filter by referring page URL.", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { - "type": "string" + "type": "string", + "default": "json" } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "new_lost_backlinks_count": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Date for which the count is provided (YYYY-MM-DD)." + }, + "new": { + "type": "integer", + "description": "Number of newly found backlinks on this date matching the request filters." + }, + "lost": { + "type": "integer", + "description": "Number of backlinks lost on this date matching the request filters." + } + } + } + } + } + }, + "example": { + "new_lost_backlinks_count": [ + { + "date": "2023-01-16", + "new": 5, + "lost": 0 + }, + { + "date": "2023-01-15", + "new": 5, + "lost": 0 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "GET", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/history/count?target=https://www.seranking.com&mode=domain&new_lost_type=new&date_from=2019-01-14&date_to=2019-01-16&link_type=href&anchor_type=text&dofollow=dofollow&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] }, "post": { "operationId": "createBacklinksHistoryCount", "tags": [ - "backlinks" + "Backlinks" + ], + "summary": "Get daily count of new and lost backlinks", + "description": "Returns the daily count of newly found or lost backlinks for a specified target with the given date range. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 10 credits per target + 1 credit per date point returned\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#history-count" + }, + "parameters": [ + { + "name": "output", + "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", + "schema": { + "type": "string", + "default": "json" + } + } ], - "summary": "history/count", - "description": "Returns the daily count of new and lost backlinks for a target over a specified period.", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "type": "object", - "example": { - "target": "https://www.seranking.com", - "mode": "domain", - "date_from": "2025-09-15", - "date_to": "2025-10-15" - } + "properties": { + "target": { + "type": "string", + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "mode": { + "type": "string", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL." + }, + "new_lost_type": { + "type": "string", + "description": "Backlink status filter:\n• `new` – counts newly found backlinks.\n• `lost` – returns backlinks tagged as lost.\n\nIf empty, both are returned." + }, + "date_from": { + "type": "string", + "description": "Start date (`YYYY-MM-DD`), inclusive." + }, + "date_to": { + "type": "string", + "description": "End date (`YYYY-MM-DD`), inclusive." + }, + "link_type": { + "type": "string", + "description": "Type of backlink:\n• `href` – returns standard hyperlinks.\n• `redirect` – returns redirect links.\n\nIf empty, all types are counted." + }, + "anchor_type": { + "type": "string", + "description": "Anchor type:\n• `text` – returns text links.\n• `image` – returns image links (if the anchor contains both text and an image, it is classified as image).\n• `undefined` – returns undefined links.\n\nIf empty, all types are returned." + }, + "dofollow": { + "type": "string", + "description": "Follow status (`dofollow`, `nofollow`, `undefined`).\n\nIf empty, all statuses are counted." + }, + "url_from": { + "type": "string", + "description": "Referring domain filter (including subdomains).\nExample: `http://seo.jouwlinkhier.nl/path` returns backlinks originating from `seo.jouwlinkhier.nl/*`.\n\nIf empty, backlinks from all domains and subdomains are returned." + } + }, + "required": [ + "target" + ] + }, + "example": { + "target": "https://www.seranking.com", + "mode": "domain", + "date_from": "2023-01-15", + "date_to": "2023-01-15" } } } }, - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "output", - "in": "query", - "schema": { - "type": "string" - }, - "example": "json" - } - ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "new_lost_backlinks_count": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Date for which the count is provided (YYYY-MM-DD)." + }, + "new": { + "type": "integer", + "description": "Number of newly found backlinks on this date matching the request filters." + }, + "lost": { + "type": "integer", + "description": "Number of backlinks lost on this date matching the request filters." + } + } + } + } + } + }, + "example": { + "new_lost_backlinks_count": [ + { + "date": "2023-01-16", + "new": 5, + "lost": 0 + }, + { + "date": "2023-01-15", + "new": 5, + "lost": 0 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "POST", + "source": "curl -X POST 'https://api.seranking.com/v1/backlinks/history/count?output=json' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"target\": \"https://www.seranking.com\",\n \"mode\": \"domain\",\n \"date_from\": \"2023-01-15\",\n \"date_to\": \"2023-01-15\"\n}'" + } + ] } }, "/v1/backlinks/history/cumulative": { "get": { "operationId": "getBacklinksHistoryCumulative", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "history/cumulative", - "description": "Returns the total number of live backlinks for a target for each day in a specified date range.", + "summary": "Get cumulative backlinks over time", + "description": "Returns the number of live backlinks for each day within the given date range for a target. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 10 credits per target + 1 credit per date point returned\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#history-cumulative" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: only full page URL is supported (e.g., `http://seranking.com/index.html`).", "schema": { "type": "string" - }, - "example": "https://www.seranking.com" + } }, { "name": "mode", "in": "query", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL.", "schema": { "type": "string", - "enum": [ - "domain", - "host", - "url" - ], "default": "host" - }, - "example": "domain" + } }, { "name": "date_from", "in": "query", + "description": "Start date (`YYYY-MM-DD`), inclusive.", "schema": { - "type": "string" - }, - "example": "2024-01-14" + "type": "string", + "default": "yesterday" + } }, { "name": "date_to", "in": "query", + "description": "End date (`YYYY-MM-DD`), inclusive.", "schema": { - "type": "string" - }, - "example": "2024-08-28" + "type": "string", + "default": "today" + } }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { "type": "string", - "enum": [ - "json", - "xml" - ], "default": "json" - }, - "example": "json" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "backlinks_count": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Date for which the count is provided (YYYY-MM-DD)." + }, + "backlinks": { + "type": "integer", + "description": "Number of live backlinks on that date matching the filters specified in the request." + } + } + } + } + } + }, + "example": { + "backlinks_count": [ + { + "date": "2023-01-16", + "backlinks": 5 + }, + { + "date": "2023-01-15", + "backlinks": 5 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "GET", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/history/cumulative?target=https://www.seranking.com&mode=domain&date_from=2019-01-14&date_to=2019-01-16&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] }, "post": { "operationId": "createBacklinksHistoryCumulative", "tags": [ - "backlinks" + "Backlinks" + ], + "summary": "Get cumulative backlinks over time", + "description": "Returns the number of live backlinks for each day within the given date range for a target. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 10 credits per target + 1 credit per date point returned\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#history-cumulative" + }, + "parameters": [ + { + "name": "output", + "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", + "schema": { + "type": "string", + "default": "json" + } + } ], - "summary": "history/cumulative", - "description": "Returns the total number of live backlinks for a target for each day in a specified date range.", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "type": "object", + "properties": { + "target": { + "type": "string", + "description": "Target to analyze: only full page URL is supported (e.g., `http://seranking.com/index.html`)." + }, + "mode": { + "type": "string", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL." + }, + "date_from": { + "type": "string", + "description": "Start date (`YYYY-MM-DD`), inclusive." + }, + "date_to": { + "type": "string", + "description": "End date (`YYYY-MM-DD`), inclusive." + } + }, + "required": [ + "target" + ] + }, + "example": { + "target": "https://www.seranking.com", + "mode": "domain", + "date_from": "2023-01-15", + "date_to": "2023-01-15" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "backlinks_count": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Date for which the count is provided (YYYY-MM-DD)." + }, + "backlinks": { + "type": "integer", + "description": "Number of live backlinks on that date matching the filters specified in the request." + } + } + } + } + } + }, "example": { - "target": "https://www.seranking.com", - "mode": "domain", - "date_from": "2024-01-14", - "date_to": "2024-08-28", - "output": "json" + "backlinks_count": [ + { + "date": "2023-01-16", + "backlinks": 5 + }, + { + "date": "2023-01-15", + "backlinks": 5 + } + ] } } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "POST", + "source": "curl -X POST 'https://api.seranking.com/v1/backlinks/history/cumulative?output=json' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n\"target\": \"https://www.seranking.com\",\n\"mode\": \"domain\",\n\"date_from\": \"2023-01-15\",\n\"date_to\": \"2023-01-15\"\n}'" } + ] + } + }, + "/v1/backlinks/anchors": { + "get": { + "operationId": "getBacklinksAnchors", + "tags": [ + "Backlinks" + ], + "summary": "Get backlink anchor texts", + "description": "Returns information about anchor texts of backlinks pointing to a target. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 1 credit per anchor text\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#anchors" }, "parameters": [ { - "name": "apikey", + "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "{{secret_key_data}}" + } }, { - "name": "output", - "in": "query", - "schema": { - "type": "string" - }, - "example": "json" - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/v1/backlinks/anchors": { - "get": { - "operationId": "getBacklinksAnchors", - "tags": [ - "backlinks" - ], - "summary": "anchors", - "description": "Returns information about the anchor texts used in backlinks that point to a single target.", - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "target", - "in": "query", - "schema": { - "type": "string" - }, - "example": "https://seranking.com" - }, - { - "name": "mode", + "name": "mode", "in": "query", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL.", "schema": { "type": "string", - "enum": [ - "domain", - "host", - "url" - ], "default": "host" - }, - "example": "domain" + } }, { "name": "order_by", "in": "query", + "description": "Field by which results are sorted (descending):\n• `backlinks` – total number of backlinks using the anchor text.\n• `refdomains` – total number of referring domains using the anchor text.", "schema": { "type": "string", - "enum": [ - "backlinks", - "refdomains" - ] - }, - "example": "backlinks" + "default": "backlinks" + } }, { "name": "limit", "in": "query", + "description": "Maximum number of results to return. Must be within the range: `[1, 10,000]`.", "schema": { - "type": "integer" - }, - "example": 2 + "type": "integer", + "default": 100 + } }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { "type": "string", - "enum": [ - "json", - "xml" - ], "default": "json" - }, - "example": "json" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "anchors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "anchor": { + "type": "string", + "description": "Case-sensitive anchor text (may be empty)." + }, + "backlinks": { + "type": "integer", + "description": "Number of backlinks using this anchor text (> 0)." + }, + "refdomains": { + "type": "integer", + "description": "Number of referring domains using this anchor text (> 0)." + }, + "dofollow_backlinks": { + "type": "integer", + "description": "Number of backlinks not classified as nofollow." + }, + "nofollow_backlinks": { + "type": "integer", + "description": "Number of backlinks classified as nofollow." + }, + "first_seen": { + "type": "string", + "description": "Date of the earliest backlink with this anchor text in the index (YYYY-MM-DD)." + }, + "last_visited": { + "type": "string", + "description": "Last date the backlink with this anchor text was seen (YYYY-MM-DD)." + } + } + } + } + } + }, + "example": { + "anchors": [ + { + "anchor": "SE Ranking", + "backlinks": 1844, + "refdomains": 445, + "dofollow_backlinks": 1595, + "nofollow_backlinks": 249, + "first_seen": "2016-12-07", + "last_visited": "2023-10-19" + }, + { + "anchor": "social listening", + "backlinks": 1542, + "refdomains": 7, + "dofollow_backlinks": 1542, + "nofollow_backlinks": 0, + "first_seen": "2020-04-30", + "last_visited": "2022-04-01" + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "GET", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/anchors?target=https://seranking.com&mode=domain&limit=2&order_by=backlinks&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] }, "post": { "operationId": "createBacklinksAnchors", "tags": [ - "backlinks" + "Backlinks" + ], + "summary": "Get backlink anchor texts", + "description": "Returns information about anchor texts of backlinks pointing to a target. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 1 credit per anchor text\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#anchors" + }, + "parameters": [ + { + "name": "output", + "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", + "schema": { + "type": "string", + "default": "json" + } + } ], - "summary": "anchors", - "description": "Returns information about the anchor texts used in backlinks that point to a single target.", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "type": "object", - "example": { - "target": "https://www.seranking.com/", - "order_by": "backlinks", - "mode": "domain", - "limit": 2 - } + "properties": { + "target": { + "type": "string", + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "mode": { + "type": "string", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL." + }, + "order_by": { + "type": "string", + "description": "Field by which results are sorted (descending):\n• `backlinks` – total number of backlinks using the anchor text.\n• `refdomains` – total number of referring domains using the anchor text." + }, + "limit": { + "type": "integer", + "description": "Maximum number of results to return. Must be within the range: `[1, 10,000]`." + } + }, + "required": [ + "target" + ] + }, + "example": { + "target": "https://www.seranking.com/", + "order_by": "backlinks", + "mode": "domain", + "limit": 2 } } } }, - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "output", - "in": "query", - "schema": { - "type": "string" - }, - "example": "json" - } - ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "anchors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "anchor": { + "type": "string", + "description": "Case-sensitive anchor text (may be empty)." + }, + "backlinks": { + "type": "integer", + "description": "Number of backlinks using this anchor text (> 0)." + }, + "refdomains": { + "type": "integer", + "description": "Number of referring domains using this anchor text (> 0)." + }, + "dofollow_backlinks": { + "type": "integer", + "description": "Number of backlinks not classified as nofollow." + }, + "nofollow_backlinks": { + "type": "integer", + "description": "Number of backlinks classified as nofollow." + }, + "first_seen": { + "type": "string", + "description": "Date of the earliest backlink with this anchor text in the index (YYYY-MM-DD)." + }, + "last_visited": { + "type": "string", + "description": "Last date the backlink with this anchor text was seen (YYYY-MM-DD)." + } + } + } + } + } + }, + "example": { + "anchors": [ + { + "anchor": "SE Ranking", + "backlinks": 1844, + "refdomains": 445, + "dofollow_backlinks": 1595, + "nofollow_backlinks": 249, + "first_seen": "2016-12-07", + "last_visited": "2023-10-19" + }, + { + "anchor": "social listening", + "backlinks": 1542, + "refdomains": 7, + "dofollow_backlinks": 1542, + "nofollow_backlinks": 0, + "first_seen": "2020-04-30", + "last_visited": "2022-04-01" + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "POST", + "source": "curl -X POST 'https://api.seranking.com/v1/backlinks/anchors?output=json' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"target\": \"https://www.seranking.com/\",\n \"order_by\": \"backlinks\",\n \"mode\": \"domain\",\n \"limit\": 2\n}'" + } + ] } }, "/v1/backlinks/refdomains": { "get": { "operationId": "getBacklinksRefdomains", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "refdomains", - "description": "Retrieves a list of referring domains pointing to a single target, with sorting options.", + "summary": "List referring domains", + "description": "Returns information about referring domains pointing to a target. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 1 credit per refdomain\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#refdomains" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "https://seranking.com" + } }, { "name": "mode", "in": "query", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL.", "schema": { "type": "string", - "enum": [ - "domain", - "host", - "url" - ], "default": "host" - }, - "example": "domain" + } }, { "name": "order_by", "in": "query", + "description": "Field by which results are sorted:\n• `new_lost_date` – returns most recent referring domains first.\n• `domain_inlink_rank` – returns referring domains with the highest Domain InLink Rank first.\n• `inlink_rank` – returns referring domains with the highest InLink Rank first.", "schema": { "type": "string", - "enum": [ - "date_found", - "domain_inlink_rank", - "inlink_rank" - ], "default": "date_found" - }, - "example": "date_found" + } }, { "name": "limit", "in": "query", + "description": "Maximum number of results to return. Must be within the range: `[1, 10,000]`.", "schema": { - "type": "integer" - }, - "example": 10 + "type": "integer", + "default": 100 + } }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { "type": "string", - "enum": [ - "json", - "xml" - ], "default": "json" - }, - "example": "json" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "refdomains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "refdomain": { + "type": "string", + "description": "Name of the referring domain." + }, + "backlinks": { + "type": "integer", + "description": "Number of live backlinks linking to the target from this referring domain." + }, + "dofollow_backlinks": { + "type": "integer", + "description": "Number of backlinks classified as dofollow." + }, + "first_seen": { + "type": "string", + "description": "Date the oldest live backlink from this referring domain was found (YYYY-MM-DD)." + }, + "domain_inlink_rank": { + "type": "integer", + "description": "Domain Authority of the referring domain." + } + } + } + } + } + }, + "example": { + "refdomains": [ + { + "refdomain": "daveyandkrista.com", + "backlinks": 1, + "dofollow_backlinks": 1, + "first_seen": "2022-06-30", + "domain_inlink_rank": 73 + }, + { + "refdomain": "isearch.avg.com", + "backlinks": 72, + "dofollow_backlinks": 72, + "first_seen": "2019-02-22", + "domain_inlink_rank": 90 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "GET", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/refdomains?target=seranking.com&mode=domain&limit=2&order_by=inlink_rank&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] }, "post": { "operationId": "createBacklinksRefdomains", "tags": [ - "backlinks" + "Backlinks" + ], + "summary": "List referring domains", + "description": "Returns information about referring domains pointing to a target. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 1 credit per refdomain\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#refdomains" + }, + "parameters": [ + { + "name": "output", + "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", + "schema": { + "type": "string", + "default": "json" + } + } ], - "summary": "refdomains", - "description": "Retrieves a list of referring domains pointing to a single target, with sorting options.", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "type": "object", - "example": { - "target": "https://www.seranking.com/", - "order_by": "date_found", - "mode": "domain", - "limit": 2 - } + "properties": { + "target": { + "type": "string", + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "mode": { + "type": "string", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL." + }, + "order_by": { + "type": "string", + "description": "Field by which results are sorted:\n• `new_lost_date` – returns most recent referring domains first.\n• `domain_inlink_rank` – returns referring domains with the highest Domain InLink Rank first.\n• `inlink_rank` – returns referring domains with the highest InLink Rank first." + }, + "limit": { + "type": "integer", + "description": "Maximum number of results to return. Must be within the range: `[1, 10,000]`." + } + }, + "required": [ + "target" + ] + }, + "example": { + "target": "seranking.com", + "mode": "domain", + "limit": 2 } } } }, - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "output", - "in": "query", - "schema": { - "type": "string" - }, - "example": "json" - } - ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "refdomains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "refdomain": { + "type": "string", + "description": "Name of the referring domain." + }, + "backlinks": { + "type": "integer", + "description": "Number of live backlinks linking to the target from this referring domain." + }, + "dofollow_backlinks": { + "type": "integer", + "description": "Number of backlinks classified as dofollow." + }, + "first_seen": { + "type": "string", + "description": "Date the oldest live backlink from this referring domain was found (YYYY-MM-DD)." + }, + "domain_inlink_rank": { + "type": "integer", + "description": "Domain Authority of the referring domain." + } + } + } + } + } + }, + "example": { + "refdomains": [ + { + "refdomain": "daveyandkrista.com", + "backlinks": 1, + "dofollow_backlinks": 1, + "first_seen": "2022-06-30", + "domain_inlink_rank": 73 + }, + { + "refdomain": "isearch.avg.com", + "backlinks": 72, + "dofollow_backlinks": 72, + "first_seen": "2019-02-22", + "domain_inlink_rank": 90 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "POST", + "source": "curl -X POST 'https://api.seranking.com/v1/backlinks/refdomains?output=json' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"target\":\"seranking.com\",\n \"mode\":\"domain\",\n \"limit\":2\n}'" + } + ] } }, "/v1/backlinks/refdomains/count": { "get": { "operationId": "getBacklinksRefdomainsCount", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "refdomains/count", - "description": "Returns the total number of unique referring domains for one or more targets.", + "summary": "Get total referring domains count", + "description": "Returns the number of unique domains linking to a target. This endpoint supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format).\n\n**Cost:** 2 credits per target\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#refdomains-count" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`).", "schema": { - "type": "string", - "description": "Supports multiple targets by repeating this parameter." - }, - "example": "https://seranking.com" + "type": "string" + } }, { "name": "mode", "in": "query", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL.", "schema": { - "type": "string" - }, - "example": "domain" + "type": "string", + "default": "host" + } }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { - "type": "string" - }, - "example": "json" + "type": "string", + "default": "json" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "metrics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "target": { + "type": "string", + "description": "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "refdomains": { + "type": "integer", + "description": "Number of unique domains linking to the target." + } + } + } + } + } + }, + "example": { + "metrics": [ + { + "target": "seranking.com", + "refdomains": 50234 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "GET (multiple targets)", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/refdomains/count?target=https://www.seranking.com&target=https://www.seranking.com&mode=url&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] }, "post": { "operationId": "createBacklinksRefdomainsCount", "tags": [ - "backlinks" + "Backlinks" + ], + "summary": "Get total referring domains count", + "description": "Returns the number of unique domains linking to a target. This endpoint supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format).\n\n**Cost:** 2 credits per target\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#refdomains-count" + }, + "parameters": [ + { + "name": "output", + "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", + "schema": { + "type": "string", + "default": "json" + } + } ], - "summary": "refdomains/count", - "description": "Returns the total number of unique referring domains for one or more targets.", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "type": "object", - "example": { - "target": [ - "https://www.seranking.com/", - "https://www.anandaioga.com/" - ], - "order_by": "date_found", - "mode": "domain", - "limit": 2 - } + "properties": { + "target": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "mode": { + "type": "string", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL." + } + }, + "required": [ + "target" + ] + }, + "example": { + "target": [ + "https://www.seranking.com/" + ], + "mode": "domain" } } } }, - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "output", - "in": "query", - "schema": { - "type": "string" - }, - "example": "json" - } - ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "metrics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "target": { + "type": "string", + "description": "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "refdomains": { + "type": "integer", + "description": "Number of unique domains linking to the target." + } + } + } + } + } + }, + "example": { + "metrics": [ + { + "target": "seranking.com", + "refdomains": 50234 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "POST (single target)", + "source": "curl -X POST 'https://api.seranking.com/v1/backlinks/refdomains/count?output=json' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"target\": [\n \"https://www.seranking.com/\"\n ],\n \"mode\": \"domain\"\n}'" + } + ] } }, "/v1/backlinks/refdomains/history": { "get": { "operationId": "getBacklinksRefdomainsHistory", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "refdomains/history", - "description": "Retrieves a list of new and lost referring domains for a target within a specified date range.", + "summary": "List new and lost referring domains", + "description": "Returns referring domains for which at least one backlink was newly found or lost in the given date range for a target. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 1 credit per refdomain\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#refdomains-history" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "https://seranking.com" + } }, { "name": "mode", "in": "query", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL.", "schema": { - "type": "string" - }, - "example": "domain" + "type": "string", + "default": "host" + } }, { "name": "new_lost_type", "in": "query", + "description": "Refdomain status filter:\n• `new` – returns referring domains from which at least one backlink was newly found.\n• `lost` – returns referring domains from which at least one backlink was lost.\n\nIf empty, both are returned.", "schema": { - "type": "string" - }, - "example": "new" + "type": "string", + "default": "“”" + } }, { "name": "date_from", "in": "query", + "description": "Start date (`YYYY-MM-DD`), inclusive.", "schema": { - "type": "string" - }, - "example": "2025-03-01" + "type": "string", + "default": "yesterday" + } }, { "name": "date_to", "in": "query", + "description": "End date (`YYYY-MM-DD`), inclusive.", "schema": { - "type": "string" - }, - "example": "2025-06-01" + "type": "string", + "default": "today" + } }, { "name": "order_by", "in": "query", + "description": "Field by which results are sorted:\n• `new_lost_date` – returns new or lost referring domains ordered by the date they were found or lost (most recent first).\n• `domain_inlink_rank` – returns referring domains with the highest Domain InLink Rank first.\n• `inlink_rank` – returns referring domains with the highest InLink Rank first.", "schema": { - "type": "string" - }, - "example": "new_lost_date" + "type": "string", + "default": "new_lost_date" + } }, { "name": "limit", "in": "query", + "description": "Maximum number of results to return. Must be within the range: `[1, 10,000]`.", "schema": { - "type": "integer" - }, - "example": 10 + "type": "integer", + "default": 100 + } }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { - "type": "string" - }, - "example": "json" + "type": "string", + "default": "json" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "new_lost_refdomains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "new_lost_date": { + "type": "string", + "description": "Date when the oldest live backlink from this referring domain was found, or the last backlink from this referring domain was lost (YYYY-MM-DD)." + }, + "new_lost_type": { + "type": "string", + "description": "Refdomain status:\n• `new` – referring domains with at least one backlink newly found.\n• `lost` – referring domains with at least one backlink lost." + }, + "refdomain": { + "type": "string", + "description": "Name of the referring domain." + }, + "backlinks": { + "type": "integer", + "description": "Number of backlinks linking to the target from this refdomain." + }, + "dofollow_backlinks": { + "type": "integer", + "description": "Number of backlinks from this referring domain classified as dofollow." + }, + "first_seen": { + "type": "string", + "description": "Date the oldest live backlink from this refdomain was found (YYYY-MM-DD)." + }, + "domain_inlink_rank": { + "type": "integer", + "description": "Domain Authority of the referring domain." + } + } + } + } + } + }, + "example": { + "new_lost_refdomains": [ + { + "new_lost_date": "2023-01-16", + "new_lost_type": "new", + "refdomain": "agenzia-seo.it", + "backlinks": 1, + "dofollow_backlinks": 1, + "first_seen": "2023-01-16", + "domain_inlink_rank": 32 + }, + { + "new_lost_date": "2023-01-15", + "new_lost_type": "lost", + "refdomain": "doso.com.au", + "backlinks": 1, + "dofollow_backlinks": 1, + "first_seen": "2023-01-15", + "domain_inlink_rank": 25 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "GET", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/refdomains/history?target=https://www.seranking.com&mode=domain&new_lost_type=new&date_from=2023-01-15&date_to=2023-01-16&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] }, "post": { "operationId": "createBacklinksRefdomainsHistory", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "refdomains/history", - "description": "Retrieves a list of new and lost referring domains for a target within a specified date range.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "target": "https://www.seranking.com", - "mode": "domain", - "new_lost_type": "new", - "date_from": "2025-01-15", - "date_to": "2025-04-16" - } - } - } - } + "summary": "List new and lost referring domains", + "description": "Returns referring domains for which at least one backlink was newly found or lost in the given date range for a target. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 1 credit per refdomain\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#refdomains-history" }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { - "type": "string" - }, - "example": "json" - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "type": "string", + "default": "json" } } - } - } - }, - "/v1/backlinks/refdomains/history/count": { - "get": { - "operationId": "getBacklinksRefdomainsHistoryCount", - "tags": [ - "backlinks" ], - "summary": "refdomains/history/count", - "description": "Returns the daily count of new and lost referring domains for a target over a specified period.", - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "target": { + "type": "string", + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "mode": { + "type": "string", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL." + }, + "new_lost_type": { + "type": "string", + "description": "Refdomain status filter:\n• `new` – returns referring domains from which at least one backlink was newly found.\n• `lost` – returns referring domains from which at least one backlink was lost.\n\nIf empty, both are returned." + }, + "date_from": { + "type": "string", + "description": "Start date (`YYYY-MM-DD`), inclusive." + }, + "date_to": { + "type": "string", + "description": "End date (`YYYY-MM-DD`), inclusive." + }, + "order_by": { + "type": "string", + "description": "Field by which results are sorted:\n• `new_lost_date` – returns new or lost referring domains ordered by the date they were found or lost (most recent first).\n• `domain_inlink_rank` – returns referring domains with the highest Domain InLink Rank first.\n• `inlink_rank` – returns referring domains with the highest InLink Rank first." + }, + "limit": { + "type": "integer", + "description": "Maximum number of results to return. Must be within the range: `[1, 10,000]`." + } + }, + "required": [ + "target" + ] + }, + "example": { + "target": "https://www.seranking.com", + "mode": "domain", + "new_lost_type": "new", + "date_from": "2023-01-15", + "date_to": "2023-01-16" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "new_lost_refdomains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "new_lost_date": { + "type": "string", + "description": "Date when the oldest live backlink from this referring domain was found, or the last backlink from this referring domain was lost (YYYY-MM-DD)." + }, + "new_lost_type": { + "type": "string", + "description": "Refdomain status:\n• `new` – referring domains with at least one backlink newly found.\n• `lost` – referring domains with at least one backlink lost." + }, + "refdomain": { + "type": "string", + "description": "Name of the referring domain." + }, + "backlinks": { + "type": "integer", + "description": "Number of backlinks linking to the target from this refdomain." + }, + "dofollow_backlinks": { + "type": "integer", + "description": "Number of backlinks from this referring domain classified as dofollow." + }, + "first_seen": { + "type": "string", + "description": "Date the oldest live backlink from this refdomain was found (YYYY-MM-DD)." + }, + "domain_inlink_rank": { + "type": "integer", + "description": "Domain Authority of the referring domain." + } + } + } + } + } + }, + "example": { + "new_lost_refdomains": [ + { + "new_lost_date": "2023-01-16", + "new_lost_type": "new", + "refdomain": "agenzia-seo.it", + "backlinks": 1, + "dofollow_backlinks": 1, + "first_seen": "2023-01-16", + "domain_inlink_rank": 32 + }, + { + "new_lost_date": "2023-01-15", + "new_lost_type": "lost", + "refdomain": "doso.com.au", + "backlinks": 1, + "dofollow_backlinks": 1, + "first_seen": "2023-01-15", + "domain_inlink_rank": 25 + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "POST", + "source": "curl -X POST 'https://api.seranking.com/v1/backlinks/refdomains/history?output=json' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"target\": \"https://www.seranking.com\",\n \"mode\": \"domain\",\n \"new_lost_type\": \"new\",\n \"date_from\": \"2023-01-15\",\n \"date_to\": \"2023-01-16\"\n}'" + } + ] + } + }, + "/v1/backlinks/refdomains/history/count": { + "get": { + "operationId": "getBacklinksRefdomainsHistoryCount", + "tags": [ + "Backlinks" + ], + "summary": "Get daily count of new and lost referring domains", + "description": "Returns the number of referring domains with at least one backlink newly found or lost in the given date range for a target. The data is broken down by day. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 10 credits per target + 1 credit per date point returned\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#refdomains-history-count" + }, + "parameters": [ { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "https://seranking.com" + } }, { "name": "mode", "in": "query", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL.", "schema": { - "type": "string" - }, - "example": "domain" + "type": "string", + "default": "host" + } }, { "name": "new_lost_type", "in": "query", + "description": "Refdomain status filter:\n• `new` – returns referring domains from which at least one backlink was newly found.\n• `lost` – returns referring domains from which at least one backlink was lost.\n\nIf empty, both are returned.", "schema": { - "type": "string" - }, - "example": "new" + "type": "string", + "default": "“”" + } }, { "name": "date_from", "in": "query", + "description": "Start date (`YYYY-MM-DD`), inclusive.", "schema": { - "type": "string" - }, - "example": "2025-03-01" + "type": "string", + "default": "yesterday" + } }, { "name": "date_to", "in": "query", + "description": "End date (`YYYY-MM-DD`), inclusive.", "schema": { - "type": "string" - }, - "example": "2025-06-01" + "type": "string", + "default": "today" + } }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { - "type": "string" - }, - "example": "json" + "type": "string", + "default": "json" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "new_lost_refdomains_count": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Date for which new or lost referring domains were counted (`YYYY-MM-DD`)." + }, + "new": { + "type": "integer", + "description": "Number of new referring domains on this date matching the request filters." + }, + "lost": { + "type": "integer", + "description": "Number of lost referring domains on this date matching the request filters." + } + } + } + } + } + }, + "example": { + "new_lost_refdomains_count": [ + { + "date": "2023-01-16", + "new": 4, + "lost": 0 + }, + { + "date": "2023-01-15", + "new": 3, + "lost": 0 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "GET", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/refdomains/history/count?target=https://www.seranking.com&mode=domain&new_lost_type=new&date_from=2023-01-15&date_to=2023-01-16&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] }, "post": { "operationId": "createBacklinksRefdomainsHistoryCount", "tags": [ - "backlinks" + "Backlinks" + ], + "summary": "Get daily count of new and lost referring domains", + "description": "Returns the number of referring domains with at least one backlink newly found or lost in the given date range for a target. The data is broken down by day. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 10 credits per target + 1 credit per date point returned\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#refdomains-history-count" + }, + "parameters": [ + { + "name": "output", + "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", + "schema": { + "type": "string", + "default": "json" + } + } ], - "summary": "refdomains/history/count", - "description": "Returns the daily count of new and lost referring domains for a target over a specified period.", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "type": "object", - "example": { - "target": "https://www.seranking.com", - "mode": "domain", - "new_lost_type": "new", - "date_from": "2025-01-15", - "date_to": "2025-04-16" - } + "properties": { + "target": { + "type": "string", + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "mode": { + "type": "string", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL." + }, + "new_lost_type": { + "type": "string", + "description": "Refdomain status filter:\n• `new` – returns referring domains from which at least one backlink was newly found.\n• `lost` – returns referring domains from which at least one backlink was lost.\n\nIf empty, both are returned." + }, + "date_from": { + "type": "string", + "description": "Start date (`YYYY-MM-DD`), inclusive." + }, + "date_to": { + "type": "string", + "description": "End date (`YYYY-MM-DD`), inclusive." + } + }, + "required": [ + "target" + ] + }, + "example": { + "target": "https://www.seranking.com", + "mode": "domain", + "new_lost_type": "new", + "date_from": "2023-01-15", + "date_to": "2023-01-16" } } } }, - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "output", - "in": "query", - "schema": { - "type": "string" - }, - "example": "json" - } - ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "new_lost_refdomains_count": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Date for which new or lost referring domains were counted (`YYYY-MM-DD`)." + }, + "new": { + "type": "integer", + "description": "Number of new referring domains on this date matching the request filters." + }, + "lost": { + "type": "integer", + "description": "Number of lost referring domains on this date matching the request filters." + } + } + } + } + } + }, + "example": { + "new_lost_refdomains_count": [ + { + "date": "2023-01-16", + "new": 4, + "lost": 0 + }, + { + "date": "2023-01-15", + "new": 3, + "lost": 0 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "POST", + "source": "curl -X POST 'https://api.seranking.com/v1/backlinks/refdomains/history/count?output=json' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"target\": \"https://www.seranking.com\",\n \"mode\": \"domain\",\n \"new_lost_type\": \"new\",\n \"date_from\": \"2023-01-15\",\n \"date_to\": \"2023-01-16\"\n}'" + } + ] } }, "/v1/backlinks/referring-ips": { "get": { "operationId": "getBacklinksReferringIps", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "referring-ips", - "description": "Returns information about the IPv4 addresses that host backlinks pointing to a single target.", + "summary": "List referring IPs", + "description": "Returns information about IPv4 addresses from which backlinks linking to a target originate. IPv6 addresses are not supported. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 1 credit per referring IP\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#referring-ips" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "https://seranking.com" + } }, { "name": "mode", "in": "query", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL.", "schema": { - "type": "string" - }, - "example": "domain" + "type": "string", + "default": "host" + } }, { "name": "order_by", "in": "query", + "description": "Field by which results are sorted (descending):\n• `backlinks` – returns IPs with the highest number of backlinks first.\n• `refdomains` – returns IPs with the highest number of referring domains first.", "schema": { - "type": "string" - }, - "example": "backlinks" + "type": "string", + "default": "backlinks" + } }, { "name": "limit", "in": "query", + "description": "Maximum number of results to return. Must be within the range: `[1, 10,000]`.", "schema": { - "type": "integer" - }, - "example": 10 + "type": "integer", + "default": 100 + } }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { "type": "string", - "enum": [ - "json", - "xml" - ], "default": "json" - }, - "example": "json" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "ips": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ip": { + "type": "string", + "description": "IPv4 address that serves at least one page linking to the target." + }, + "backlinks": { + "type": "integer", + "description": "Number of live backlinks linking to the target from this IP (> 0)." + }, + "refdomains": { + "type": "integer", + "description": "Number of referring domains linking to the target from this IP (> 0)." + }, + "first_seen": { + "type": "string", + "description": "Date the earliest backlink from this IP was found (YYYY-MM-DD)." + }, + "last_visited": { + "type": "string", + "description": "Date the most recent backlink from this IP was last seen (YYYY-MM-DD)." + } + } + } + } + } + }, + "example": { + "ips": [ + { + "ip": "123.234.23.43", + "backlinks": 188, + "refdomains": 144, + "first_seen": "2020-10-19", + "last_visited": "2022-03-15" + }, + { + "ip": "32.114.53.3", + "backlinks": 68, + "refdomains": 60, + "first_seen": "2019-04-24", + "last_visited": "2022-02-21" + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "GET", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/referring-ips?target=https://seranking.com&mode=domain&limit=100&order_by=backlinks&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] }, "post": { "operationId": "createBacklinksReferringIps", "tags": [ - "backlinks" + "Backlinks" + ], + "summary": "List referring IPs", + "description": "Returns information about IPv4 addresses from which backlinks linking to a target originate. IPv6 addresses are not supported. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 1 credit per referring IP\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#referring-ips" + }, + "parameters": [ + { + "name": "output", + "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", + "schema": { + "type": "string", + "default": "json" + } + } ], - "summary": "referring-ips", - "description": "Returns information about the IPv4 addresses that host backlinks pointing to a single target.", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "type": "object", - "example": { - "target": "https://www.seranking.com/", - "order_by": "refdomains", - "mode": "domain", - "limit": 2 - } + "properties": { + "target": { + "type": "string", + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "mode": { + "type": "string", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL." + }, + "order_by": { + "type": "string", + "description": "Field by which results are sorted (descending):\n• `backlinks` – returns IPs with the highest number of backlinks first.\n• `refdomains` – returns IPs with the highest number of referring domains first." + }, + "limit": { + "type": "integer", + "description": "Maximum number of results to return. Must be within the range: `[1, 10,000]`." + } + }, + "required": [ + "target" + ] + }, + "example": { + "target": "https://www.seranking.com/", + "order_by": "backlinks", + "mode": "domain", + "limit": 2 } } } }, - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "output", - "in": "query", - "schema": { - "type": "string" - }, - "example": "json" - } - ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "ips": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ip": { + "type": "string", + "description": "IPv4 address that serves at least one page linking to the target." + }, + "backlinks": { + "type": "integer", + "description": "Number of live backlinks linking to the target from this IP (> 0)." + }, + "refdomains": { + "type": "integer", + "description": "Number of referring domains linking to the target from this IP (> 0)." + }, + "first_seen": { + "type": "string", + "description": "Date the earliest backlink from this IP was found (YYYY-MM-DD)." + }, + "last_visited": { + "type": "string", + "description": "Date the most recent backlink from this IP was last seen (YYYY-MM-DD)." + } + } + } + } + } + }, + "example": { + "ips": [ + { + "ip": "123.234.23.43", + "backlinks": 188, + "refdomains": 144, + "first_seen": "2020-10-19", + "last_visited": "2022-03-15" + }, + { + "ip": "32.114.53.3", + "backlinks": 68, + "refdomains": 60, + "first_seen": "2019-04-24", + "last_visited": "2022-02-21" + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "POST", + "source": "curl -X POST 'https://api.seranking.com/v1/backlinks/referring-ips?output=json' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"target\": \"https://www.seranking.com/\",\n \"order_by\": \"backlinks\",\n \"mode\": \"domain\",\n \"limit\": 2\n}'" + } + ] } }, "/v1/backlinks/referring-ips/count": { "get": { "operationId": "getBacklinksReferringIpsCount", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "referring-ips/count", - "description": "Returns the total number of unique referring IPs for one or more targets.", + "summary": "Get total referring IPs count", + "description": "Returns the number of unique IPs linking to a target. This endpoint supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format).\n\n**Cost:** 2 credits per target\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#referring-ips-count" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`).", "schema": { - "type": "string", - "description": "Supports multiple targets by repeating this parameter." - }, - "example": "https://seranking.com" + "type": "string" + } }, { "name": "mode", "in": "query", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL.", "schema": { - "type": "string" - }, - "example": "domain" + "type": "string", + "default": "host" + } }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { - "type": "string" - }, - "example": "json" + "type": "string", + "default": "json" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "metrics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "target": { + "type": "string", + "description": "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "ips": { + "type": "integer", + "description": "Number of unique IP addresses linking to the target." + } + } + } + } + } + }, + "example": { + "metrics": [ + { + "target": "https://seranking.com", + "ips": 75 + }, + { + "target": "https://www.us-seranking.com", + "ips": 2493 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "GET (multiple targets)", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/referring-ips/count?target=https://seranking.com&target=https://www.us-seranking.com&mode=url&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] }, "post": { "operationId": "createBacklinksReferringIpsCount", "tags": [ - "backlinks" + "Backlinks" + ], + "summary": "Get total referring IPs count", + "description": "Returns the number of unique IPs linking to a target. This endpoint supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format).\n\n**Cost:** 2 credits per target\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#referring-ips-count" + }, + "parameters": [ + { + "name": "output", + "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", + "schema": { + "type": "string", + "default": "json" + } + } ], - "summary": "referring-ips/count", - "description": "Returns the total number of unique referring IPs for one or more targets.", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "type": "object", - "example": { - "target": [ - "https://www.seranking.com/", - "https://www.us-seranking.com/" - ], - "mode": "host" - } + "properties": { + "target": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "mode": { + "type": "string", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL." + } + }, + "required": [ + "target" + ] + }, + "example": { + "target": [ + "https://www.seranking.com/", + "https://www.us-seranking.com/" + ], + "mode": "host" } } } }, - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "output", - "in": "query", - "schema": { - "type": "string" - }, - "example": "json" - } - ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "metrics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "target": { + "type": "string", + "description": "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "ips": { + "type": "integer", + "description": "Number of unique IP addresses linking to the target." + } + } + } + } + } + }, + "example": { + "metrics": [ + { + "target": "https://seranking.com", + "ips": 75 + }, + { + "target": "https://www.us-seranking.com", + "ips": 2493 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "POST (multiple targets)", + "source": "curl -X POST 'https://api.seranking.com/v1/backlinks/referring-ips/count?output=json' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"target\": [\n \"https://www.seranking.com/\",\n \"https://www.us-seranking.com/\"\n ],\n \"mode\": \"host\"\n}'" + } + ] } }, "/v1/backlinks/referring-subnets/count": { "get": { "operationId": "getBacklinksReferringSubnetsCount", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "referring-subnets/count", - "description": "Returns the total number of unique referring subnets (C-blocks) for one or more targets.", + "summary": "Get total referring subnets count", + "description": "Returns the number of unique subnets (C-blocks) linking to a target. This endpoint supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format).\n\n**Cost:** 2 credits per target\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#referring-subnets-count" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`).", "schema": { - "type": "string", - "description": "Supports multiple targets by repeating this parameter." - }, - "example": "https://seranking.com" + "type": "string" + } }, { "name": "mode", "in": "query", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL.", "schema": { - "type": "string" - }, - "example": "domain" + "type": "string", + "default": "host" + } }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { - "type": "string" - }, - "example": "json" + "type": "string", + "default": "json" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "metrics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "target": { + "type": "string", + "description": "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "subnets": { + "type": "integer", + "description": "Number of unique subnets (C-blocks) linking to the target (e.g., `50`)." + } + } + } + } + } + }, + "example": { + "metrics": [ + { + "target": "seranking.com", + "subnets": 1399 + }, + { + "target": "us-seranking.com", + "subnets": 7690 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "GET (multiple targets)", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/referring-subnets/count?target=seranking.com&target=us-seranking.com&mode=host&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] }, "post": { "operationId": "createBacklinksReferringSubnetsCount", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "referring-subnets/count", - "description": "Returns the total number of unique referring subnets (C-blocks) for one or more targets.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "target": [ - "https://www.seranking.com/", - "https://www.us-seranking.com/" - ], - "mode": "host" - } - } - } - } + "summary": "Get total referring subnets count", + "description": "Returns the number of unique subnets (C-blocks) linking to a target. This endpoint supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format).\n\n**Cost:** 2 credits per target\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#referring-subnets-count" }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { - "type": "string" - }, - "example": "json" + "type": "string", + "default": "json" + } } ], - "responses": { + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "target": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "mode": { + "type": "string", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL." + } + }, + "required": [ + "target" + ] + }, + "example": { + "target": [ + "https://www.seranking.com/", + "https://www.us-seranking.com/" + ], + "mode": "host" + } + } + } + }, + "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "metrics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "target": { + "type": "string", + "description": "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "subnets": { + "type": "integer", + "description": "Number of unique subnets (C-blocks) linking to the target (e.g., `50`)." + } + } + } + } + } + }, + "example": { + "metrics": [ + { + "target": "seranking.com", + "subnets": 1399 + }, + { + "target": "us-seranking.com", + "subnets": 7690 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "GET (multiple targets)", + "source": "curl -X POST 'https://api.seranking.com/v1/backlinks/referring-subnets/count?output=json' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"target\": [\n \"https://www.seranking.com/\",\n \"https://www.us-seranking.com/\"\n ],\n \"mode\": \"host\"\n}'" + } + ] } }, "/v1/backlinks/indexed-pages": { "get": { "operationId": "getBacklinksIndexedPages", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "indexed-pages", - "description": "Retrieves a list of pages on a target site that have received at least one backlink.", + "summary": "List indexed pages with backlinks", + "description": "Returns information about pages that belong to a target under the following conditions:\n\n- A page is included if it has at least one live backlink.\n\n- Pages that no longer have backlinks are excluded.\n\nThe returned list contains no duplicate pages, with protocol differences taken into account when determining page uniqueness. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 1 credit per site page\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#indexed-pages" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "https://seranking.com" + } }, { "name": "mode", "in": "query", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL.", "schema": { "type": "string", - "enum": [ - "domain", - "host", - "url" - ], "default": "host" - }, - "example": "domain" + } }, { - "name": "output", + "name": "order_by", "in": "query", + "description": "Field by which results are sorted (descending):\n• `backlinks` – returns pages with the highest number of backlinks first.\n• `refdomains` – returns pages with the highest number of referring domains first.", "schema": { "type": "string", - "enum": [ - "json", - "xml" - ], - "default": "json" - }, - "example": "json" + "default": "backlinks" + } }, { "name": "limit", "in": "query", + "description": "Maximum number of results to return. Must be within the range: `[1, 10,000]`.", "schema": { - "type": "integer" - }, - "example": 10 + "type": "integer", + "default": 100 + } }, { - "name": "order_by", + "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { - "type": "string" - }, - "example": "backlinks" + "type": "string", + "default": "json" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "pages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL of a page that belongs to the target specified in the request." + }, + "backlinks": { + "type": "integer", + "description": "Number of live backlinks linking to the URL (> 0)." + }, + "refdomains": { + "type": "integer", + "description": "Number of referring domains linking to the URL (> 0)." + }, + "dofollow_backlinks": { + "type": "integer", + "description": "Number of backlinks classified as dofollow." + }, + "nofollow_backlinks": { + "type": "integer", + "description": "Number of backlinks classified as nofollow." + }, + "first_seen": { + "type": "string", + "description": "Date the earliest backlink pointing to the URL was found (YYYY-MM-DD)." + }, + "last_visited": { + "type": "string", + "description": "Date the most recent backlink pointing to the URL was last seen (YYYY-MM-DD)." + } + } + } + } + } + }, + "example": { + "pages": [ + { + "url": "https://www.seranking.com/", + "backlinks": 16696, + "refdomains": 1227, + "dofollow_backlinks": 14708, + "nofollow_backlinks": 1978, + "first_seen": "2017-01-03", + "last_visited": "2023-10-23" + }, + { + "url": "http://seranking.com/", + "backlinks": 1926, + "refdomains": 220, + "dofollow_backlinks": 1254, + "nofollow_backlinks": 671, + "first_seen": "2017-09-15", + "last_visited": "2023-10-21" + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "GET", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/indexed-pages?target=https://seranking.com&mode=domain&limit=100&order_by=backlinks&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] }, "post": { "operationId": "createBacklinksIndexedPages", "tags": [ - "backlinks" + "Backlinks" + ], + "summary": "List indexed pages with backlinks", + "description": "Returns information about pages that belong to a target under the following conditions:\n\n- A page is included if it has at least one live backlink.\n\n- Pages that no longer have backlinks are excluded.\n\nThe returned list contains no duplicate pages, with protocol differences taken into account when determining page uniqueness. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 1 credit per site page\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#indexed-pages" + }, + "parameters": [ + { + "name": "output", + "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", + "schema": { + "type": "string", + "default": "json" + } + } ], - "summary": "indexed-pages", - "description": "Retrieves a list of pages on a target site that have received at least one backlink.", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "type": "object", - "example": { - "target": "https://www.seranking.com/", - "order_by": "backlinks", - "mode": "domain", - "limit": 2 - } + "properties": { + "target": { + "type": "string", + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + }, + "mode": { + "type": "string", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL." + }, + "order_by": { + "type": "string", + "description": "Field by which results are sorted (descending):\n• `backlinks` – returns pages with the highest number of backlinks first.\n• `refdomains` – returns pages with the highest number of referring domains first." + }, + "limit": { + "type": "integer", + "description": "Maximum number of results to return. Must be within the range: `[1, 10,000]`." + } + }, + "required": [ + "target" + ] + }, + "example": { + "target": "https://www.seranking.com/", + "order_by": "backlinks", + "mode": "domain", + "limit": 2 } } } }, - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "output", - "in": "query", - "schema": { - "type": "string" - }, - "example": "json" - } - ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "pages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL of a page that belongs to the target specified in the request." + }, + "backlinks": { + "type": "integer", + "description": "Number of live backlinks linking to the URL (> 0)." + }, + "refdomains": { + "type": "integer", + "description": "Number of referring domains linking to the URL (> 0)." + }, + "dofollow_backlinks": { + "type": "integer", + "description": "Number of backlinks classified as dofollow." + }, + "nofollow_backlinks": { + "type": "integer", + "description": "Number of backlinks classified as nofollow." + }, + "first_seen": { + "type": "string", + "description": "Date the earliest backlink pointing to the URL was found (YYYY-MM-DD)." + }, + "last_visited": { + "type": "string", + "description": "Date the most recent backlink pointing to the URL was last seen (YYYY-MM-DD)." + } + } + } + } + } + }, + "example": { + "pages": [ + { + "url": "https://www.seranking.com/", + "backlinks": 16696, + "refdomains": 1227, + "dofollow_backlinks": 14708, + "nofollow_backlinks": 1978, + "first_seen": "2017-01-03", + "last_visited": "2023-10-23" + }, + { + "url": "http://seranking.com/", + "backlinks": 1926, + "refdomains": 220, + "dofollow_backlinks": 1254, + "nofollow_backlinks": 671, + "first_seen": "2017-09-15", + "last_visited": "2023-10-21" + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "POST", + "source": "curl -X POST 'https://api.seranking.com/v1/backlinks/indexed-pages?output=json' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"target\": \"https://www.seranking.com/\",\n \"order_by\": \"backlinks\",\n \"mode\": \"domain\",\n \"limit\": 2\n}'" + } + ] } }, "/v1/backlinks/authority": { "get": { "operationId": "getBacklinksAuthority", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "authority", - "description": "Returns the Page Authority (InLink Rank) and Domain Authority (Domain InLink Rank) for one or more targets.", + "summary": "Get page and domain authority", + "description": "Returns the InLink Rank (Page Authority) and Domain InLink Rank (Domain Authority) for a target. This endpoint supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format).\n\n**Note:** The `inlink_rank` value in the response is calculated in real time, so it may differ from the cached value returned by [List all backlinks](https://seranking.com/api/data/backlinks#all).\n\n**Cost:** 10 credits per target\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#authority" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, subdomain, or specific URL (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "https://seranking.com" + } }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { - "type": "string" - }, - "example": "json" + "type": "string", + "default": "json" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "pages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL of the analyzed page." + }, + "inlink_rank": { + "type": "integer", + "description": "Page Authority of the target URL." + }, + "domain_inlink_rank": { + "type": "integer", + "description": "Domain Authority of the target’s root domain." + } + } + } + } + } + }, + "example": { + "pages": [ + { + "url": "https://www.seranking.com", + "inlink_rank": 40, + "domain_inlink_rank": 68 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "GET (single target)", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/authority?target=https://www.seranking.com&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] }, "post": { "operationId": "createBacklinksAuthority", "tags": [ - "backlinks" + "Backlinks" + ], + "summary": "Get page and domain authority", + "description": "Returns the InLink Rank (Page Authority) and Domain InLink Rank (Domain Authority) for a target. This endpoint supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format).\n\n**Note:** The `inlink_rank` value in the response is calculated in real time, so it may differ from the cached value returned by [List all backlinks](https://seranking.com/api/data/backlinks#all).\n\n**Cost:** 10 credits per target\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#authority" + }, + "parameters": [ + { + "name": "output", + "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", + "schema": { + "type": "string", + "default": "json" + } + } ], - "summary": "authority", - "description": "Returns the Page Authority (InLink Rank) and Domain Authority (Domain InLink Rank) for one or more targets.", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "type": "object", - "example": { - "target": [ - "https://www.seranking.com/", - "https://www.seranking.com/rank-tracker/" - ] - } + "properties": { + "target": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Target to analyze: root domain, subdomain, or specific URL (e.g., `seranking.com`)." + } + }, + "required": [ + "target" + ] + }, + "example": { + "target": [ + "https://www.seranking.com/", + "https://www.seranking.com/rank-tracker/" + ] } } } }, - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "output", - "in": "query", - "schema": { - "type": "string" - }, - "example": "json" - } - ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "pages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL of the analyzed page." + }, + "inlink_rank": { + "type": "integer", + "description": "Page Authority of the target URL." + }, + "domain_inlink_rank": { + "type": "integer", + "description": "Domain Authority of the target’s root domain." + } + } + } + } + } + }, + "example": { + "pages": [ + { + "url": "https://www.seranking.com", + "inlink_rank": 40, + "domain_inlink_rank": 68 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "POST (multiple targets)", + "source": "curl -X POST 'https://api.seranking.com/v1/backlinks/authority?output=json' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"target\":\n [ \n \"https://www.seranking.com/\", \n \"https://www.seranking.com/rank-tracker/\" \n ]\n}'" + } + ] } }, "/v1/backlinks/authority/domain": { "get": { "operationId": "getBacklinksAuthorityDomain", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "authority/domain", - "description": "Returns the Domain Authority (Domain InLink Rank) for one or more targets.", + "summary": "Get domain authority", + "description": "Returns the [Domain InLink Rank](https://seranking.com/api/data/reference/#domain-inlink-rank) value of the target page’s root domain. This endpoint supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format).\n\n**Cost:** 5 credits per target\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#authority-domain" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "https://seranking.com" + } }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { - "type": "string" - }, - "example": "json" + "type": "string", + "default": "json" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "pages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL of the analyzed page." + }, + "domain_inlink_rank": { + "type": "integer", + "description": "Domain Authority of the target’s root domain." + } + } + } + } + } + }, + "example": { + "pages": [ + { + "url": "https://seranking.com", + "domain_inlink_rank": 68 + }, + { + "url": "https://www.seranking.com", + "domain_inlink_rank": 87 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "GET (multiple targets)", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/authority/domain?target=https://seranking.com&target=https://www.seranking.com&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] }, "post": { "operationId": "createBacklinksAuthorityDomain", "tags": [ - "backlinks" + "Backlinks" + ], + "summary": "Get domain authority", + "description": "Returns the [Domain InLink Rank](https://seranking.com/api/data/reference/#domain-inlink-rank) value of the target page’s root domain. This endpoint supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format).\n\n**Cost:** 5 credits per target\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#authority-domain" + }, + "parameters": [ + { + "name": "output", + "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", + "schema": { + "type": "string", + "default": "json" + } + } ], - "summary": "authority/domain", - "description": "Returns the Domain Authority (Domain InLink Rank) for one or more targets.", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "type": "object", - "example": { - "target": [ - "https://www.seranking.com/", - "https://www.seranking.com/rank-tracker/" - ] - } + "properties": { + "target": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + } + }, + "required": [ + "target" + ] + }, + "example": { + "target": [ + "https://seranking.com/", + "https://www.seranking.com/rank-tracker/" + ] } } } }, - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "output", - "in": "query", - "schema": { - "type": "string" - }, - "example": "json" - } - ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "pages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL of the analyzed page." + }, + "domain_inlink_rank": { + "type": "integer", + "description": "Domain Authority of the target’s root domain." + } + } + } + } + } + }, + "example": { + "pages": [ + { + "url": "https://seranking.com", + "domain_inlink_rank": 68 + }, + { + "url": "https://www.seranking.com", + "domain_inlink_rank": 87 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "POST (multiple targets)", + "source": "curl -X POST 'https://api.seranking.com/v1/backlinks/authority/domain?output=json' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"target\": [\n \"https://seranking.com/\",\n \"https://www.seranking.com/rank-tracker/\"\n ]\n}'" + } + ] } }, "/v1/backlinks/authority/domain/distribution": { "get": { "operationId": "getBacklinksAuthorityDomainDistribution", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "authority/domain/distribution", - "description": "Returns the distribution of Domain Authority scores for all domains linking to a single target.", + "summary": "Get domain authority distribution", + "description": "Returns the distribution of [Domain InLink Rank](https://seranking.com/api/data/reference/#domain-inlink-rank) values for domains that link to a target. This endpoint doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 1 credit per domain", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#authority-domain-distribution" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "https://seranking.com" + } }, { "name": "mode", "in": "query", + "description": "Mode of operation:\n• `domain` – analyzes all URLs in the domain, including subdomains.\n• `host` – analyzes all URLs under this host only (subdomains excluded).\n• `url` – analyzes a single, specific URL.", "schema": { "type": "string", - "enum": [ - "domain", - "host", - "url" - ], "default": "host" - }, - "example": "host" + } }, { "name": "histogramMode", "in": "query", + "description": "Mode of aggregation:\n• `domain` – counts base domains per Domain InLink Rank.\n• `host` – counts hosts per Domain InLink Rank.", "schema": { "type": "string", - "enum": [ - "domain", - "host" - ], "default": "host" - }, - "example": "host" + } }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`).", "schema": { - "type": "string" - }, - "example": "json" + "type": "string", + "default": "json" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "histogram": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain_inlink_rank": { + "type": "integer", + "description": "Domain Authority value for which the distribution is calculated." + }, + "refdomains": { + "type": "integer", + "description": "Number of referring domains with the specified Domain InLink Rank." + } + } + } + } + } + }, + "example": { + "histogram": [ + { + "domain_inlink_rank": 0, + "refdomains": 250 + }, + { + "domain_inlink_rank": 1, + "refdomains": 872 + }, + { + "domain_inlink_rank": 2, + "refdomains": 567 + }, + { + "domain_inlink_rank": 3, + "refdomains": 347 + }, + { + "domain_inlink_rank": 4, + "refdomains": 268 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/authority/domain/distribution?output=json&target=seranking.com&mode=host&histogramMode=domain' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] } }, - "/v1/backlinks/authority/page": { + "/v1/backlinks/authority/domain/history": { "get": { - "operationId": "getBacklinksAuthorityPage", + "operationId": "getBacklinksAuthorityDomainHistory", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "authority/page", - "description": "Returns the Page Authority (InLink Rank) for one or more target URLs.", + "summary": "Get domain authority history", + "description": "Returns historical [Domain InLink Rank](https://seranking.com/api/data/reference/#domain-inlink-rank) values for a target. Results are returned for all dates in the requested range based on the selected granularity. This endpoint doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 4 credits per target + 1 credit per date point returned", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#authority-domain-history" + }, "parameters": [ { - "name": "apikey", + "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`). The [PLD](https://seranking.com/api/data/reference/#pld) is extracted automatically.", "schema": { "type": "string" - }, - "example": "{{secret_key_data}}" + } }, { - "name": "target", + "name": "date_from", "in": "query", + "description": "Start date (`YYYY-MM-DD`, inclusive).", "schema": { - "type": "string" - }, - "example": "https://seranking.com" + "type": "string", + "format": "date", + "default": "now − 1 month" + } }, { - "name": "output", + "name": "date_to", "in": "query", + "description": "End date (`YYYY-MM-DD`, inclusive).", "schema": { - "type": "string" - }, - "example": "json" - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - }, - "post": { - "operationId": "createBacklinksAuthorityPage", - "tags": [ - "backlinks" - ], - "summary": "authority/page", - "description": "Returns the Page Authority (InLink Rank) for one or more target URLs.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "target": [ - "https://www.seranking.com/", - "https://www.seranking.com/rank-tracker/" - ] - } - } + "type": "string", + "format": "date", + "default": "now" } - } - }, - "parameters": [ + }, { - "name": "apikey", + "name": "granularity", "in": "query", + "description": "Granularity at which data is returned (`by_day`, `by_week`, or `by_month`).", "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" + "type": "string", + "default": "by_day" + } }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`).", "schema": { - "type": "string" - }, - "example": "json" + "type": "string", + "default": "json" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "ranks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Date associated with the rank value. Depends on granularity:\n• `by_day` – exact day.\n• `by_week` – first day of the week (Monday).\n• `by_month` – first day of the month." + }, + "domain_inlink_rank": { + "type": "integer", + "description": "Domain Authority value for the specified date." + } + } + } + } + } + }, + "example": { + "ranks": [ + { + "date": "2025-09-01", + "domain_inlink_rank": 72 + }, + { + "date": "2025-08-01", + "domain_inlink_rank": 70 + }, + { + "date": "2025-07-01", + "domain_inlink_rank": 68 + }, + { + "date": "2025-06-01", + "domain_inlink_rank": 65 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/authority/domain/history?output=json&target=seranking.com&date_from=2025-06-01&date_to=2025-09-01&granularity=by_month' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] } }, - "/v1/backlinks/authority/page/history": { + "/v1/backlinks/authority/page": { "get": { - "operationId": "getBacklinksAuthorityPageHistory", + "operationId": "getBacklinksAuthorityPage", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "authority/page/history", - "description": "Returns the historical Page Authority (InLink Rank) values for a single target URL.", + "summary": "Get page authority", + "description": "Returns the [InLink Rank](https://seranking.com/api/data/reference/#inlink-rank) value for a target URL. This endpoint supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format).\n\n**Cost:** 5 credits per target\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#authority-page" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "https://seranking.com" + } }, { - "name": "date_from", + "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { - "type": "string" - }, - "example": "2025-01-01" + "type": "string", + "default": "json" + } }, { - "name": "date_to", + "name": "mode", "in": "query", + "description": "Shown in the documented request example.", "schema": { "type": "string" - }, - "example": "2025-05-30" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "pages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL of the analyzed page." + }, + "inlink_rank": { + "type": "integer", + "description": "Page Authority of the target URL." + } + } + } + } + } + }, + "example": { + "pages": [ + { + "url": "https://seranking.com", + "inlink_rank": 19 + }, + { + "url": "https://www.seranking.com", + "inlink_rank": 49 + } + ] + } + } + } }, - { - "name": "granularity", - "in": "query", - "schema": { - "type": "string" - }, - "example": "by_week" + "401": { + "$ref": "#/components/responses/Unauthorized" }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "GET (multiple targets)", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/authority/page?target=https://seranking.com&target=https://www.us-seranking.com&mode=url&output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "post": { + "operationId": "createBacklinksAuthorityPage", + "tags": [ + "Backlinks" + ], + "summary": "Get page authority", + "description": "Returns the [InLink Rank](https://seranking.com/api/data/reference/#inlink-rank) value for a target URL. This endpoint supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format).\n\n**Cost:** 5 credits per target\n\n- The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if other parameters are sent via POST.\n\n- Any POST data in the request body should be in JSON format.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#authority-page" + }, + "parameters": [ { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`). Must always be sent as a GET parameter.", "schema": { - "type": "string" - }, - "example": "json" + "type": "string", + "default": "json" + } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "target": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + } + }, + "required": [ + "target" + ] + }, + "example": { + "target": [ + "https://www.seranking.com/", + "https://www.seranking.com/rank-tracker/" + ] + } + } + } + }, "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "pages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL of the analyzed page." + }, + "inlink_rank": { + "type": "integer", + "description": "Page Authority of the target URL." + } + } + } + } + } + }, + "example": { + "pages": [ + { + "url": "https://seranking.com", + "inlink_rank": 19 + }, + { + "url": "https://www.seranking.com", + "inlink_rank": 49 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "POST (multiple targets)", + "source": "curl -X POST 'https://api.seranking.com/v1/backlinks/authority/page?output=json' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"target\": [\n \"https://www.seranking.com/\",\n \"https://www.seranking.com/rank-tracker/\"\n ]\n}'" + } + ] } }, - "/v1/backlinks/authority/domain/history": { + "/v1/backlinks/authority/page/history": { "get": { - "operationId": "getBacklinksAuthorityDomainHistory", + "operationId": "getBacklinksAuthorityPageHistory", "tags": [ - "backlinks" + "Backlinks" ], - "summary": "authority/domain/history", - "description": "Returns historical Domain InLink Rank (Domain Authority) values for a target domain. GET only, single target.", + "summary": "Get page authority history", + "description": "Returns historical [InLink Rank](https://seranking.com/api/data/reference/#inlink-rank) values for a page. This endpoint doesn’t support batching. Only a single target can be specified per request.\n\n**Cost:** 4 credits per target + 1 credit per date point returned", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/backlinks/#authority-page-history" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze: only full page URL is supported (e.g., `http://seranking.com/index.html`).", "schema": { "type": "string" - }, - "example": "seranking.com" + } }, { "name": "date_from", "in": "query", + "description": "Start date (`YYYY-MM-DD`), inclusive.", "schema": { - "type": "string" + "type": "string", + "format": "date", + "default": "now – 1 month" } }, { "name": "date_to", "in": "query", + "description": "End date (`YYYY-MM-DD`), inclusive.", "schema": { - "type": "string" + "type": "string", + "format": "date", + "default": "now" } }, { "name": "granularity", "in": "query", + "description": "Granularity at which data is returned (`by_day`, `by_week`, or `by_month`). Aggregation uses the latest value within the aggregated range.", "schema": { - "type": "string" - }, - "example": "by_day" + "type": "string", + "default": "by_day" + } }, { "name": "output", "in": "query", + "description": "Response format (`json` or `xml`).", "schema": { - "type": "string" + "type": "string", + "default": "json" } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "ranks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Date associated with the rank value. Depends on granularity:\n• `by_day` – exact day.\n• `by_week` – first day of the week (Monday).\n• `by_month` – first day of the month." + }, + "inlink_rank": { + "type": "integer", + "description": "Page Authority value for the specified date." + } + } + } + } + } + }, + "example": { + "ranks": [ + { + "date": "2025-04-01", + "inlink_rank": 54 + }, + { + "date": "2025-03-01", + "inlink_rank": 32 + }, + { + "date": "2025-02-01", + "inlink_rank": 21 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/backlinks/authority/page/history?output=json&target=seranking.com&date_from=2025-02-01&date_to=2025-04-01&granularity=by_month' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] } }, "/v1/domain/overview/db": { @@ -2929,136 +6923,538 @@ "tags": [ "Domain Analysis" ], - "summary": "Regional database", - "description": "Provides a detailed breakdown of a domain's organic and paid keyword performance within a single specified regional database.", + "summary": "Get domain overview by region", + "description": "Returns detailed keyword statistics for a specified domain within a single, selected regional database. It breaks down performance for both organic and paid traffic, offering insights into keyword rankings, traffic estimates, and position changes.\n\n**Cost:** 100 credits per request\n\nIf the request is successful, the server returns a JSON object with two primary keys: `organic` and `adv`. Each of these keys details various keyword statistics for the selected database.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/domain-analysis/#regional-database" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "source", "in": "query", + "required": true, + "description": "Country code of the regional keyword database (e.g., `us`). For acceptable values, see [Regional database codes](https://seranking.com/api/data/reference#regional-database-codes).", "schema": { "type": "string" - }, - "example": "us" + } }, { "name": "domain", "in": "query", + "required": true, + "description": "Domain for which to retrieve the keyword statistics (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "seranking.com" + } }, { - "name": "url", + "name": "with_subdomains", "in": "query", + "description": "Flag indicating whether subdomain data should be included in the analysis:\n`1` – include subdomains\n`0` – exclude subdomains", "schema": { - "type": "string" - }, - "example": "https://seranking.com/api.html" + "type": "integer", + "default": 1 + } }, { - "name": "with_subdomains", + "name": "url", "in": "query", + "description": "Specific URL to analyze instead of the root domain\n(e.g., `https://domain.com/path/page`). If provided, the `domain` parameter is ignored.", "schema": { - "type": "boolean", - "default": true - }, - "example": false + "type": "string" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} - } - } - } - } - }, - "/v1/domain/overview/worldwide": { - "get": { - "operationId": "getDomainOverviewWorldwide", - "tags": [ - "Domain Analysis" - ], - "summary": "Worldwide aggregate", - "description": "Aggregates a domain\u2019s current global search performance statistics for both organic and paid traffic.", - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "domain", - "in": "query", - "schema": { - "type": "string" - }, - "example": "seranking.com" - }, - { - "name": "fields", - "in": "query", - "schema": { - "type": "string" - }, - "example": "price,traffic,keywords,positions_diff,positions_tops" + "application/json": { + "schema": { + "type": "object", + "properties": { + "organic": { + "type": "object", + "properties": { + "base_domain": { + "type": "string" + }, + "price_sum": { + "type": "integer", + "description": "Estimated traffic value (PPC equivalent) for organic search data." + }, + "traffic_sum": { + "type": "integer", + "description": "Estimated monthly organic search traffic from ranking keywords." + }, + "keywords_new_count": { + "type": "integer", + "description": "Number of keywords for which the domain has newly started ranking." + }, + "keywords_down_count": { + "type": "integer", + "description": "Number of keywords for which the domain’s ranking has declined." + }, + "keywords_up_count": { + "type": "integer", + "description": "Number of keywords for which the domain’s ranking has improved." + }, + "keywords_equal_count": { + "type": "integer", + "description": "Number of keywords for which the domain’s ranking has not changed." + }, + "keywords_lost_count": { + "type": "integer", + "description": "Number of keywords for which the domain has dropped out of the SERPs." + }, + "keywords_count": { + "type": "integer", + "description": "Number of organic keywords for which the domain ranks in the selected database." + }, + "top1_5": { + "type": "integer", + "description": "Number of organic keywords ranked in positions 1–5." + }, + "top6_10": { + "type": "integer", + "description": "Number of organic keywords ranked in positions 6–10." + }, + "top11_20": { + "type": "integer", + "description": "Number of organic keywords ranked in positions 11–20." + }, + "top21_50": { + "type": "integer", + "description": "Number of organic keywords ranked in positions 21–50." + }, + "top51_100": { + "type": "integer", + "description": "Number of organic keywords ranked in positions 51–100." + }, + "year": { + "type": "integer", + "description": "Year of the data snapshot." + }, + "month": { + "type": "integer", + "description": "Month of the data snapshot." + } + } + }, + "adv": { + "type": "object", + "properties": { + "base_domain": { + "type": "string" + }, + "price_sum": { + "type": "integer", + "description": "Estimated traffic value (PPC equivalent) from paid keywords." + }, + "traffic_sum": { + "type": "integer", + "description": "Estimated monthly traffic from paid keywords." + }, + "keywords_new_count": { + "type": "integer", + "description": "Number of new keywords targeted by paid ads." + }, + "keywords_down_count": { + "type": "integer", + "description": "Number of paid keywords where ad positions declined." + }, + "keywords_up_count": { + "type": "integer", + "description": "Number of paid keywords where ad positions improved." + }, + "keywords_equal_count": { + "type": "integer", + "description": "Number of paid keywords where ad positions remained unchanged." + }, + "keywords_lost_count": { + "type": "integer", + "description": "Number of keywords for which paid ads are no longer running or appearing in the SERPs." + }, + "keywords_count": { + "type": "integer", + "description": "Number of keywords for which the domain has paid ads in the selected database." + }, + "top1_2": { + "type": "integer", + "description": "Number of paid keywords with ads appearing in positions 1–2." + }, + "top3_5": { + "type": "integer", + "description": "Number of paid keywords with ads appearing in positions 3–5." + }, + "top6_8": { + "type": "integer", + "description": "Number of paid keywords with ads appearing in positions 6–8." + }, + "top9_11": { + "type": "integer", + "description": "Number of paid keywords with ads appearing in positions 9–11." + }, + "year": { + "type": "integer", + "description": "Year of the data snapshot." + }, + "month": { + "type": "integer", + "description": "Month of the data snapshot." + } + } + } + } + }, + "example": { + "organic": { + "base_domain": "example.com", + "price_sum": 100000, + "traffic_sum": 40000, + "keywords_new_count": 250, + "keywords_down_count": 70, + "keywords_up_count": 65, + "keywords_equal_count": 140000, + "keywords_lost_count": 110, + "keywords_count": 115000, + "top1_5": 20000, + "top6_10": 11000, + "top11_20": 18000, + "top21_50": 41000, + "top51_100": 50000, + "year": 2025, + "month": 11 + }, + "adv": { + "base_domain": "example.com", + "price_sum": 85, + "traffic_sum": 40, + "keywords_new_count": 0, + "keywords_down_count": 0, + "keywords_up_count": 0, + "keywords_equal_count": 16, + "keywords_lost_count": 0, + "keywords_count": 16, + "top1_2": 15, + "top3_5": 1, + "top6_8": 0, + "top9_11": 0, + "year": 2025, + "month": 11 + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ { - "name": "show_zones_list", + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/domain/overview/db?source=xx&domain=yourdomain.com&with_subdomains=1' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/domain/overview/worldwide": { + "get": { + "operationId": "getDomainOverviewWorldwide", + "tags": [ + "Domain Analysis" + ], + "summary": "Get worldwide domain overview", + "description": "Aggregates and returns domain search performance statistics globally for the current month. The method provides a comprehensive view of worldwide organic and paid traffic metrics, with options to customize the returned data, including currency and specific fields.\n\n**Cost:** 100 credits per request\n\nIf the request is successful, the server returns a JSON object with two primary keys: `organic` and `adv`. Each of these keys holds an array of objects.\n\n- The first object in each array always represents the aggregated “worldwide” statistics.\n\n- If `show_zones_list` is set to “1” (or true), subsequent objects in the arrays will represent statistics for individual regional zones (countries).\n\nEach object within the `organic` and `adv` arrays can contain the following parameters (depending on the fields requested):", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/domain-analysis/#worldwide-aggregate" + }, + "parameters": [ + { + "name": "domain", "in": "query", + "required": true, + "description": "Domain name for which to retrieve worldwide statistics (e.g., `seranking.com`).", "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ], - "default": 0 - }, - "example": 0 + "type": "string" + } }, { "name": "currency", "in": "query", - "description": "ISO 4217 currency code.", + "description": "ISO 4217 currency code to be used for any monetary values (like traffic cost) returned in the response (e.g., `USD`, `EUR`, `GBP`).", "schema": { "type": "string", - "maxLength": 3, "default": "USD" - }, - "example": "USD" + } + }, + { + "name": "fields", + "in": "query", + "description": "Comma-separated list specifying which data fields or categories to include in the response: \n• `price` – shows traffic price/cost value\n• `traffic` – shows traffic volume value\n• `keywords` – shows keyword count statistics\n• `positions_diff` – shows statistics on position changes\n• `positions_tops` – shows statistics on top-ranking positions", + "schema": { + "type": "string", + "default": "price, traffic, keywords" + } + }, + { + "name": "show_zones_list", + "in": "query", + "description": "Identifies whether the response should include a detailed breakdown of statistics by regional zone (country) in addition to aggregated worldwide statistics: \n`1` – include stats for each zone\n`0` – return worldwide stats only", + "schema": { + "type": "string", + "default": "0" + } }, { "name": "with_subdomains", "in": "query", + "description": "Flag indicating whether subdomain data should be included in the analysis:\n`1` – include subdomains\n`0` – exclude subdomains", "schema": { - "type": "boolean", - "default": true - }, - "example": true + "type": "integer", + "default": 1 + } + }, + { + "name": "url", + "in": "query", + "description": "Specific URL to analyze instead of the root domain\n(e.g., `https://domain.com/path/page`). If provided, the `domain` parameter is ignored.", + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "organic": { + "type": "array", + "items": { + "type": "object", + "properties": { + "source": { + "type": "string", + "description": "Identifier of the data scope:\n`worldwide` for the global summary, or a specific country code for zone-specific data when `show_zones_list` is enabled." + }, + "country": { + "type": "string", + "description": "Descriptive name for the source: `worldwide` for the global summary, or country name for zone-specific data (e.g., `United States`)." + }, + "keywords_count": { + "type": "integer", + "description": "Number of keywords for this scope (organic or paid, depending on the parent object)." + }, + "traffic_sum": { + "type": "integer", + "description": "Sum of estimated traffic for this scope (organic or paid)." + }, + "price_sum": { + "type": "number", + "description": "Estimated traffic value (PPC equivalent) in the specified currency." + }, + "positions_new_count": { + "type": "integer", + "description": "Number of keywords newly appearing in rankings for this scope (if `positions_diff` requested in fields)." + }, + "positions_up_count": { + "type": "integer", + "description": "Number of keywords with improved rankings for this scope (if `positions_diff` requested in fields)." + }, + "positions_down_count": { + "type": "integer", + "description": "Number of keywords with declined rankings for this scope (if `positions_diff` requested in fields)." + }, + "positions_lost_count": { + "type": "integer", + "description": "Number of keywords that dropped out of rankings for this scope (if `positions_diff` requested in fields)." + }, + "positions_equal_count": { + "type": "integer", + "description": "Number of keywords with unchanged rankings for this scope (if `positions_diff` requested in fields)." + }, + "positions_tops": { + "type": "object", + "properties": { + "top1_5": { + "type": "integer", + "description": "Organic: keywords in positions 1–5." + }, + "top6_10": { + "type": "integer", + "description": "Organic: keywords in positions 6–10." + }, + "top11_20": { + "type": "integer", + "description": "Organic: keywords in positions 11–20." + }, + "top21_50": { + "type": "integer", + "description": "Organic: keywords in positions 21–50." + }, + "top51_100": { + "type": "integer", + "description": "Organic: keywords in positions 51–100." + } + } + } + } + } + }, + "adv": { + "type": "array", + "items": { + "type": "object", + "properties": { + "source": { + "type": "string", + "description": "Identifier of the data scope:\n`worldwide` for the global summary, or a specific country code for zone-specific data when `show_zones_list` is enabled." + }, + "country": { + "type": "string", + "description": "Descriptive name for the source: `worldwide` for the global summary, or country name for zone-specific data (e.g., `United States`)." + }, + "keywords_count": { + "type": "integer", + "description": "Number of keywords for this scope (organic or paid, depending on the parent object)." + }, + "traffic_sum": { + "type": "integer", + "description": "Sum of estimated traffic for this scope (organic or paid)." + }, + "price_sum": { + "type": "number", + "description": "Estimated traffic value (PPC equivalent) in the specified currency." + }, + "positions_new_count": { + "type": "integer", + "description": "Number of keywords newly appearing in rankings for this scope (if `positions_diff` requested in fields)." + }, + "positions_up_count": { + "type": "integer", + "description": "Number of keywords with improved rankings for this scope (if `positions_diff` requested in fields)." + }, + "positions_down_count": { + "type": "integer", + "description": "Number of keywords with declined rankings for this scope (if `positions_diff` requested in fields)." + }, + "positions_lost_count": { + "type": "integer", + "description": "Number of keywords that dropped out of rankings for this scope (if `positions_diff` requested in fields)." + }, + "positions_equal_count": { + "type": "integer", + "description": "Number of keywords with unchanged rankings for this scope (if `positions_diff` requested in fields)." + }, + "positions_tops": { + "type": "object", + "properties": { + "top1_2": { + "type": "integer", + "description": "Paid (adv): keywords with ads in positions 1–2." + }, + "top3_5": { + "type": "integer", + "description": "Paid (adv): keywords with ads in positions 3–5." + }, + "top6_8": { + "type": "integer", + "description": "Paid (adv): keywords with ads in positions 6–8." + }, + "top9_11": { + "type": "integer", + "description": "Paid (adv): keywords with ads in positions 9–11." + } + } + } + } + } + } + } + }, + "example": { + "organic": [ + { + "source": "worldwide", + "country": "Worldwide", + "keywords_count": 823967, + "traffic_sum": 273150, + "price_sum": 241482.11, + "positions_new_count": 56042, + "positions_up_count": 56326, + "positions_down_count": 49834, + "positions_lost_count": 47169, + "positions_equal_count": 876005, + "positions_tops": { + "top1_5": 91520, + "top6_10": 95652, + "top11_20": 165641, + "top21_50": 332015, + "top51_100": 353061 + } + } + ], + "adv": [ + { + "source": "worldwide", + "country": "Worldwide", + "keywords_count": 4947, + "traffic_sum": 4369, + "price_sum": 6509.45, + "positions_new_count": 333, + "positions_up_count": 7, + "positions_down_count": 4, + "positions_lost_count": 1742, + "positions_equal_count": 5645, + "positions_tops": { + "top1_2": 4905, + "top3_5": 1046, + "top6_8": 38, + "top9_11": 0 + } + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/domain/overview/worldwide?domain=seranking.com¤cy=USD&fields=price,traffic,keywords,positions_diff,positions_tops&show_zones_list=0' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] } }, "/v1/domain/overview/worldwide/url": { @@ -3067,42 +7463,130 @@ "tags": [ "Domain Analysis" ], - "summary": "Worldwide aggregate for URL", - "description": "Aggregates a domain\u2019s current global search performance statistics for both organic and paid traffic.", + "summary": "Get worldwide URL overview", + "description": "Aggregates and returns URL search performance statistics globally for the current month. The method provides a comprehensive view of worldwide organic and paid traffic metrics for a specific URL, with options to customize the returned data using selected fields.\n\n**Cost:** 100 credits per request\n\nIf the request is successful, the server returns a JSON object containing two arrays: `organic` and `adv`.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/domain-analysis/#worldwide-aggregate-url" + }, "parameters": [ { - "name": "apikey", + "name": "url", "in": "query", + "required": true, + "description": "Full URL to analyze (including protocol).", "schema": { "type": "string" - }, - "example": "{{secret_key_data}}" + } }, { "name": "fields", "in": "query", + "description": "Comma-separated list of metrics to include in the response. Accepted values: `keywords`, `traffic`, `price`.", "schema": { "type": "string" - }, - "example": "price,traffic,keywords" - }, - { - "name": "url", - "in": "query", - "schema": { - "type": "string" - }, - "example": "https://seranking.com/api.html" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "organic": { + "type": "array", + "items": { + "type": "object", + "properties": { + "source": { + "type": "string", + "description": "Data source scope. Always `worldwide`." + }, + "keywords_count": { + "type": "integer", + "description": "Number of ranking keywords worldwide." + }, + "traffic_sum": { + "type": "integer", + "description": "Estimated total monthly traffic worldwide." + }, + "price_sum": { + "type": "integer", + "description": "Estimated traffic value (PPC equivalent)." + } + } + } + }, + "adv": { + "type": "array", + "items": { + "type": "object", + "properties": { + "source": { + "type": "string", + "description": "Data source scope. Always `worldwide`." + }, + "keywords_count": { + "type": "integer", + "description": "Number of ranking keywords worldwide." + }, + "traffic_sum": { + "type": "integer", + "description": "Estimated total monthly traffic worldwide." + }, + "price_sum": { + "type": "integer", + "description": "Estimated traffic value (PPC equivalent)." + } + } + } + } + } + }, + "example": { + "organic": [ + { + "source": "worldwide", + "keywords_count": 1791, + "traffic_sum": 1018, + "price_sum": 1826 + } + ], + "adv": [ + { + "source": "worldwide", + "keywords_count": 5, + "traffic_sum": 0, + "price_sum": 0 + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/domain/overview/worldwide/url?fields=price,traffic,keywords&url=https://example.com/api.html' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] } }, "/v1/domain/overview/history": { @@ -3111,59 +7595,53 @@ "tags": [ "Domain Analysis" ], - "summary": "History Trends", - "description": "Fetches historical data, including keyword counts and traffic trends, for a domain's organic or paid performance in a specific region.", + "summary": "Get domain traffic and keyword history", + "description": "Retrieves historical data for a specified domain from a specific regional database. It tracks changes over time for key metrics, including the number of keywords, estimated traffic (clicks), and traffic cost estimates, for either organic or paid search.\n\n**Cost:** 100 credits per request\n\nIf the request is successful, the server returns a JSON array. Each object in this array represents a historical data point (typically for a specific month and year) and contains the following parameters.\n\n- The `topX_Y` fields for ranking distribution correspond to the type of traffic requested—organic ranking ranges or paid ad position ranges.\n\n- The `topX_Y` fields count position occurrences, not unique keywords. If a domain has multiple links for a single keyword, each link is counted separately in the relevant position range(s). As a result, the sum of `top1_5` + `top6_10` + … + `top51_100` may exceed `keywords_count`.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/domain-analysis/#history-trends" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "source", "in": "query", + "required": true, + "description": "Country code of the regional keyword database (e.g., `us`). For acceptable values, see [Regional database codes](https://seranking.com/api/data/reference#regional-database-codes).", "schema": { "type": "string" - }, - "example": "us" + } }, { "name": "domain", "in": "query", + "required": true, + "description": "Domain name for which to retrieve historical performance data (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "seranking.com" + } }, { "name": "type", "in": "query", + "description": "Search traffic type for which data is retrieved:\n• `organic` – organic search traffic\n• `adv` – paid search traffic", "schema": { "type": "string", - "enum": [ - "organic", - "adv" - ], "default": "organic" - }, - "example": "organic" + } }, { "name": "with_subdomains", "in": "query", + "description": "Flag indicating whether subdomain data should be included in the analysis:\n`1` – include subdomains\n`0` – exclude subdomains", "schema": { - "type": "boolean", - "default": true - }, - "example": true + "type": "integer", + "default": 1 + } }, { "name": "url", "in": "query", - "description": "Specific URL to get history for instead of domain.", + "description": "Specific URL to analyze instead of the root domain\n(e.g., `https://domain.com/path/page`). If provided, the `domain` parameter is ignored.", "schema": { "type": "string" } @@ -3171,12 +7649,159 @@ ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "keywords_count": { + "type": "integer", + "description": "Number of unique keywords (organic or paid, depending on the request type) for which the domain had at least one result during the period." + }, + "traffic_sum": { + "type": "integer", + "description": "Estimation of the total search traffic (clicks) the domain received from these keywords during that period." + }, + "top1_5": { + "type": "integer", + "description": "If type is `organic`: total number of occurrences of organic keywords ranked in positions 1–5 during that period." + }, + "top6_10": { + "type": "integer", + "description": "If type is `organic`: total number of occurrences of organic keywords ranked in positions 6–10 during that period." + }, + "top11_20": { + "type": "integer", + "description": "If type is `organic`: total number of occurrences of organic keywords ranked in positions 11–20 during that period." + }, + "top21_50": { + "type": "integer", + "description": "If type is `organic`: total number of occurrences of organic keywords ranked in positions 21–50 during that period." + }, + "top51_100": { + "type": "integer", + "description": "If type is `organic`: total number of occurrences of organic keywords ranked in positions 51–100 during that period." + }, + "year": { + "type": "integer", + "description": "Year of the historical data point." + }, + "month": { + "type": "integer", + "description": "Month of the historical data point (1–12)." + }, + "price_sum": { + "type": "number", + "description": "Estimated traffic value (PPC equivalent) in the default currency of the database." + }, + "top1_2": { + "type": "integer", + "description": "If type is `adv`: total number of occurrences of paid keywords with ads appearing in positions 1–2 during that period." + }, + "top3_5": { + "type": "integer", + "description": "If type is `adv`: total number of occurrences of paid keywords with ads appearing in positions 3–5 during that period." + }, + "top6_8": { + "type": "integer", + "description": "If type is `adv`: total number of occurrences of paid keywords with ads appearing in positions 6–8 during that period." + }, + "top9_11": { + "type": "integer", + "description": "If type is `adv`: total number of occurrences of paid keywords with ads appearing in positions 9–11 during that period." + } + } + } + }, + "examples": { + "typeOrganic": { + "summary": "Type=organic", + "value": [ + { + "keywords_count": 104199, + "traffic_sum": 35838, + "top1_5": 12629, + "top6_10": 11401, + "top11_20": 19134, + "top21_50": 39725, + "top51_100": 46089, + "year": 2025, + "month": 4, + "price_sum": 85424.78 + }, + { + "keywords_count": 103538, + "traffic_sum": 34402, + "top1_5": 9107, + "top6_10": 11517, + "top11_20": 19029, + "top21_50": 39617, + "top51_100": 45963, + "year": 2025, + "month": 5, + "price_sum": 85721.73 + } + ] + }, + "typeAdv": { + "summary": "Type=adv", + "value": [ + { + "keywords_count": 7, + "traffic_sum": 0, + "top1_2": 7, + "top3_5": 0, + "top6_8": 0, + "top9_11": 0, + "year": 2025, + "month": 4, + "price_sum": 0 + }, + { + "keywords_count": 8, + "traffic_sum": 0, + "top1_2": 8, + "top3_5": 0, + "top6_8": 0, + "top9_11": 0, + "year": 2025, + "month": 5, + "price_sum": 0 + } + ] + } + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "To retrieve organic historical data", + "source": "curl -X GET 'https://api.seranking.com/v1/domain/overview/history?source=us&domain=seranking.com&type=organic' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "To retrieve paid (advertising) historical data", + "source": "curl -X GET 'https://api.seranking.com/v1/domain/overview/history?source=us&domain=seranking.com&type=adv' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] } }, "/v1/domain/keywords": { @@ -3185,342 +7810,548 @@ "tags": [ "Domain Analysis" ], - "summary": "Domain keywords", - "description": "Returns a filterable and sortable list of organic or paid keywords for which a specific domain ranks in a given database.", + "summary": "Get domain keyword rankings", + "description": "Returns the keywords a domain (or a specific URL) ranks for in a regional database, organic or paid. Supports historical month-by-month snapshots, advanced filtering across keyword properties, SERP-feature presence, search intent, and traffic share.\n\n**Cost:** 100 credits per request\n\nEither `domain` or `url` must be supplied. **If both are sent, `url` takes precedence and `domain` is silently dropped.**\n\n**Historical snapshots (year / month)**\n\n- Both omitted → current snapshot.\n\n- Both supplied with a month within the retention window → historical snapshot.\n\n- Only one of the two supplied → current snapshot (the lone parameter is silently ignored — there is no error).\n\n- Future date → current snapshot (silent fallback).\n\n- Date older than the retention window → empty array `[]`.\n\n⚠ **Historical responses use a different schema than current responses.** See [Response shape — historical](#response-shape-historical-year-month) below. Clients that consume both must branch on whether `year`/`month` were sent.\n\n**Filters**\n\nAll filter keys use bracket-path syntax (`filter[name]=value` or `filter[name][from]=value`). Filters within a single key combine with AND; multiple values within one filter combine with OR.\n\n**Range filters (from / to)**\n\nAll accept any combination of `from` and `to`; either bound can be omitted.\n\n**Text filters**\n\nJSON-encoded value; see [Text search JSON structure](#).\n\n**Current**\n\nIf the request succeeds, the server returns an HTTP 200 with a JSON array of keyword objects. The default response includes 16 fields; request `cols=` to project a subset.\n\n**Default response columns**\n\nFor `type=adv` (paid search), the `block` and `snippet_*` family are also returned when explicitly requested.\n\n**Field reference**\n\n📝 `kei` (Keyword Effectiveness Index) is accepted as an `order_field` value but is **not** a selectable response column. Requesting `cols=kei` silently drops it.\n\n**Historical (year + month)**\n\nWhen a request includes valid `year` and `month`, the upstream returns data from a different store with a different schema. Five fields are renamed or retyped, and two are dropped:\n\nClients consuming both shapes should branch on whether `year`/`month` were sent.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/domain-analysis/#domain-keywords" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "source", "in": "query", + "description": "Country code of the regional keyword database (e.g., `us`, `uk`, `de`). See [Regional database codes](#).", "schema": { "type": "string" - }, - "example": "us" + } }, { "name": "domain", "in": "query", + "description": "Domain to retrieve rankings for (e.g., `booking.com`). Mutually exclusive with `url`.", "schema": { "type": "string" - }, - "example": "wix.com" + } }, { "name": "url", "in": "query", + "description": "Exact URL to retrieve rankings for (e.g., `https://seranking.com/api.html`). When supplied, the `with_subdomains` flag has no effect — only this exact URL is considered.", "schema": { "type": "string" - }, - "example": "https://www.mywage.de/blog/baufinanzierung-trotz-schufa" + } }, { "name": "type", "in": "query", + "description": "Search-traffic type. `adv` returns paid-search keywords with snippet fields populated.", "schema": { "type": "string", - "enum": [ - "organic", - "adv" - ] - }, - "example": "organic" + "default": "organic" + } }, { "name": "with_subdomains", "in": "query", + "description": "When `true`, include keywords ranking for any subdomain of `domain`. When `false`, restrict to the exact `domain`. Ignored when `url` is used. Also accepts `1`/`0`.", "schema": { - "type": "boolean" - }, - "example": true + "type": "boolean", + "default": true + } + }, + { + "name": "page", + "in": "query", + "description": "Page number for paginated results.", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "limit", + "in": "query", + "description": "Page size. Values > 1000 are silently capped at 1000.", + "schema": { + "type": "integer", + "default": 100 + } }, { "name": "order_field", "in": "query", + "description": "Sort key. Valid values: `traffic`, `volume`, `position`, `cpc`, `competition`, `kei`, `difficulty`, `traffic_percent`, `price`.", "schema": { "type": "string", - "enum": [ - "traffic", - "volume", - "position", - "cpc", - "competition", - "kei", - "difficulty" - ] - }, - "example": "traffic" + "default": "traffic" + } }, { "name": "order_type", "in": "query", + "description": "Sort direction.", "schema": { "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "example": "desc" + "default": "desc" + } }, { - "name": "page", + "name": "cols", "in": "query", + "description": "Comma-separated list of fields to return. See [Default response columns](#default-response-columns). Invalid column names are silently dropped.", "schema": { - "type": "integer", - "default": 1 - }, - "example": 1 + "type": "string", + "default": "(default set)" + } }, { - "name": "limit", + "name": "year", "in": "query", + "description": "Year of the historical snapshot to retrieve. **Must be supplied together with `month`.**\n\nDefault: current", "schema": { "type": "integer" - }, - "example": 10 + } }, { - "name": "cols", + "name": "month", "in": "query", + "description": "Month of the historical snapshot. **Must be supplied together with `year`.** Out-of-range values return HTTP 400 `invalid month`.\n\nDefault: current", "schema": { - "type": "string" + "type": "integer" } }, { "name": "pos_change", "in": "query", + "description": "Selects keywords by how their position changed vs. the previous snapshot. Values: `up` (improved), `down` (worsened), `new` (`prev_pos: null`), `lost` (dropped from SERP), `diff` (any change — equivalent to `up ∪ down`), `same` (unchanged). Unknown values are silently ignored (filter does not apply).", "schema": { - "type": "string", - "enum": [ - "up", - "down", - "new", - "lost", - "diff", - "same" - ] + "type": "string" } }, { "name": "filter[volume][from]", "in": "query", + "description": "Monthly search volume.", "schema": { "type": "integer" - }, - "example": 500 + } }, { "name": "filter[volume][to]", "in": "query", + "description": "Monthly search volume.", "schema": { "type": "integer" - }, - "example": 2000 + } }, { - "name": "filter[difficulty][from]", + "name": "filter[traffic][from]", "in": "query", + "description": "Estimated monthly traffic to the ranking URL.", "schema": { - "type": "string" + "type": "integer" } }, { - "name": "filter[difficulty][to]", + "name": "filter[traffic][to]", "in": "query", + "description": "Estimated monthly traffic to the ranking URL.", "schema": { - "type": "string" + "type": "integer" } }, { - "name": "filter[url]", + "name": "filter[traffic_percent][from]", "in": "query", + "description": "Share (%) of the keyword’s total traffic captured by the domain.", "schema": { - "type": "string" - }, - "example": "[\n [\n {\n \"type\": \"contains\",\n \"value\": \"/blog/\"\n }\n ]\n]" + "type": "number" + } }, { - "name": "filter[multi_keyword_excluded]", + "name": "filter[traffic_percent][to]", "in": "query", + "description": "Share (%) of the keyword’s total traffic captured by the domain.", "schema": { - "type": "string" - }, - "example": "[\n [\n { \"type\": \"contains\", \"value\": \"seo\" },\n { \"type\": \"contains\", \"value\": \"tools\" }\n ],\n [\n { \"type\": \"begins\", \"value\": \"find\" },\n { \"type\": \"contains\", \"value\": \"link\" }\n ],\n [\n { \"type\": \"contains\", \"value\": \"backlink\" },\n { \"type\": \"ends\", \"value\": \"checker\" }\n ],\n [\n { \"type\": \"exact\", \"value\": \"serankings\" }\n ]\n]" + "type": "number" + } }, { - "name": "filter[multi_keyword_included]", + "name": "filter[position][from]", "in": "query", + "description": "Ranking position.", "schema": { - "type": "string" - }, - "example": "[[{\"type\":\"contains\", \"value\":\"seo\"}]]" + "type": "integer" + } }, { - "name": "filter[serp_features]", + "name": "filter[position][to]", "in": "query", + "description": "Ranking position.", "schema": { - "type": "string" + "type": "integer" } }, { - "name": "filter[intents]", + "name": "filter[keyword_count][from]", "in": "query", + "description": "Number of words in the keyword phrase.", "schema": { - "type": "string" + "type": "integer" } }, { - "name": "filter[keyword]", + "name": "filter[keyword_count][to]", "in": "query", + "description": "Number of words in the keyword phrase.", "schema": { - "type": "string" - }, - "example": "scholar" + "type": "integer" + } }, { "name": "filter[characters_count][from]", "in": "query", + "description": "Character length of the keyword phrase.", "schema": { - "type": "string" + "type": "integer" } }, { "name": "filter[characters_count][to]", "in": "query", + "description": "Character length of the keyword phrase.", "schema": { - "type": "string" + "type": "integer" } }, { - "name": "filter[keyword_count][from]", + "name": "filter[cpc][from]", "in": "query", + "description": "Cost per click. USD.", "schema": { - "type": "string" + "type": "number" } }, { - "name": "filter[keyword_count][to]", + "name": "filter[cpc][to]", "in": "query", + "description": "Cost per click. USD.", "schema": { - "type": "string" + "type": "number" } }, { - "name": "filter[position][from]", + "name": "filter[price][from]", "in": "query", + "description": "Estimated traffic value (PPC-equivalent). USD.", "schema": { - "type": "string" + "type": "number" } }, { - "name": "filter[position][to]", + "name": "filter[price][to]", "in": "query", + "description": "Estimated traffic value (PPC-equivalent). USD.", "schema": { - "type": "string" + "type": "number" } }, { "name": "filter[competition][from]", "in": "query", + "description": "Competition score (0.00–1.00).", "schema": { - "type": "string" + "type": "number" } }, { "name": "filter[competition][to]", "in": "query", + "description": "Competition score (0.00–1.00).", "schema": { - "type": "string" + "type": "number" } }, { - "name": "filter[cpc][from]", + "name": "filter[difficulty][from]", "in": "query", + "description": "Keyword difficulty.", "schema": { - "type": "string" + "type": "integer" } }, { - "name": "filter[cpc][to]", + "name": "filter[difficulty][to]", "in": "query", + "description": "Keyword difficulty.", "schema": { - "type": "string" + "type": "integer" } }, { - "name": "filter[traffic][from]", + "name": "filter[keyword]", "in": "query", + "description": "Keyword text to match.", "schema": { "type": "string" } }, { - "name": "filter[traffic][to]", + "name": "filter[multi_keyword_included]", "in": "query", + "description": "Must-include keyword tokens.", "schema": { "type": "string" } }, { - "name": "filter[traffic_percent][from]", + "name": "filter[multi_keyword_excluded]", "in": "query", + "description": "Must-exclude keyword tokens.", "schema": { "type": "string" } }, { - "name": "filter[traffic_percent][to]", + "name": "filter[url]", "in": "query", + "description": "Filter by ranking URL (substring/pattern). Single base array element only — no OR logic. Use the top-level `url` request param for an exact single-URL match.", "schema": { "type": "string" } }, { - "name": "filter[price][from]", + "name": "filter[intents]", "in": "query", + "description": "Comma-separated short codes — `I` (informational), `N` (navigational), `T` (transactional), `C` (commercial), `L` (local). Multi-value semantics: keyword passes if **any** listed intent matches. Unknown codes are silently ignored.", "schema": { "type": "string" } }, { - "name": "filter[price][to]", + "name": "filter[serp_features]", "in": "query", "schema": { "type": "string" } }, { - "name": "filter[serp_features_2][mode]", - "in": "query", - "schema": { - "type": "string" - }, - "example": "with_link" - }, - { - "name": "filter[serp_features_2][value][0]", + "name": "filter[serp_features_2]", "in": "query", "schema": { "type": "string" - }, - "example": "sge" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "block_type": { + "description": "Type of SERP block where the result appears (e.g., `featured_snippets`, `tads`, `local_pack`, `sitelinks`). `null` indicates an organic 10-blue-links result." + }, + "block_position": { + "type": "integer", + "description": "Position of the block on the SERP." + }, + "keyword": { + "type": "string", + "description": "The keyword phrase." + }, + "position": { + "type": "integer", + "description": "Current ranking position (organic) or ad position (paid)." + }, + "prev_pos": { + "type": "integer", + "description": "Previous-period position. `null` for new keywords." + }, + "volume": { + "description": "Average monthly search volume." + }, + "cpc": { + "type": "number", + "description": "Average cost per click, USD." + }, + "competition": { + "type": "number", + "description": "Competition score, 0.00 (low) – 1.00 (high)." + }, + "url": { + "type": "string", + "description": "URL of the ranking page (or the URL used in the ad for paid)." + }, + "difficulty": { + "type": "integer", + "description": "Keyword difficulty, 0–100." + }, + "total_sites": { + "description": "Estimated number of sites ranking for this keyword. Often `null`." + }, + "traffic": { + "description": "Estimated monthly traffic this keyword drives to the URL." + }, + "traffic_percent": { + "type": "number", + "description": "Share of the keyword’s total traffic the domain captures (%)." + }, + "price": { + "type": "number", + "description": "Estimated traffic value (PPC equivalent), USD." + }, + "serp_features": { + "type": "array", + "items": { + "type": "string", + "description": "SERP features present on this keyword’s SERP. See [SERP features](#)." + }, + "description": "SERP features present on this keyword’s SERP. See [SERP features](#)." + }, + "intents": { + "type": "array", + "items": { + "type": "string", + "description": "Detected intents — short codes `I` / `N` / `T` / `C` / `L`." + }, + "description": "Detected intents — short codes `I` / `N` / `T` / `C` / `L`." + }, + "previous_position": { + "type": "integer" + } + } + } + }, + "examples": { + "example1": { + "summary": "Example 1", + "value": [ + { + "block_type": null, + "block_position": 4, + "keyword": "ranking", + "position": 4, + "prev_pos": 4, + "volume": 22400, + "cpc": 0, + "competition": 0, + "url": "https://seranking.com/", + "difficulty": 59, + "total_sites": null, + "traffic": 836, + "traffic_percent": 2.09, + "price": 0, + "serp_features": [ + "sitelinks", + "video", + "sge", + "related_searches" + ], + "intents": [ + "I", + "N" + ] + } + ] + }, + "example2": { + "summary": "Example 2", + "value": [ + { + "competition": 0.13, + "intents": [ + "INFORMATIONAL", + "NAVIGATIONAL" + ], + "serp_features": [ + "reviews", + "sitelinks", + "video", + "people_also_ask" + ], + "keyword": "se rank", + "block_position": 0, + "volume": "2900", + "position": 1, + "price": 797.75, + "traffic": "1246", + "difficulty": 62, + "previous_position": 1, + "traffic_percent": 3.58, + "cpc": 0.64, + "url": "https://seranking.com/" + } + ] + } + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl 'https://api.seranking.com/v1/domain/keywords?source=us&domain=booking.com&type=adv&limit=2&cols=keyword,cpc,volume,block_type,block_position,snippet_title&order_field=cpc&order_type=desc' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "curl 'https://api.seranking.com/v1/domain/keywords?source=us&url=https://seranking.com/api.html&type=organic&limit=2&filter[serp_features]=sitelinks' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "curl 'https://api.seranking.com/v1/domain/keywords?source=us&domain=booking.com&filter[serp_features_2][mode]=with_link&filter[serp_features_2][value][0]=sge' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "curl 'https://api.seranking.com/v1/domain/keywords?source=us&domain=booking.com&filter[serp_features_2][mode]=without_link&filter[serp_features_2][value][0]=sge' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "curl 'https://api.seranking.com/v1/domain/keywords?source=us&domain=booking.com&filter[serp_features_2][mode]=with_link&filter[serp_features_2][value][0]=sge&filter[serp_features_2][value][1]=reviews' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "curl 'https://api.seranking.com/v1/domain/keywords?source=us&domain=seranking.com&year=2024&month=6&limit=5' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "# Keywords that gained positions vs. the previous period\ncurl 'https://api.seranking.com/v1/domain/keywords?source=us&domain=seranking.com&pos_change=up&order_field=position&order_type=asc&limit=20' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "# New SERP entries in the period (prev_pos is null)\ncurl 'https://api.seranking.com/v1/domain/keywords?source=us&domain=seranking.com&pos_change=new&limit=20' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "curl 'https://api.seranking.com/v1/domain/keywords?source=us&domain=seranking.com\\\n&filter[intents]=I\\\n&filter[difficulty][to]=30\\\n&filter[volume][from]=100\\\n&filter[keyword_count][from]=4\\\n&order_field=traffic_percent&order_type=desc&limit=50' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] } }, "/v1/domain/pages": { @@ -3529,83 +8360,88 @@ "tags": [ "Domain Analysis" ], - "summary": "Domain pages", - "description": "Returns a filterable and sortable list of organic or paid keywords for which a specific domain ranks in a given database.", + "summary": "Get domain pages", + "description": "Retrieves a list of individual pages ranking within a specified domain, along with their organic or paid search performance metrics. This endpoint helps identify which specific URLs contribute the most to visibility, traffic, and value in a regional database.\n\n**Cost:** 100 credits per request\n\nIf the request is successful, the server returns a JSON array. Each object represents a single ranking page with aggregated metrics.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/domain-analysis/#domain-pages" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "target", "in": "query", + "required": true, + "description": "Root domain to analyze (e.g., `example.com`).", "schema": { "type": "string" - }, - "example": "seranking.com" + } }, { "name": "scope", "in": "query", + "required": true, + "description": "Scope of analysis:\n• `base_domain` – includes all subdomains under the registrable domain.\n• `domain` – analyzes pages under the specified host only.\n• `url` – analyzes a single, specific URL including its path and query parameters.", "schema": { "type": "string" - }, - "example": "base_domain" + } }, { "name": "source", "in": "query", + "required": true, + "description": "Country code of the regional keyword database (e.g., `us`). For acceptable values, see [Regional database codes](https://seranking.com/api/data/reference#regional-database-codes).", "schema": { "type": "string" - }, - "example": "us" + } }, { "name": "type", "in": "query", + "description": "Search traffic type for which data is retrieved:\n• `organic` – organic search traffic\n• `adv` – paid search traffic", "schema": { - "type": "string" - }, - "example": "organic" + "type": "string", + "default": "organic" + } }, { "name": "order_field", "in": "query", + "description": "Field by which results are sorted: \n• `keywords_count`\n• `traffic_sum`\n• `traffic_percent`\n• `price_sum`", "schema": { - "type": "string" - }, - "example": "keywords_count" + "type": "string", + "default": "keywords_count" + } }, { "name": "order_type", "in": "query", + "description": "Sorting order: \n• `asc` – ascending\n• `desc` – descending", "schema": { - "type": "string" - }, - "example": "desc" + "type": "string", + "default": "desc" + } }, { "name": "offset", "in": "query", + "description": "Starting position for the paginated list.", "schema": { - "type": "string" + "type": "integer" } }, { "name": "limit", "in": "query", + "description": "Maximum number of pages to return in a single response.", "schema": { - "type": "integer" - }, - "example": 1000 + "type": "integer", + "default": 1000 + } }, { "name": "filter[domain_url]", "in": "query", + "description": "JSON string specifying the URL text that must be included. See [Text search JSON structure](https://seranking.com/api/data/domain-analysis/#text-search-json-structure) for formatting details.", "schema": { "type": "string" } @@ -3613,68 +8449,256 @@ { "name": "filter[domain_traffic_percent][from]", "in": "query", + "description": "Minimum percentage of the total domain traffic contributed by the page to be included in the results.", "schema": { - "type": "string" + "type": "number" } }, { "name": "filter[domain_traffic_percent][to]", "in": "query", + "description": "Maximum percentage of the total domain traffic contributed by the page to be included in the results.", "schema": { - "type": "string" + "type": "number" } }, { "name": "filter[keywords_count][from]", "in": "query", + "description": "Minimum number of ranking keywords for the page to be included in the results.", "schema": { - "type": "string" + "type": "integer" } }, { "name": "filter[keywords_count][to]", "in": "query", + "description": "Maximum number of ranking keywords for the page to be included in the results.", "schema": { - "type": "string" + "type": "integer" } }, { "name": "filter[traffic_sum][from]", "in": "query", + "description": "Minimum estimated monthly traffic for the page to be included in the results.", "schema": { - "type": "string" + "type": "integer" } }, { "name": "filter[traffic_sum][to]", "in": "query", + "description": "Maximum estimated monthly traffic for the page to be included in the results.", "schema": { - "type": "string" + "type": "integer" } }, { "name": "filter[price_sum][from]", "in": "query", + "description": "Minimum estimated traffic value (PPC equivalent) for the page to be included in the results.", "schema": { - "type": "string" + "type": "number" } }, { "name": "filter[price_sum][to]", "in": "query", + "description": "Maximum estimated traffic value (PPC equivalent) for the page to be included in the results.", "schema": { - "type": "string" + "type": "number" } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "traffic_sum": { + "type": "integer", + "description": "Estimated monthly traffic from ranking keywords." + }, + "traffic_percent": { + "type": "number", + "description": "Percentage of total domain traffic attributed to the page." + }, + "price_sum": { + "type": "number", + "description": "Estimated traffic value (PPC equivalent)." + }, + "keywords_count": { + "type": "integer", + "description": "Number of keywords the page ranks for." + }, + "url": { + "type": "string", + "description": "Full page URL." + }, + "title": { + "type": "string", + "description": "Page title as shown in search results." + }, + "intents": { + "type": "object", + "properties": { + "I": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Number of keywords matching the intent." + }, + "traffic": { + "type": "integer", + "description": "Estimated traffic from keywords with this intent." + }, + "percents": { + "type": "number", + "description": "Share of this intent within the page’s total keyword set." + } + } + }, + "N": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Number of keywords matching the intent." + }, + "traffic": { + "type": "integer", + "description": "Estimated traffic from keywords with this intent." + }, + "percents": { + "type": "number", + "description": "Share of this intent within the page’s total keyword set." + } + } + }, + "L": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Number of keywords matching the intent." + }, + "traffic": { + "type": "integer", + "description": "Estimated traffic from keywords with this intent." + }, + "percents": { + "type": "number", + "description": "Share of this intent within the page’s total keyword set." + } + } + }, + "C": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Number of keywords matching the intent." + }, + "traffic": { + "type": "integer", + "description": "Estimated traffic from keywords with this intent." + }, + "percents": { + "type": "number", + "description": "Share of this intent within the page’s total keyword set." + } + } + }, + "T": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Number of keywords matching the intent." + }, + "traffic": { + "type": "integer", + "description": "Estimated traffic from keywords with this intent." + }, + "percents": { + "type": "number", + "description": "Share of this intent within the page’s total keyword set." + } + } + } + }, + "description": "Distribution of keyword intent types for the page:\n• `I` – informational\n• `N` – navigational\n• `L` – local\n• `C` – commercial\n• `T` – transactional" + } + } + } + }, + "example": [ + { + "traffic_sum": 451267, + "traffic_percent": 5.95, + "price_sum": 403266.21, + "keywords_count": 133271, + "url": "https://www.booking.com/", + "title": "Booking.com | Official site | The best hotels, flights, car rentals ...", + "intents": { + "I": { + "count": 85939, + "traffic": 440725, + "percents": 43.46 + }, + "N": { + "count": 27623, + "traffic": 374646, + "percents": 13.97 + }, + "L": { + "count": 46758, + "traffic": 10482, + "percents": 23.64 + }, + "C": { + "count": 35928, + "traffic": 7688, + "percents": 18.17 + }, + "T": { + "count": 1503, + "traffic": 80, + "percents": 0.76 + } + } + } + ] + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.example.com/v1/domain/pages?target=seranking.com&scope=base_domain&source=us&type=organic' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] } }, "/v1/domain/subdomains": { @@ -3683,83 +8707,88 @@ "tags": [ "Domain Analysis" ], - "summary": "Domain subdomains", - "description": "Returns a filterable and sortable list of organic or paid keywords for which a specific domain ranks in a given database.", + "summary": "Get domain subdomains", + "description": "Retrieves a list of subdomains for a specified domain, along with key organic or paid search performance metrics. This endpoint helps identify which subdomains contribute the most to visibility, traffic, and value within a regional database.\n\n**Cost:** 100 credits per request\n\nIf the request is successful, the server returns a JSON array. Each object in this array represents a subdomain with aggregated metrics.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/domain-analysis/#domain-subdomains" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "target", "in": "query", + "required": true, + "description": "Root domain to analyze (e.g., `example.com`).", "schema": { "type": "string" - }, - "example": "seranking.com" + } }, { "name": "scope", "in": "query", + "required": true, + "description": "Scope of analysis:\n• `base_domain` – aggregates subdomains under the registrable domain.\n• `domain` – aggregates subdomains under the specified host.", "schema": { "type": "string" - }, - "example": "base_domain" + } }, { "name": "source", "in": "query", + "required": true, + "description": "Country code of the regional keyword database (e.g., `us`). For acceptable values, see [Regional database codes](https://seranking.com/api/data/reference#regional-database-codes).", "schema": { "type": "string" - }, - "example": "us" + } }, { "name": "type", "in": "query", + "description": "Search traffic type for which data is retrieved:\n• `organic` – organic search traffic\n• `adv` – paid search traffic", "schema": { - "type": "string" - }, - "example": "organic" + "type": "string", + "default": "organic" + } }, { "name": "order_field", "in": "query", + "description": "Field by which results are sorted:\n• `keywords_count`\n• `traffic_sum`\n• `traffic_percent`\n• `price_sum`", "schema": { - "type": "string" - }, - "example": "keywords_count" + "type": "string", + "default": "keywords_count" + } }, { "name": "order_type", "in": "query", + "description": "Sorting order:\n• `asc` – ascending\n• `desc` – descending", "schema": { - "type": "string" - }, - "example": "asc" + "type": "string", + "default": "desc" + } }, { "name": "offset", "in": "query", + "description": "Starting position for the paginated list.", "schema": { - "type": "string" + "type": "integer" } }, { "name": "limit", "in": "query", + "description": "Maximum number of subdomains to return in a single response (per page).", "schema": { - "type": "integer" - }, - "example": 1000 + "type": "integer", + "default": 1000 + } }, { "name": "filter[domain_url]", "in": "query", + "description": "JSON string specifying the subdomain or host text that must be included. See [Text search JSON structure](https://seranking.com/api/data/domain-analysis/#text-search-json-structure) for formatting details.", "schema": { "type": "string" } @@ -3767,68 +8796,161 @@ { "name": "filter[domain_traffic_percent][from]", "in": "query", + "description": "Minimum percentage of the total domain traffic contributed by the subdomain or URL to be included in the results.", "schema": { - "type": "string" + "type": "number" } }, { "name": "filter[domain_traffic_percent][to]", "in": "query", + "description": "Maximum percentage of the total domain traffic contributed by the subdomain or URL to be included in the results.", "schema": { - "type": "string" + "type": "number" } }, { "name": "filter[keywords_count][from]", "in": "query", + "description": "Minimum number of ranking keywords for the subdomain or URL to be included in the results.", "schema": { - "type": "string" + "type": "integer" } }, { "name": "filter[keywords_count][to]", "in": "query", + "description": "Maximum number of ranking keywords for the subdomain or URL to be included in the results.", "schema": { - "type": "string" + "type": "integer" } }, { "name": "filter[traffic_sum][from]", "in": "query", + "description": "Minimum estimated monthly traffic for the subdomain or URL to be included in the results.", "schema": { - "type": "string" + "type": "integer" } }, { "name": "filter[traffic_sum][to]", "in": "query", + "description": "Maximum estimated monthly traffic for the subdomain or URL to be included in the results.", "schema": { - "type": "string" + "type": "integer" } }, { "name": "filter[price_sum][from]", "in": "query", + "description": "Minimum estimated traffic value (PPC equivalent) for the subdomain or URL to be included in the results.", "schema": { - "type": "string" + "type": "number" } }, { "name": "filter[price_sum][to]", "in": "query", + "description": "Maximum estimated traffic value (PPC equivalent) for the subdomain or URL to be included in the results.", "schema": { - "type": "string" + "type": "number" } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "traffic_sum": { + "type": "integer", + "description": "Estimated monthly traffic from ranking keywords." + }, + "traffic_percent": { + "type": "number", + "description": "Percentage of total domain traffic attributed to the subdomain." + }, + "price_sum": { + "type": "number", + "description": "Estimated traffic value (PPC equivalent)." + }, + "keywords_count": { + "type": "integer", + "description": "Number of keywords the subdomain ranks for." + }, + "url": { + "type": "string", + "description": "Subdomain or root domain host (e.g., `blog.example.com`, `example.com`)." + } + } + } + }, + "example": [ + { + "traffic_sum": 73909, + "traffic_percent": 99.52, + "price_sum": 149497.18, + "keywords_count": 116181, + "url": "example.com" + }, + { + "traffic_sum": 209, + "traffic_percent": 0.28, + "price_sum": 56.34, + "keywords_count": 33, + "url": "online.example.com" + }, + { + "traffic_sum": 146, + "traffic_percent": 0.2, + "price_sum": 175.67, + "keywords_count": 1590, + "url": "help.example.com" + }, + { + "traffic_sum": 0, + "traffic_percent": 0, + "price_sum": 0, + "keywords_count": 1, + "url": "academy.example.com" + }, + { + "traffic_sum": 0, + "traffic_percent": 0, + "price_sum": 0, + "keywords_count": 4, + "url": "visible.example.com" + } + ] + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/domain/subdomains?target=example.com&scope=base_domain&source=us&type=organic&order_field=keywords_count&order_type=desc&limit=1000' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] } }, "/v1/domain/ads": { @@ -3837,84 +8959,289 @@ "tags": [ "Domain Analysis" ], - "summary": "Paid ads for domain", - "description": "Returns a list of keywords a specific domain is bidding on, along with the ad creatives used for those keywords.", + "summary": "Get paid ads by keyword / Get paid ads for domain", + "description": "### Get paid ads by keyword\n\nRetrieves an overview of paid advertisements (PPC ads) run by various domains for a specific target keyword. The method shows which domains are advertising on that keyword, the extent of their advertising efforts over a period, and details of their ad creatives.\n\n**Cost:** 100 credits per request\n\nIf successful, the server returns a JSON array. Each object in the array represents a unique domain that has run paid ads for the specified keyword and contains an overview of that domain’s advertising activity for that keyword.\n\n### Get paid ads for domain\n\nRetrieves an overview of keywords a specific target domain is bidding on in paid search auctions. It details the ads run by this domain for those keywords, including ad copy, landing pages, and observed performance metrics over a specified period.\n\n**Cost:** 100 credits per request\n\nIf successful, the server returns a JSON array. Each object in the array represents a unique keyword that the specified domain has targeted with paid ads. It includes performance metrics for that keyword and details of the ad snippets run by the domain for that keyword.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/domain-analysis/#paid-ads-keyword" + }, "parameters": [ { - "name": "apikey", + "name": "source", "in": "query", + "required": true, + "description": "Country code of the regional keyword database (e.g., `us`). For acceptable values, see [Regional database codes](https://seranking.com/api/data/reference#regional-database-codes).", "schema": { "type": "string" - }, - "example": "{{secret_key_data}}" + } }, { - "name": "domain", + "name": "keyword", "in": "query", + "description": "Specific keyword for which to retrieve paid ad data. Accepts any valid keyword string (e.g., `new york hotels`).", "schema": { "type": "string" - }, - "example": "booking.com" + } }, { "name": "from", "in": "query", + "description": "Starting year and month for the data retrieval period, formatted as YYYY-MM (e.g., `2017-01`).", "schema": { - "type": "string" - }, - "example": "2023-01" + "type": "string", + "default": "N/A (implies current/all available data)" + } }, { "name": "to", "in": "query", + "description": "Ending year and month for the data retrieval period, formatted as YYYY-MM (e.g., `2023-12`).\n\nGet paid ads for domain: Ending year and month for the data retrieval period, formatted as YYYY-MM (e.g., `2018-12`).", "schema": { - "type": "string" - }, - "example": "2023-12" + "type": "string", + "default": "N/A (implies current/all available data)" + } }, { - "name": "limit", + "name": "page", "in": "query", + "description": "Page number for paginated results when retrieving domains advertising on the specified keyword (e.g., `1`). Positive integer.\n\nGet paid ads for domain: Page number for paginated results when retrieving keywords the domain is advertising on (e.g., `1`). Positive integer.", "schema": { - "type": "integer" - }, - "example": 10 + "type": "integer", + "default": 1 + } }, { - "name": "source", + "name": "limit", "in": "query", - "required": true, + "description": "Maximum number of domains advertising on the specified keyword to return per page. Accepts values from 1 to 100 (e.g., `20`).\n\nGet paid ads for domain: Maximum number of keywords the domain is advertising on to return per page. Accepts values from 1 to 100 (e.g., `100`).", "schema": { - "type": "string" - }, - "example": "us" + "type": "integer", + "default": 100 + } }, { - "name": "keyword", + "name": "domain", "in": "query", - "description": "Search by keyword instead of domain. Mutually exclusive with domain.", + "description": "Specific domain for which to retrieve its paid ad data (e.g., `booking.com`).", "schema": { "type": "string" } - }, - { - "name": "page", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - }, - "example": 1 } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain name that ran ads for the target keyword (e.g., `hotels.com`)." + }, + "ads_count": { + "type": "integer", + "description": "Number of unique ad creatives or instances observed from this domain for the target keyword within the specified period (e.g., `19`)." + }, + "keywords_count": { + "type": "integer", + "description": "Number of other keywords the domain was also seen advertising on, providing context on the advertiser’s breadth (e.g., `78972`)." + }, + "traffic_sum": { + "type": "integer", + "description": "Estimation of the total traffic this domain received from its ads for all its keywords, not just the target one (e.g., `3565364`)." + }, + "price_sum": { + "type": "number", + "description": "Estimated traffic value (PPC equivalent) from paid keywords." + }, + "snippets": { + "type": "object", + "properties": { + "2023-05": { + "type": "object", + "properties": { + "position": { + "type": "integer", + "description": "Observed position of the ad snippet on the SERP (e.g., `2`)." + }, + "snippet_title": { + "type": "string", + "description": "Title text of the specific advertisement (e.g., `Booking`)." + }, + "snippet_description": { + "type": "string", + "description": "Descriptive text body of the specific advertisement (e.g., `Stay 10 nights & get 1 free!...`)." + }, + "snippet_display_url": { + "type": "string", + "description": "URL displayed in the specific advertisement (e.g., `www.hotels.com/`)." + }, + "snippet_count": { + "type": "string", + "description": "Count or frequency of this specific snippet being observed (e.g., `1`)." + }, + "url": { + "type": "string", + "description": "Actual destination URL (landing page) of the specific advertisement (e.g., `https://www.hotels.com/`)." + } + } + } + } + } + } + }, + "title": "Get paid ads by keyword" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "keyword": { + "type": "string", + "description": "Keyword phrase that the specified domain was advertising on (e.g., `locanda vivaldi venice`)." + }, + "ads_count": { + "type": "integer", + "description": "Number of unique ad creatives or instances observed from the specified domain for this keyword within the given period (e.g., `24`)." + }, + "competition": { + "type": "string", + "description": "Score representing keyword competition. Float from `0.00` (low) to `1.00` (high)." + }, + "cpc": { + "type": "string", + "description": "Average CPC (Cost Per Click) for the keyword (e.g.,` 5.64`)." + }, + "volume": { + "type": "string", + "description": "Average monthly search volume for this keyword (e.g., `100`)." + }, + "snippets": { + "type": "object", + "properties": { + "2017-01": { + "type": "object", + "properties": { + "position": { + "type": "string", + "description": "Observed position of the ad snippet on the SERP (e.g., `2`)." + }, + "snippet_title": { + "type": "string", + "description": "Title text of the specific advertisement (e.g., `Locanda Vivaldi, Venice - Booking.com`)." + }, + "snippet_description": { + "type": "string", + "description": "Descriptive text body of the specific advertisement (e.g., `Book at Locanda Vivaldi, Venice. No reservation costs...`)." + }, + "snippet_display_url": { + "type": "string", + "description": "URL displayed in the specific advertisement (e.g., `www.booking.com/hotel/it/locanda-vivaldi.en.html?a`)." + }, + "snippet_count": { + "type": "string", + "description": "Count or frequency of the specific snippet being observed (e.g., `1`)." + }, + "snippet_num": { + "type": "integer", + "description": "Numerical identifier for the specific ad snippet (e.g., `125`)." + }, + "url": { + "type": "string", + "description": "Actual destination URL (landing page) of the specific advertisement (e.g., `http://www.booking.com/hotel/it/locanda-vivaldi.en.html?aid=311088`)." + } + } + } + } + } + } + }, + "title": "Get paid ads for domain" + } + ] + }, + "examples": { + "getPaidAdsByKeyword": { + "summary": "Get paid ads by keyword", + "value": [ + { + "domain": "examplehotelchain.com", + "ads_count": 5, + "keywords_count": 250, + "traffic_sum": 150000, + "price_sum": 75000.5, + "snippets": { + "2023-05": { + "position": 1, + "snippet_title": "Luxury London Stays | Example Hotels‎", + "snippet_description": "Experience unparalleled luxury. Book your 5-star hotel in London today. Exclusive offers available for a limited time.", + "snippet_display_url": "www.examplehotelchain.com/london", + "snippet_count": "1", + "url": "https://www.examplehotelchain.com/offers/london-luxury" + } + } + } + ] + }, + "getPaidAdsForDomain": { + "summary": "Get paid ads for domain", + "value": [ + { + "keyword": "locanda vivaldi venice", + "ads_count": 24, + "competition": "0.39", + "cpc": "5.64", + "volume": "100", + "snippets": { + "2017-01": { + "position": "2", + "snippet_title": "Locanda Vivaldi, Venice – Booking.com‎", + "snippet_description": "Book at Locanda Vivaldi, Venice. No reservation costs. Great rates Amenities: Free Wifi, Non Smoking Rooms, 24 Hour Front Desk, Air Conditioning", + "snippet_display_url": "www.booking.com/hotel/it/locanda-vivaldi.en.html?a", + "snippet_count": "1", + "snippet_num": 125, + "url": "http://www.booking.com/hotel/it/locanda-vivaldi.en.html?aid=311088" + } + } + } + ] + } + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/domain/ads?source=us&keyword=nyc+hotels&from=2023-01&to=2023-12&limit=10' \\\n-H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/domain/ads?source=us&domain=booking.com&from=2023-01&to=2023-12&limit=10' \\\n-H 'Authorization: Token YOUR_API_KEY'" + } + ] } }, "/v1/domain/competitors": { @@ -3923,1005 +9250,1660 @@ "tags": [ "Domain Analysis" ], - "summary": "Competitors", - "description": "Identifies a list of top organic or paid competitors for a specified domain and shows the number of keywords they have in common.", + "summary": "Get domain competitors", + "description": "Retrieves a list of competitor domains for a specified target domain. The list can be tailored to show organic or paid competitors, and can optionally include or exclude major industry players. Furthermore, the level of detail in the response can be adjusted to include basic information or more extensive statistics for each competitor. The maximum number of competitors returned is 500.\n\n**Cost:** 100 credits per request\n\nIf the request is successful, the server returns a JSON array. Each object in this array represents a competitor domain.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/domain-analysis/#competitors" + }, "parameters": [ { - "name": "apikey", + "name": "source", "in": "query", + "required": true, + "description": "Country code of the regional keyword database (e.g., `us`). For acceptable values, see [Regional database codes](https://seranking.com/api/data/reference#regional-database-codes).", "schema": { "type": "string" - }, - "example": "{{secret_key_data}}" + } }, { "name": "domain", "in": "query", + "required": true, + "description": "Primary domain for which to find competitors (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "seranking.com" + } }, { "name": "type", "in": "query", + "description": "Search traffic type for which data is retrieved:\n• `organic` – organic search traffic\n• `adv` – paid search traffic", "schema": { "type": "string", - "enum": [ - "organic", - "adv" - ] - }, - "example": "organic" + "default": "organic" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain name of the competitor (e.g., `tripadvisor.com`)." + }, + "common_keywords": { + "type": "integer", + "description": "Number of keywords for which both the analyzed domain and the competitor rank (e.g., `1076`)." + }, + "domain_relevance": { + "type": "number", + "description": "A score indicating how closely the competitor’s keyword profile overlaps with the analyzed domain (e.g., `10.98`). Higher values indicate greater relevance." + }, + "total_keywords": { + "type": "integer", + "description": "Number of keywords for which the competitor domain ranks within Google’s top 100 results in the specified database (e.g., `2084`)." + }, + "missing_keywords": { + "type": "integer", + "description": "Number of keywords for which the competitor ranks but the analyzed domain does not (e.g., `19511`). Calculated as `total_keywords - common_keywords`." + }, + "traffic_sum": { + "type": "integer", + "description": "Estimated monthly traffic volume the competitor receives from its ranking keywords (e.g., `291`). This is typically calculated based on expected CTR, search volume, and positions." + }, + "price_sum": { + "type": "number", + "description": "Estimated traffic value (PPC equivalent) of the competitor’s traffic." + } + } + } + }, + "example": [ + { + "domain": "seoreviewtools.com", + "common_keywords": 29926, + "domain_relevance": 10.98, + "total_keywords": 49437, + "missing_keywords": 19511, + "traffic_sum": 40619, + "price_sum": 68705.61 + }, + { + "domain": "keyword-tools.org", + "common_keywords": 10110, + "domain_relevance": 2.7, + "total_keywords": 11183, + "missing_keywords": 1073, + "traffic_sum": 19544, + "price_sum": 26071.28 + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/domain/competitors?source=us&domain=yourtargetdomain.com&type=organic' \\\n-H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/domain/keywords/comparison": { + "get": { + "operationId": "getDomainKeywordsComparison", + "tags": [ + "Domain Analysis" + ], + "summary": "Analyze keyword overlap and gaps", + "description": "Analyzes and compares the keyword rankings of two websites using either domains or full URLs. It can find keywords they have in common or identify a ‘keyword gap’— keywords for which one site ranks, but the other does not. This is useful for competitive analysis and identifying ranking opportunities.\n\n**Cost:** 100 credits per request\n\n**Note:** Either `domain` or `url` must be specified.\nWhen one option is provided, the other is ignored.\n\n**Understanding the diff parameter**\n\nThe `diff` parameter controls the comparison mode by defining which set of keywords to return. For these examples, let **A** be the primary `domain` and **B** be the `compare` domain.\n\n**diff=0: common keywords (A ∩ B)**\n\nReturns keywords for which **both** the primary `domain` (A) and the `compare` domain (B) rank.\n\n**diff=1: keyword gap (A – B)**\n\nReturns keywords for which the primary `domain` (A) ranks, but the `compare` domain (B) does **not**.\n\nTo find the keywords for which the compare domain ranks but your primary domain does not, simply swap the domains in your request. Set the competitor’s domain as the primary domain and your domain as the compare domain, while keeping `diff=1`.\n\nFor example, to see keywords `hotels.com` has that `booking.com` lacks, request: `...&domain=hotels.com&compare=booking.com&diff=1...`\n\nIf the request is successful, the server returns a JSON array. Each object in this array represents a keyword and includes metrics for both the primary domain and the compare domain (where applicable, depending on the diff mode).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/domain-analysis/#domain-comparison" + }, + "parameters": [ { "name": "source", "in": "query", "required": true, + "description": "Country code of the regional keyword database (e.g., `us`). For acceptable values, see [Regional database codes](https://seranking.com/api/data/reference#regional-database-codes).", "schema": { "type": "string" - }, - "example": "us" + } }, { - "name": "url", + "name": "domain", "in": "query", - "description": "Specific URL to analyze instead of the full domain.", + "description": "Primary domain for the comparison (e.g., `booking.com`).", "schema": { "type": "string" - }, - "example": "https://seranking.com/api.html" - }, - { - "name": "stats", - "in": "query", - "description": "Include additional statistics (0 or 1).", - "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ], - "default": 0 - }, - "example": 0 - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} } - } - } - } - }, - "/v1/domain/keywords/comparison": { - "get": { - "operationId": "getDomainKeywordsComparison", - "tags": [ - "Domain Analysis" - ], - "summary": "Domain keyword comparison", - "description": "Compares two domains to find either their common keywords or the keywords for which one ranks and the other does not.", - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" }, { - "name": "source", + "name": "url", "in": "query", + "description": "Primary full URL for the comparison (e.g., `https://www.booking.com`).", "schema": { "type": "string" - }, - "example": "us" + } }, { "name": "compare", "in": "query", + "required": true, + "description": "Competitor domain or full URL to compare against the primary domain or URL. Must match the type of the primary parameter (`domain` or `url`).", "schema": { "type": "string" - }, - "example": "samsung.com" + } }, { - "name": "domain", + "name": "type", "in": "query", + "description": "Search traffic type for which data is retrieved:\n• `organic` – organic search traffic\n• `adv` – paid search traffic", "schema": { - "type": "string" - }, - "example": "apple.com" + "type": "string", + "default": "organic" + } }, { - "name": "url", + "name": "page", "in": "query", - "description": "Specific URL to compare instead of full domain.", + "description": "Page number for paginated results when retrieving keywords (e.g., `1`). Positive integer.", "schema": { - "type": "string" - }, - "example": "https://www.apple.com" + "type": "integer", + "default": 1 + } }, { - "name": "type", + "name": "limit", "in": "query", + "description": "Maximum number of keywords to return per page (e.g., `50`). Accepts values from 1 to 1000.", "schema": { - "type": "string" - }, - "example": "organic" + "type": "integer", + "default": 100 + } }, { "name": "diff", "in": "query", - "schema": { - "type": "integer" - }, - "example": 1 - }, - { - "name": "order_type", - "in": "query", + "description": "Controls the comparison mode. Accepts values: 0, 1. See the section below for a detailed explanation.", "schema": { "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "example": "desc" + "default": "0" + } }, { "name": "order_field", "in": "query", + "description": "Field by which results are sorted:\n• `keyword`\n• `volume`\n• `cpc`\n• `competition`\n• `difficulty`\n• `position`", "schema": { "type": "string", - "enum": [ - "keyword", - "volume", - "cpc", - "competition", - "difficulty", - "position" - ] - }, - "example": "volume" - }, - { - "name": "limit", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 1 + "default": "keyword" + } }, { - "name": "page", + "name": "order_type", "in": "query", + "description": "Sorting order:\n• `asc` – ascending\n• `desc` – descending", "schema": { - "type": "integer" - }, - "example": 0 + "type": "string", + "default": "asc" + } }, { "name": "cols", "in": "query", - "description": "Comma-separated list of columns to include in the response.", + "description": "Comma-separated list of response fields to include. If omitted, a default set of relevant columns is returned.", "schema": { - "type": "string" - }, - "example": "keyword,position,volume,traffic,cpc,competition" - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/v1/keywords/export": { - "post": { - "operationId": "createKeywordsExport", - "tags": [ - "Keyword Research" - ], - "summary": "Export Keywords Metrics", - "description": "Retrieves bulk performance metrics like search volume, CPC, and difficulty for a submitted list of up to 5,000 keywords.", - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "required": [ - "keywords[]" - ], - "properties": { - "keywords[]": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of keywords (max 5,000).", - "maxItems": 5000 - }, - "sort": { - "type": "string", - "enum": [ - "volume", - "cpc", - "difficulty", - "competition", - "history_trend" - ] - }, - "sort_order": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "cols": { - "type": "string", - "description": "Comma-separated list of columns to include." - } - } - } + "type": "string", + "default": "All relevant by default" } - } - }, - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" }, { - "name": "source", + "name": "filter[keyword]", "in": "query", - "required": true, + "description": "Case-insensitive substring match on the keyword text (e.g., `vegas`).", "schema": { "type": "string" - }, - "example": "us" - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} } - } - } - } - }, - "/v1/keywords/similar": { - "get": { - "operationId": "getKeywordsSimilar", - "tags": [ - "Keyword Research" - ], - "summary": "Get similar keywords", - "description": "Discovers semantically similar keywords, including synonyms and close variations, for a given seed term.", - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" }, { - "name": "source", + "name": "filter[multi_keyword_included]", "in": "query", + "description": "JSON string specifying keyword text that must be included. See [Text search JSON structure](https://seranking.com/api/data/domain-analysis/#text-search-json-structure) for formatting details.", "schema": { "type": "string" - }, - "example": "us" + } }, { - "name": "keyword", + "name": "filter[multi_keyword_excluded]", "in": "query", + "description": "JSON string specifying keyword text that must be excluded. See [Text search JSON structure](https://seranking.com/api/data/domain-analysis/#text-search-json-structure) for formatting details.", "schema": { "type": "string" - }, - "example": "seo" + } }, { - "name": "limit", + "name": "filter[volume][from]", "in": "query", + "description": "Minimum monthly search volume for keywords to be included. Non-negative integer.", "schema": { "type": "integer" - }, - "example": 100 + } }, { - "name": "offset", + "name": "filter[volume][to]", "in": "query", + "description": "Maximum monthly search volume for keywords to be included. Non-negative integer.", "schema": { "type": "integer" - }, - "example": 0 - }, - { - "name": "sort", - "in": "query", - "schema": { - "type": "string" - }, - "example": "keyword" + } }, { - "name": "sort_order", + "name": "filter[cpc][from]", "in": "query", + "description": "Minimum CPC (Cost Per Click) value (e.g., `0.1`). Non-negative float.", "schema": { - "type": "string" - }, - "example": "asc" + "type": "number" + } }, { - "name": "history_trend", + "name": "filter[cpc][to]", "in": "query", + "description": "Maximum CPC (Cost Per Click) value (e.g., `2.5`). Non-negative float.", "schema": { - "type": "boolean" - }, - "example": true + "type": "number" + } }, { - "name": "filter[volume][from]", + "name": "filter[competition][from]", "in": "query", + "description": "Minimum competition score. Float from `0.00` (low) to `1.00` (high).", "schema": { - "type": "integer" - }, - "example": 100 + "type": "number" + } }, { - "name": "filter[volume][to]", + "name": "filter[competition][to]", "in": "query", + "description": "Maximum competition score. Float from `0.00` (low) to `1.00` (high).", "schema": { - "type": "integer" - }, - "example": 100000 + "type": "number" + } }, { "name": "filter[difficulty][from]", "in": "query", + "description": "Minimum keyword difficulty score (0–100).", "schema": { "type": "integer" - }, - "example": 0 + } }, { "name": "filter[difficulty][to]", "in": "query", + "description": "Maximum keyword difficulty score (0–100).", "schema": { "type": "integer" - }, - "example": 30 - }, - { - "name": "filter[cpc][from]", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 0 - }, - { - "name": "filter[cpc][to]", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 100 - }, - { - "name": "filter[competition][from]", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 0 + } }, { - "name": "filter[competition][to]", + "name": "filter[intents]", "in": "query", + "description": "Comma-separated list of search intent codes. Returns keywords matching **any** of the specified intents (OR logic):\n• `I` – informational\n• `N` – navigational\n• `T` – transactional\n• `C` – commercial\n• `L` – local", "schema": { - "type": "number" - }, - "example": 0.1 + "type": "string" + } }, { - "name": "filter[keyword_count][from]", + "name": "filter[serp_features]", "in": "query", + "description": "Comma-separated list of SERP feature codes. Returns keywords where **any** of the specified features is present on the SERP (OR logic), e.g., `sitelinks,hotel_pack,people_also_ask`. For acceptable values, see [SERP features](https://seranking.com/api/data/reference/#serp-features).", "schema": { - "type": "integer" - }, - "example": 3 + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "keyword": { + "type": "string", + "description": "Analyzed keyword phrase (e.g., `haworth hotel holland mi`)." + }, + "volume": { + "type": "integer", + "description": "Average monthly number of Google searches for the specified keyword (e.g., `10`)." + }, + "cpc": { + "type": "number", + "description": "CPC (Cost Per Click) for the keyword (e.g., `3.01`)." + }, + "competition": { + "type": "number", + "description": "Score representing keyword competition. Float from `0.00` (low) to `1.00` (high)." + }, + "difficulty": { + "type": "integer", + "description": "Keyword difficulty for this keyword (from `0` to `100`)." + }, + "total_sites": { + "type": "integer", + "description": "Number of websites appearing in the search results for the query (e.g., `94`)." + }, + "intents": { + "type": "array", + "items": { + "type": "string", + "description": "Search intent codes associated with the keyword. Possible values:\n• `I` – informational\n• `N` – navigational\n• `T` – transactional\n• `C` – commercial\n• `L` – local" + }, + "description": "Search intent codes associated with the keyword. Possible values:\n• `I` – informational\n• `N` – navigational\n• `T` – transactional\n• `C` – commercial\n• `L` – local" + }, + "serp_features": { + "type": "array", + "items": { + "type": "string", + "description": "SERP features present for this keyword on the SERP (e.g., `sitelinks`, `hotel_pack`, `people_also_ask`). For acceptable values, see [SERP features](https://seranking.com/api/data/reference/#serp-features)." + }, + "description": "SERP features present for this keyword on the SERP (e.g., `sitelinks`, `hotel_pack`, `people_also_ask`). For acceptable values, see [SERP features](https://seranking.com/api/data/reference/#serp-features)." + }, + "compare_position": { + "type": "integer", + "description": "Ranking position of the `compare` domain for this keyword (e.g., `5`)." + }, + "compare_url": { + "type": "string", + "description": "URL of the `compare` domain’s page that ranks for this keyword (e.g., `https://www.hotels.com/ho576868/haworth/`)." + }, + "compare_price": { + "type": "number", + "description": "Estimated cost/value of the traffic the `compare` domain receives from this keyword (e.g., `1.84`)." + }, + "compare_traffic": { + "type": "integer", + "description": "Estimated traffic the `compare` domain receives from this keyword (e.g., `0.61`)." + }, + "position": { + "type": "integer", + "description": "Ranking position of the primary domain for the keyword (e.g., `4`). Can be null if `diff=1` and the primary domain doesn’t rank." + }, + "url": { + "type": "string", + "description": "URL of the primary domain’s page that ranks for this keyword (e.g., `https://www.booking.com/hotel/us/haworth-inn-center.html`). Can be null if `diff=1`." + }, + "price": { + "type": "number", + "description": "Estimated cost/value of the traffic the primary domain receives from this keyword (e.g., `2.44`). Can be null if `diff=1`." + }, + "traffic": { + "type": "integer", + "description": "Estimated traffic the primary domain receives from this keyword (e.g., `0.81`). Can be null if `diff=1`." + } + } + } + }, + "examples": { + "example1": { + "summary": "Example 1", + "value": [ + { + "keyword": "403", + "volume": 33100, + "cpc": 0.11, + "competition": 0.05, + "difficulty": 96, + "total_sites": 0, + "intents": [ + "I" + ], + "serp_features": [ + "video", + "images", + "knowledge_graph", + "sge" + ], + "compare_position": 21, + "compare_url": "https://seranking.com/blog/401-vs-403-error-codes/", + "compare_price": 3.52, + "compare_traffic": 32, + "position": 25, + "url": "https://www.wix.com/encyclopedia/definition/error-403", + "price": 7.81, + "traffic": 71 + } + ] + }, + "example2": { + "summary": "Example 2", + "value": [ + { + "keyword": "403", + "volume": 33100, + "cpc": 0.11, + "competition": 0.05, + "difficulty": 96, + "total_sites": 0, + "intents": [ + "I" + ], + "serp_features": [ + "video", + "images", + "knowledge_graph", + "sge" + ], + "compare_position": 21, + "compare_url": "https://seranking.com/blog/401-vs-403-error-codes/", + "compare_price": 3.52, + "compare_traffic": 32, + "position": 25, + "url": "https://www.wix.com/encyclopedia/definition/error-403", + "price": 7.81, + "traffic": 71 + } + ] + } + } + } + } }, - { - "name": "filter[keyword_count][to]", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 8 + "401": { + "$ref": "#/components/responses/Unauthorized" }, - { - "name": "filter[characters_count][from]", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 15 + "402": { + "$ref": "#/components/responses/PaymentRequired" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ { - "name": "filter[characters_count][to]", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 50 + "lang": "Shell", + "label": "Comparing domain names", + "source": "curl -X GET 'https://api.seranking.com/v1/domain/keywords/comparison?source=us&domain=booking.com&compare=hotels.com&type=organic&diff=0&order_field=volume&order_type=desc' \\\n-H 'Authorization: Token YOUR_API_KEY'" }, { - "name": "filter[serp_features]", - "in": "query", - "schema": { - "type": "string" - }, - "example": "sge,images" + "lang": "Shell", + "label": "Comparing URLs", + "source": "curl -X GET 'https://api.seranking.com/v1/domain/keywords/comparison?source=us&url=https://www.booking.com&compare=https://www.hotels.com&type=organic&diff=1&order_type=desc&order_field=volume' \\\n-H 'Authorization: Token YOUR_API_KEY'" }, { - "name": "filter[intents]", - "in": "query", - "schema": { - "type": "string" - }, - "example": "I,C,T,L" + "lang": "Shell", + "label": "Comparing URLs", + "source": "curl -X GET 'https://api.seranking.com/v1/domain/keywords/comparison?source=us&domain=booking.com&compare=hotels.com&type=organic&diff=0&filter[intents]=T&filter[volume][from]=1000&cols=keyword,volume,intents,position,compare_position' \\\n-H 'Authorization: Token YOUR_API_KEY'" }, { - "name": "filter[multi_keyword_included]", - "in": "query", - "schema": { - "type": "string" - }, - "example": "[\n [\n { \"type\": \"begins\", \"value\": \"find\" },\n { \"type\": \"contains\", \"value\": \"link\" }\n ],\n [\n { \"type\": \"contains\", \"value\": \"backlink\" },\n { \"type\": \"ends\", \"value\": \"checker\" }\n ],\n [\n { \"type\": \"exact\", \"value\": \"serankings\" }\n ]\n]" + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/domain/keywords/comparison?source=us&domain=booking.com&compare=hotels.com&type=organic&diff=0&limit=1' \\\n-H 'Authorization: Token YOUR_API_KEY'" }, { - "name": "filter[multi_keyword_excluded]", + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/domain/keywords/comparison?source=us&domain=booking.com&compare=hotels.com&type=organic&diff=1&limit=1' \\\n-H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/keywords/export": { + "post": { + "operationId": "createKeywordsExport", + "tags": [ + "Keyword Research" + ], + "summary": "Get Keyword Metrics (Bulk)", + "description": "Retrieves various data points for a list of specified keywords within a given regional database. It’s designed for bulk analysis and returns metrics like search volume, CPC, competition, keyword difficulty, search intent, and historical search volume trends for each submitted keyword.\n\nBy default, the returned `history_trend` covers the **12 most recent months, ending at the current month**. Use the optional `history_to` parameter to end the window at an earlier month, and `history_from` to start it later — together they return a custom date range (e.g. to reconstruct a keyword’s seasonality as of a past date). The window is always **capped at 12 months**.\n\n**Cost:** 100 credits per request\n\nIf successful, the server returns a JSON array. Each object in this array corresponds to one of the keywords submitted in the request and contains the requested data points.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/keyword-research/#export" + }, + "parameters": [ + { + "name": "source", "in": "query", + "required": true, + "description": "Country code of the regional keyword database (e.g., `us`). For acceptable values, see Regional database codes.", "schema": { "type": "string" - }, - "example": "[\n [\n { \"type\": \"contains\", \"value\": \"seo\" },\n { \"type\": \"contains\", \"value\": \"tools\" }\n ],\n [\n { \"type\": \"begins\", \"value\": \"find\" },\n { \"type\": \"contains\", \"value\": \"link\" }\n ],\n [\n { \"type\": \"contains\", \"value\": \"backlink\" },\n { \"type\": \"ends\", \"value\": \"checker\" }\n ],\n [\n { \"type\": \"exact\", \"value\": \"serankings\" }\n ]\n]" + } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "keywords": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of keywords to analyze, e.g. `[\"seo platform\", \"seranking.com\"]`. Between 1 and 5,000 keywords per request." + }, + "sort": { + "type": "string", + "description": "Field the results are sorted by: `volume`, `cpc`, `difficulty`, or `competition`." + }, + "sort_order": { + "type": "string", + "description": "Sorting order: `asc` (ascending) or `desc` (descending)." + }, + "history_from": { + "type": "string", + "description": "Start month of the `history_trend` window, `YYYY-MM-DD` (the day is ignored). **Only takes effect together with `history_to`** — sent on its own it is ignored. The window then runs from `history_from` through `history_to` inclusive, capped at the most recent 12 months. Must not be later than `history_to`." + }, + "history_to": { + "type": "string", + "description": "End month of the `history_trend` window, `YYYY-MM-DD` (the day is ignored). On its own it returns the **12 months ending at this month** — e.g. `2024-05-01` returns `2023-06-01` through `2024-05-01`. Combine with `history_from` for a shorter range. Must not be a future month." + } + }, + "required": [ + "keywords" + ] + }, + "example": { + "keywords": [ + "seo platform", + "seranking.com" + ], + "sort": "cpc", + "sort_order": "desc" + } + } + } + }, "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "is_data_found": { + "type": "boolean", + "description": "Indicates whether data was successfully found and retrieved for this specific keyword: `true` (found) / `false` (otherwise)." + }, + "keyword": { + "type": "string", + "description": "Keyword phrase as submitted in the request." + }, + "volume": { + "type": "integer", + "description": "Average monthly search volume for this keyword in the specified source database." + }, + "cpc": { + "type": "number", + "description": "Average Cost Per Click for this keyword." + }, + "competition": { + "type": "number", + "description": "Paid-search competition level for this keyword, on a 0–1 scale (higher = more competition)." + }, + "difficulty": { + "type": "integer", + "description": "Keyword difficulty — how hard it is to rank organically for this keyword, on a 0–100 scale (higher = harder)." + }, + "intents": { + "type": "array", + "items": { + "type": "string", + "description": "Array of search intent codes. Possible values: `I` (Informational — user is looking for information), `C` (Commercial — user is investigating products, services, or brands), `T` (Transactional — user wants to complete an action or purchase), `L` (Local — user is looking for a location or something nearby), `N` (Navigational — user is looking for a specific website or page)." + }, + "description": "Array of search intent codes. Possible values: `I` (Informational — user is looking for information), `C` (Commercial — user is investigating products, services, or brands), `T` (Transactional — user wants to complete an action or purchase), `L` (Local — user is looking for a location or something nearby), `N` (Navigational — user is looking for a specific website or page)." + }, + "history_trend": { + "type": "object", + "properties": { + "2024-06-01": { + "type": "integer" + }, + "2024-07-01": { + "type": "integer" + }, + "2024-08-01": { + "type": "integer" + }, + "2024-09-01": { + "type": "integer" + }, + "2024-10-01": { + "type": "integer" + }, + "2024-11-01": { + "type": "integer" + }, + "2024-12-01": { + "type": "integer" + }, + "2025-01-01": { + "type": "integer" + }, + "2025-02-01": { + "type": "integer" + }, + "2025-03-01": { + "type": "integer" + }, + "2025-04-01": { + "type": "integer" + }, + "2025-05-01": { + "type": "integer" + } + }, + "description": "Object containing historical search volume data for the keyword. Each key is a `YYYY-MM-DD` string representing the first day of a month, and the value is the search volume for that month. By default the window covers the 12 months ending at the current month; it is shifted by `history_to` and narrowed by `history_from` (see Request)." + } + } + } + }, + "example": [ + { + "is_data_found": true, + "keyword": "seo platform", + "volume": 160, + "cpc": 3.87, + "competition": 0.06, + "difficulty": 31, + "intents": [ + "C", + "I" + ], + "history_trend": { + "2024-06-01": 70, + "2024-07-01": 70, + "2024-08-01": 80, + "2024-09-01": 140, + "2024-10-01": 140, + "2024-11-01": 140, + "2024-12-01": 110, + "2025-01-01": 160, + "2025-02-01": 200, + "2025-03-01": 240, + "2025-04-01": 240, + "2025-05-01": 300 + } + }, + { + "is_data_found": true, + "keyword": "seranking.com", + "volume": 480, + "cpc": 2, + "competition": 0.01, + "difficulty": 16, + "intents": [ + "C", + "I" + ], + "history_trend": { + "2024-06-01": 30, + "2024-07-01": 50, + "2024-08-01": 40, + "2024-09-01": 70, + "2024-10-01": 20, + "2024-11-01": 30, + "2024-12-01": 40, + "2025-01-01": 260, + "2025-02-01": 1300, + "2025-03-01": 1600, + "2025-04-01": 1300, + "2025-05-01": 880 + } + } + ] + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/keywords/export?source=us' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"keywords\": [\"seo platform\", \"seranking.com\"],\n \"sort\": \"cpc\",\n \"sort_order\": \"desc\"\n }'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/keywords/export?source=us' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"keywords\": [\"seo platform\"],\n \"history_from\": \"2024-01-01\",\n \"history_to\": \"2024-05-01\"\n }'" + } + ] } }, - "/v1/keywords/related": { + "/v1/keywords/similar": { "get": { - "operationId": "getKeywordsRelated", + "operationId": "getKeywordsSimilar", "tags": [ "Keyword Research" ], - "summary": "Get related keywords", - "description": "Finds topically related keywords that share a high number of overlapping URLs in the search results for a given seed term.", + "summary": "Get similar keywords", + "description": "Retrieves keywords similar to a specified seed keyword within a regional database. Semantically similar keywords include synonyms, close variations, or different phrasings with the same intent. The method returns metrics such as search volume, CPC, competition, keyword difficulty, search intent, and historical trends.\n\n**Cost:** 10 credits per returned keyword\n\nIf successful, the server returns a JSON object containing the total count of available similar keywords and an array of keyword objects.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/keyword-research/#similar" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "source", "in": "query", + "required": true, + "description": "Country code of the regional keyword database (e.g., `us`). For acceptable values, see [Regional database codes](https://seranking.com/api/data/reference#regional-database-codes).", "schema": { "type": "string" - }, - "example": "us" + } }, { "name": "keyword", "in": "query", + "required": true, + "description": "Seed keyword used to find similar keywords (e.g., `avocado`).", "schema": { "type": "string" - }, - "example": "avocado" + } }, { "name": "limit", "in": "query", + "description": "Maximum number of keywords to return per page (e.g., `10`). Positive integer.", "schema": { - "type": "integer" - }, - "example": 10 + "type": "integer", + "default": 100 + } }, { "name": "offset", "in": "query", + "description": "Starting offset for pagination (e.g., `0`). Non-negative integer.", "schema": { - "type": "integer" - }, - "example": 0 + "type": "integer", + "default": 0 + } }, { "name": "sort", "in": "query", + "description": "Field by which keywords are sorted:\n• `keyword` \n• `volume`\n• `cpc`\n• `difficult`y\n• `competition`", "schema": { "type": "string" - }, - "example": "keyword" + } }, { "name": "sort_order", "in": "query", + "description": "Sorting order:\n• `asc` – ascending\n• `desc` – descending", "schema": { - "type": "string" - }, - "example": "asc" + "type": "string", + "default": "desc" + } }, { "name": "history_trend", "in": "query", + "description": "Indicates whether to include historical search volume trend data in the response:\n• `true`\n• `false`", "schema": { - "type": "boolean" - }, - "example": true + "type": "boolean", + "default": false + } }, { "name": "filter[volume][from]", "in": "query", + "description": "Minimum monthly search volume (e.g., `50`). Non-negative integer.", "schema": { "type": "integer" - }, - "example": 100 + } }, { "name": "filter[volume][to]", "in": "query", + "description": "Maximum monthly search volume (e.g., `5000`). Non-negative integer.", "schema": { "type": "integer" - }, - "example": 100000 + } }, { "name": "filter[difficulty][from]", "in": "query", + "description": "Minimum keyword difficulty score. Integers from 0 to 100.", "schema": { "type": "integer" - }, - "example": 0 + } }, { "name": "filter[difficulty][to]", "in": "query", + "description": "Maximum keyword difficulty score. Integers from 0 to 100.", "schema": { "type": "integer" - }, - "example": 30 + } }, { "name": "filter[cpc][from]", "in": "query", + "description": "Minimum Cost Per Click (e.g., `0.1`). Non-negative float.", "schema": { - "type": "integer" - }, - "example": 0 + "type": "number" + } }, { "name": "filter[cpc][to]", "in": "query", + "description": "Maximum Cost Per Click (e.g., `3`). Non-negative float.", "schema": { - "type": "integer" - }, - "example": 100 + "type": "number" + } }, { "name": "filter[competition][from]", "in": "query", + "description": "Minimum competition score (e.g., `0.2`). Floats from 0.0 to 1.0.", "schema": { - "type": "integer" - }, - "example": 0 + "type": "number" + } }, { "name": "filter[competition][to]", "in": "query", + "description": "Maximum competition score (e.g., `0.7`). Floats from 0.0 to 1.0.", "schema": { "type": "number" - }, - "example": 0.1 + } }, { "name": "filter[keyword_count][from]", "in": "query", + "description": "Minimum number of words in the keyword (e.g., `3`). Positive integer.", "schema": { "type": "integer" - }, - "example": 3 + } }, { "name": "filter[keyword_count][to]", "in": "query", + "description": "Maximum number of words in the keyword (e.g., `5`). Positive integer.", "schema": { "type": "integer" - }, - "example": 8 + } }, { "name": "filter[characters_count][from]", "in": "query", + "description": "Minimum character length of the keyword (e.g., `20`). Positive integer.", "schema": { "type": "integer" - }, - "example": 15 + } }, { "name": "filter[characters_count][to]", "in": "query", + "description": "Maximum character length of the keyword (e.g., `50`). Positive integer.", "schema": { "type": "integer" - }, - "example": 50 + } }, { "name": "filter[serp_features]", "in": "query", + "description": "Comma-separated list of SERP features to filter results (e.g., `sge`, `images`, `top_stories`). For acceptable values, see [SERP features](https://seranking.com/api/data/reference#serp-features).", "schema": { "type": "string" - }, - "example": "sge,images" + } }, { "name": "filter[intents]", "in": "query", + "description": "Comma-separated list of intent codes:\n• `I` – informational\n• `N` – navigational\n• `T` – transactional\n• `C` – commercial\n• `L` – local", "schema": { "type": "string" - }, - "example": "I,C,T,L" + } }, { "name": "filter[multi_keyword_included]", "in": "query", + "description": "Keywords to include based on specific patterns. Each element is an array of objects with `type` (begins, contains, ends, exact) and `value` (string to match).", "schema": { - "type": "string" - }, - "example": "[\n [\n { \"type\": \"begins\", \"value\": \"find\" },\n { \"type\": \"contains\", \"value\": \"link\" }\n ],\n [\n { \"type\": \"contains\", \"value\": \"backlink\" },\n { \"type\": \"ends\", \"value\": \"checker\" }\n ],\n [\n { \"type\": \"exact\", \"value\": \"serankings\" }\n ]\n]" + "type": "array", + "items": { + "type": "string" + } + } }, { "name": "filter[multi_keyword_excluded]", "in": "query", + "description": "Keywords to exclude based on specific patterns. Each element is an array of objects with `type` (begins, contains, ends, exact) and `value` (string to match).", "schema": { - "type": "string" - }, - "example": "[\n [\n { \"type\": \"contains\", \"value\": \"seo\" },\n { \"type\": \"contains\", \"value\": \"tools\" }\n ],\n [\n { \"type\": \"begins\", \"value\": \"find\" },\n { \"type\": \"contains\", \"value\": \"link\" }\n ],\n [\n { \"type\": \"contains\", \"value\": \"backlink\" },\n { \"type\": \"ends\", \"value\": \"checker\" }\n ],\n [\n { \"type\": \"exact\", \"value\": \"serankings\" }\n ]\n]" + "type": "array", + "items": { + "type": "string" + } + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of similar keywords matching the criteria (ignoring `limit` and `offset`)." + }, + "keywords": { + "type": "array", + "items": { + "type": "object", + "properties": { + "keyword": { + "type": "string", + "description": "Similar keyword phrase." + }, + "volume": { + "type": "integer", + "description": "Average monthly search volume for this keyword in the specified source database." + }, + "cpc": { + "type": "number", + "description": "Average Cost Per Click for this keyword." + }, + "difficulty": { + "type": "integer", + "description": "Score indicating the keyword’s ranking difficulty (0-100)." + }, + "competition": { + "type": "number", + "description": "Score indicating the level of competition for this keyword (0.0-1.0)." + }, + "intents": { + "type": "array", + "items": { + "type": "string", + "description": "Array of search intent codes." + }, + "description": "Array of search intent codes." + }, + "serp_features": { + "type": "array", + "items": { + "type": "string", + "description": "Array of SERP features associated with the keyword." + }, + "description": "Array of SERP features associated with the keyword." + }, + "history_trend": { + "type": "object", + "properties": { + "2024-05-01": { + "type": "integer" + }, + "2024-06-01": { + "type": "integer" + }, + "2024-07-01": { + "type": "integer" + }, + "2024-08-01": { + "type": "integer" + }, + "2024-09-01": { + "type": "integer" + }, + "2024-10-01": { + "type": "integer" + }, + "2024-11-01": { + "type": "integer" + }, + "2024-12-01": { + "type": "integer" + }, + "2025-01-01": { + "type": "integer" + }, + "2025-02-01": { + "type": "integer" + }, + "2025-03-01": { + "type": "integer" + }, + "2025-04-01": { + "type": "integer" + } + }, + "description": "If `history_trend=true` is included in the request, the object contains the historical search volume for the keyword:\n• Each key is a date string in `YYYY-MM-DD` format (the first day of the month).\n• Each value is the search volume for that month.\n• Can be `null` if historical data is unavailable." + } + }, + "description": "Array of objects, each representing a similar keyword with its metrics." + }, + "description": "Array of objects, each representing a similar keyword with its metrics." + } + } + }, + "example": { + "total": 35, + "keywords": [ + { + "keyword": "can you cook with avocado oil", + "volume": 480, + "cpc": 1.2, + "difficulty": 6, + "competition": 0.4, + "intents": [ + "I" + ], + "serp_features": [ + "featured_snippets", + "videos" + ], + "history_trend": { + "2024-05-01": 400, + "2024-06-01": 450, + "2024-07-01": 480, + "2024-08-01": 500, + "2024-09-01": 520, + "2024-10-01": 480, + "2024-11-01": 460, + "2024-12-01": 440, + "2025-01-01": 500, + "2025-02-01": 550, + "2025-03-01": 600, + "2025-04-01": 0 + } + }, + { + "keyword": "avocado recipes", + "volume": 1000, + "cpc": 0.8, + "difficulty": 12, + "competition": 0.3, + "intents": [ + "I", + "C" + ], + "serp_features": [ + "recipes", + "images" + ], + "history_trend": { + "2024-05-01": 900, + "2024-06-01": 950, + "2024-07-01": 1000, + "2024-08-01": 1050, + "2024-09-01": 1100, + "2024-10-01": 1000, + "2024-11-01": 950, + "2024-12-01": 900, + "2025-01-01": 1050, + "2025-02-01": 1100, + "2025-03-01": 1200, + "2025-04-01": 0 + } + } + ] + } + } } - } - } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/keywords/similar?source=us&keyword=avocado&limit=10&offset=0&sort=keyword&sort_order=asc&history_trend=true&filter[volume][from]=50&filter[volume][to]=5000&filter[difficulty][from]=18&filter[difficulty][to]=40&filter[cpc][from]=0.10&filter[cpc][to]=3.00&filter[competition][from]=0.2&filter[competition][to]=0.7&filter[keyword_count][from]=3&filter[keyword_count][to]=5&filter[characters_count][from]=20&filter[characters_count][to]=50&filter[serp_features]=featured_snippets,images&filter[intents]=I,C&filter[multi_keyword_included]=[[{\"type\":\"contains\",\"value\":\"oil\"}],[{\"type\":\"exact\",\"value\":\"avocado recipes\"}]]' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] } }, - "/v1/keywords/questions": { + "/v1/keywords/related": { "get": { - "operationId": "getKeywordsQuestions", + "operationId": "getKeywordsRelated", "tags": [ "Keyword Research" ], - "summary": "Get question keywords", - "description": "Generates a list of keywords phrased as common user questions that are relevant to a given seed term.", + "summary": "Get related keywords", + "description": "Retrieves keywords that are topically related to a specified seed keyword within a regional database. Topically related keywords are based on having a high degree of overlapping URLs in their search results. The method returns metrics such as search volume, CPC, competition, keyword difficulty, search intent, relevance score, and optional historical search volume trends.\n\n**Cost:** 10 credits per returned keyword\n\nIf successful, the server returns a JSON object containing the total count of available related keywords and an array of keyword objects.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/keyword-research/#related" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "source", "in": "query", + "required": true, + "description": "Country code of the regional keyword database (e.g., `us`, `uk`). For acceptable values, see [Regional database codes](https://seranking.com/api/data/reference#regional-database-codes).", "schema": { "type": "string" - }, - "example": "us" + } }, { "name": "keyword", "in": "query", + "required": true, + "description": "Seed keyword used to find related keywords (e.g., `avocado`).", "schema": { "type": "string" - }, - "example": "avocado" + } }, { "name": "limit", "in": "query", + "description": "Maximum number of keywords to return per page (e.g., `10`). Positive integer.", "schema": { - "type": "integer" - }, - "example": 10 + "type": "integer", + "default": 100 + } }, { "name": "offset", "in": "query", + "description": "Starting offset for pagination (e.g., `0`). Non-negative integer.", "schema": { - "type": "integer" - }, - "example": 0 + "type": "integer", + "default": 0 + } }, { "name": "sort", "in": "query", + "description": "Field by which keywords are sorted:\n• `keyword`\n**• **`volume`\n• `cpc`\n• `difficult`y\n• `competition`", "schema": { "type": "string" - }, - "example": "keyword" + } }, { "name": "sort_order", "in": "query", + "description": "Sorting order:\n• `asc` – ascending\n• `desc` – descending", "schema": { - "type": "string" - }, - "example": "asc" + "type": "string", + "default": "desc" + } }, { "name": "history_trend", "in": "query", + "description": "Indicates whether to include historical search volume trend data in the response:\n• `true`\n• `false`", "schema": { - "type": "boolean" - }, - "example": true + "type": "boolean", + "default": false + } }, { "name": "filter[volume][from]", "in": "query", + "description": "Minimum monthly search volume (e.g., `50`). Non-negative integer.", "schema": { "type": "integer" - }, - "example": 100 + } }, { "name": "filter[volume][to]", "in": "query", + "description": "Maximum monthly search volume (e.g., `5000`). Non-negative integer.", "schema": { "type": "integer" - }, - "example": 100000 + } }, { "name": "filter[difficulty][from]", "in": "query", + "description": "Minimum keyword difficulty score. Integers from 0 to 100.", "schema": { "type": "integer" - }, - "example": 0 + } }, { "name": "filter[difficulty][to]", "in": "query", + "description": "Maximum keyword difficulty score. Integers from 0 to 100.", "schema": { "type": "integer" - }, - "example": 30 + } }, { "name": "filter[cpc][from]", "in": "query", + "description": "Minimum Cost Per Click (e.g., `0.1`). Non-negative float.", "schema": { - "type": "integer" - }, - "example": 0 + "type": "number" + } }, { "name": "filter[cpc][to]", "in": "query", + "description": "Maximum Cost Per Click (e.g., `3`). Non-negative float.", "schema": { - "type": "integer" - }, - "example": 100 + "type": "number" + } }, { "name": "filter[competition][from]", "in": "query", + "description": "Minimum competition score (e.g., `0.2`). Floats from 0.0 to 1.0.", "schema": { - "type": "integer" - }, - "example": 0 + "type": "number" + } }, { "name": "filter[competition][to]", "in": "query", + "description": "Maximum competition score (e.g., `0.7`). Floats from 0.0 to 1.0.", "schema": { "type": "number" - }, - "example": 0.1 + } }, { "name": "filter[keyword_count][from]", "in": "query", + "description": "Minimum number of words in the keyword (e.g., `3`). Positive integer.", "schema": { "type": "integer" - }, - "example": 3 + } }, { "name": "filter[keyword_count][to]", "in": "query", + "description": "Maximum number of words in the keyword (e.g., `5`). Positive integer.", "schema": { "type": "integer" - }, - "example": 8 + } }, { "name": "filter[characters_count][from]", "in": "query", + "description": "Minimum character length of the keyword (e.g., `20`). Positive integer.", "schema": { "type": "integer" - }, - "example": 15 + } }, { "name": "filter[characters_count][to]", "in": "query", + "description": "Maximum character length of the keyword (e.g., `50`). Positive integer.", "schema": { "type": "integer" - }, - "example": 50 + } }, { "name": "filter[serp_features]", "in": "query", + "description": "Comma-separated list of SERP features to filter results (e.g., `sge`, `images`, `top_stories`). \nFor acceptable values, see [SERP features](https://seranking.com/api/data/reference#serp-features).", "schema": { "type": "string" - }, - "example": "sge,images" + } }, { "name": "filter[intents]", "in": "query", + "description": "Comma-separated list of intent codes:\n• `I` – informational\n• `N` – navigational\n• `T` – transactional\n• `C` – commercial\n• `L` – local", "schema": { "type": "string" - }, - "example": "I,C,T,L" + } }, { "name": "filter[multi_keyword_included]", "in": "query", + "description": "Keywords to include based on specific patterns. Each element is an array of objects with `type` (begins, contains, ends, exact) and `value` (string to match).", "schema": { - "type": "string" - }, - "example": "[\n [\n { \"type\": \"begins\", \"value\": \"find\" },\n { \"type\": \"contains\", \"value\": \"link\" }\n ],\n [\n { \"type\": \"contains\", \"value\": \"backlink\" },\n { \"type\": \"ends\", \"value\": \"checker\" }\n ],\n [\n { \"type\": \"exact\", \"value\": \"serankings\" }\n ]\n]" + "type": "array", + "items": { + "type": "string" + } + } }, { "name": "filter[multi_keyword_excluded]", "in": "query", + "description": "Keywords to exclude based on specific patterns. Each element is an array of objects with `type` (begins, contains, ends, exact) and `value` (string to match).", "schema": { - "type": "string" - }, - "example": "[\n [\n { \"type\": \"contains\", \"value\": \"seo\" },\n { \"type\": \"contains\", \"value\": \"tools\" }\n ],\n [\n { \"type\": \"begins\", \"value\": \"find\" },\n { \"type\": \"contains\", \"value\": \"link\" }\n ],\n [\n { \"type\": \"contains\", \"value\": \"backlink\" },\n { \"type\": \"ends\", \"value\": \"checker\" }\n ],\n [\n { \"type\": \"exact\", \"value\": \"serankings\" }\n ]\n]" + "type": "array", + "items": { + "type": "string" + } + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of related keywords matching the criteria (ignoring `limit` and `offset`)." + }, + "keywords": { + "type": "array", + "items": { + "type": "object", + "properties": { + "keyword": { + "type": "string", + "description": "Related keyword phrase." + }, + "cpc": { + "type": "integer", + "description": "Average Cost Per Click for this keyword." + }, + "difficulty": { + "type": "integer", + "description": "Score indicating the keyword’s ranking difficulty (0-100)." + }, + "volume": { + "type": "integer", + "description": "Average monthly search volume for this keyword in the specified source database." + }, + "competition": { + "type": "number", + "description": "Score indicating the level of competition for this keyword (0.0-1.0)." + }, + "serp_features": { + "type": "array", + "items": { + "type": "string", + "description": "Array of SERP features associated with the keyword." + }, + "description": "Array of SERP features associated with the keyword." + }, + "relevance": { + "type": "integer", + "description": "Relevance score of the returned keyword in relation to the queried keyword." + }, + "intents": { + "type": "array", + "items": { + "type": "string", + "description": "Array of search intent codes." + }, + "description": "Array of search intent codes." + }, + "history_trend": { + "type": "object", + "properties": { + "2024-06-01": { + "type": "integer" + }, + "2024-07-01": { + "type": "integer" + }, + "2024-08-01": { + "type": "integer" + }, + "2024-09-01": { + "type": "integer" + }, + "2024-10-01": { + "type": "integer" + }, + "2024-11-01": { + "type": "integer" + }, + "2024-12-01": { + "type": "integer" + }, + "2025-01-01": { + "type": "integer" + }, + "2025-02-01": { + "type": "integer" + }, + "2025-03-01": { + "type": "integer" + }, + "2025-04-01": { + "type": "integer" + }, + "2025-05-01": { + "type": "integer" + } + }, + "description": "If `history_trend=true` is included in the request, the object contains the historical search volume for the keyword:\n• Each key is a date string in `YYYY-MM-DD` format (the first day of the month).\n• Each value is the search volume for that month.\n• Can be `null` if historical data is unavailable." + } + }, + "description": "Array of objects, each representing a related keyword with its metrics." + }, + "description": "Array of objects, each representing a related keyword with its metrics." + } + } + }, + "example": { + "total": 21, + "keywords": [ + { + "keyword": "avocado anbauen deutschland", + "cpc": 0, + "difficulty": 9, + "volume": 140, + "competition": 0.06, + "serp_features": [ + "images", + "sge", + "related_searches" + ], + "relevance": 6, + "intents": [ + "I" + ], + "history_trend": { + "2024-06-01": 140, + "2024-07-01": 170, + "2024-08-01": 140, + "2024-09-01": 140, + "2024-10-01": 110, + "2024-11-01": 90, + "2024-12-01": 110, + "2025-01-01": 170, + "2025-02-01": 140, + "2025-03-01": 260, + "2025-04-01": 140, + "2025-05-01": 170 + } + }, + { + "keyword": "avocado baum deutschland", + "cpc": 0, + "difficulty": 9, + "volume": 110, + "competition": 0.09, + "serp_features": [ + "featured_snippets", + "reviews", + "images", + "sge", + "related_searches" + ], + "relevance": 6, + "intents": [ + "I" + ], + "history_trend": { + "2024-06-01": 90, + "2024-07-01": 110, + "2024-08-01": 110, + "2024-09-01": 110, + "2024-10-01": 110, + "2024-11-01": 90, + "2024-12-01": 90, + "2025-01-01": 70, + "2025-02-01": 110, + "2025-03-01": 170, + "2025-04-01": 140, + "2025-05-01": 140 + } + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/keywords/related?source=us&keyword=avocado&limit=10&offset=0&sort=keyword&sort_order=asc&history_trend=true&filter[volume][from]=50&filter[volume][to]=5000&filter[difficulty][from]=18&filter[difficulty][to]=40&filter[cpc][from]=0.10&filter[cpc][to]=3.00&filter[competition][from]=0.2&filter[competition][to]=0.7&filter[keyword_count][from]=3&filter[keyword_count][to]=5&filter[characters_count][from]=20&filter[characters_count][to]=50&filter[serp_features]=featured_snippets,images&filter[intents]=I,C&filter[multi_keyword_included]=[[{\"type\":\"contains\",\"value\":\"oil\"}],[{\"type\":\"exact\",\"value\":\"avocado recipes\"}]]' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] } }, - "/v1/keywords/longtail": { + "/v1/keywords/questions": { "get": { - "operationId": "getKeywordsLongtail", + "operationId": "getKeywordsQuestions", "tags": [ "Keyword Research" ], - "summary": "Get longtail keywords", - "description": "Provides a list of longer, more specific long-tail keyword variations related to a given seed term.", + "summary": "Get question keywords", + "description": "Retrieves keywords phrased as common user questions related to a specified seed keyword within a regional database. The method returns metrics such as search volume, CPC, competition, keyword difficulty, search intent, and optional historical search volume trends.\n\n**Cost:** 10 credits per returned keyword\n\nIf successful, the server returns a JSON object containing the total count of available question keywords and an array of keyword objects.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/keyword-research/#questions" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "source", "in": "query", + "required": true, + "description": "Country code of the regional keyword database (e.g., `us`). For acceptable values, see [Regional database codes](https://seranking.com/api/data/reference#regional-database-codes).", "schema": { "type": "string" - }, - "example": "us" + } }, { "name": "keyword", "in": "query", + "required": true, + "description": "Seed keyword to retrieve question-style keywords (e.g., `avocado`).", "schema": { "type": "string" - }, - "example": "avocado" + } }, { "name": "limit", "in": "query", + "description": "Maximum number of keywords to return per page (e.g., `10`). Positive integer.", "schema": { - "type": "integer" - }, - "example": 10 + "type": "integer", + "default": 100 + } }, { "name": "offset", "in": "query", + "description": "Starting offset for pagination (e.g., `0`). Non-negative integer.", "schema": { - "type": "integer" - }, - "example": 0 + "type": "integer", + "default": 0 + } }, { "name": "sort", "in": "query", + "description": "Field by which keywords are sorted:\n• `keyword`\n• `volume`\n• `cpc`\n• `difficult`y\n• `competition`", "schema": { - "type": "string", - "enum": [ - "keyword", - "volume", - "cpc", - "difficulty", - "competition" - ] - }, - "example": "volume" + "type": "string" + } }, { "name": "sort_order", "in": "query", + "description": "Sorting order:\n• `asc` – ascending\n• `desc` – descending", "schema": { "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "example": "desc" + "default": "desc" + } + }, + { + "name": "history_trend", + "in": "query", + "description": "Indicates whether to include historical search volume trend data in the response:\n• `true`\n• `false`", + "schema": { + "type": "boolean", + "default": false + } }, { "name": "filter[volume][from]", "in": "query", + "description": "Minimum monthly search volume (e.g., `50`). Non-negative integer.", "schema": { "type": "integer" } @@ -4929,6 +10911,7 @@ { "name": "filter[volume][to]", "in": "query", + "description": "Maximum monthly search volume (e.g., `5000`). Non-negative integer.", "schema": { "type": "integer" } @@ -4936,6 +10919,7 @@ { "name": "filter[difficulty][from]", "in": "query", + "description": "Minimum keyword difficulty score. Integers from 0 to 100.", "schema": { "type": "integer" } @@ -4943,6 +10927,7 @@ { "name": "filter[difficulty][to]", "in": "query", + "description": "Maximum keyword difficulty score. Integers from 0 to 100.", "schema": { "type": "integer" } @@ -4950,6 +10935,7 @@ { "name": "filter[cpc][from]", "in": "query", + "description": "Minimum Cost Per Click (e.g., `0.1`). Non-negative float.", "schema": { "type": "number" } @@ -4957,6 +10943,7 @@ { "name": "filter[cpc][to]", "in": "query", + "description": "Maximum Cost Per Click (e.g., `3`). Non-negative float.", "schema": { "type": "number" } @@ -4964,6 +10951,7 @@ { "name": "filter[competition][from]", "in": "query", + "description": "Minimum competition score (e.g., `0.2`). Floats from 0.0 to 1.0.", "schema": { "type": "number" } @@ -4971,6 +10959,7 @@ { "name": "filter[competition][to]", "in": "query", + "description": "Maximum competition score (e.g., `0.7`). Floats from 0.0 to 1.0.", "schema": { "type": "number" } @@ -4978,6 +10967,7 @@ { "name": "filter[keyword_count][from]", "in": "query", + "description": "Minimum number of words in the keyword (e.g., `3`). Positive integer.", "schema": { "type": "integer" } @@ -4985,6 +10975,7 @@ { "name": "filter[keyword_count][to]", "in": "query", + "description": "Maximum number of words in the keyword (e.g., `5`). Positive integer.", "schema": { "type": "integer" } @@ -4992,6 +10983,7 @@ { "name": "filter[characters_count][from]", "in": "query", + "description": "Minimum character length of the keyword (e.g., `20`). Positive integer.", "schema": { "type": "integer" } @@ -4999,6 +10991,7 @@ { "name": "filter[characters_count][to]", "in": "query", + "description": "Maximum character length of the keyword (e.g., `50`). Positive integer.", "schema": { "type": "integer" } @@ -5006,6 +10999,7 @@ { "name": "filter[serp_features]", "in": "query", + "description": "Comma-separated list of SERP features to filter results (e.g., `sge`, `images`, `top_stories`). For acceptable values, see [SERP features](https://seranking.com/api/data/reference#serp-features).", "schema": { "type": "string" } @@ -5013,6 +11007,7 @@ { "name": "filter[intents]", "in": "query", + "description": "Comma-separated list of intent codes:\n• `I` – informational\n• `N` – navigational\n• `T` – transactional\n• `C` – commercial\n• `L` – local", "schema": { "type": "string" } @@ -5020,1719 +11015,5317 @@ { "name": "filter[multi_keyword_included]", "in": "query", + "description": "Keywords to include based on specific patterns. Each element is an array of objects with `type` (begins, contains, ends, exact) and `value` (string to match).", "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } }, { "name": "filter[multi_keyword_excluded]", "in": "query", + "description": "Keywords to exclude based on specific patterns. Each element is an array of objects with `type` (begins, contains, ends, exact) and `value` (string to match).", "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of question keywords matching the criteria (ignoring `limit` and `offset`)." + }, + "keywords": { + "type": "array", + "items": { + "type": "object", + "properties": { + "keyword": { + "type": "string", + "description": "Question keyword phrase." + }, + "cpc": { + "type": "integer", + "description": "Average Cost Per Click for this keyword." + }, + "difficulty": { + "type": "integer", + "description": "Score indicating the keyword’s ranking difficulty (0-100)." + }, + "volume": { + "type": "integer", + "description": "Average monthly search volume for this keyword in the specified source database." + }, + "competition": { + "type": "number", + "description": "Score indicating the level of competition for this keyword (0.0-1.0)." + }, + "serp_features": { + "type": "array", + "items": { + "type": "string", + "description": "Array of SERP features associated with the keyword." + }, + "description": "Array of SERP features associated with the keyword." + }, + "intents": { + "type": "array", + "items": { + "type": "string", + "description": "Array of search intent codes." + }, + "description": "Array of search intent codes." + }, + "history_trend": { + "type": "object", + "properties": { + "2024-06-01": { + "type": "integer" + }, + "2024-07-01": { + "type": "integer" + }, + "2024-08-01": { + "type": "integer" + }, + "2024-09-01": { + "type": "integer" + }, + "2024-10-01": { + "type": "integer" + }, + "2024-11-01": { + "type": "integer" + }, + "2024-12-01": { + "type": "integer" + }, + "2025-01-01": { + "type": "integer" + }, + "2025-02-01": { + "type": "integer" + }, + "2025-03-01": { + "type": "integer" + }, + "2025-04-01": { + "type": "integer" + }, + "2025-05-01": { + "type": "integer" + } + }, + "nullable": true, + "description": "If `history_trend=true` is included in the request, the object contains the historical search volume for the keyword:\n• Each key is a date string in `YYYY-MM-DD` format (the first day of the month).\n• Each value is the search volume for that month.\n• Can be `null` if historical data is unavailable." + } + }, + "description": "Array of objects, each representing a question keyword with its metrics." + }, + "description": "Array of objects, each representing a question keyword with its metrics." + } + } + }, + "example": { + "total": 3, + "keywords": [ + { + "keyword": "für welche organe sind avocados gut", + "cpc": 0, + "difficulty": 11, + "volume": 140, + "competition": 0, + "serp_features": [ + "images", + "sge", + "related_searches" + ], + "intents": [ + "I" + ], + "history_trend": null + }, + { + "keyword": "how are avocados grown", + "cpc": 0, + "difficulty": 24, + "volume": 110, + "competition": 0.03, + "serp_features": [ + "featured_snippets", + "reviews", + "images", + "related_searches" + ], + "intents": [ + "I" + ], + "history_trend": { + "2024-06-01": 140, + "2024-07-01": 140, + "2024-08-01": 110, + "2024-09-01": 90, + "2024-10-01": 140, + "2024-11-01": 90, + "2024-12-01": 70, + "2025-01-01": 110, + "2025-02-01": 90, + "2025-03-01": 110, + "2025-04-01": 90, + "2025-05-01": 140 + } + }, + { + "keyword": "how to ripen avocados fast", + "cpc": 0, + "difficulty": 19, + "volume": 170, + "competition": 0.01, + "serp_features": [ + "featured_snippets", + "people_also_ask", + "sge", + "related_searches" + ], + "intents": [ + "I" + ], + "history_trend": { + "2024-06-01": 210, + "2024-07-01": 170, + "2024-08-01": 140, + "2024-09-01": 110, + "2024-10-01": 170, + "2024-11-01": 170, + "2024-12-01": 140, + "2025-01-01": 210, + "2025-02-01": 140, + "2025-03-01": 140, + "2025-04-01": 210, + "2025-05-01": 210 + } + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --globoff 'https://api.seranking.com/v1/keywords/questions?source=us&keyword=avocado&limit=10&offset=0&sort=keyword&sort_order=asc&history_trend=true&filter[volume][from]=100&filter[volume][to]=100000&filter[difficulty][from]=0&filter[difficulty][to]=30&filter[cpc][from]=0&filter[cpc][to]=100&filter[competition][from]=0&filter[competition][to]=0.1&filter[keyword_count][from]=3&filter[keyword_count][to]=8&filter[characters_count][from]=15&filter[characters_count][to]=50&filter[serp_features]=sge,images&filter[intents]=I,C&filter[multi_keyword_included]=[[{\"type\":\"contains\",\"value\":\"oil\"}],[{\"type\":\"exact\",\"value\":\"avocado recipes\"}]]' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] } }, - "/v1/ai-search/overview/aggregated/time-series": { + "/v1/keywords/longtail": { "get": { + "operationId": "getKeywordsLongtail", "tags": [ - "AI search" + "Keyword Research" ], - "summary": "overview (aggregated)", - "description": "Retrieves a high-level aggregated summary of a domain's key performance metrics and historical trends across all LLM engines.", - "operationId": "getAiOverviewAggregated", + "summary": "Get longtail keywords", + "description": "Retrieves long-tail keywords related to a specified seed keyword within a regional database. Long-tail keywords have a lower search volume, often indicating more specific user intent and less competition.\n\n**Cost:** 1 credit per returned keyword\n\nIf successful, the server returns a JSON object containing the total count of available longtail keywords and an array of keyword strings.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/keyword-research/#longtail" + }, "parameters": [ { - "name": "target", + "name": "source", "in": "query", "required": true, + "description": "Country code of the regional keyword database (e.g., `us`). For acceptable values, see [Regional database codes](https://seranking.com/api/data/reference#regional-database-codes).", "schema": { "type": "string" - }, - "example": "seranking.com" + } }, { - "name": "source", + "name": "keyword", "in": "query", "required": true, + "description": "Seed keyword used to find longtail keywords (e.g., `avocado`).", "schema": { "type": "string" - }, - "example": "us" + } }, { - "name": "brand", + "name": "limit", "in": "query", + "description": "Maximum number of keywords to return per page (e.g., `10`). Positive integer.", "schema": { - "type": "string" - }, - "example": "SE Ranking" + "type": "integer", + "default": 100 + } }, { - "name": "scope", + "name": "offset", "in": "query", + "description": "Starting offset for pagination (e.g., `0`). Non-negative integer.", "schema": { - "type": "string", - "enum": [ - "domain", - "base_domain", - "url" - ], - "default": "base_domain" - }, - "example": "base_domain" + "type": "integer", + "default": 0 + } } ], "responses": { "200": { - "description": "Successful response.\n\nChanges since 2026-09-29 (new AI Search data source):\n\n- `summary.average_position` is always `null`.\n- `time_series.organic_traffic`, `time_series.overall_traffic` and\n `time_series.average_position` are empty arrays.\n- `summary.brand_presence` counts the prompts whose answer mentions the\n brand as a recognized entity, instead of a text match on the brand\n name.\n- `summary.*.previous` is the value of the previous monthly snapshot\n (`null` when unknown), and `change_absolute` / `change_percent` are\n computed from it and signed. Before, `previous` was always `null`\n and the change was reported as the current value and 100%.", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of longtail keywords matching the criteria (ignoring `limit` and `offset`)." + }, + "keywords": { + "type": "array", + "items": { + "type": "string", + "description": "Array of longtail keyword strings." + }, + "description": "Array of longtail keyword strings." + } + } + }, + "example": { + "total": 40717, + "keywords": [ + "1 1/2 oz avocado", + "1 1/2 oz of avocado", + "1 2 medium avocado protein", + "1 8 avocado calories", + "1 avocado brownies", + "1 avocado dip recipe", + "1 avocado eiweiß", + "1 avocado fett", + "1 avocado gewicht ohne kern", + "1 avocado guacamole calories" + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --globoff 'https://api.seranking.com/v1/keywords/longtail?source=us&keyword=avocado&limit=10&offset=0' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] } }, "/v1/ai-search/overview/by-engine/time-series": { "get": { "operationId": "getAiSearchOverviewByEngineTimeSeries", "tags": [ - "AI search" + "AI Search" ], - "summary": "overview", - "description": "Retrieves a high-level summary of a domain\u2019s key performance metrics and historical trends within a specified LLM.", + "summary": "Get AI search overview", + "description": "Retrieves a high-level overview of a domain’s brand presence in an LLM, including historical trends over time and other metrics like link presence, average position, and AI traffic.\n\n**Cost:** 800 credits per request\n\nIf successful, the server returns a JSON object containing aggregated metrics, changes from the previous period, and time-series data for generating charts.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/ai-search/#overview" + }, "parameters": [ { - "name": "apikey", + "name": "engine", "in": "query", + "required": true, + "description": "LLM to query (e.g., `ai-overview`, `chatgpt`, `gemini`, `ai-mode`).", "schema": { "type": "string" - }, - "example": "{{secret_key_data}}" + } }, { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze for LLM performance. Can be a root domain, subdomain, or a specific URL (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "seranking.com" + } }, { "name": "source", "in": "query", + "required": true, + "description": "Country code for the regional prompt database (e.g., `us` for the United States results). For acceptable values, see [Regional database codes](https://seranking.com/api/data/reference#regional-database-codes).", "schema": { "type": "string" - }, - "example": "us" + } }, { - "name": "engine", + "name": "scope", "in": "query", + "description": "Scope of analysis:\n• `base_domain` – aggregate by registrable domain, includes all subdomains.\n• `domain` – exact host only, no subdomain aggregation.\n• `url` – exact URL including path and query.", "schema": { - "type": "string" - }, - "example": "ai-overview" + "type": "string", + "default": "base_domain" + } }, { "name": "brand", "in": "query", + "description": "Brand to filter the brand presence analysis (e.g., `SE Ranking`).", "schema": { "type": "string" - }, - "example": "SE Ranking" - }, - { - "name": "scope", - "in": "query", - "schema": { - "type": "string", - "enum": [ - "domain", - "base_domain", - "url" - ], - "default": "base_domain" - }, - "example": "base_domain" + } } ], "responses": { "200": { - "description": "Successful response.\n\nChanges since 2026-09-29 (new AI Search data source):\n\n- `summary.average_position` is always `null`.\n- `time_series.organic_traffic`, `time_series.overall_traffic` and\n `time_series.average_position` are empty arrays.\n- `summary.brand_presence` counts the prompts whose answer mentions the\n brand as a recognized entity, instead of a text match on the brand\n name.\n- `summary.*.previous` is the value of the previous monthly snapshot\n (`null` when unknown), and `change_absolute` / `change_percent` are\n computed from it and signed. Before, `previous` was always `null`\n and the change was reported as the current value and 100%.", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "summary": { + "type": "object", + "properties": { + "brand_presence": { + "type": "object", + "properties": { + "current": { + "type": "integer", + "description": "Value for the current period." + }, + "previous": { + "type": "integer", + "description": "Value for the previous period." + }, + "change_absolute": { + "type": "integer", + "description": "Absolute difference between the current and previous periods." + }, + "change_percent": { + "type": "number", + "description": "Percentage change between the current and previous periods." + } + } + }, + "link_presence": { + "type": "object", + "properties": { + "current": { + "type": "integer", + "description": "Value for the current period." + }, + "previous": { + "type": "integer", + "description": "Value for the previous period." + }, + "change_absolute": { + "type": "integer", + "description": "Absolute difference between the current and previous periods." + }, + "change_percent": { + "type": "number", + "description": "Percentage change between the current and previous periods." + } + } + }, + "average_position": { + "type": "object", + "properties": { + "current": { + "type": "number", + "description": "Value for the current period." + }, + "previous": { + "type": "number", + "description": "Value for the previous period." + }, + "change_absolute": { + "type": "number", + "description": "Absolute difference between the current and previous periods." + }, + "change_percent": { + "type": "number", + "description": "Percentage change between the current and previous periods." + } + } + }, + "ai_opportunity_traffic": { + "type": "object", + "properties": { + "current": { + "type": "integer", + "description": "Value for the current period." + }, + "previous": { + "type": "integer", + "description": "Value for the previous period." + }, + "change_absolute": { + "type": "integer", + "description": "Absolute difference between the current and previous periods." + }, + "change_percent": { + "type": "number", + "description": "Percentage change between the current and previous periods." + } + } + } + }, + "description": "Object containing key performance metrics like `brand_presence`, `link_presence`, `average_position`, and `ai_opportunity_traffic`." + }, + "time_series": { + "type": "object", + "properties": { + "overall_traffic": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Month and year of the data point in `YYYY-MM` format." + }, + "value": { + "type": "integer", + "description": "Metric’s value for that month." + } + } + } + }, + "organic_traffic": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Month and year of the data point in `YYYY-MM` format." + }, + "value": { + "type": "integer", + "description": "Metric’s value for that month." + } + } + } + }, + "ai_traffic": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Month and year of the data point in `YYYY-MM` format." + }, + "value": { + "type": "integer", + "description": "Metric’s value for that month." + } + } + } + }, + "link_presence": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Month and year of the data point in `YYYY-MM` format." + }, + "value": { + "type": "integer", + "description": "Metric’s value for that month." + } + } + } + }, + "average_position": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Month and year of the data point in `YYYY-MM` format." + }, + "value": { + "type": "number", + "description": "Metric’s value for that month." + } + } + } + } + }, + "description": "Object containing historical data arrays for `overall_traffic`, `organic_traffic`, `ai_traffic`, `link_presence`, and `average_position`." + } + } + }, + "example": { + "summary": { + "brand_presence": { + "current": 50, + "previous": 45, + "change_absolute": 5, + "change_percent": 11.1 + }, + "link_presence": { + "current": 120, + "previous": 110, + "change_absolute": 10, + "change_percent": 9.1 + }, + "average_position": { + "current": 8.5, + "previous": 9.2, + "change_absolute": 0.7, + "change_percent": 7.6 + }, + "ai_opportunity_traffic": { + "current": 2000, + "previous": 1800, + "change_absolute": 200, + "change_percent": 11.1 + } + }, + "time_series": { + "overall_traffic": [ + { + "date": "2025-08", + "value": 43000 + }, + { + "date": "2025-09", + "value": 45000 + } + ], + "organic_traffic": [ + { + "date": "2025-08", + "value": 40000 + }, + { + "date": "2025-09", + "value": 42000 + } + ], + "ai_traffic": [ + { + "date": "2025-08", + "value": 3000 + }, + { + "date": "2025-09", + "value": 3000 + } + ], + "link_presence": [ + { + "date": "2025-08", + "value": 110 + }, + { + "date": "2025-09", + "value": 120 + } + ], + "average_position": [ + { + "date": "2025-08", + "value": 9.2 + }, + { + "date": "2025-09", + "value": 8.5 + } + ] + } + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/ai-search/overview/by-engine/time-series?target=seranking.com&source=us&engine=ai-overview' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] } }, "/v1/ai-search/overview/leaderboard": { "post": { "operationId": "createAiSearchOverviewLeaderboard", "tags": [ - "AI search" + "AI Search" ], - "summary": "leaderboard", - "description": "Retrieves a high-level summary of a domain\u2019s key performance metrics and historical trends within a specified LLM.", + "summary": "Get AI search leaderboard", + "description": "Compares a primary domain against up to 10 competitors across multiple LLM engines and returns a share of voice leaderboard showing which domains have the highest AI search visibility. The leaderboard is calculated based on both brand and link presence across the selected engines.\n\n**Cost:** 7,500 credits per request (flat)\n\nIf successful, the server returns a JSON object containing leaderboard and per-domain, per-engine metrics.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/ai-search/" + }, "requestBody": { + "required": true, "content": { "application/json": { "schema": { "type": "object", - "example": { + "properties": { "primary": { - "target": "seranking.com", - "brand": "SE Ranking" + "type": "object", + "description": "Primary domain and brand information.", + "properties": { + "target": { + "type": "string" + }, + "brand": { + "type": "string" + } + } + }, + "competitors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "target": { + "type": "string" + }, + "brand": { + "type": "string" + } + } + }, + "description": "List of competitors to compare (1–10 items)." + }, + "scope": { + "type": "string", + "description": "Scope of the analysis: \n• `base_domain` – aggregate by registrable domain, includes all subdomains. \n• `domain` – exact host only, no subdomain aggregation.\n• `url` – exact URL including path and query." + }, + "source": { + "type": "string", + "description": "Country code for the regional database (e.g., `us` for United States results). For acceptable values, see [Regional database codes](https://seranking.com/api/data/reference#regional-database-codes)." + }, + "engines": { + "type": "array", + "items": { + "type": "string" + }, + "description": "LLM engines to query (`ai-overview`, `chatgpt`, `gemini`, `ai-mode`)." + }, + "target": { + "type": "string", + "description": "Competitor to analyze for LLM performance. Can be a root domain, subdomain, or a specific URL (e.g., `semrush.com`)." + }, + "brand": { + "type": "string", + "description": "Competitor brand name (e.g., `Semrush`)." + } + }, + "required": [ + "primary", + "competitors", + "source", + "engines" + ] + }, + "example": { + "primary": { + "target": "example.com", + "brand": "Example" + }, + "competitors": [ + { + "target": "example1.com", + "brand": "Example 1" + }, + { + "target": "example2.com", + "brand": "Example 2" + } + ], + "scope": "base_domain", + "source": "us", + "engines": [ + "ai-overview", + "chatgpt" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "object", + "properties": { + "example.com": { + "type": "object", + "properties": { + "chatgpt": { + "type": "object", + "properties": { + "brand_presence": { + "type": "integer", + "description": "Total brand mentions across selected engines." + }, + "link_presence": { + "type": "integer", + "description": "Total link citations across selected engines." + } + } + }, + "ai-overview": { + "type": "object", + "properties": { + "brand_presence": { + "type": "integer", + "description": "Total brand mentions across selected engines." + }, + "link_presence": { + "type": "integer", + "description": "Total link citations across selected engines." + } + } + } + } + }, + "example1.com": { + "type": "object", + "properties": { + "chatgpt": { + "type": "object", + "properties": { + "brand_presence": { + "type": "integer", + "description": "Total brand mentions across selected engines." + }, + "link_presence": { + "type": "integer", + "description": "Total link citations across selected engines." + } + } + }, + "ai-overview": { + "type": "object", + "properties": { + "brand_presence": { + "type": "integer", + "description": "Total brand mentions across selected engines." + }, + "link_presence": { + "type": "integer", + "description": "Total link citations across selected engines." + } + } + } + } + }, + "example2.com": { + "type": "object", + "properties": { + "chatgpt": { + "type": "object", + "properties": { + "brand_presence": { + "type": "integer", + "description": "Total brand mentions across selected engines." + }, + "link_presence": { + "type": "integer", + "description": "Total link citations across selected engines." + } + } + }, + "ai-overview": { + "type": "object", + "properties": { + "brand_presence": { + "type": "integer", + "description": "Total brand mentions across selected engines." + }, + "link_presence": { + "type": "integer", + "description": "Total link citations across selected engines." + } + } + } + } + } + }, + "description": "Detailed per-domain, per-engine metrics." + }, + "request_metadata": { + "type": "object", + "properties": { + "engines": { + "type": "array", + "items": { + "type": "string", + "description": "Engines used for the comparison." + }, + "description": "Engines used for the comparison." + }, + "competitors": { + "type": "array", + "items": { + "type": "string", + "description": "Competitor domains included in the request." + }, + "description": "Competitor domains included in the request." + }, + "source": { + "type": "string", + "description": "Country code for the regional database." + }, + "primary": { + "type": "string", + "description": "Primary target domain." + } + }, + "description": "Metadata describing the request." + }, + "leaderboard": { + "type": "array", + "items": { + "type": "object", + "properties": { + "rank": { + "type": "integer", + "description": "Position in the leaderboard (1 = highest share of voice)." + }, + "link_presence": { + "type": "integer", + "description": "Total link citations across selected engines." + }, + "share_of_voice": { + "type": "number", + "description": "Calculated share of voice." + }, + "is_primary_target": { + "type": "boolean", + "description": "Indicates whether this is the primary domain." + }, + "brand_presence": { + "type": "integer", + "description": "Total brand mentions across selected engines." + }, + "domain": { + "type": "string", + "description": "Domain name." + } + }, + "description": "Leaderboard of domains sorted by share of voice." + }, + "description": "Leaderboard of domains sorted by share of voice." + } + } + }, + "example": { + "results": { + "example.com": { + "chatgpt": { + "brand_presence": 5, + "link_presence": 18 + }, + "ai-overview": { + "brand_presence": 4798, + "link_presence": 9245 + } + }, + "example1.com": { + "chatgpt": { + "brand_presence": 3042, + "link_presence": 287 + }, + "ai-overview": { + "brand_presence": 13688, + "link_presence": 10083 + } + }, + "example2.com": { + "chatgpt": { + "brand_presence": 55, + "link_presence": 324 + }, + "ai-overview": { + "brand_presence": 20161, + "link_presence": 37952 + } + } }, - "competitors": [ + "request_metadata": { + "engines": [ + "ai-overview", + "chatgpt" + ], + "competitors": [ + "example1.com", + "example2.com" + ], + "source": "us", + "primary": "example.com" + }, + "leaderboard": [ + { + "rank": 1, + "link_presence": 41092, + "share_of_voice": 0.5719, + "is_primary_target": false, + "brand_presence": 20682, + "domain": "example2.com" + }, { - "target": "semrush.com", - "brand": "Semrush" + "rank": 2, + "link_presence": 11100, + "share_of_voice": 0.2923, + "is_primary_target": false, + "brand_presence": 17467, + "domain": "example1.com" }, { - "target": "ahrefs.com", - "brand": "Ahrefs" + "rank": 3, + "link_presence": 9679, + "share_of_voice": 0.1358, + "is_primary_target": true, + "brand_presence": 4965, + "domain": "example.com" } - ], - "scope": "base_domain", - "source": "us", - "engines": [ - "ai-overview", - "chatgpt", - "perplexity" ] } } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/ai-search/overview/leaderboard' \\\n--header 'Authorization: Token YOUR_API_KEY' \\\n--header 'Content-Type: application/json' \\\n--data '{\n \"primary\": {\n \"target\": \"example.com\",\n \"brand\": \"Example\"\n },\n \"competitors\": [\n { \"target\": \"example1.com\", \"brand\": \"Example 1\" },\n { \"target\": \"example2.com\", \"brand\": \"Example 2\" }\n ],\n \"scope\": \"base_domain\",\n \"source\": \"us\",\n \"engines\": [\"ai-overview\", \"chatgpt\"]\n}'" } + ] + } + }, + "/v1/ai-search/discover-brand": { + "get": { + "operationId": "getAiSearchDiscoverBrand", + "tags": [ + "AI Search" + ], + "summary": "Discover brand by URL", + "description": "Identifies the brand name associated with the specified target domain. This utility endpoint is useful for programmatically finding a brand before using it in other queries.\n\n**Cost:** 100 credits per request\n\nIf successful, the server returns a JSON object containing an array of discovered brand names.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/ai-search/#discover-brand-by-url" }, "parameters": [ { - "name": "apikey", + "name": "target", "in": "query", + "required": true, + "description": "Target to analyze for LLM performance. Can be a root domain, subdomain, or a specific URL (e.g., `seranking.com`).", "schema": { "type": "string" - }, - "example": "{{secret_key_data}}" + } }, { - "name": "brand", + "name": "source", "in": "query", + "required": true, + "description": "Country code for the regional prompt database (e.g., `us` for United States results). For acceptable values, see [Regional database codes](https://seranking.com/api/data/reference#regional-database-codes).", "schema": { "type": "string" - }, - "example": "SE Ranking" + } }, { "name": "scope", "in": "query", + "required": true, + "description": "Scope of analysis:\n• `base_domain` – aggregate by registrable domain, includes all subdomains.\n• `domain` – exact host only, no subdomain aggregation.\n• `url` – exact URL including path and query.", "schema": { - "type": "string" - }, - "example": "base_domain" + "type": "string", + "default": "base_domain" + } } ], "responses": { "200": { - "description": "Successful response.\n\nSince 2026-09-29 (new AI Search data source) `brand_presence` counts\nthe prompts whose answer mentions the brand as a recognized entity,\ninstead of a text match on the brand name.", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "brands": { + "type": "array", + "items": { + "type": "string", + "description": "Array of strings, each a potential brand name." + }, + "description": "Array of strings, each a potential brand name." + } + } + }, + "example": { + "brands": [ + "Microsoft" + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/ai-search/discover-brand?target=microsoft.com&scope=domain&source=us' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] } }, - "/v1/ai-search/discover-brand": { + "/v1/ai-search/prompts-by-target": { "get": { - "operationId": "getAiSearchDiscoverBrand", + "operationId": "getAiSearchPromptsByTarget", "tags": [ - "AI search" + "AI Search" ], - "summary": "discover brand", - "description": "Identifies and returns the brand name associated with a given target domain, subdomain, or URL.", + "summary": "Get prompts by target", + "description": "Retrieves a paginated list of prompts where the specified domain, subdomain, or URL appears in LLM results.\n\n**Cost:** 200 credits per returned prompt\n\nIf successful, the server returns a JSON object containing a list of prompts and metadata.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/ai-search/#get-prompts-by-target" + }, "parameters": [ { - "name": "apikey", + "name": "engine", "in": "query", + "required": true, + "description": "LLM to query (e.g., `ai-overview`, `chatgpt`, `gemini`, `ai-mode`).", "schema": { "type": "string" - }, - "example": "{{secret_key_data}}" + } }, { "name": "target", "in": "query", + "required": true, + "description": "Target to analyze for LLM performance. Can be a root domain, subdomain, or a specific URL.", "schema": { "type": "string" - }, - "example": "seranking.com" + } + }, + { + "name": "source", + "in": "query", + "required": true, + "description": "Country code for the regional prompt database (e.g., `us` for United States results).\n\nFor acceptable values, see [Regional database codes](https://seranking.com/api/data/reference#regional-database-codes).", + "schema": { + "type": "string" + } }, { "name": "scope", "in": "query", + "required": true, + "description": "Scope of the analysis: \n• `base_domain` – aggregate by registrable domain, includes all subdomains. \n• `domain` – exact host only, no subdomain aggregation.\n• `url` – exact URL including path and query.", "schema": { "type": "string", - "enum": [ - "domain", - "base_domain", - "url" - ], - "default": "domain" - }, - "description": "base_domain (aggregate by registrable domain, includes all subdomains), domain (exact host only, no subdomain aggregation), url (exact URL including path and query)", - "example": "domain" + "default": "base_domain" + } }, { - "name": "source", + "name": "sort", "in": "query", + "description": "Field to sort the results by: `volume`, `type`, `snippet_length`.", "schema": { - "type": "string" - }, - "example": "us" + "type": "string", + "default": "volume" + } + }, + { + "name": "sort_order", + "in": "query", + "description": "Sort order for the results: \n• `asc` – for ascending\n• `desc` – for descending", + "schema": { + "type": "string", + "default": "desc" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of prompts to return per page (max 1000).", + "schema": { + "type": "integer", + "default": 100 + } + }, + { + "name": "offset", + "in": "query", + "description": "Starting position for the paginated list.", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "filter", + "in": "query", + "description": "Object for filtering results. See the [Filtering results](https://seranking.com/api/data/ai-search#filtering-results) section for details.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of prompts found for the target." + }, + "date": { + "type": "string", + "description": "Date of the data snapshot in `YYYY-MM-DD` format." + }, + "prompts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prompt": { + "type": "string", + "description": "User query or prompt text that triggered the LLM response." + }, + "volume": { + "type": "integer", + "description": "Estimated monthly search volume for the prompt." + }, + "type": { + "type": "string", + "description": "Type of appearance for the target in the LLM result (e.g., `Link`, `Brand`)." + }, + "answer": { + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "Full text of the snippet generated by the LLM." + }, + "links": { + "type": "array", + "items": { + "type": "string", + "description": "Array of URL strings that were included as links within the LLM’s answer." + }, + "description": "Array of URL strings that were included as links within the LLM’s answer." + } + }, + "description": "Object containing the detailed response from the LLM." + } + }, + "description": "Array of objects, each representing a found prompt." + }, + "description": "Array of objects, each representing a found prompt." + } + } + }, + "example": { + "total": 5448, + "date": "2025-09-01", + "prompts": [ + { + "prompt": "peliculas en netflix", + "volume": 14800, + "type": "Link", + "answer": { + "text": "Hay una gran variedad de peliculas disponibles en Netflix...", + "links": [ + "[https://movies.sitioficial.netflix.com/browse/genre/34399](https://movies.sitioficial.netflix.com/browse/genre/34399)" + ] + } + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --globoff 'https://api.seranking.com/v1/ai-search/prompts-by-target?target=seranking.com&scope=domain&source=us&engine=ai-mode&limit=1' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] } }, - "/v1/ai-search/prompts-by-target": { + "/v1/ai-search/prompts-by-brand": { "get": { - "operationId": "getAiSearchPromptsByTarget", + "operationId": "getAiSearchPromptsByBrand", "tags": [ - "AI search" + "AI Search" ], - "summary": "prompts by target", - "description": "Fetches a list of prompts where a specified domain, subdomain, or URL appears in the results of a chosen LLM.\n\nThe `filter[volume]`, `filter[keyword_count]` and `filter[characters_count]` filters were removed on 2026-10-14. A page holds at most 1000 prompts (`limit`).", + "summary": "Get prompts by brand", + "description": "Retrieves a paginated list of prompts where the specified brand name is mentioned in LLM results.\n\n**Cost:** 200 credits per returned prompt\n\nIf successful, the server returns a JSON object containing a list of prompts that mention the specified brand.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/ai-search/#get-prompts-by-brand" + }, "parameters": [ { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "target", + "name": "engine", "in": "query", + "required": true, + "description": "LLM to query (e.g., `ai-overview`, `chatgpt`, `gemini`, `ai-mode`).", "schema": { "type": "string" - }, - "example": "seranking.com" + } }, { - "name": "scope", + "name": "brand", "in": "query", + "required": true, + "description": "Brand name to search for in LLM snippets.", "schema": { "type": "string" - }, - "description": "base_domain (aggregate by registrable domain, includes all subdomains), domain (exact host only, no subdomain aggregation), url (exact URL including path and query)", - "example": "domain" + } }, { "name": "source", "in": "query", + "required": true, + "description": "Country code for the regional prompt database (e.g., `us` for United States results). For acceptable values, see [Regional database codes](https://seranking.com/api/data/reference#regional-database-codes).", "schema": { "type": "string" - }, - "example": "us" - }, - { - "name": "engine", - "in": "query", - "schema": { - "type": "string" - }, - "example": "ai-mode" + } }, { "name": "sort", "in": "query", + "description": "Field to sort the results by: `volume`, `type`, `snippet_length`.", "schema": { "type": "string", - "enum": [ - "volume", - "type", - "snippet_length" - ], "default": "volume" - }, - "example": "volume" + } }, { "name": "sort_order", "in": "query", + "description": "Sort order for the results:\n• `asc` – for ascending\n• `desc` – for descending", "schema": { "type": "string", - "enum": [ - "asc", - "desc" - ], "default": "desc" - }, - "example": "desc" - }, - { - "name": "offset", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 0 + } }, { "name": "limit", "in": "query", + "description": "Maximum number of prompts to return per page (max 1000).", "schema": { "type": "integer", - "maximum": 1000 - }, - "description": "Number of prompts per page, at most 1000. A larger value is rejected with 400.", - "example": 100 - }, - { - "name": "filter[multi_keyword_included]", - "in": "query", - "schema": { - "type": "string" - }, - "example": "[\n [\n {\n \"type\": \"contains\",\n \"value\": \"seo\"\n }\n ]\n]" + "default": 100 + } }, { - "name": "filter[multi_keyword_excluded]", + "name": "offset", "in": "query", + "description": "Starting position for the paginated list.", "schema": { - "type": "string" - }, - "example": "[\n [\n { \"type\": \"contains\", \"value\": \"seo\" },\n { \"type\": \"contains\", \"value\": \"tools\" }\n ],\n [\n { \"type\": \"contains\", \"value\": \"backlinks\" }\n ]\n]" + "type": "integer", + "default": 0 + } }, { - "name": "filter[volume][from]", + "name": "filter", "in": "query", - "deprecated": true, - "description": "Removed on 2026-10-14; requests that use it get 400 unsupported filter.", + "description": "Object for filtering results. See the [Filtering results](https://seranking.com/api/data/ai-search#filtering-results) section for details.", + "style": "deepObject", + "explode": true, "schema": { - "type": "integer" - }, - "example": 100 + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of times the brand has been mentioned in the specified LLM for the current month." + }, + "date": { + "type": "string", + "description": "Date of the data snapshot in `YYYY-MM-DD` format." + }, + "prompts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prompt": { + "type": "string", + "description": "User query or prompt text that triggered the LLM response." + }, + "volume": { + "type": "integer", + "description": "Estimated monthly search volume for the prompt." + }, + "type": { + "type": "string", + "description": "Type of appearance for the target in the LLM result (e.g., `Link`, `Brand`)." + }, + "answer": { + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "Full text of the snippet generated by the LLM." + }, + "links": { + "type": "array", + "items": { + "type": "string", + "description": "Array of URL strings that were included as links within the LLM’s answer." + }, + "description": "Array of URL strings that were included as links within the LLM’s answer." + } + }, + "description": "Object containing the detailed response from the LLM." + } + }, + "description": "Array of objects, each representing a found prompt. See the structure below for details." + }, + "description": "Array of objects, each representing a found prompt. See the structure below for details." + } + } + }, + "example": { + "total": 5448, + "date": "2025-09-01", + "prompts": [ + { + "prompt": "peliculas en netflix", + "volume": 14800, + "type": "Link", + "answer": { + "text": "Hay una gran variedad de peliculas disponibles en Netflix...", + "links": [ + "[https://movies.sitioficial.netflix.com/browse/genre/34399](https://movies.sitioficial.netflix.com/browse/genre/34399)" + ] + } + } + ] + } + } + } }, - { - "name": "filter[volume][to]", - "in": "query", - "deprecated": true, - "description": "Removed on 2026-10-14; requests that use it get 400 unsupported filter.", - "schema": { - "type": "integer" - }, - "example": 100000 + "401": { + "$ref": "#/components/responses/Unauthorized" }, - { - "name": "filter[keyword_count][from]", - "in": "query", - "deprecated": true, - "description": "Removed on 2026-10-14; requests that use it get 400 unsupported filter.", - "schema": { - "type": "integer" - }, - "example": 5 + "402": { + "$ref": "#/components/responses/PaymentRequired" }, - { - "name": "filter[keyword_count][to]", - "in": "query", - "deprecated": true, - "description": "Removed on 2026-10-14; requests that use it get 400 unsupported filter.", - "schema": { - "type": "integer" - }, - "example": 8 + "403": { + "$ref": "#/components/responses/Forbidden" }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ { - "name": "filter[characters_count][from]", - "in": "query", - "deprecated": true, - "description": "Removed on 2026-10-14; requests that use it get 400 unsupported filter.", - "schema": { - "type": "integer" - }, - "example": 15 - }, + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/ai-search/prompts-by-brand?brand=Netflix&source=us&engine=chatgpt&sort=volume&sort_order=desc&offset=0&limit=10' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/serp/classic/tasks": { + "post": { + "operationId": "createSerpClassicTasks", + "tags": [ + "SERP" + ], + "summary": "Add SERP tasks", + "description": "Adds one or more search queries to the queue for SERP collection. Each task returns SERP results for the specified keywords, retrievable via the [Get standard SERP results](https://seranking.com/api/data/serp#standard-results) or [Get advanced SERP results](https://seranking.com/api/data/serp#advanced-results) endpoints.\n\nWhen tasks are complete, the system automatically sends webhook notifications if the `pingback_url` parameter is set. This allows you to avoid repeatedly checking for task status (for more information, see [Pingback notifications](https://seranking.com/api/data/serp/#pingback-notifications)).\n\n**Note:** The method supports **Google** search results only. **Bing** and **Yahoo!** are in development — contact [api@seranking.com](mailto:api@seranking.com) for release updates.\n\n**Warning:** Up to **1500 SERP tasks** can run in parallel. Requests exceeding this limit return a `429 Too Many Requests` response with a `processing_limit_exceeded` error, for example:\n\n```\n{\n \"error\": {\n \"code\": \"processing_limit_exceeded\",\n \"details\": {\n \"limit\": 1500,\n \"current_active_count\": 1503,\n \"requested_count\": 10\n }\n },\n \"message\": \"Processing limit exceeded. You have 1503 active tasks, which exceeds the limit of 1500. Please wait for the pending tasks to complete.\"\n}\n \n```\n\n**Cost:** 10 credits per keyword\n\n**Note:** One of `location_id` or `google_ads_location_id` must be provided.\n\n**Pingback notifications**\n\nWhen `pingback_url` is provided in the request, the system sends an HTTP GET request to the specified URL once the asynchronous task finishes.\n\n- Include `$id` and `$tag` as they are in your URL.\n\n- Upon task completion, the system substitutes these with actual values and calls the URL.\n\n**Note:** The `$tag` value is URL-encoded if it contains special characters.\n\n- Request: `\"pingback_url\": \"https://your-server.com/callback?id=$id&tag=$tag\"`.\n\n- Task completes with, e.g., ID `385103` and tag `campaign_abc`.\n\n- System calls: `GET https://your-server.com/callback?id=385103&tag=campaign_abc`.\n\n- Requests timeout after 5 seconds.\n\n- Failed deliveries retry up to 3 times (at ~1 min, ~5 min, ~15 min intervals).\n\n- Success requires an `HTTP` `2xx` response from your server.\n\n- Requests use User-Agent: `SE-Ranking-Pingback/1.0`.\n\n- Private and internal IPs are blocked (for SSRF protection).\n\n**Expected SERP**\n\nUse `expected_serp` to pass what you already know about the SERP of a keyword, for example the domains you saw in its top 10 last time. It is a reference for checking the collected SERP. It does not filter or reorder the returned results, and it does not change the cost.\n\n- Every field is optional: the parameter itself, any item and any field of an item.\n\n- Domains are host names such as `example.com`, not URLs. They are validated by syntax only, without a DNS lookup. URLs, IP addresses and names without a top-level domain are rejected.\n\n- Domains are converted to lower case and punycode. `www.` and duplicate domains are removed.\n\n- `position` can only be set together with `domain`.\n\n**Errors:** if any value is invalid, the request returns `400 Bad Request` and no tasks are created. The message names the field, for example:\n\n```\n{\n \"message\": \"Invalid expected_serp[1].top10_domains[1]. Must be a valid domain.\"\n}\n```\n\nIf successful, the server returns an array of task objects, each representing a submitted query.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/serp/#add-tasks" + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "One of `location_id` or `google_ads_location_id` must be provided.", + "required": [ + "search_engine", + "device", + "language_code", + "query" + ], + "properties": { + "search_engine": { + "type": "string", + "enum": [ + "google" + ], + "description": "Search engine. Only `google` is supported." + }, + "device": { + "type": "string", + "enum": [ + "desktop", + "mobile" + ], + "description": "Search device type." + }, + "language_code": { + "type": "string", + "description": "Language code (ISO 639-1), e.g. `fr`." + }, + "location_id": { + "type": "integer", + "description": "SE Ranking location ID, from `GET /v1/serp/classic/locations`. One of `location_id` or `google_ads_location_id` is required." + }, + "google_ads_location_id": { + "type": "integer", + "description": "Google Ads geo target ID. One of `location_id` or `google_ads_location_id` is required." + }, + "query": { + "type": "array", + "minItems": 1, + "description": "Keywords to collect the SERP for; one task is created per keyword. Up to 10 keywords per request by default; more returns `400`.", + "items": { + "type": "string", + "maxLength": 255 + } + }, + "tag": { + "type": "string", + "description": "Optional tag for grouping tasks." + }, + "pingback_url": { + "type": "string", + "description": "HTTP or HTTPS webhook URL that receives a GET request when a task completes. Literal `$id` and `$tag` placeholders are replaced with the task ID and tag." + }, + "expected_serp": { + "type": "array", + "description": "Optional. What the SERP of each query is expected to contain, as an array parallel to `query`: the item at index i applies to the query at index i. Use `null` (or `{}`) for a query without expectations. The array may be shorter than `query`, but not longer. Domains are checked by syntax only (no DNS lookup), then stored in lower case and punycode, without `www` and duplicates. URLs, IP addresses and names without a top-level domain are rejected. Any invalid value or unknown field returns `400` with the path of the field, for example `Invalid expected_serp[1].top10_domains[2]. Must be a valid domain.`, and no tasks are created.", + "items": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "top10_domains": { + "type": "array", + "description": "Domains expected in the top 10 results.", + "maxItems": 10, + "items": { + "type": "string", + "format": "hostname", + "maxLength": 253 + }, + "example": [ + "semrush.com", + "ahrefs.com" + ] + }, + "domain": { + "type": "string", + "format": "hostname", + "maxLength": 253, + "description": "A domain expected in the results.", + "example": "ahrefs.com" + }, + "position": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "description": "The position `domain` is expected at. Requires `domain`.", + "example": 3 + } + } + } + } + }, + "example": { + "search_engine": "google", + "device": "desktop", + "language_code": "es", + "location_id": 12998, + "query": [ + "seo report", + "seo api", + "seo tools" + ], + "expected_serp": [ + { + "top10_domains": [ + "semrush.com", + "ahrefs.com" + ], + "domain": "ahrefs.com", + "position": 3 + }, + null, + { + "top10_domains": [ + "moz.com" + ] + } + ], + "tag": "test_tag", + "pingback_url": "https://your-webhook.example.com?id=$id&user_tag=$tag" + } + }, + "example": { + "search_engine": "google", + "device": "desktop", + "language_code": "fr", + "google_ads_location_id": 2250, + "query": [ + "avocado", + "avocado recipes" + ], + "expected_serp": [ + { + "top10_domains": [ + "wikipedia.org", + "marmiton.org" + ], + "domain": "marmiton.org", + "position": 3 + }, + null + ], + "tag": "test_tag", + "pingback_url": "https://yourserver.com/serp-ready?id=$id&tag=$tag" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Unique ID assigned to each SERP collection task." + }, + "query": { + "type": "string", + "description": "Keyword for the task." + }, + "device": { + "type": "string", + "description": "Search device type." + }, + "location_id": { + "nullable": true, + "description": "ID of the location for the search results.", + "type": "integer" + }, + "google_ads_location_id": { + "type": "integer", + "description": "Google Ads ID of the location for the search results." + }, + "language_code": { + "type": "string", + "description": "Language code for the search results." + }, + "is_completed": { + "type": "boolean", + "description": "Indicates whether the task is completed (`true` or `false`)." + }, + "added": { + "type": "string", + "description": "Timestamp when the task was added in `YYYY-MM-DD HH:MM:SS` format." + } + } + } + }, + "example": [ + { + "id": 3005401, + "query": "avocado", + "device": "desktop", + "location_id": null, + "google_ads_location_id": 2250, + "language_code": "fr", + "is_completed": false, + "added": "2025-12-17 23:05:09" + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/serp/classic/tasks' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n --data '{\n \"search_engine\": \"google\",\n \"device\": \"desktop\",\n \"language_code\": \"fr\",\n \"google_ads_location_id\": 2250,\n \"query\": [\"avocado\", \"avocado recipes\"],\n \"expected_serp\": [\n {\"top10_domains\": [\"wikipedia.org\", \"marmiton.org\"], \"domain\": \"marmiton.org\", \"position\": 3},\n null\n ],\n \"tag\": \"test_tag\",\n \"pingback_url\": \"https://yourserver.com/serp-ready?id=$id&tag=$tag\"\n }'" + } + ] + }, + "get": { + "operationId": "getSerpClassicTasks", + "tags": [ + "SERP" + ], + "summary": "Get standard SERP results / List SERP tasks", + "description": "### Get standard SERP results\n\nRetrieves the status or standard results of a SERP task previously added via the **Add SERP tasks **endpoint. If the SERP results have not yet been collected, the server returns a `status` object. Once the task is complete, the server returns a `results` array containing the top 100 SERP results. Results are stored for 24 hours and then deleted.\n\n**Note:** This endpoint provides results for the following SERP item types only: `organic`, `ads`, and `featured_snippet`.\n\n**Cost:** 0 credits\n\n### List SERP tasks\n\nRetrieves a list of all SERP tasks that were added to the queue in the last 24 hours.\n\n**Cost:** 0 credits\n\nNo parameters are required for this request.\n\nIf successful, the server returns an array of task objects. Each object in the array represents a single task.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/serp/#standard-results" + }, + "parameters": [ + { + "name": "task_id", + "in": "query", + "description": "Unique ID of the query task created using the **Add SERP tasks** method.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Indicates that the task is currently being processed: `\"processing\"`." + }, + "request_metadata": { + "type": "object", + "properties": { + "keyword": { + "type": "string", + "description": "Keyword used in the search query." + }, + "device": { + "type": "string", + "description": "Search device type." + }, + "location_id": { + "type": "integer", + "description": "ID of the location for the search results." + }, + "language_code": { + "type": "string", + "description": "Language code for the search results." + }, + "tag": { + "type": "string", + "description": "Custom tag for the request (optional)." + }, + "crawled_at": { + "type": "string", + "description": "Timestamp when the SERP was crawled." + }, + "serp_url": { + "type": "string", + "description": "Full SERP URL." + } + }, + "description": "Metadata about the request." + }, + "summary": { + "type": "object", + "properties": { + "total_results": { + "type": "integer", + "description": "Total number of search results found." + }, + "organic_items_count": { + "type": "integer", + "description": "Number of organic results on the page." + }, + "SERP_features": { + "type": "array", + "items": { + "type": "string", + "description": "List of all SERP features present." + }, + "description": "List of all SERP features present." + } + }, + "description": "Summary statistics for the search results." + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of the SERP item. Possible values for this endpoint include: \n– `organic\n`– `ads\n`– `featured_snippet`" + }, + "rank_absolute": { + "type": "integer", + "description": "Absolute ranking of the item in the SERP." + }, + "rank_group": { + "type": "integer", + "description": "Rank within its group of similar items." + }, + "serp_features": { + "type": "array", + "items": { + "type": "string", + "description": "List of SERP features associated with this result." + }, + "description": "List of SERP features associated with this result." + }, + "position": { + "type": "string", + "description": "Position on the page (e.g., `top`, `bottom`)." + }, + "title": { + "type": "string", + "description": "Title of the page as shown in the SERP." + }, + "links": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL of the link." + }, + "title": { + "type": "string", + "description": "Title of the link." + } + }, + "description": "Array of link objects." + }, + "description": "Array of link objects." + }, + "displayUrl": { + "type": "string", + "description": "Displayed URL of the result as shown in the SERP." + } + }, + "description": "Array of search result objects." + }, + "description": "Array of search result objects." + } + }, + "title": "Get standard SERP results" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Unique ID of the query task." + }, + "query": { + "type": "string", + "description": "Keyword for the task." + }, + "location_id": { + "type": "integer", + "description": "ID of the location for the search results." + }, + "language_code": { + "type": "string", + "description": "Language code for the search results." + }, + "is_completed": { + "type": "boolean", + "description": "Completion status of the task (`true` if completed, `false` otherwise)." + }, + "added": { + "type": "string", + "description": "Timestamp (UTC) when the task was added to the queue." + } + } + }, + "title": "List SERP tasks" + } + ] + }, + "examples": { + "ifTheTaskIsStillInProgress": { + "summary": "- If the task is still in progress", + "value": { + "status": "processing" + } + }, + "ifTheTaskIsComplete": { + "summary": "- If the task is complete", + "value": { + "request_metadata": { + "keyword": "seo report", + "device": "desktop", + "location_id": 31808, + "language_code": "fr", + "tag": "test_tag", + "crawled_at": "2025-11-03 17:50:45", + "serp_url": "https://www.google.com/search?q=seo+report&hl=fr&gl=FR&ie=UTF-8" + }, + "summary": { + "total_results": 1160000000, + "organic_items_count": 99, + "SERP_features": [ + "tads", + "people_also_ask", + "bads", + "related_searches", + "reviews", + "video" + ] + }, + "items": [ + { + "type": "organic", + "rank_absolute": 1, + "rank_group": 1, + "serp_features": [ + "tads" + ], + "position": "top", + "title": "SEO Report Tool - SE Ranking SEO Software", + "links": [ + { + "url": "https://seranking.com/easy-to-use.html", + "title": "SEO Report Tool - SE Ranking SEO SoftwareSE Rankinghttps://www.seranking.com" + } + ], + "displayUrl": "https://www.seranking.com" + } + ] + } + }, + "listSERPTasks": { + "summary": "List SERP tasks", + "value": [ + { + "id": 62, + "query": "seo report", + "location_id": 31808, + "language_code": "fr", + "is_completed": true, + "added": "2025-11-03 17:49:34" + }, + { + "id": 65, + "query": "seo api", + "location_id": 31808, + "language_code": "fr", + "is_completed": true, + "added": "2025-11-03 17:49:34" + } + ] + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/serp/classic/tasks?task_id=14' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/serp/classic/tasks' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/serp/classic/tasks/results_advanced": { + "get": { + "operationId": "getSerpClassicTasksResults_advanced", + "tags": [ + "SERP" + ], + "summary": "Get advanced SERP results", + "description": "Retrieves the full, detailed SERP results of a task previously added via the **Add SERP tasks** endpoint. This call returns summaries, SERP features, and detailed items (organic, videos, images, AI overviews, etc.). Results are stored for 24 hours and then deleted.\n\n**Note:** Advanced results for mobile searches do *not* include AI overviews and therefore cost 0 credits.\n\n- If the SERP results have not yet been collected, the server returns a `status` object.\n\n- Once the task is complete, the server returns a `results` array containing the advanced results.\n\n**Cost:** 10 credits", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/serp/#advanced-results" + }, + "parameters": [ + { + "name": "task_id", + "in": "query", + "required": true, + "description": "Unique ID of the query task for which advanced results are requested.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Indicates that the task is currently being processed: `\"processing\"`." + }, + "request_metadata": { + "type": "object", + "properties": { + "keyword": { + "type": "string", + "description": "Keyword submitted in the request." + }, + "device": { + "type": "string", + "description": "Search device type." + }, + "location_id": { + "type": "integer", + "description": "ID of the location for the search results." + }, + "language_code": { + "type": "string", + "description": "Language code for the search results." + }, + "tag": { + "type": "string", + "description": "Custom tag for the request (optional)." + }, + "crawled_at": { + "type": "string", + "description": "Timestamp when the SERP was crawled." + }, + "serp_url": { + "type": "string", + "description": "Full SERP URL." + } + }, + "description": "Metadata about the request." + }, + "summary": { + "type": "object", + "properties": { + "total_results": { + "type": "integer", + "description": "Total number of search results found." + }, + "organic_items_count": { + "type": "integer", + "description": "Number of organic results on the page." + }, + "SERP_features": { + "type": "array", + "items": { + "type": "string", + "description": "List of all SERP features present." + }, + "description": "List of all SERP features present." + } + } + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of the SERP item. Common values include:\n– `organic\n`– `ads\n`– `featured_snippet`\n– `ai_overview`\n– `people_also_ask`\n– `find_results_on`\n– `related_searches`\n– `images`" + }, + "rank_absolute": { + "type": "integer", + "description": "Absolute ranking of the item in the SERP." + }, + "rank_group": { + "type": "integer", + "description": "Rank within its group of similar items." + }, + "position": { + "type": "string", + "description": "Position of the item on the SERP (e.g., `top`, `bottom`)." + }, + "serp_features": { + "type": "array", + "items": { + "type": "string", + "description": "List of SERP features associated with this result." + }, + "description": "List of SERP features associated with this result." + }, + "domain": { + "type": "string", + "description": "Domain of the page (if available)." + }, + "url": { + "type": "string", + "description": "URL of the page." + }, + "title": { + "type": "string", + "description": "Title of the page as shown in the SERP." + }, + "description": { + "type": "string", + "description": "Description snippet of the page (if available)." + }, + "breadcrumb": { + "type": "string", + "description": "Breadcrumb or main URL path of the page." + }, + "highlighted_terms": { + "type": "array", + "items": { + "type": "string", + "description": "Terms highlighted in the snippet matching the query." + }, + "description": "Terms highlighted in the snippet matching the query." + }, + "links": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL of the link." + }, + "title": { + "type": "string", + "description": "Title of the link." + } + }, + "description": "Array of link objects." + }, + "description": "Array of link objects." + }, + "searches": { + "type": "array", + "items": { + "type": "string", + "description": "Array of related search queries (only present for `related_searches` items)." + }, + "description": "Array of related search queries (only present for `related_searches` items)." + } + }, + "description": "Array of search result objects." + }, + "description": "Array of search result objects." + } + } + }, + "examples": { + "ifTheTaskIsStillInProgress": { + "summary": "- If the task is still in progress", + "value": { + "status": "processing" + } + }, + "ifTheTaskIsComplete": { + "summary": "- If the task is complete", + "value": { + "request_metadata": { + "keyword": "seo report", + "device": "desktop", + "location_id": 31808, + "language_code": "fr", + "tag": "test_tag", + "crawled_at": "2025-11-18 16:12:29", + "serp_url": "https://www.google.com/search?q=seo+report&hl=fr&source=hp&gl=US&ie=UTF-8&sclient=gws-wiz&uule=w+CAIQIFISCcVu4B8B2MJQEVDYwwkSgdS5&pws=0" + }, + "summary": { + "total_results": 1520000000, + "organic_items_count": 100, + "SERP_features": [ + "people_also_ask", + "bads", + "related_searches", + "reviews", + "video" + ] + }, + "items": [ + { + "type": "organic", + "rank_absolute": 1, + "rank_group": 1, + "position": "center", + "serp_features": [], + "domain": "www.seoptimer.com", + "url": "https://www.seoptimer.com/", + "title": "SEOptimer: Analyze Websites With Free SEO Audit ...", + "description": "SEOptimer is a free SEO Audit Tool that will perform a detailed SEO Analysis across 100 website data points, and provide clear and actionable recommendations.", + "breadcrumb": "https://www.seoptimer.com", + "highlighted_terms": [ + "SEOptimer is a free SEO Audit Tool" + ] + }, + { + "type": "organic", + "rank_absolute": 2, + "rank_group": 2, + "position": "center", + "serp_features": [], + "domain": "aioseo.com", + "url": "https://aioseo.com/seo-analyzer/", + "title": "FREE SEO Analyzer Tool - Generate Website SEO Audit ...", + "description": "Analyze your WordPress site to detect critical errors and get actionable insights to boost your SEO and get more traffic.", + "breadcrumb": "https://aioseo.com › seo-analyzer", + "highlighted_terms": [ + "Analyze your WordPress site" + ] + }, + { + "type": "organic", + "rank_absolute": 110, + "rank_group": 100, + "position": "center", + "serp_features": [], + "domain": "ahrefs.com", + "url": "https://ahrefs.com/site-audit", + "title": "A Free SEO Audit Tool by Ahrefs", + "description": "Scan your website for 170+ technical and on-page SEO issues to get a comprehensive website analysis. Site Audit segments issues into errors, warnings, and ...", + "breadcrumb": "https://ahrefs.com › site-audit", + "highlighted_terms": [ + "SEO" + ] + }, + { + "type": "related_searches", + "rank_absolute": 111, + "rank_group": 10, + "serp_features": [ + "related_searches" + ], + "position": "center", + "title": "Recherches associées", + "links": [ + { + "url": "", + "title": "SEO Checker" + }, + { + "url": "", + "title": "SEO score" + }, + { + "url": "", + "title": "Aioseo seo analyzer" + }, + { + "url": "", + "title": "SEO checker free" + }, + { + "url": "", + "title": "SEO test Google" + }, + { + "url": "", + "title": "Audit SEO" + }, + { + "url": "", + "title": "Website Analyzer" + }, + { + "url": "", + "title": "SEO tools" + } + ], + "searches": [ + "SEO Checker", + "SEO score", + "Aioseo seo analyzer", + "SEO checker free", + "SEO test Google", + "Audit SEO", + "Website Analyzer", + "SEO tools" + ] + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/serp/classic/tasks/results_advanced?task_id=14' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/serp/classic/tasks/html": { + "get": { + "operationId": "getSerpClassicTasksHtml", + "tags": [ + "SERP" + ], + "summary": "Get HTML SERP dump", + "description": "Retrieves the raw HTML version of Google search results pages for a completed SERP task. This method delivers the original SERP markup as rendered by Google, including pagination and layout. The response is returned as a ZIP archive containing Google SERP HTML files and a manifest.\n\n**Note:** Since the response is a ZIP archive, it must be saved to a file.\n\n**Cost:** 0 credits\n\n**Saving the response in Postman**\n\n- Send the request.\n\n- Click **Save Response**.\n\n- Choose **Save response to file**.\n\n- Save the file.\n\nAfter saving the ZIP file, extract the HTML dump. Use the following command to extract all HTML files and metadata into the `serp_data` directory:\n\n```\nunzip SERP_00000_desktop_us_12345.zip -d serp_data\n```\n\nThe server returns a ZIP archive containing the HTML dump. The contents of the HTML dump depend on the `device`parameter specified when creating the SERP task.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/serp/#html-dump" + }, + "parameters": [ { - "name": "filter[characters_count][to]", + "name": "task_id", "in": "query", - "deprecated": true, - "description": "Removed on 2026-10-14; requests that use it get 400 unsupported filter.", + "required": true, + "description": "Unique ID of the query task created using the **Add SERP tasks** method.", "schema": { "type": "integer" - }, - "example": 50 + } } ], "responses": { "200": { - "description": "Successful response.\n\nChanges since 2026-09-29 (new AI Search data source):\n\n- `prompts[].volume` is `null` for `engine=ai-overview` and `0` for\n the LLM engines.\n- `date` is the current month.", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Indicates that the task is currently being processed: `\"processing\"`." + } + } + }, + "example": { + "status": "processing" + } + } } }, - "400": { - "description": "Invalid request, e.g. `limit` above 1000 or a filter that is no longer supported (`unsupported filter`).", - "content": { - "application/json": {} - } + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/serp/classic/tasks/html?task_id=803249' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] } }, - "/v1/ai-search/prompts-by-brand": { + "/v1/serp/classic/locations": { "get": { - "operationId": "getAiSearchPromptsByBrand", + "operationId": "getSerpClassicLocations", "tags": [ - "AI search" + "SERP" ], - "summary": "prompts by brand", - "description": "Retrieves a list of prompts where a specified brand name is mentioned in the results of a chosen LLM.\n\nThe `filter[volume]`, `filter[keyword_count]` and `filter[characters_count]` filters were removed on 2026-10-14. A page holds at most 1000 prompts (`limit`).", + "summary": "Get locations", + "description": "Retrieves a list of available locations for SERP queries.\n\n**Cost:** 0 credits\n\n**Note:** If you plan to create SERP tasks using **google_ads_location_id**, make sure to include `include=google_ads_location_id` when retrieving locations.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/serp/#locations" + }, "parameters": [ { - "name": "apikey", + "name": "country_code", "in": "query", + "description": "Country code to filter locations by country.\n\nFor acceptable values, see [Regional database codes](https://seranking.com/api/data/reference#regional-database-codes).", "schema": { "type": "string" - }, - "example": "{{secret_key_data}}" + } }, { - "name": "brand", + "name": "q", "in": "query", + "description": "Parameter for matching a specific city.", "schema": { "type": "string" - }, - "example": "SE Ranking" + } }, { - "name": "source", + "name": "include", "in": "query", + "description": "Additional data to include in the response; currently supports `google_ads_location_id`.", "schema": { "type": "string" - }, - "example": "us" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "location_id": { + "type": "string", + "description": "Location identifier for the search query." + }, + "location_name": { + "type": "string", + "description": "Full name of the location returned in the search." + }, + "country_code": { + "type": "string", + "description": "Country code of the location returned in the search." + }, + "google_ads_location_id": { + "type": "string", + "description": "Google Ads location ID associated with the location (optional)." + } + } + } + } + } + }, + "example": { + "data": [ + { + "location_id": "LOCATION_ID_1", + "location_name": "Barcelona, Catalonia, Spain", + "country_code": "ES", + "google_ads_location_id": "GOOGLE_ADS_ID_1" + }, + { + "location_id": "LOCATION_ID_2", + "location_name": "Province of Barcelona, Catalonia, Spain", + "country_code": "ES", + "google_ads_location_id": "GOOGLE_ADS_ID_2" + }, + { + "location_id": "LOCATION_ID_3", + "location_name": "Barcelona, Catalonia, Spain", + "country_code": "ES", + "google_ads_location_id": "GOOGLE_ADS_ID_3" + } + ] + } + } + } }, - { - "name": "engine", - "in": "query", - "schema": { - "type": "string" - }, - "example": "perplexity" + "401": { + "$ref": "#/components/responses/Unauthorized" }, - { - "name": "sort", - "in": "query", - "schema": { - "type": "string", - "enum": [ - "volume", - "type", - "snippet_length" - ], - "default": "volume" - }, - "example": "volume" + "402": { + "$ref": "#/components/responses/PaymentRequired" }, - { - "name": "sort_order", - "in": "query", - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - }, - "example": "desc" + "403": { + "$ref": "#/components/responses/Forbidden" }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ { - "name": "offset", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 0 + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/serp/classic/locations?country_code=ES&q=Barcelona&include=google_ads_location_id' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/site-audit/audits/standard": { + "post": { + "operationId": "createSiteAuditAuditsStandard", + "tags": [ + "Website Audit" + ], + "summary": "Create standard audit", + "description": "Launches a standard audit that crawls the HTML of a website. This is suitable for most static and server-side rendered sites.\n\n**Cost:** 2 credits per crawled page\n\n**Settings**\n\nThe settings object allows for detailed customization of the website crawl. All parameters are optional.\n\nIf successful, the server returns a JSON object containing the unique ID for the newly created audit.\n\nIf successful, the server returns a JSON object containing the unique ID for the newly created audit.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/website-audit/#create-audit-standard" + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain to be audited (e.g., `domain.com`)." + }, + "title": { + "type": "string", + "description": "Custom title for the audit report. Maximum 300 characters." + }, + "settings": { + "type": "object", + "description": "Object containing specific audit settings. Only include parameters you want to override. See the **Audit settings** table below.", + "properties": { + "source_site": { + "type": "integer", + "description": "Scan all pages by following internal links from the homepage. If 0, scans only from sitemap or a provided list." + }, + "source_sitemap": { + "type": "integer", + "description": "Scan the sitemap.xml file." + }, + "source_subdomain": { + "type": "integer", + "description": "Scan subdomains. If 0, subdomain links are treated as external." + }, + "source_file": { + "type": "integer", + "description": "Use a custom list of pages for the audit." + }, + "check_robots": { + "type": "integer", + "description": "Follow the directives in the robots.txt file." + }, + "ignore_noindex": { + "type": "integer", + "description": "Ignore pages with a noindex tag." + }, + "ignore_nofollow": { + "type": "integer", + "description": "Ignore links with a nofollow attribute." + }, + "ignore_params": { + "type": "integer", + "description": "Ignore URL parameters." + }, + "custom_params": { + "type": "string" + }, + "user_agent": { + "type": "integer" + }, + "login": { + "type": "string" + }, + "password": { + "type": "string" + }, + "max_pages": { + "type": "integer", + "description": "Maximum number of pages to crawl." + }, + "max_depth": { + "type": "integer", + "description": "Maximum crawl depth." + }, + "max_req": { + "type": "integer", + "description": "Maximum number of requests per second." + }, + "max_redirects": { + "type": "integer", + "description": "Maximum number of redirects to follow." + }, + "max_size": { + "type": "integer", + "description": "Maximum page size in kilobytes." + }, + "min_title_len": { + "type": "integer", + "description": "Minimum length for the tag." + }, + "max_title_len": { + "type": "integer", + "description": "Maximum length for the <title> tag." + }, + "min_description_len": { + "type": "integer", + "description": "Minimum length for the meta description." + }, + "max_description_len": { + "type": "integer", + "description": "Maximum length for the meta description." + }, + "min_words": { + "type": "integer", + "description": "Minimum word count per page." + }, + "max_h1_len": { + "type": "integer", + "description": "Maximum length for <h1> tags." + }, + "max_h2_len": { + "type": "integer", + "description": "Maximum length for <h2> tags." + }, + "allow": { + "type": "string" + }, + "disallow": { + "type": "string" + }, + "hide": { + "type": "string" + }, + "send_report": { + "type": "integer", + "description": "Send an email report when the audit completes." + }, + "report_emails": { + "type": "string" + } + } + } + }, + "required": [ + "domain" + ] + }, + "example": { + "domain": "example.com", + "title": "Full Audit - example.com", + "settings": { + "source_site": 1, + "source_sitemap": 1, + "source_subdomain": 1, + "source_file": 0, + "check_robots": 1, + "ignore_noindex": 1, + "ignore_nofollow": 1, + "ignore_params": 2, + "custom_params": "utm_source, utm_medium, utm_term, utm_content, utm_campaign, cid, PHPSESSID, fbclid, gclid", + "user_agent": 0, + "login": "", + "password": "", + "max_pages": 10000, + "max_depth": 15, + "max_req": 300, + "max_redirects": 10, + "max_size": 5000, + "min_title_len": 30, + "max_title_len": 60, + "min_description_len": 50, + "max_description_len": 160, + "min_words": 300, + "max_h1_len": 70, + "max_h2_len": 80, + "allow": "/blog\n/products", + "disallow": "/admin\n/staging", + "hide": "/cdn-cgi\n/wp-json", + "send_report": 1, + "report_emails": "seo-lead@example.com, devops@example.com" + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The unique identifier for the audit report." + } + } + }, + "example": { + "id": 700237036 + } + } + } }, - { - "name": "limit", - "in": "query", - "schema": { - "type": "integer", - "maximum": 1000 - }, - "description": "Number of prompts per page, at most 1000. A larger value is rejected with 400.", - "example": 10 + "401": { + "$ref": "#/components/responses/Unauthorized" }, - { - "name": "filter[multi_keyword_included]", - "in": "query", - "schema": { - "type": "string" - }, - "example": "[\n [\n {\n \"type\": \"contains\",\n \"value\": \"seo\"\n }\n ]\n]" + "402": { + "$ref": "#/components/responses/PaymentRequired" }, - { - "name": "filter[multi_keyword_excluded]", - "in": "query", - "schema": { - "type": "string" - }, - "example": "[\n [\n { \"type\": \"contains\", \"value\": \"seo\" },\n { \"type\": \"contains\", \"value\": \"tools\" }\n ],\n [\n { \"type\": \"contains\", \"value\": \"backlinks\" }\n ]\n]" + "403": { + "$ref": "#/components/responses/Forbidden" }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ { - "name": "filter[volume][from]", - "in": "query", - "deprecated": true, - "description": "Removed on 2026-10-14; requests that use it get 400 unsupported filter.", - "schema": { - "type": "integer" - }, - "example": 100 + "lang": "Shell", + "label": "To launch a standard audit", + "source": "curl --location 'https://api.seranking.com/v1/site-audit/audits/standard' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Token YOUR_API_KEY' \\\n--data '{\n \"domain\": \"example.com\",\n \"title\": \"Full Audit - example.com\",\n \"settings\": {\n \"source_site\": 1,\n \"source_sitemap\": 1,\n \"source_subdomain\": 1,\n \"source_file\": 0,\n \"check_robots\": 1,\n \"ignore_noindex\": 1,\n \"ignore_nofollow\": 1,\n \"ignore_params\": 2,\n \"custom_params\": \"utm_source, utm_medium, utm_term, utm_content, utm_campaign, cid, PHPSESSID, fbclid, gclid\",\n \"user_agent\": 0,\n \"login\": \"\",\n \"password\": \"\",\n \"max_pages\": 10000,\n \"max_depth\": 15,\n \"max_req\": 300,\n \"max_redirects\": 10,\n \"max_size\": 5000,\n \"min_title_len\": 30,\n \"max_title_len\": 60,\n \"min_description_len\": 50,\n \"max_description_len\": 160,\n \"min_words\": 300,\n \"max_h1_len\": 70,\n \"max_h2_len\": 80,\n \"allow\": \"/blog\\n/products\",\n \"disallow\": \"/admin\\n/staging\",\n \"hide\": \"/cdn-cgi\\n/wp-json\",\n \"send_report\": 1,\n \"report_emails\": \"seo-lead@example.com, devops@example.com\"\n }\n}'" + } + ] + } + }, + "/v1/site-audit/audits/advanced": { + "post": { + "operationId": "createSiteAuditAuditsAdvanced", + "tags": [ + "Website Audit" + ], + "summary": "Create advanced audit", + "description": "Launches an advanced audit that renders JavaScript before analyzing the page. Use this for single-page applications (SPAs) or any site where content is loaded dynamically.\n\n**Cost:** 20 credits per crawled page\n\n**Settings**\n\nThe settings object allows for detailed customization of the website crawl. All parameters are optional.\n\nIf successful, the server returns a JSON object containing the unique ID for the newly created audit.\n\nIf successful, the server returns a JSON object containing the unique ID for the newly created audit.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/website-audit/#create-audit-advanced" + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain to be audited (e.g., `domain.com`)." + }, + "title": { + "type": "string", + "description": "Custom title for the audit report. Maximum 300 characters." + }, + "settings": { + "type": "object", + "description": "Object containing specific audit settings. Only include parameters you want to override. See the **Audit settings** table below.", + "properties": { + "source_site": { + "type": "integer", + "description": "Scan all pages by following internal links from the homepage. If 0, scans only from sitemap or a provided list." + }, + "source_sitemap": { + "type": "integer", + "description": "Scan the sitemap.xml file." + }, + "source_subdomain": { + "type": "integer", + "description": "Scan subdomains. If 0, subdomain links are treated as external." + }, + "source_file": { + "type": "integer", + "description": "Use a custom list of pages for the audit." + }, + "check_robots": { + "type": "integer", + "description": "Follow the directives in the robots.txt file." + }, + "ignore_noindex": { + "type": "integer", + "description": "Ignore pages with a noindex tag." + }, + "ignore_nofollow": { + "type": "integer", + "description": "Ignore links with a nofollow attribute." + }, + "ignore_params": { + "type": "integer", + "description": "Ignore URL parameters." + }, + "custom_params": { + "type": "string" + }, + "user_agent": { + "type": "integer" + }, + "login": { + "type": "string" + }, + "password": { + "type": "string" + }, + "max_pages": { + "type": "integer", + "description": "Maximum number of pages to crawl." + }, + "max_depth": { + "type": "integer", + "description": "Maximum crawl depth." + }, + "max_req": { + "type": "integer", + "description": "Maximum number of requests per second." + }, + "max_redirects": { + "type": "integer", + "description": "Maximum number of redirects to follow." + }, + "max_size": { + "type": "integer", + "description": "Maximum page size in kilobytes." + }, + "min_title_len": { + "type": "integer", + "description": "Minimum length for the <title> tag." + }, + "max_title_len": { + "type": "integer", + "description": "Maximum length for the <title> tag." + }, + "min_description_len": { + "type": "integer", + "description": "Minimum length for the meta description." + }, + "max_description_len": { + "type": "integer", + "description": "Maximum length for the meta description." + }, + "min_words": { + "type": "integer", + "description": "Minimum word count per page." + }, + "max_h1_len": { + "type": "integer", + "description": "Maximum length for <h1> tags." + }, + "max_h2_len": { + "type": "integer", + "description": "Maximum length for <h2> tags." + }, + "allow": { + "type": "string" + }, + "disallow": { + "type": "string" + }, + "hide": { + "type": "string" + }, + "send_report": { + "type": "integer", + "description": "Send an email report when the audit completes." + }, + "report_emails": { + "type": "string" + } + } + } + }, + "required": [ + "domain" + ] + }, + "example": { + "domain": "example.com", + "title": "Full Audit - example.com", + "settings": { + "source_site": 1, + "source_sitemap": 1, + "source_subdomain": 1, + "source_file": 0, + "check_robots": 1, + "ignore_noindex": 1, + "ignore_nofollow": 1, + "ignore_params": 2, + "custom_params": "utm_source, utm_medium, utm_term, utm_content, utm_campaign, cid, PHPSESSID, fbclid, gclid", + "user_agent": 0, + "login": "", + "password": "", + "max_pages": 10000, + "max_depth": 15, + "max_req": 300, + "max_redirects": 10, + "max_size": 5000, + "min_title_len": 30, + "max_title_len": 60, + "min_description_len": 50, + "max_description_len": 160, + "min_words": 300, + "max_h1_len": 70, + "max_h2_len": 80, + "allow": "/blog\n/products", + "disallow": "/admin\n/staging", + "hide": "/cdn-cgi\n/wp-json", + "send_report": 1, + "report_emails": "seo-lead@example.com, devops@example.com" + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The unique identifier for the audit report." + } + } + }, + "example": { + "id": 700237036 + } + } + } }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ { - "name": "filter[volume][to]", + "lang": "Shell", + "label": "To launch an advanced audit", + "source": "curl --location 'https://api.seranking.com/v1/site-audit/audits/advanced' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Token YOUR_API_KEY' \\\n--data '{\n \"domain\": \"example.com\",\n \"title\": \"Full Audit - example.com\",\n \"settings\": {\n \"source_site\": 1,\n \"source_sitemap\": 1,\n \"source_subdomain\": 1,\n \"source_file\": 0,\n \"check_robots\": 1,\n \"ignore_noindex\": 1,\n \"ignore_nofollow\": 1,\n \"ignore_params\": 2,\n \"custom_params\": \"utm_source, utm_medium, utm_term, utm_content, utm_campaign, cid, PHPSESSID, fbclid, gclid\",\n \"user_agent\": 0,\n \"login\": \"\",\n \"password\": \"\",\n \"max_pages\": 10000,\n \"max_depth\": 15,\n \"max_req\": 300,\n \"max_redirects\": 10,\n \"max_size\": 5000,\n \"min_title_len\": 30,\n \"max_title_len\": 60,\n \"min_description_len\": 50,\n \"max_description_len\": 160,\n \"min_words\": 300,\n \"max_h1_len\": 70,\n \"max_h2_len\": 80,\n \"allow\": \"/blog\\n/products\",\n \"disallow\": \"/admin\\n/staging\",\n \"hide\": \"/cdn-cgi\\n/wp-json\",\n \"send_report\": 1,\n \"report_emails\": \"seo-lead@example.com, devops@example.com\"\n }\n}'" + } + ] + } + }, + "/v1/site-audit/audits": { + "get": { + "operationId": "getSiteAuditAudits", + "tags": [ + "Website Audit" + ], + "summary": "List audits", + "description": "Retrieves a list of all website audits associated with your account, providing key details and statistics for each.\n\n**Cost:** 0 credits\n\nIf successful, the server returns a JSON object containing the total count of audits and an array of audit objects.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/website-audit/#list-audits" + }, + "parameters": [ + { + "name": "limit", "in": "query", - "deprecated": true, - "description": "Removed on 2026-10-14; requests that use it get 400 unsupported filter.", + "description": "Number of audits to return in the list.", "schema": { - "type": "integer" - }, - "example": 100000 + "type": "integer", + "default": 100 + } }, { - "name": "filter[keyword_count][from]", + "name": "offset", "in": "query", - "deprecated": true, - "description": "Removed on 2026-10-14; requests that use it get 400 unsupported filter.", + "description": "Starting position (offset) for the list of audits.", "schema": { - "type": "integer" - }, - "example": 5 + "type": "integer", + "default": 0 + } }, { - "name": "filter[keyword_count][to]", + "name": "search", "in": "query", - "deprecated": true, - "description": "Removed on 2026-10-14; requests that use it get 400 unsupported filter.", + "description": "Filters the list by a search term matching the audit’s title or URL.", "schema": { - "type": "integer" - }, - "example": 8 + "type": "string" + } }, { - "name": "filter[characters_count][from]", + "name": "date_start", "in": "query", - "deprecated": true, - "description": "Removed on 2026-10-14; requests that use it get 400 unsupported filter.", + "description": "Start date for filtering audits (YYYY-MM-DD).", "schema": { - "type": "integer" - }, - "example": 15 + "type": "string" + } }, { - "name": "filter[characters_count][to]", + "name": "date_end", "in": "query", - "deprecated": true, - "description": "Removed on 2026-10-14; requests that use it get 400 unsupported filter.", + "description": "End date for filtering audits (YYYY-MM-DD).", "schema": { - "type": "integer" - }, - "example": 50 + "type": "string" + } } ], "responses": { "200": { - "description": "Successful response.\n\nChanges since 2026-09-29 (new AI Search data source):\n\n- `prompts[].volume` is `null` for `engine=ai-overview` and `0` for\n the LLM engines.\n- `date` is the current month.", - "content": { - "application/json": {} - } - }, - "400": { - "description": "Invalid request, e.g. `limit` above 1000 or a filter that is no longer supported (`unsupported filter`).", + "description": "Successful response.", "content": { - "application/json": {} - } - } - } - } - }, - "/v1/serp/classic/tasks": { - "post": { - "operationId": "createSerpClassicTasks", - "tags": [ - "SERP Results > classic" - ], - "summary": "Add task", - "description": "Queues one or more keywords for SERP data collection and returns a unique task ID for each.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "One of `location_id` or `google_ads_location_id` must be provided.", - "required": [ - "search_engine", - "device", - "language_code", - "query" - ], - "properties": { - "search_engine": { - "type": "string", - "enum": [ - "google" - ], - "description": "Search engine. Only `google` is supported." - }, - "device": { - "type": "string", - "enum": [ - "desktop", - "mobile" - ], - "description": "Search device type." - }, - "language_code": { - "type": "string", - "description": "Language code (ISO 639-1), e.g. `fr`." - }, - "location_id": { - "type": "integer", - "description": "SE Ranking location ID, from `GET /v1/serp/classic/locations`. One of `location_id` or `google_ads_location_id` is required." - }, - "google_ads_location_id": { - "type": "integer", - "description": "Google Ads geo target ID. One of `location_id` or `google_ads_location_id` is required." - }, - "query": { - "type": "array", - "minItems": 1, - "description": "Keywords to collect the SERP for; one task is created per keyword. Up to 10 keywords per request by default; more returns `400`.", - "items": { - "type": "string", - "maxLength": 255 - } - }, - "tag": { - "type": "string", - "description": "Optional tag for grouping tasks." - }, - "pingback_url": { - "type": "string", - "description": "HTTP or HTTPS webhook URL that receives a GET request when a task completes. Literal `$id` and `$tag` placeholders are replaced with the task ID and tag." - }, - "expected_serp": { - "type": "array", - "description": "Optional. What the SERP of each query is expected to contain, as an array parallel to `query`: the item at index i applies to the query at index i. Use `null` (or `{}`) for a query without expectations. The array may be shorter than `query`, but not longer. Domains are checked by syntax only (no DNS lookup), then stored in lower case and punycode, without `www` and duplicates. URLs, IP addresses and names without a top-level domain are rejected. Any invalid value or unknown field returns `400` with the path of the field, for example `Invalid expected_serp[1].top10_domains[2]. Must be a valid domain.`, and no tasks are created.", + "application/json": { + "schema": { + "type": "object", + "properties": { "items": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "top10_domains": { - "type": "array", - "description": "Domains expected in the top 10 results.", - "maxItems": 10, - "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Unique identifier for the audit report (e.g., `700138456`)." + }, + "group_id": { + "type": "integer" + }, + "url": { "type": "string", - "format": "hostname", - "maxLength": 253 + "description": "URL of the audited website (e.g., `http://booking.com`)." }, - "example": [ - "semrush.com", - "ahrefs.com" - ] - }, - "domain": { - "type": "string", - "format": "hostname", - "maxLength": 253, - "description": "A domain expected in the results.", - "example": "ahrefs.com" + "title": { + "type": "string", + "description": "Title of the audit report (e.g., `booking.com`)." + }, + "has_project": { + "type": "boolean" + }, + "site_id": { + "type": "integer" + }, + "last_update": { + "type": "string", + "description": "Date the audit was last updated in YYYY-MM-DD format (e.g., `2025-07-08`)." + }, + "status": { + "type": "string", + "description": "Current status of the audit (e.g., `finished`, `processing`)." + }, + "error": {}, + "error_params": {}, + "stats": { + "type": "object", + "properties": { + "score": { + "type": "integer" + }, + "errors": { + "type": "integer" + }, + "warnings": { + "type": "integer" + }, + "notices": { + "type": "integer" + }, + "crawled": { + "type": "integer" + } + }, + "description": "Object containing the latest statistics for the audit (`score`, `errors`, `warnings`, `notices`, `crawled`)." + }, + "prev_stats": { + "description": "Object containing statistics from the previous audit run. Can be `null` if no prior data exists." + }, + "version": { + "type": "string" + }, + "owner_account_id": { + "type": "integer" + }, + "is_new": { + "type": "integer" + } }, - "position": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "description": "The position `domain` is expected at. Requires `domain`.", - "example": 3 - } - } + "description": "Array of objects, each representing a website audit." + }, + "description": "Array of objects, each representing a website audit." + }, + "total": { + "type": "integer", + "description": "Total number of audits matching the filter criteria." } } }, "example": { - "search_engine": "google", - "device": "desktop", - "language_code": "es", - "location_id": 12998, - "query": [ - "seo report", - "seo api", - "seo tools" - ], - "expected_serp": [ - { - "top10_domains": [ - "semrush.com", - "ahrefs.com" - ], - "domain": "ahrefs.com", - "position": 3 - }, - null, + "items": [ { - "top10_domains": [ - "moz.com" - ] + "id": 700138456, + "group_id": 0, + "url": "http://booking.com", + "title": "booking.com", + "has_project": true, + "site_id": 10113599, + "last_update": "2025-07-08", + "status": "finished", + "error": null, + "error_params": null, + "stats": { + "score": 69, + "errors": 2303, + "warnings": 3710, + "notices": 10875, + "crawled": 1830 + }, + "prev_stats": null, + "version": "2.0", + "owner_account_id": 4242308, + "is_new": 1 } ], - "tag": "test_tag", - "pingback_url": "https://your-webhook.example.com?id=$id&user_tag=$tag" + "total": 1 } } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/site-audit/audits?limit=4&offset=0&search=booking.com&date_start=2025-07-01&date_end=2025-07-31' \\\n--header 'Authorization: Token YOUR_API_KEY'" } + ] + }, + "patch": { + "operationId": "updateSiteAuditAudits", + "tags": [ + "Website Audit" + ], + "summary": "Update audit title", + "description": "Changes the title of an existing website audit report.\n\n**Cost:** 0 credits\n\nIf successful, the server returns **HTTP 200 OK** with an empty response body.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/website-audit/#update-audit-title" }, "parameters": [ { - "name": "apikey", + "name": "audit_id", "in": "query", + "required": true, + "description": "Unique identifier of the audit to update.", "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" + "type": "integer" + } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "New title for the audit report. Maximum 300 characters." + } + }, + "required": [ + "title" + ] + }, + "example": { + "title": "New Title for Ananda Ioga Audit" + } + } + } + }, "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "array", + "items": {} + }, + "example": [] + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request PATCH 'https://api.seranking.com/v1/site-audit/audits?audit_id=89263' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Token YOUR_API_KEY' \\\n--data '{\n \"title\": \"New Title for Ananda Ioga Audit\"\n}'" + } + ] }, - "get": { - "operationId": "getSerpClassicTasks", + "delete": { + "operationId": "deleteSiteAuditAudits", "tags": [ - "SERP Results > classic" + "Website Audit" ], - "summary": "List tasks / Get task results", - "description": "Without task_id: returns a list of all SERP tasks submitted within the last 24 hours. With task_id: returns the status or results for a specific task.", + "summary": "Delete audit", + "description": "Permanently deletes a specified website audit report and all of its associated data. This action can’t be undone.\n\n**Cost:** 0 credits\n\nIf successful, the server returns **HTTP 200 OK** with an empty response body.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/website-audit/#delete-audit" + }, "parameters": [ { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{vault:api_key_project}}" - }, - { - "name": "task_id", + "name": "audit_id", "in": "query", - "description": "Task ID returned by the POST endpoint. When provided, returns status or results for that specific task.", + "required": true, + "description": "Unique identifier of the audit to delete.", "schema": { "type": "integer" - }, - "example": 62458525 + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "array", + "items": {} + }, + "example": [] + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request DELETE 'https://api.seranking.com/v1/site-audit/audits?audit_id=89263' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] } }, - "/v1/serp/classic/tasks/results_advanced": { + "/v1/site-audit/audits/status": { "get": { - "operationId": "getSerpClassicTasksResults_advanced", + "operationId": "getSiteAuditAuditsStatus", "tags": [ - "SERP Results > classic" + "Website Audit" ], - "summary": "Get advanced results", - "description": "Checks the status of a specific task and retrieves the top 100 SERP results once the task is complete.", + "summary": "Get audit status", + "description": "Checks the real-time status of a specific website audit, whether it’s queued, currently processing, or already finished. This is useful for monitoring the progress of a crawl before fetching the full report.\n\n**Cost:** 0 credits\n\nIf successful, the server returns a JSON object containing the current status and key metrics of the audit.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/website-audit/#get-audit-status" + }, "parameters": [ { - "name": "task_id", + "name": "audit_id", "in": "query", + "required": true, + "description": "Unique identifier of the audit to check.", "schema": { "type": "integer" - }, - "example": 32 + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "total_pages": { + "type": "integer", + "description": "Number of pages crawled so far." + }, + "total_warnings": { + "type": "integer", + "description": "Current count of warnings found." + }, + "total_errors": { + "type": "integer", + "description": "Current count of critical issues found." + }, + "total_passed": { + "type": "integer", + "description": "Current count of checks that have passed." + }, + "status": { + "type": "string", + "description": "Current status of the audit. Possible values: `queued`, `processing`, `finished`, `cancelled`, `expired`." + }, + "start_time": { + "type": "string", + "description": "Timestamp for when the audit began." + }, + "audit_time": { + "type": "string", + "description": "Timestamp for when the audit was completed. This will be present if the status is finished." + } + } + }, + "example": { + "total_pages": 1009, + "total_warnings": 979, + "total_errors": 346, + "total_passed": 77, + "status": "finished", + "start_time": "2025-07-29 11:06:23", + "audit_time": "2025-07-29 11:19:33" + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/site-audit/audits/status?audit_id=700183831' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] } }, - "/v1/serp/classic/tasks/html": { + "/v1/site-audit/audits/report": { "get": { - "operationId": "getSerpClassicTasksHtml", + "operationId": "getSiteAuditAuditsReport", "tags": [ - "SERP Results > classic" + "Website Audit" ], - "summary": "Get HTML dump", - "description": "Checks the status of a specific task and retrieves the top 100 SERP results once the task is complete.", + "summary": "Get audit report", + "description": "Retrieves the full, detailed report for a completed website audit. The report includes the site’s overall health score, domain properties, and a section-by-section breakdown of all checks performed, categorized by issue type (errors, warnings, notices).\n\n**Cost:** 0 credits\n\nIf successful, the server returns a JSON object containing the complete audit report.\n\nEach object in the `sections` array contains a uid (unique ID), a name for the category, and a `props` object. The `props` object lists all the individual checks for that category. Each check includes:\n\n- `code`: A unique identifier for the check (e.g., no_https).\n\n- `status`: The result of the check (error, warning, notice, passed).\n\n- `name`: A human-readable name for the check.\n\n- `value`: The number of pages affected by this issue.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/website-audit/#get-audit-report" + }, "parameters": [ { - "name": "task_id", + "name": "audit_id", "in": "query", + "required": true, + "description": "Unique identifier of the audit for which to retrieve the report.", "schema": { "type": "integer" - }, - "example": 743834 + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "total_pages": { + "type": "integer", + "description": "Total number of pages crawled during the audit." + }, + "total_warnings": { + "type": "integer", + "description": "Total count of warnings found." + }, + "total_errors": { + "type": "integer", + "description": "Total count of critical issues found." + }, + "total_passed": { + "type": "integer", + "description": "Total count of checks that passed successfully." + }, + "total_notices": { + "type": "integer", + "description": "Total count of minor issues or notices." + }, + "is_finished": { + "type": "boolean", + "description": "Indicates if the audit has completed. The report is only available if this is true." + }, + "domain_props": { + "type": "object", + "properties": { + "dt": { + "type": "integer" + }, + "domain": { + "type": "string" + }, + "domains": { + "type": "string" + }, + "expdate": { + "type": "string", + "description": "Expiration date of the domain registration." + }, + "updated": { + "type": "string" + }, + "backlinks": { + "type": "string", + "description": "Total number of backlinks pointing to the domain." + }, + "index_bing": { + "type": "integer" + }, + "all_checked": { + "type": "boolean" + }, + "index_yahoo": { + "type": "integer" + }, + "index_google": { + "type": "string", + "description": "Number of pages indexed in Google." + } + }, + "description": "Object containing general data about the audited domain. See details below." + }, + "sections": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "props": { + "type": "object", + "properties": { + "no_https": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "status": { + "type": "string" + }, + "name": { + "type": "string" + }, + "value": { + "type": "integer" + } + } + }, + "mixed_content": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "status": { + "type": "string" + }, + "name": { + "type": "string" + }, + "value": { + "type": "integer" + } + } + }, + "http4xx": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "status": { + "type": "string" + }, + "name": { + "type": "string" + }, + "value": { + "type": "integer" + } + } + }, + "blocked_by_noindex": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "status": { + "type": "string" + }, + "name": { + "type": "string" + }, + "value": { + "type": "integer" + } + } + } + } + } + }, + "description": "Array of objects, where each object represents a category of audit checks (e.g., `Security`, `Content`)." + }, + "description": "Array of objects, where each object represents a category of audit checks (e.g., `Security`, `Content`)." + }, + "score_percent": { + "type": "integer", + "description": "Overall health score of the website, from 0 to 100." + }, + "audit_time": { + "type": "string", + "description": "Timestamp for when the audit was completed." + }, + "version": { + "type": "string" + } + } + }, + "example": { + "total_pages": 1009, + "total_warnings": 979, + "total_errors": 346, + "total_passed": 77, + "total_notices": 3915, + "is_finished": true, + "domain_props": { + "dt": 44, + "domain": "www.vitality.co.uk", + "domains": "3401", + "expdate": "2025-08-30", + "updated": "2025-07-29 12:07:28", + "backlinks": "212249", + "index_bing": 15500, + "all_checked": true, + "index_yahoo": 15500, + "index_google": "1380" + }, + "sections": [ + { + "uid": "security_v2", + "name": "Security", + "props": { + "no_https": { + "code": "no_https", + "status": "error", + "name": "No HTTPS encryption", + "value": 0 + }, + "mixed_content": { + "code": "mixed_content", + "status": "error", + "name": "Mixed content", + "value": 0 + } + } + }, + { + "uid": "crawling_v2", + "name": "Crawling & Indexing", + "props": { + "http4xx": { + "code": "http4xx", + "status": "error", + "name": "4XX HTTP Status Codes", + "value": 28 + }, + "blocked_by_noindex": { + "code": "blocked_by_noindex", + "status": "notice", + "name": "Blocked by noindex", + "value": 34 + } + } + } + ], + "score_percent": 80, + "audit_time": "2025-07-29 11:19:33", + "version": "2.0" + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/site-audit/audits/report?audit_id=700183831' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] } }, - "/v1/serp/classic/locations": { + "/v1/site-audit/audits/pages": { "get": { - "operationId": "getSerpClassicLocations", + "operationId": "getSiteAuditAuditsPages", "tags": [ - "SERP Results > classic" + "Website Audit" ], - "summary": "Get locations", - "description": "Returns a list of all SERP tasks submitted by the user within the last 24 hours.", + "summary": "Get all crawled pages", + "description": "Returns a paginated list of all URLs found during an audit, providing a complete sitemap as discovered by the crawler. This includes pages with and without detected issues.\n\n**Cost:** 0 credits\n\nIf successful, the server returns a JSON object containing the total count of crawled pages and an array of page objects.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/website-audit/#get-all-crawled-pages" + }, "parameters": [ { - "name": "country_code", + "name": "audit_id", "in": "query", + "required": true, + "description": "Unique identifier of the audit report.", "schema": { - "type": "string" - }, - "example": "ES" + "type": "integer" + } }, { - "name": "q", + "name": "limit", "in": "query", + "description": "Number of pages to return in the list.", "schema": { - "type": "string" - }, - "example": "Barcelona" + "type": "integer", + "default": 100 + } }, { - "name": "include", + "name": "offset", "in": "query", - "description": "Include additional fields in the response.", + "description": "Starting position for the list of pages.", "schema": { - "type": "string" - }, - "example": "google_ads_location_id" - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/v1/site-audit/audits/standard": { - "post": { - "operationId": "createSiteAuditAuditsStandard", - "tags": [ - "Website Audit" - ], - "summary": "Create standard audit", - "description": "Launches a new website audit by crawling the site's raw HTML.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "domain": "example.com", - "title": "Example Audit Title", - "settings": { - "source_site": 1, - "source_sitemap": 1, - "source_subdomain": 0, - "source_file": 0, - "check_robots": 1, - "ignore_params": 0, - "custom_params": "utm_source,utm_medium,utm_term,utm_content,utm_campaign", - "ignore_noindex": 0, - "ignore_nofollow": 0, - "user_agent": 0, - "login": "", - "password": "", - "max_pages": 10000, - "max_depth": 10, - "max_req": 500, - "max_redirects": 5, - "min_title_len": 20, - "max_title_len": 65, - "min_description_len": 1, - "max_description_len": 158, - "max_size": 3000, - "min_words": 250, - "max_h1_len": 100, - "max_h2_len": 100, - "allow": "", - "disallow": "", - "hide": "" - } - } - } + "type": "integer", + "default": 0 } } - }, - "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{vault:api_key_data_api}}" - } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} - } - } - } - } - }, - "/v1/site-audit/audits/advanced": { - "post": { - "operationId": "createSiteAuditAuditsAdvanced", - "tags": [ - "Website Audit" - ], - "summary": "Create advanced audit", - "description": "Launches a new website audit that renders JavaScript to analyze dynamically-loaded content, ideal for SPAs.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "domain": "example.com", - "title": "Example Audit Title", - "settings": { - "source_site": 1, - "source_sitemap": 1, - "source_subdomain": 0, - "source_file": 0, - "check_robots": 1, - "ignore_params": 0, - "custom_params": "utm_source,utm_medium,utm_term,utm_content,utm_campaign", - "ignore_noindex": 0, - "ignore_nofollow": 0, - "user_agent": 0, - "login": "", - "password": "", - "max_pages": 100, - "max_depth": 10, - "max_req": 500, - "max_redirects": 5, - "min_title_len": 20, - "max_title_len": 65, - "min_description_len": 1, - "max_description_len": 158, - "max_size": 3000, - "min_words": 250, - "max_h1_len": 100, - "max_h2_len": 100, - "allow": "", - "disallow": "", - "hide": "" + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of pages crawled in the audit." + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique internal identifier for the page (e.g., `50958380`)." + }, + "url": { + "type": "string", + "description": "Full URL of the crawled page (e.g., `https://www.vitality.co.uk/`)." + }, + "url_len": { + "type": "string" + }, + "type": { + "type": "string" + }, + "url_protocol": { + "type": "string" + }, + "sitemap": { + "type": "string" + }, + "status": { + "type": "string", + "description": "HTTP status code returned by the page (e.g., `200`)." + }, + "size": { + "type": "string" + }, + "depth": { + "type": "string", + "description": "Crawl depth of the page, i.e., distance from the start page (e.g., `1`)." + }, + "noindex": { + "type": "string" + }, + "first_ms": { + "type": "string" + }, + "load_ms": { + "type": "string", + "description": "Time it took for the page to load, in milliseconds (e.g., `1373`)." + }, + "robots": { + "type": "string" + }, + "nofollow": { + "type": "string" + }, + "xrobots": {}, + "title_len": { + "type": "string" + }, + "description_len": { + "type": "string" + }, + "chars": { + "type": "string" + }, + "h1_len": { + "type": "string" + }, + "h2_len": { + "type": "string" + }, + "html_ratio": { + "type": "string" + }, + "blocked_robots": { + "type": "string" + }, + "img": { + "type": "string" + }, + "hreflang": {}, + "hreflang_link": {}, + "refresh_time": {}, + "meta_refresh": { + "type": "string" + }, + "redirect_url": {}, + "canonical_url": { + "type": "string", + "description": "Canonical URL specified for the page (e.g., `https://www.vitality.co.uk/`)." + }, + "single_h1": { + "type": "string" + }, + "single_h2": { + "type": "string" + }, + "h3_count": { + "type": "string" + }, + "h4_count": { + "type": "string" + }, + "h5_count": { + "type": "string" + }, + "h6_count": { + "type": "string" + }, + "words_count": { + "type": "string", + "description": "Total number of words found on the page (e.g., `1621`)." + }, + "total_links": { + "type": "string" + }, + "mixed_count": {}, + "mixed": {}, + "last_modified": {}, + "content_hash": { + "type": "string" + }, + "title": { + "type": "string", + "description": "Content of the `<title>` tag (e.g., `Vitality Insurance`)." + }, + "description": { + "type": "string", + "description": "Content of the meta description tag (e.g., `Vitality is a leading UK insurer...`)." + }, + "h1": { + "type": "string", + "description": "Content of the first `<h1>` tag (e.g., `Live longer with Vitality insurance`)." + }, + "h2": { + "type": "string" + }, + "issues": { + "type": "string", + "description": "Total count of issues found on the page (e.g., `2`)." + }, + "errors": { + "type": "string", + "description": "Total count of critical errors on the page (e.g., `0`)." + }, + "warnings": { + "type": "string", + "description": "Total count of warnings on the page (e.g., `0`)." + }, + "notices": { + "type": "string", + "description": "Total count of notices on the page (e.g., `2`)." + }, + "refpages": { + "type": "string" + }, + "inlinks": { + "type": "string", + "description": "Number of internal links pointing to this page (e.g., `922`)." + }, + "inlinks_nofollow": { + "type": "string" + }, + "inlinks_follow": { + "type": "string" + }, + "redirect_links": { + "type": "string" + }, + "redirect_count": { + "type": "string" + }, + "img_size": { + "type": "string" + }, + "css_size": { + "type": "string" + }, + "js_size": { + "type": "string" + }, + "outlinks_external": { + "type": "string", + "description": "Number of external links found on this page (e.g., `12`)." + }, + "outlinks_internal": { + "type": "string", + "description": "Number of internal links found on this page (e.g., `83`)." + }, + "title_duplicate": { + "type": "string" + }, + "description_duplicate": { + "type": "string" + }, + "h1_duplicate": { + "type": "string" + }, + "amp": { + "type": "string" + }, + "indexable": { + "type": "string" + }, + "indexable_status": { + "type": "string", + "description": "Indexability status of the page (e.g., `ok`)." + }, + "traffic_forecast": { + "type": "string" + }, + "num_keywords": { + "type": "string" + }, + "recheck_status": {}, + "time_check": { + "type": "string" + } + }, + "description": "Array of objects, each representing a crawled page with its detailed metrics." + }, + "description": "Array of objects, each representing a crawled page with its detailed metrics." + } } + }, + "example": { + "total": 1009, + "items": [ + { + "id": "50958380", + "url": "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)", + "url_len": "27", + "type": "doc", + "url_protocol": "https", + "sitemap": "0", + "status": "200", + "size": "156676", + "depth": "1", + "noindex": "0", + "first_ms": "35", + "load_ms": "1373", + "robots": "index, follow", + "nofollow": "0", + "xrobots": null, + "title_len": "53", + "description_len": "139", + "chars": "153843", + "h1_len": "35", + "h2_len": "16", + "html_ratio": "40", + "blocked_robots": "0", + "img": "21", + "hreflang": null, + "hreflang_link": null, + "refresh_time": null, + "meta_refresh": "0", + "redirect_url": null, + "canonical_url": "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)", + "single_h1": "1", + "single_h2": "0", + "h3_count": "9", + "h4_count": "33", + "h5_count": "0", + "h6_count": "0", + "words_count": "1621", + "total_links": "230", + "mixed_count": null, + "mixed": null, + "last_modified": null, + "content_hash": "9d657683ebd385ba700d4301f1ef854f", + "title": "Vitality Insurance | Award-Winning Insurance Provider", + "description": "Vitality is a leading UK insurer offering health and life insurance. Get your quote today and unlock discounts and rewards from top brands.", + "h1": "Live longer with Vitality insurance", + "h2": "Health insurance", + "issues": "2", + "errors": "0", + "warnings": "0", + "notices": "2", + "refpages": "921", + "inlinks": "922", + "inlinks_nofollow": "0", + "inlinks_follow": "922", + "redirect_links": "4", + "redirect_count": "5", + "img_size": "700322", + "css_size": "443163", + "js_size": "543728", + "outlinks_external": "12", + "outlinks_internal": "83", + "title_duplicate": "0", + "description_duplicate": "0", + "h1_duplicate": "0", + "amp": "0", + "indexable": "1", + "indexable_status": "ok", + "traffic_forecast": "10716", + "num_keywords": "48369", + "recheck_status": null, + "time_check": "2025-07-29 11:06:30" + }, + { + "id": "50958398", + "url": "[https://www.vitality.co.uk/health-insurance/](https://www.vitality.co.uk/health-insurance/)", + "url_len": "44", + "type": "doc", + "url_protocol": "https", + "sitemap": "1", + "status": "200", + "size": "181179", + "depth": "2", + "noindex": "0", + "first_ms": "0", + "load_ms": "496", + "robots": "index, follow", + "nofollow": "0", + "xrobots": null, + "title_len": "52", + "description_len": "121", + "chars": "178088", + "h1_len": "26", + "h2_len": "33", + "html_ratio": "42", + "blocked_robots": "0", + "img": "27", + "hreflang": null, + "hreflang_link": null, + "refresh_time": null, + "meta_refresh": "0", + "redirect_url": null, + "canonical_url": "[https://www.vitality.co.uk/health-insurance/](https://www.vitality.co.uk/health-insurance/)", + "single_h1": "1", + "single_h2": "0", + "h3_count": "20", + "h4_count": "39", + "h5_count": "0", + "h6_count": "0", + "words_count": "3032", + "total_links": "239", + "mixed_count": null, + "mixed": null, + "last_modified": null, + "content_hash": "5b6d17dbcb03b2405450db10f86dd43a", + "title": "Health Insurance in the UK | Get Private Health Care", + "description": "Get top-rated health insurance in the UK, with real benefits and incentives from your healthcare plan. Get a quote today.", + "h1": "Health insurance in the UK", + "h2": "What is private health insurance?", + "issues": "3", + "errors": "0", + "warnings": "1", + "notices": "2", + "refpages": "896", + "inlinks": "898", + "inlinks_nofollow": "0", + "inlinks_follow": "898", + "redirect_links": "0", + "redirect_count": "4", + "img_size": "2316745", + "css_size": "443163", + "js_size": "543728", + "outlinks_external": "12", + "outlinks_internal": "86", + "title_duplicate": "0", + "description_duplicate": "0", + "h1_duplicate": "0", + "amp": "0", + "indexable": "1", + "indexable_status": "ok", + "traffic_forecast": "4928", + "num_keywords": "13021", + "recheck_status": null, + "time_check": "2025-07-29 11:06:45" + } + ] } } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } }, - "parameters": [ + "x-codeSamples": [ { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/site-audit/audits/pages?audit_id=700183831&limit=2&offset=0' \\\n--header 'Authorization: Token YOUR_API_KEY'" } - } + ] } }, - "/v1/site-audit/audits": { + "/v1/site-audit/audits/issue-pages": { "get": { - "operationId": "getSiteAuditAudits", + "operationId": "getSiteAuditAuditsIssuePages", "tags": [ "Website Audit" ], - "summary": "List audits", - "description": "Retrieves a paginated list of all website audits associated with your account, including their current status and summary stats.", + "summary": "Get audit pages by issue", + "description": "Retrieves a paginated list of all URLs affected by a specific issue within a given audit. You can identify the code for an issue by first fetching the main audit report.\n\n**Cost:** 0 credits\n\nIf successful, the server returns a JSON object containing the total count of affected URLs and an array of the URLs themselves.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/website-audit/#get-audit-pages-by-issue" + }, "parameters": [ { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "limit", - "in": "query", - "schema": { - "type": "integer", - "default": 100 - }, - "example": 100 - }, - { - "name": "offset", + "name": "audit_id", "in": "query", + "required": true, + "description": "Unique identifier of the audit report.", "schema": { - "type": "integer", - "default": 0 - }, - "example": 0 + "type": "integer" + } }, { - "name": "search", + "name": "code", "in": "query", - "description": "Filter audits by title or URL.", + "required": true, + "description": "Unique code for the issue (e.g., `title_duplicate`). [Audit Issue Codes](https://seranking.com/api/data/reference/#site-audit-issue-codes) for the full list of valid codes.", "schema": { "type": "string" } }, { - "name": "date_start", + "name": "limit", "in": "query", - "description": "Filter audits created on or after this date (YYYY-MM-DD).", + "description": "Number of URLs to return in the list.", "schema": { - "type": "string", - "format": "date" + "type": "integer", + "default": 100 } }, { - "name": "date_end", + "name": "offset", "in": "query", - "description": "Filter audits created on or before this date (YYYY-MM-DD).", + "description": "Starting position (offset) for the list of URLs.", "schema": { - "type": "string", - "format": "date" + "type": "integer", + "default": 0 } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} - } - } - } - }, - "patch": { - "operationId": "updateSiteAuditAudits", - "tags": [ - "Website Audit" - ], - "summary": "Update audit", - "description": "Changes the display title of an existing website audit report.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", + "application/json": { + "schema": { + "type": "object", + "properties": { + "total_urls": { + "type": "integer", + "description": "Total number of URLs affected by this specific issue." + }, + "urls": { + "type": "array", + "items": { + "type": "string", + "description": "Array of strings, where each string is a URL affected by the issue." + }, + "description": "Array of strings, where each string is a URL affected by the issue." + }, + "urls_type": { + "type": "string", + "description": "Type of `urls` array returned. For this endpoint, it is `simple_urls_array`, meaning a plain array of URL strings." + } + } + }, "example": { - "title": "New Example Audit Title" + "total_urls": 143, + "urls": [ + "https://www.vitality.co.uk/life-insurance/accident-and-fracture-cover/", + "https://www.vitality.co.uk/business/health-insurance/callback/", + "https://www.vitality.co.uk/media/vitality-employee-challenges-programme-goes-live/", + "https://www.vitality.co.uk/media/bbq-blunders-the-bbq-foods-fooling-brits/", + "https://www.vitality.co.uk/media/vitality-launches-cpd-accredited-sustainability-webinar-series-for-advisers/", + "https://www.vitality.co.uk/media/vitality-welcomes-new-partners-to-the-programme/", + "https://www.vitality.co.uk/media/sneezing-season-slams-first-time-sufferers/", + "https://www.vitality.co.uk/media/vitality-calls-for-greater-focus-on-burnout/", + "https://www.vitality.co.uk/media/vitality-research-reveals-gaps-in-employee-awareness-of-sick-leave-policies/", + "https://www.vitality.co.uk/media/vitality-parkrun-celebrate-record-breaking/" + ], + "urls_type": "simple_urls_array" } } } - } - }, - "parameters": [ - { - "name": "audit_id", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 700387192 }, - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - }, - "delete": { - "operationId": "deleteSiteAuditAudits", - "tags": [ - "Website Audit" - ], - "summary": "Delete audit", - "description": "Permanently deletes a specified website audit report and all of its associated data.", - "parameters": [ - { - "name": "audit_id", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 700387192 + "401": { + "$ref": "#/components/responses/Unauthorized" }, - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/site-audit/audits/issue-pages?code=title_duplicate&audit_id=700183831&limit=10&offset=0' \\\n--header 'Authorization: Token YOUR_API_KEY'" } - } + ] } }, - "/v1/site-audit/audits/status": { + "/v1/site-audit/audits/issues": { "get": { - "operationId": "getSiteAuditAuditsStatus", + "operationId": "getSiteAuditAuditsIssues", "tags": [ "Website Audit" ], - "summary": "Get audit status", - "description": "Checks the real-time progress of a specific audit, including the number of pages crawled and issues found so far.", + "summary": "Get all issues by URL", + "description": "Retrieves a detailed list of all issues (errors, warnings, and notices) found on a single, specific page within an audit. The response also includes the full `page_data` object for the complete context.\n\n**Cost:** 0 credits\n\nIf successful, the server returns a JSON object containing the page’s URL, its full data object, and an array of all issues found on that page.\n\nThe `snippet` value provides the specific evidence, such as a list of redirecting URLs or an oversized CSS file with its size.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/website-audit/#get-all-issues-for-a-specific-url" + }, "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - }, { "name": "audit_id", "in": "query", + "required": true, + "description": "Unique identifier of the audit.", "schema": { "type": "integer" - }, - "example": 700313923 - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} } - } - } - } - }, - "/v1/site-audit/audits/report": { - "get": { - "operationId": "getSiteAuditAuditsReport", - "tags": [ - "Website Audit" - ], - "summary": "Get audit report", - "description": "Retrieves the full summary report for a completed audit, including the overall health score and a breakdown of all issues.", - "parameters": [ + }, { - "name": "audit_id", + "name": "url_id", "in": "query", + "description": "Unique identifier of the page obtained from the [Get all crawled pages](https://seranking.com/api/data/website-audit/#get-all-crawled-pages) endpoint. Required if `url` is not provided.", "schema": { "type": "integer" - }, - "example": 700183831 + } }, { - "name": "apikey", + "name": "url", "in": "query", + "description": "Full page URL. Required if `url_id` is not provided.", "schema": { "type": "string" - }, - "example": "{{secret_key_data}}" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Full URL of the page being queried." + }, + "page_data": { + "type": "object", + "properties": { + "h1": { + "type": "string" + }, + "h2": { + "type": "string" + }, + "js": { + "type": "integer" + }, + "css": { + "type": "integer" + }, + "doc": { + "type": "integer" + }, + "img": { + "type": "integer" + }, + "lang": { + "type": "string" + }, + "cache": { + "type": "string" + }, + "chars": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "words": { + "type": "integer" + }, + "ext_js": { + "type": "integer" + }, + "h1_len": { + "type": "integer" + }, + "h2_len": { + "type": "integer" + }, + "robots": { + "type": "string" + }, + "ext_doc": { + "type": "integer" + }, + "h1_hash": { + "type": "string" + }, + "inlinks": { + "type": "integer" + }, + "js_size": { + "type": "integer" + }, + "css_size": { + "type": "integer" + }, + "encoding": { + "type": "string" + }, + "h1_count": { + "type": "integer" + }, + "h2_count": { + "type": "integer" + }, + "h3_count": { + "type": "integer" + }, + "h4_count": { + "type": "integer" + }, + "img_size": { + "type": "integer" + }, + "refpages": { + "type": "integer" + }, + "canonical": { + "type": "string" + }, + "title_len": { + "type": "integer" + }, + "html_ratio": { + "type": "integer" + }, + "time_check": { + "type": "string" + }, + "title_hash": { + "type": "string" + }, + "description": { + "type": "string" + }, + "total_links": { + "type": "integer" + }, + "errors_count": { + "type": "integer" + }, + "issues_count": { + "type": "integer" + }, + "num_keywords": { + "type": "integer" + }, + "notices_count": { + "type": "integer" + }, + "redirect_count": { + "type": "integer" + }, + "redirect_links": { + "type": "integer" + }, + "warnings_count": { + "type": "integer" + }, + "description_len": { + "type": "integer" + }, + "description_hash": { + "type": "string" + }, + "traffic_forecast": { + "type": "integer" + } + }, + "description": "Snapshot of all metrics and metadata collected for the page during the crawl." + }, + "issues": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Unique, machine-readable identifier for the issue type (e.g., `css_big`)." + }, + "type": { + "type": "string", + "description": "Severity of the issue (e.g., `error`, `warning`, `notice`)." + }, + "group": { + "type": "string", + "description": "Category the issue belongs to (e.g., `links_v2`, `css`)." + }, + "snippet": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Severity of the issue (e.g., `error`, `warning`, `notice`)." + }, + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "url": { + "type": "string", + "description": "Full URL of the page being queried." + }, + "size": { + "type": "string" + } + } + } + } + }, + "description": "Concrete, actionable details about the issue: `{...}`" + } + }, + "description": "Array of objects, where each object is a specific issue (error, warning, or notice) found on the page." + }, + "description": "Array of objects, where each object is a specific issue (error, warning, or notice) found on the page." + } + } + }, + "example": { + "url": "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)", + "page_data": { + "h1": "Live longer with Vitality insurance", + "h2": "Health insurance", + "js": 6, + "css": 1, + "doc": 83, + "img": 21, + "lang": "en", + "cache": "no-cache, no-store", + "chars": 153843, + "title": "Vitality Insurance | Award-Winning Insurance Provider", + "words": 1621, + "ext_js": 4, + "h1_len": 35, + "h2_len": 16, + "robots": "index, follow", + "ext_doc": 12, + "h1_hash": "4c57f3fc38a26dcc202c11b8975f590e", + "inlinks": 922, + "js_size": 543728, + "css_size": 443163, + "encoding": "gzip", + "h1_count": 1, + "h2_count": 14, + "h3_count": 9, + "h4_count": 33, + "img_size": 700322, + "refpages": 921, + "canonical": "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)", + "title_len": 53, + "html_ratio": 40, + "time_check": "2025-07-29 11:06:30", + "title_hash": "c33af508bc32002acac1e3a12606c626", + "description": "Vitality is a leading UK insurer offering health and life insurance. Get your quote today and unlock discounts and rewards from top brands.", + "total_links": 230, + "errors_count": 0, + "issues_count": 2, + "num_keywords": 48369, + "notices_count": 2, + "redirect_count": 5, + "redirect_links": 4, + "warnings_count": 0, + "description_len": 139, + "description_hash": "3bb8e0f3905c4b7203a8b7cae91f890b", + "traffic_forecast": 10716 + }, + "issues": [ + { + "code": "extlinks3xx", + "type": "notice", + "group": "links_v2", + "snippet": { + "type": "urls", + "value": [ + { + "status": "302", + "url": "[https://members.vitality.co.uk/my-points/confirm-an-activity](https://members.vitality.co.uk/my-points/confirm-an-activity)" + }, + { + "status": "302", + "url": "[https://members.vitality.co.uk/](https://members.vitality.co.uk/)" + } + ] + } + }, + { + "code": "css_big", + "type": "notice", + "group": "css", + "snippet": { + "type": "urls", + "value": [ + { + "status": "200", + "url": "[https://www.vitality.co.uk/dist/vds/css/presales.css?v=2025.6.30121236](https://www.vitality.co.uk/dist/vds/css/presales.css?v=2025.6.30121236)", + "size": "443163" + } + ] + } + } + ] + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/site-audit/audits/issues?audit_id=700183831&url_id=50958380' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] } }, - "/v1/site-audit/audits/pages": { + "/v1/site-audit/audits/links": { "get": { - "operationId": "getSiteAuditAuditsPages", + "operationId": "getSiteAuditAuditsLinks", "tags": [ "Website Audit" ], - "summary": "Get all crawled pages", - "description": "Returns a paginated list of every URL discovered during an audit, along with detailed on-page and technical metrics for each.", + "summary": "Get all found links", + "description": "Returns a paginated list of every hyperlink (e.g., in `<a>` tags, canonicals) discovered across the entire site during the audit. It allows for a complete analysis of all internal and outbound links.\n\n**Cost:** 0 credits\n\n**Advanced filtering**\n\nTo build complex queries, you can add an array of `filter` parameters to the URL query string. This allows you to chain multiple conditions together using logical operators.\n\n- `filter[index][param]`: **(Required)** The field you want to filter on.\n\n- `filter[index][value]`: **(Required)** The value to match.\n\n- `filter[index][type]`: The logical operator (`and` or `or`) to connect this condition to the previous one. This is **required for the second condition onwards** (i.e., for `filter[1]`, `filter[2]`, etc.).\n\n**Example 1: OR logic**\n\nTo find all internal links that have a status code of either `301` **OR** `302`.\n\n- `filter[0]` sets the base condition (`status = 301`).\n\n- `filter[1][type]=or` **explicitly connects** the next condition (`status = 302`) with an **OR**.\n\n**Example 2: AND logic**\n\nTo find all broken (`404`) image links (`anchor_type = image`).\n\n- `filter[0]` sets the base condition (`status = 404`).\n\n- `filter[1][type]=and` **must be included** to connect the second condition (`anchor_type = image`) with an **AND**. Omitting it would result in an error.\n\nIf successful, the server returns a JSON object containing the total count of links and an array of link objects.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/website-audit/#get-all-found-links" + }, "parameters": [ { "name": "audit_id", "in": "query", + "required": true, + "description": "Unique identifier of the audit.", "schema": { "type": "integer" - }, - "example": 700183831 - }, - { - "name": "limit", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 10 - }, - { - "name": "offset", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 0 + } }, { - "name": "apikey", + "name": "page_type", "in": "query", + "description": "Filters links by type. Possible values: `internal`, `external`, `all`.\n\nDefault: all", "schema": { "type": "string" - }, - "example": "{{secret_key_data}}" - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} } - } - } - } - }, - "/v1/site-audit/audits/issue-pages": { - "get": { - "operationId": "getSiteAuditAuditsIssuePages", - "tags": [ - "Website Audit" - ], - "summary": "Get audit pages by issue", - "description": "Returns a list of all URLs affected by a single, specific issue within an audit report.", - "parameters": [ - { - "name": "code", - "in": "query", - "schema": { - "type": "string" - }, - "example": "title_duplicate" }, { - "name": "audit_id", + "name": "filter", "in": "query", + "description": "Array of `filter` objects to build complex queries. Allows for filtering on link properties like HTTP status. See details below.", "schema": { - "type": "integer" - }, - "example": 700183831 + "type": "array", + "items": { + "type": "string" + } + } }, { "name": "limit", "in": "query", + "description": "Number of links to return in the list.", "schema": { "type": "integer" - }, - "example": 10 + } }, { "name": "offset", "in": "query", + "description": "Starting position for the list of links.", "schema": { "type": "integer" - }, - "example": 0 - }, - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of links matching the filter criteria." + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Destination URL of the link (e.g., `https://www.vitality.co.uk/`)." + }, + "id": { + "type": "string", + "description": "Unique identifier for this specific link instance (e.g., `1153787496`)." + }, + "status": { + "type": "string", + "description": "HTTP status code of the destination URL (e.g., `200`)." + }, + "type": { + "type": "string", + "description": "Type of the link (e.g., `hyperlink`, `canonical`)." + }, + "source_url": { + "type": "string", + "description": "URL of the page where the link was discovered (e.g., `https://www.vitality.co.uk/advisers/`)." + }, + "source_noindex": { + "type": "string", + "description": "Indicates if the source page has a noindex directive (“1” for yes, “0” for no)." + }, + "nofollow": { + "type": "string", + "description": "Indicates if the link has a rel=”nofollow” attribute (“1” for yes, “0” for no)." + }, + "alt": { + "type": "string" + }, + "anchor_type": { + "type": "string" + }, + "anchor": { + "type": "string", + "description": "Visible, clickable text of the link (e.g., `Personal`)." + }, + "title": { + "type": "string" + } + }, + "description": "Array of objects, each representing a discovered link." + }, + "description": "Array of objects, each representing a discovered link." + } + } + }, + "example": { + "total": 103624, + "items": [ + { + "url": "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)", + "id": "1153787496", + "status": "200", + "type": "hyperlink", + "source_url": "[https://www.vitality.co.uk/advisers/](https://www.vitality.co.uk/advisers/)", + "source_noindex": "1", + "nofollow": "0", + "alt": "", + "anchor_type": "text", + "anchor": "Personal", + "title": "" + }, + { + "url": "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)", + "id": "1153787624", + "status": "200", + "type": "hyperlink", + "source_url": "[https://www.vitality.co.uk/business/](https://www.vitality.co.uk/business/)", + "source_noindex": "0", + "nofollow": "0", + "alt": "", + "anchor_type": "text", + "anchor": "Personal", + "title": "" + }, + { + "url": "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)", + "id": "1153787774", + "status": "200", + "type": "hyperlink", + "source_url": "[https://www.vitality.co.uk/community/](https://www.vitality.co.uk/community/)", + "source_noindex": "0", + "nofollow": "0", + "alt": "", + "anchor_type": "text", + "anchor": "Personal", + "title": "" + }, + { + "url": "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)", + "id": "1153787908", + "status": "200", + "type": "hyperlink", + "source_url": "[https://www.vitality.co.uk/healthcare-providers/](https://www.vitality.co.uk/healthcare-providers/)", + "source_noindex": "0", + "nofollow": "0", + "alt": "", + "anchor_type": "text", + "anchor": "Personal", + "title": "" + } + ] + } + } } - } - } - } - }, - "/v1/site-audit/audits/issues": { - "get": { - "operationId": "getSiteAuditAuditsIssues", - "tags": [ - "Website Audit" - ], - "summary": "Get All Issues for a Specific URL", - "description": "Retrieves a detailed list of all technical and on-page issues found on a single, specific page.", - "parameters": [ - { - "name": "audit_id", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 700183831 }, - { - "name": "url_id", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 50958380 + "401": { + "$ref": "#/components/responses/Unauthorized" }, - { - "name": "url", - "in": "query", - "schema": { - "type": "string" - }, - "example": "https://www.vitality.co.uk/" + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ { - "name": "limit", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 10 + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/site-audit/audits/links?audit_id=700183831&page_type=internal&limit=10&filter[0][param]=status&filter[0][value]=301&filter[1][param]=status&filter[1][value]=302&filter[1][type]=or' \\\n--header 'Authorization: Token YOUR_API_KEY'" }, { - "name": "offset", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 0 + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/site-audit/audits/links?audit_id=700183831&page_type=internal&limit=10&filter[0][param]=status&filter[0][value]=404&filter[1][param]=anchor_type&filter[1][value]=image&filter[1][type]=and' \\\n--header 'Authorization: Token YOUR_API_KEY'" }, { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/site-audit/audits/links?audit_id=700183831&page_type=all&limit=4&offset=0' \\\n--header 'Authorization: Token YOUR_API_KEY'" } - } + ] } }, - "/v1/site-audit/audits/links": { + "/v1/site-audit/audits/history": { "get": { - "operationId": "getSiteAuditAuditsLinks", + "operationId": "getSiteAuditAuditsHistory", "tags": [ "Website Audit" ], - "summary": "Get all found links", - "description": "Fetches a complete, filterable list of every internal and external hyperlink discovered across the entire site during an audit.", + "summary": "Get audit history by date", + "description": "Retrieves a historical snapshot of a specific audit run, providing the full context of that audit, including the settings used, domain data at the time, and a summary of all issues found.\n\n**Cost:** 0 credits\n\nIf successful, the server returns a JSON object containing the complete historical data for the specified audit run.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/website-audit/#get-audit-history-by-date" + }, "parameters": [ { "name": "audit_id", "in": "query", + "required": true, + "description": "Unique identifier of the audit.", "schema": { "type": "integer" - }, - "example": 700183831 - }, - { - "name": "page_type", - "in": "query", - "schema": { - "type": "string", - "enum": [ - "all", - "internal", - "external" - ], - "default": "all" - }, - "example": "internal" - }, - { - "name": "limit", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 10 + } }, { - "name": "filter[0][param]", + "name": "date", "in": "query", + "required": true, + "description": "Specific date of the historical audit to retrieve (YYYY-MM-DD).", "schema": { "type": "string" - }, - "example": "status" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "audit_time": { + "type": "string", + "description": "Exact timestamp when the historical audit was completed." + }, + "domain_data": { + "type": "object", + "properties": { + "dt": { + "type": "integer" + }, + "domain": { + "type": "string" + }, + "backlinks": { + "type": "string" + }, + "index_google": { + "type": "string" + } + }, + "description": "Object containing general data about the domain at the time of the audit (e.g., backlinks, indexed pages)." + }, + "settings": { + "type": "object", + "properties": { + "source_site": { + "type": "integer" + }, + "source_sitemap": { + "type": "integer" + }, + "max_pages": { + "type": "integer" + }, + "max_depth": { + "type": "integer" + } + }, + "description": "Object detailing all the configuration settings that were used for this specific audit run." + }, + "pages_data": { + "type": "object", + "properties": { + "css3xx": { + "type": "integer" + }, + "css_big": { + "type": "integer" + }, + "h1_long": { + "type": "integer" + }, + "http4xx": { + "type": "integer" + }, + "title_duplicate": { + "type": "integer" + }, + "description_duplicate": { + "type": "integer" + } + }, + "description": "Object where each key is an issue code (e.g., `title_duplicate`) and the value is the number of pages affected by that issue." + }, + "totals": { + "type": "object", + "properties": { + "total_pages": { + "type": "integer" + }, + "total_warnings": { + "type": "integer" + }, + "total_errors": { + "type": "integer" + }, + "total_passed": { + "type": "integer" + } + }, + "description": "Object summarizing the final counts for the audit (`total_pages`, `total_warnings`, `total_errors`)." + }, + "version": { + "type": "string" + } + } + }, + "example": { + "audit_time": "2025-07-29 11:19:33", + "domain_data": { + "dt": 44, + "domain": "www.vitality.co.uk", + "backlinks": "212249", + "index_google": "1380" + }, + "settings": { + "source_site": 1, + "source_sitemap": 1, + "max_pages": 1000, + "max_depth": 10 + }, + "pages_data": { + "css3xx": 1, + "css_big": 880, + "h1_long": 19, + "http4xx": 28, + "title_duplicate": 143, + "description_duplicate": 169 + }, + "totals": { + "total_pages": 1009, + "total_warnings": 979, + "total_errors": 346, + "total_passed": 77 + }, + "version": "2.0" + } + } + } }, - { - "name": "filter[0][value]", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 301 + "401": { + "$ref": "#/components/responses/Unauthorized" }, - { - "name": "filter[1][param]", - "in": "query", - "schema": { - "type": "string" - }, - "example": "status" + "402": { + "$ref": "#/components/responses/PaymentRequired" }, - { - "name": "filter[1][value]", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 302 + "403": { + "$ref": "#/components/responses/Forbidden" }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ { - "name": "filter[1][type]", - "in": "query", - "schema": { - "type": "string" - }, - "example": "or" - }, + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/site-audit/audits/history?audit_id=700183831&date=2025-07-29' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/site-audit/audits/recheck/standard": { + "post": { + "operationId": "createSiteAuditAuditsRecheckStandard", + "tags": [ + "Website Audit" + ], + "summary": "Recheck standard audit", + "description": "Launches a new standard crawl for an existing audit.\n\n**Cost:** 2 credits per crawled page\n\nIf successful, the server returns **HTTP 200 OK** with an empty response body.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/website-audit/#recheck-audit-standard" + }, + "parameters": [ { - "name": "apikey", + "name": "audit_id", "in": "query", + "required": true, + "description": "Unique identifier of the audit to recheck, passed as a query parameter.", "schema": { "type": "string" - }, - "example": "{{secret_key_data}}" - }, - { - "name": "offset", - "in": "query", - "schema": { - "type": "integer", - "default": 0 - }, - "example": 0 + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "array", + "items": {} + }, + "example": [] + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "To launch a standard recheck", + "source": "curl --location --request POST 'https://api.seranking.com/v1/site-audit/audits/recheck/standard?audit_id=700237033' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] } }, - "/v1/site-audit/audits/history": { - "get": { - "operationId": "getSiteAuditAuditsHistory", + "/v1/site-audit/audits/recheck/advanced": { + "post": { + "operationId": "createSiteAuditAuditsRecheckAdvanced", "tags": [ "Website Audit" ], - "summary": "Get audit history by date", - "description": "Retrieves a complete historical snapshot of a specific audit run, including the settings, domain data, and issue counts for that date.", + "summary": "Recheck advanced audit", + "description": "Launches a new advanced crawl with JavaScript rendering for an existing audit.\n\n**Cost:** 20 credits per crawled page\n\nIf successful, the server returns **HTTP 200 OK** with an empty response body.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/website-audit/#recheck-audit-advanced" + }, "parameters": [ { "name": "audit_id", "in": "query", - "schema": { - "type": "integer" - }, - "example": 700183831 - }, - { - "name": "date", - "in": "query", - "schema": { - "type": "string" - }, - "example": "2025-07-29" - }, - { - "name": "apikey", - "in": "query", + "required": true, + "description": "Unique identifier of the audit to recheck, passed as a query parameter.", "schema": { "type": "string" - }, - "example": "{{secret_key_data}}" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "array", + "items": {} + }, + "example": [] + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "To launch an advanced recheck", + "source": "curl --location --request POST 'https://api.seranking.com/v1/site-audit/audits/recheck/advanced?audit_id=700237033' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] } }, - "/v1/site-audit/audits/recheck/standard": { - "post": { - "operationId": "createSiteAuditAuditsRecheckStandard", + "/v1/account/subscription": { + "get": { + "operationId": "getAccountSubscription", "tags": [ - "Website Audit" + "Account System" ], - "summary": "Recheck audit standard", - "description": "Initiates a new standard (HTML) crawl for a previously completed audit using its original settings.", - "requestBody": { - "content": {} + "summary": "Get subscription details", + "description": "Returns information about your current subscription and the remaining API balance for the authenticated API key.\n\n**Cost:** 0 credits", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/data/account-system/#subscription" }, "parameters": [ { - "name": "audit_id", - "in": "query", - "schema": { - "type": "integer" - }, - "example": 700237033 - }, - { - "name": "apikey", + "name": "output", "in": "query", + "description": "Response format. Possible values: `json` (default) or `xml`.", "schema": { - "type": "string" - }, - "example": "{{secret_key_data}}" + "type": "string", + "default": "json" + } } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { - "application/json": {} + "application/json": { + "schema": { + "type": "object", + "properties": { + "subscription_info": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Current status of the API subscription plan: `active`, `inactive`, `expired`, or `disabled`." + }, + "start_date": { + "type": "string", + "description": "Subscription start date in `YYYY-MM-DD HH:MM:SS` format." + }, + "expiration_date": { + "type": "string", + "description": "Subscription expiration date in `YYYY-MM-DD HH:MM:SS` format." + }, + "units_limit": { + "type": "integer", + "description": "Total number of API units available for this subscription." + }, + "units_left": { + "type": "integer", + "description": "Current API balance, i.e., the number of remaining API units." + } + } + } + } + }, + "example": { + "subscription_info": { + "status": "active", + "start_date": "2024-01-18 14:20:02", + "expiration_date": "2024-02-18 14:20:02", + "units_limit": 5000000, + "units_left": 4975033 + } + } + } } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } - } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/account/subscription?output=json' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] } }, - "/v1/site-audit/audits/recheck/advanced": { - "post": { - "operationId": "createSiteAuditAuditsRecheckAdvanced", + "/v1/backlinks/export/status": { + "get": { + "operationId": "getBacklinksExportStatus", "tags": [ - "Website Audit" + "Backlinks" ], - "summary": "Recheck audit advanced", - "description": "Initiates a new advanced (JavaScript rendering) crawl for a previously completed audit using its original settings.", - "requestBody": { - "content": {} - }, + "summary": "export/status", + "description": "Status of the asynchronous task to export all backlinks for a target to a downloadable CSV file.", "parameters": [ { - "name": "audit_id", + "name": "task_id", "in": "query", + "required": true, "schema": { - "type": "integer" + "type": "string" }, - "example": 700237033 + "example": "1_878619" }, { - "name": "apikey", + "name": "output", "in": "query", "schema": { - "type": "string" + "type": "string", + "enum": [ + "json", + "xml" + ], + "default": "json" }, - "example": "{{secret_key_data}}" + "example": "json" } ], "responses": { @@ -6741,41 +16334,90 @@ "content": { "application/json": {} } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } } } }, - "/v1/account/subscription": { + "/v1/ai-search/overview/aggregated/time-series": { "get": { - "operationId": "getAccountSubscription", "tags": [ - "Account & system" + "AI Search" ], - "summary": "subscription", - "description": "Retrieves detailed information about the API subscription plan, including its status, dates, and remaining API units.", + "summary": "overview (aggregated)", + "description": "Retrieves a high-level aggregated summary of a domain's key performance metrics and historical trends across all LLM engines.", + "operationId": "getAiOverviewAggregated", "parameters": [ { - "name": "apikey", + "name": "target", "in": "query", + "required": true, "schema": { "type": "string" - } + }, + "example": "seranking.com" }, { - "name": "output", + "name": "source", "in": "query", + "required": true, "schema": { "type": "string" }, - "example": "json" + "example": "us" + }, + { + "name": "brand", + "in": "query", + "schema": { + "type": "string" + }, + "example": "SE Ranking" + }, + { + "name": "scope", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "domain", + "base_domain", + "url" + ], + "default": "base_domain" + }, + "example": "base_domain" } ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.\n\nChanges since 2026-09-29 (new AI Search data source):\n\n- `summary.average_position` is always `null`.\n- `time_series.organic_traffic`, `time_series.overall_traffic` and\n `time_series.average_position` are empty arrays.\n- `summary.brand_presence` counts the prompts whose answer mentions the\n brand as a recognized entity, instead of a text match on the brand\n name.\n- `summary.*.previous` is the value of the previous monthly snapshot\n (`null` when unknown), and `change_absolute` / `change_percent` are\n computed from it and signed. Before, `previous` was always `null`\n and the change was reported as the current value and 100%.", "content": { "application/json": {} } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" } } } @@ -6784,18 +16426,11 @@ "get": { "operationId": "getAccountCreditBalance", "tags": [ - "Account & system" + "Account System" ], "summary": "credit-balance", "description": "Returns the current account-wide credit balance, showing the total limit and the amount of credits used.", "parameters": [ - { - "name": "apikey", - "in": "query", - "schema": { - "type": "string" - } - }, { "name": "output", "in": "query", @@ -6811,9 +16446,103 @@ "content": { "application/json": {} } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + } + } + } + }, + "components": { + "securitySchemes": { + "tokenAuth": { + "type": "apiKey", + "in": "header", + "name": "Authorization", + "description": "Recommended. Send the API key in the `Authorization` header with the `Token` scheme: `Authorization: Token YOUR_API_KEY`." + }, + "apikeyQuery": { + "type": "apiKey", + "in": "query", + "name": "apikey", + "description": "Alternative. Send the API key as the `apikey` query parameter. It must always be a query parameter, even when other data goes in the request body." + } + }, + "schemas": { + "GatewayError": { + "type": "object", + "description": "Error returned by the API gateway before the request reaches the API.", + "properties": { + "error_description": { + "type": "string", + "description": "Human-readable error message." + } + } + } + }, + "responses": { + "Unauthorized": { + "description": "The API key is missing, unknown or disabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + }, + "example": { + "error_description": "Authentication failed. Please ensure you have a valid, enabled API key. To get an API key, please contact us at api@seranking.com." + } + } + } + }, + "PaymentRequired": { + "description": "The account has no active subscription or not enough credits for this request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + }, + "example": { + "error_description": "Insufficient funds, API key is temporarily disabled. Please make a payment to enable you API key, or contact us at api@seranking.com." + } + } + } + }, + "Forbidden": { + "description": "The API key may not call this endpoint or use this HTTP method.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + }, + "example": { + "error_description": "Authentication failed. Please ensure you have a valid, enabled API key. To get an API key, please contact us at api@seranking.com." + } + } + } + }, + "TooManyRequests": { + "description": "The request rate limit of the API key was exceeded. See [API rate limits](https://seranking.com/api/rate-limits/).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + }, + "example": { + "error_description": "You made 11 requests, which is over the allowed limit of 10 requests per second. Please try again later." + } } } } } } -} \ No newline at end of file +} diff --git a/openapi/data-api.yaml b/openapi/data-api.yaml index d37c9b9..3946c7e 100644 --- a/openapi/data-api.yaml +++ b/openapi/data-api.yaml @@ -1,3158 +1,8924 @@ -openapi: 3.0.0 +openapi: 3.0.3 info: title: SE Ranking Data API + version: 2.0.0 description: >- - SEO data API for keywords, domains, backlinks, AI Search, SERP, and site - audit. - version: 1.0.0 + The Data API returns SEO data for any domain, URL or keyword: backlink profiles, domain traffic and keyword + rankings, keyword research, AI search visibility, SERP results and website audits. Requests are billed in API + credits. + + + ## Authentication + + + All endpoints are served from `https://api.seranking.com` and use one SE Ranking API key, the same key for the Data + API, the Project API, the Local Marketing API and the SE Visible API. Send it in the `Authorization: Token + YOUR_API_KEY` header (recommended) or as the `apikey` query parameter. See [Getting API + access](https://seranking.com/api/how-to-get-api/). + + + Rate limits: [API rate limits](https://seranking.com/api/rate-limits/). Credits: [API credit + system](https://seranking.com/api/api-credits-system/). contact: name: SE Ranking API Support - url: https://seranking.com/api + url: https://seranking.com/api/ + email: api@seranking.com + license: + name: MIT + url: https://github.com/seranking/openapi/blob/main/LICENSE +externalDocs: + description: SE Ranking Data API documentation + url: https://seranking.com/api/data/ servers: - url: https://api.seranking.com description: Production -components: - securitySchemes: - apikeyAuth: - type: apiKey - in: query - name: apikey security: - - apikeyAuth: [] + - tokenAuth: [] + - apikeyQuery: [] tags: - - name: backlinks + - name: Backlinks description: >- - # Backlinks API - + **[Backlinks API](https://seranking.com/backlinks-api.html)** retrieves backlink data for a target domain, host, + or URL. It provides aggregated metrics such as counts of backlinks, referring domains, IPs, and subnets, as well + as anchor texts, top pages, TLDs, and countries. The API includes endpoints for summary metrics, historical data, + raw backlink lists, export options, and authority scores. Data is refreshed on a monthly basis. - This collection of requests allows you to conduct a comprehensive analysis - of the backlink profile for any given target, whether it's a root domain, - a specific host (subdomain), or a particular URL. + Using the API, you can: - You can use these endpoints to retrieve high-level statistics, fetch - detailed backlink lists, analyze historical trends, and check authority - scores. + - retrieve backlink summary metrics, including counts of backlinks, referring domains, IPs, subnets, top anchors, + TLDs, and countries - ### Summary & Core Metrics + - retrieve key backlink metrics in batch for multiple targets - Use these endpoints to get a quick overview of a target's backlink - profile. These requests support batching for up to 100 targets. - - - - **`summary`**: Returns extended statistics, including the number of - referring domains, IPs, top anchors, TLDs, and more. - - - **`metrics`**: Retrieves a set of key metrics, such as the total number - of backlinks, referring domains, and dofollow/nofollow link counts. - - - **`count`**: Provides a simple count of the total number of live - backlinks for a target. - - - ### Detailed Backlink Retrieval + - list all backlinks for a single target - Use these endpoints to get lists of the actual backlinks pointing to a - target. + - fetch backlinks in batches for large datasets - - **`all`**: Fetches a detailed list of backlinks with powerful filtering - and sorting options. This is ideal for getting the "top" backlinks based - on criteria like InLink Rank. - - - **`raw`**: Retrieves a complete, unfiltered list of all backlinks using - efficient cursor-based pagination. This is best for fetching an entire - dataset in batches. - - - **`export`**: Exports all backlinks for a target into a downloadable - `.csv.gz` file. This process is asynchronous and designed for very - large-scale data retrieval. - - ### Historical Data & Trends + - track new, lost, cumulative, and daily backlink changes - Track changes in a backlink profile over time. + - retrieve backlink anchor texts - - **`history`**: Get a list of new and lost backlinks within a specified - date range. - - - **`history/count`**: Returns the number of new or lost backlinks for - each day in a given period. - - - **`history/cumulative`**: Provides the total number of live backlinks - for each day in a given period. - + - access referring domains, including counts and new/lost domains - ### Analyze Specific Backlink Aspects + - access referring IPs and subnets, including counts - Dive deeper into specific components of the backlink profile. + - list indexed pages with backlinks - - **`anchors`**: Returns information about the anchor texts used in links - pointing to a target. - - - **`refdomains`**: Provides details on the unique referring domains, - including their authority and the number of links from each. - - - **`referring-ips`** **&** **`subnets`**: Analyzes the network - distribution of backlinks by IP address and C-class subnets. - - - **`indexed-pages`**: Lists the pages on the target site that have - received one or more backlinks. - - ### Authority Scores + - retrieve page and domain authority metrics, including distributions, histograms, and historical values - Check the calculated authority of a target based on its backlink profile. + - export backlink data for large-scale analysis - - **`authority`**: Retrieves both the InLink Rank (Page Authority) and - Domain InLink Rank (Domain Authority). - - - **`authority/domain`**: Focuses specifically on Domain Authority, - including its distribution and historical values. - - - **`authority/page`**: Focuses specifically on Page Authority and its - historical values. + Documentation: [Backlinks](https://seranking.com/api/data/backlinks/) - name: Domain Analysis description: >- - This collection of endpoints allows you to perform in-depth competitive - analysis on any domain. Use these requests to uncover keyword strategies, - traffic trends, and competitor performance in both organic and paid - search. + **Domain Analysis API** provides detailed insights into a domain’s search performance. Data is refreshed on a + monthly basis. - ### Performance Overviews + Using the API, you can: - Get high-level statistics about a domain's search performance. + - query regional or worldwide data - - **Regional database**: Get detailed organic and paid stats for a domain - within a single, selected regional database. - - - **Worldwide aggregate**: Aggregate a domain's global search performance - metrics for the current month. - - - **History trends**: Track historical trends for keywords, traffic, and - cost for organic or paid search within a specific region. - + - retrieve keyword statistics, domain pages, and subdomains - ### Keyword Analysis + - analyze competitors to identify common keywords and keyword gaps - Dive deep into the specific keywords a domain ranks for. + - retrieve paid advertising data, including ad creatives, observed positions, and traffic - - **Domain keywords**: Fetch a filterable and sortable list of all organic - or paid keywords for a domain. - - - **Domain keywords comparison**: Compare two domains to find common - keywords (overlap) or identify keyword gaps. - - ### Competitor & Ad Analysis + - access historical data to track changes in rankings, traffic, and ad performance - Analyze the competitive landscape and paid advertising strategies. + - filter and sort results by metrics such as search volume, CPC, competition, keyword difficulty, and ranking + positions - - **Competitors**: Discover a domain's top organic or paid competitors and - see the number of keywords you have in common. - - - **Paid ads**: Analyze paid ads either by keyword (to see who is bidding) - or by domain (to see what a specific domain is bidding on). + Documentation: [Domain Analysis](https://seranking.com/api/data/domain-analysis/) - name: Keyword Research description: >- - This collection of endpoints is designed for comprehensive keyword - analysis and discovery. Use these requests to retrieve performance metrics - for large lists of keywords or to generate new keyword ideas based on a - seed term. + **[Keyword Research API](https://seranking.com/keyword-research-api.html)** provides programmatic access to + keyword metrics and discovery. Data is refreshed on a monthly basis. - This folder is divided into two main categories: + Using the API, you can: - ### Bulk Keyword Metrics + - retrieve keyword metrics such as search volume, CPC, competition, difficulty, and historical trends - - **Export Keywords Metrics**: Submit a list of up to 5,000 keywords to - get detailed data points for each, including search volume, CPC, - competition score, keyword difficulty, and historical search volume - trends. This is ideal for bulk analysis and data enrichment. - + - discover similar keywords with the same user intent - ### Keyword Discovery + - find related keywords based on overlapping search results - Use these endpoints to expand your keyword lists and uncover new ranking - opportunities. + - get question keywords associated with a seed keyword - - **Get Similar Keywords**: Find keywords that are semantically similar to - your seed keyword, including synonyms and close variations. - - - **Get Related Keywords**: Discover keywords that are topically related, - based on having a high number of overlapping URLs in their search results. - - - **Get Question Keywords**: Generate a list of keywords phrased as common - user questions, perfect for content marketing and FAQ creation. - - - **Get Longtail Keywords**: Find longer, more specific keyword phrases - that often have lower competition and higher conversion rates. - - name: AI search + + - discover long-tail keywords that are lower-volume and more specific + + + Documentation: [Keyword Research](https://seranking.com/api/data/keyword-research/) + - name: AI Search description: >- - This collection of endpoints allows you to analyze a domain or brand's - visibility and performance within various Large Language Model (LLM) - results, such as ChatGPT, Gemini, and Perplexity. Use these tools to track - your presence in AI-generated answers, discover the prompts that feature - your brand or domain, and understand your overall AI search footprint. + **AI Search API** provides programmatic access to a domain’s performance in Large Language Model (LLM) results. + Data is refreshed on a monthly basis. - ### Overview & Discovery + Using the API, you can: - - **Overview**: Get a high-level summary of a domain's performance and - historical trends within a specific LLM, including metrics like link - presence, average position, and AI-driven traffic. - - - **Discover Brand by URL**: A utility endpoint to identify the primary - brand name associated with a target domain, useful for subsequent - brand-based queries. - + - get an AI search overview with metrics like link presence, average position, AI traffic, and historical trends - ### Prompt Analysis + - compare a primary domain against competitors across multiple LLM engines and retrieve a share of voice + leaderboard - - **Get Prompts by Target**: Retrieve a list of all prompts where a - specific domain, subdomain, or URL is featured as a link or mention in an - LLM's answer. - - - **Get Prompts by Brand**: Find all prompts where a specific brand name - is mentioned in an LLM's answer, allowing you to track brand visibility - and context. - - name: SERP Results + + - discover the brand associated with a domain or URL + + + - retrieve prompts by target, showing where a domain or URL appears in LLM responses + + + - retrieve prompts by brand, showing where a brand is mentioned in LLM results + + + Documentation: [AI Search](https://seranking.com/api/data/ai-search/) + - name: SERP description: >- - This collection of endpoints allows you to retrieve the top 100 search - engine results pages (SERPs) for any keyword in real-time, without needing - an active project in SE Ranking. The API uses an asynchronous, task-based - workflow. + The following limits apply to the SERP API: - **Note:** Using the ‘Add SERP Tasks’ endpoint costs 10 credits per - keyword: each keyword in `query` creates one task, so a request with 10 - keywords costs 100 credits. + - Up to **1500 SERP tasks** can run in parallel. - ### Workflow + - Up to **10 keywords per task** can be submitted by default. - 1. **Add SERP Tasks**: Submit one or more keywords to the processing queue - to initiate a SERP scrape. - - 2. **Get SERP Task Status and Results**: Use the `task_id` from the - previous step to check if the task is complete and retrieve the SERP data. - - 3. **List SERP Tasks**: View a list of all tasks you have submitted in the - last 24 hours. - + - Up to **10 tasks per second** can be created. + + + Contact [api@seranking.com](mailto:api@seranking.com) to discuss your volume needs and custom limits. + + + **SERP API** provides programmatic access to Google search engine results pages (SERPs) for specified keywords. + Results are retrieved on demand. + + + Using the API, you can: + + + - Submit SERP collection tasks for one or more keywords across specific locations, languages, and devices - Results include the URL, title, and snippet for each of the top 100 - positions and are stored for 24 hours after collection. - - name: SERP Results > classic + + - Retrieve standard SERP results, including organic results, ads, and featured snippets + + + - Retrieve advanced SERP results with full SERP items and features + + + - Download raw HTML dumps of Google search results pages + + + - List recent SERP tasks created within the last 24 hours + + + - Retrieve available search locations + + + Documentation: [SERP](https://seranking.com/api/data/serp/) - name: Website Audit description: >- - This collection of endpoints provides a comprehensive suite of tools to - programmatically manage the full lifecycle of your technical SEO audits. - These requests allow you to launch new crawls, monitor their progress in - real-time, and retrieve detailed reports and page-level data for in-depth - analysis. + **[Website Audit API](https://seranking.com/website-audit-api.html)** provides programmatic access to technical + SEO audits. Results are retrieved on demand. - **Note on Costs:** Audits are billed on a per-page basis. + Using the API, you can: - - **Standard Audits:** 2 credits per crawled page. - - - **Advanced Audits (with JavaScript rendering):** 20 credits per crawled - page. - + - Create website audits using standard HTML crawling or JavaScript-rendered crawling - ### 1\. Create & Manage Audits + - Track audit execution by checking audit status, progress, and crawl statistics in real time - Use these endpoints to start new crawls, re-run previous ones, or manage - your list of audits. + - Retrieve audit results, including health scores and categorized issues - - **Create Audits**: Launch a new **Standard** (HTML crawl) or - **Advanced** (JavaScript rendering) audit with highly customizable - settings. - - - **List Audits**: Retrieve a paginated list of all audits associated with - your account. - - - **Update Audit Title**: Change the display title of an existing audit - report. - - - **Delete Audit**: Permanently remove an audit and all of its associated - data. - - - **Recheck Audit**: Initiate a new crawl for a completed audit using its - original settings. - - ### 2\. Monitor & Retrieve Data + - Analyze pages and audit issues, including page-level technical metrics and URLs affected by specific issues - Once an audit is running or complete, use these endpoints to check its - progress and pull detailed results. + - Analyze link data, including internal and external links discovered during the crawl - - **Get Audit Status**: Check the real-time progress of an ongoing audit. - - - **Get Audit Report**: Fetch the full, high-level report for a completed - audit, including the overall health score and a summary of issues. - - - **Get Audit History**: Retrieve a historical snapshot of a specific - audit run from a particular date. - - - **Get All Crawled Pages**: Return a complete, paginated list of every - URL discovered during an audit. - - - **Get Audit Pages by Issue**: Get a list of all URLs affected by a - single, specific issue. - - - **Get All Issues for a Specific URL**: Retrieve all errors, warnings, - and notices found on a single page. - - - **Get All Found Links**: Fetch a complete list of every internal and - external link discovered across the entire site during the audit. - - name: Account & system + - Manage audits by listing, filtering, renaming, deleting, and accessing historical audit snapshots + + + Documentation: [Website Audit](https://seranking.com/api/data/website-audit/) + - name: Account System description: >- - This collection contains endpoints for retrieving information about your - account status, subscription details, and current credit and API unit - balances. Use these requests to monitor your usage and plan details - programmatically. + **Account System API** provides programmatic access to your SE Ranking Data API subscription and usage + information. - ### Endpoints + Using the API, you can: - - **Get Subscription Info**: Returns detailed information about your - current API subscription plan, including its status (e.g., active, - expired), validity dates, and the total and remaining API units available. - - - **Get Credit Balance**: Returns the current account-wide credit balance, - showing the total limit and the amount of credits that have been used. + - Get subscription details, including plan status, start, and expiration dates + + + - Check your remaining API balance (units left) + + + - Monitor usage programmatically to manage quotas + + + Documentation: [Account System](https://seranking.com/api/data/account-system/) paths: /v1/backlinks/summary: get: operationId: getBacklinksSummary tags: - - backlinks - summary: summary + - Backlinks + summary: Get backlink summary description: >- - Retrieves a comprehensive summary of backlink statistics for one or more - targets. + Returns extended statistics for a target, including the number of backlinks, referring domains, subnets, IPs, + top anchors, top TLDs, and more. This endpoint supports GET and POST requests and allows batching of up to 100 + targets per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format). + + + **Cost:** 100 credits per target + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#summary parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." schema: type: string - description: Supports multiple targets by repeating this parameter. - example: rubyonrails.org - name: mode in: query + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. schema: type: string - enum: - - domain - - host - - url default: host - example: host - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - enum: - - json - - xml default: json - example: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + summary: + type: array + items: + type: object + properties: + target: + type: string + description: "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + backlinks: + type: integer + description: Number of live backlinks linking to the target. + refdomains: + type: integer + description: Number of unique domains linking to the target. + subnets: + type: integer + description: Number of unique subnets (C-blocks) linking to the target. + ips: + type: integer + description: Number of unique IP addresses linking to the target. + nofollow_backlinks: + type: integer + description: Number of backlinks classified as nofollow. + dofollow_backlinks: + type: integer + description: Number of backlinks classified as dofollow. + edu_backlinks: + type: integer + description: Number of backlinks originating from `.edu` domains. + gov_backlinks: + type: integer + description: Number of backlinks originating from .gov domains. + inlink_rank: + type: integer + description: Page Authority of the target URL. + domain_inlink_rank: + type: integer + description: Domain Authority of the target’s root domain. + from_home_page_backlinks: + type: integer + description: Number of backlinks originating from the home page of the referring domain. + dofollow_from_home_page_backlinks: + type: integer + description: Number of dofollow backlinks originating from the home page of the referring domain. + text_backlinks: + type: integer + description: Number of backlinks with text anchors. + dofollow_refdomains: + type: integer + description: Number of referring domains with at least one dofollow backlink. + from_home_page_refdomains: + type: integer + description: Number of referring domains linking from the home page. + edu_refdomains: + type: integer + description: Number of `.edu` referring domains. + gov_refdomains: + type: integer + description: Number of `.gov`referring domains. + anchors: + type: integer + description: Number of unique anchor texts used across all backlinks. + dofollow_anchors: + type: integer + description: Number of unique anchor texts used in dofollow backlinks. + pages_with_backlinks: + type: integer + description: Number of target pages that have at least one backlink. + top_anchors_by_backlinks: + type: array + items: + type: object + properties: + anchor: + type: string + description: Anchor text used in backlinks (by total backlinks). + backlinks: + type: integer + description: Number of backlinks using this anchor text. + description: Top anchor texts sorted by number of backlinks (descending). + description: Top anchor texts sorted by number of backlinks (descending). + top_anchors_by_refdomains: + type: array + items: + type: object + properties: + anchor: + type: string + description: Anchor text used in backlinks (by referring domains). + refdomains: + type: integer + description: Number of referring domains with at least one backlink using this anchor text. + description: Top anchor texts sorted by number of referring domains (descending). + description: Top anchor texts sorted by number of referring domains (descending). + top_pages_by_backlinks: + type: array + items: + type: object + properties: + url: + type: string + description: URL of the target page. + backlinks: + type: integer + description: Number of backlinks pointing to this page. + description: Target pages sorted by number of backlinks (descending). + description: Target pages sorted by number of backlinks (descending). + top_pages_by_refdomains: + type: array + items: + type: object + properties: + url: + type: string + description: URL of the target page. + refdomains: + type: integer + description: Number of referring domains pointing to this page. + description: Target pages sorted by number of referring domains (descending). + description: Target pages sorted by number of referring domains (descending). + top_tlds: + type: array + items: + type: object + properties: + tld: + type: string + description: Top-level domain (e.g., `.com`). + count: + type: integer + description: Number of backlinks originating from this TLD. + description: Top-level domains (TLDs) sorted by number of backlinks (descending). + description: Top-level domains (TLDs) sorted by number of backlinks (descending). + top_countries: + type: array + items: + type: object + properties: + country: + type: string + description: Country code. + count: + type: integer + description: Number of backlinks originating from this country. + description: Top countries sorted by number of backlinks (descending). + description: Top countries sorted by number of backlinks (descending). + example: + summary: + - target: seranking.com + backlinks: 22407 + refdomains: 2329 + subnets: 1403 + ips: 1961 + nofollow_backlinks: 3718 + dofollow_backlinks: 18689 + edu_backlinks: 40 + gov_backlinks: 0 + inlink_rank: 24 + domain_inlink_rank: 68 + from_home_page_backlinks: 88 + dofollow_from_home_page_backlinks: 60 + text_backlinks: 21427 + dofollow_refdomains: 1291 + from_home_page_refdomains: 64 + edu_refdomains: 6 + gov_refdomains: 0 + anchors: 720 + dofollow_anchors: 522 + pages_with_backlinks: 87 + top_anchors_by_backlinks: + - anchor: SE Ranking + backlinks: 1853 + - anchor: social listening + backlinks: 1542 + - anchor: seranking.com + backlinks: 1209 + - anchor: Buy SE Ranking tools - place secure order online + backlinks: 1157 + - anchor: Search Engine Optimization + backlinks: 890 + - anchor: the website + backlinks: 872 + - anchor: SEO + backlinks: 864 + - anchor: search bar (I’ve + backlinks: 849 + - anchor: the site + backlinks: 836 + - anchor: search bar (I have actually + backlinks: 831 + top_anchors_by_refdomains: + - anchor: SE Ranking + refdomains: 454 + - anchor: seranking.com + refdomains: 192 + - anchor: SE Ranking + refdomains: 155 + - anchor: https://www.seranking.com/ + refdomains: 116 + - anchor: SE Ranking Pro + refdomains: 111 + - anchor: seranking + refdomains: 106 + - anchor: SEO software tools for results-driven site owners. + refdomains: 66 + - anchor: "" + refdomains: 64 + - anchor: SEO software tools for results-driven site owners + refdomains: 56 + - anchor: Go Now + refdomains: 44 + top_pages_by_backlinks: + - url: https://www.seranking.com/ + backlinks: 16724 + - url: http://seranking.com/ + backlinks: 1932 + - url: https://www.seranking.com/buy.html + backlinks: 1188 + - url: http://www.seranking.com/ + backlinks: 900 + - url: https://www.seranking.com/rank-tracker/ + backlinks: 356 + top_pages_by_refdomains: + - url: https://www.seranking.com/ + refdomains: 1235 + - url: http://www.seranking.com/ + refdomains: 236 + - url: http://seranking.com/ + refdomains: 221 + - url: https://www.seranking.com/rank-tracker/ + refdomains: 172 + - url: https://www.seranking.com/site-audit/ + refdomains: 88 + top_tlds: + - tld: com + count: 1183 + - tld: pw + count: 112 + - tld: net + count: 96 + - tld: org + count: 65 + - tld: it + count: 63 + top_countries: + - country: us + count: 1140 + - country: co + count: 166 + - country: sg + count: 124 + - country: de + count: 87 + - country: gb + count: 84 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: GET (single target) + source: |- + curl -X GET 'https://api.seranking.com/v1/backlinks/summary?target=rubyonrails.org&mode=host&output=json' \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: GET (multiple targets) + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/summary?target=https://www.seranking.com&target=https://www.seranking.com&mode=url&output=json' + \ + -H 'Authorization: Token YOUR_API_KEY' post: operationId: createBacklinksSummary tags: - - backlinks - summary: summary + - Backlinks + summary: Get backlink summary description: >- - Retrieves a comprehensive summary of backlink statistics for one or more - targets. + Returns extended statistics for a target, including the number of backlinks, referring domains, subnets, IPs, + top anchors, top TLDs, and more. This endpoint supports GET and POST requests and allows batching of up to 100 + targets per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format). + + + **Cost:** 100 credits per target + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#summary + parameters: + - name: output + in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. + schema: + type: string + default: json requestBody: + required: true content: application/json: schema: type: object - example: + properties: target: - - https://www.seranking.com/ - - https://www.google.com/ - mode: host - parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - - name: output - in: query - schema: - type: string - example: json + type: array + items: + type: string + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + mode: + type: string + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. + required: + - target + example: + target: + - https://www.seranking.com/ + - https://www.seranking.com/ + mode: host responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + summary: + type: array + items: + type: object + properties: + target: + type: string + description: "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + backlinks: + type: integer + description: Number of live backlinks linking to the target. + refdomains: + type: integer + description: Number of unique domains linking to the target. + subnets: + type: integer + description: Number of unique subnets (C-blocks) linking to the target. + ips: + type: integer + description: Number of unique IP addresses linking to the target. + nofollow_backlinks: + type: integer + description: Number of backlinks classified as nofollow. + dofollow_backlinks: + type: integer + description: Number of backlinks classified as dofollow. + edu_backlinks: + type: integer + description: Number of backlinks originating from `.edu` domains. + gov_backlinks: + type: integer + description: Number of backlinks originating from .gov domains. + inlink_rank: + type: integer + description: Page Authority of the target URL. + domain_inlink_rank: + type: integer + description: Domain Authority of the target’s root domain. + from_home_page_backlinks: + type: integer + description: Number of backlinks originating from the home page of the referring domain. + dofollow_from_home_page_backlinks: + type: integer + description: Number of dofollow backlinks originating from the home page of the referring domain. + text_backlinks: + type: integer + description: Number of backlinks with text anchors. + dofollow_refdomains: + type: integer + description: Number of referring domains with at least one dofollow backlink. + from_home_page_refdomains: + type: integer + description: Number of referring domains linking from the home page. + edu_refdomains: + type: integer + description: Number of `.edu` referring domains. + gov_refdomains: + type: integer + description: Number of `.gov`referring domains. + anchors: + type: integer + description: Number of unique anchor texts used across all backlinks. + dofollow_anchors: + type: integer + description: Number of unique anchor texts used in dofollow backlinks. + pages_with_backlinks: + type: integer + description: Number of target pages that have at least one backlink. + top_anchors_by_backlinks: + type: array + items: + type: object + properties: + anchor: + type: string + description: Anchor text used in backlinks (by total backlinks). + backlinks: + type: integer + description: Number of backlinks using this anchor text. + description: Top anchor texts sorted by number of backlinks (descending). + description: Top anchor texts sorted by number of backlinks (descending). + top_anchors_by_refdomains: + type: array + items: + type: object + properties: + anchor: + type: string + description: Anchor text used in backlinks (by referring domains). + refdomains: + type: integer + description: Number of referring domains with at least one backlink using this anchor text. + description: Top anchor texts sorted by number of referring domains (descending). + description: Top anchor texts sorted by number of referring domains (descending). + top_pages_by_backlinks: + type: array + items: + type: object + properties: + url: + type: string + description: URL of the target page. + backlinks: + type: integer + description: Number of backlinks pointing to this page. + description: Target pages sorted by number of backlinks (descending). + description: Target pages sorted by number of backlinks (descending). + top_pages_by_refdomains: + type: array + items: + type: object + properties: + url: + type: string + description: URL of the target page. + refdomains: + type: integer + description: Number of referring domains pointing to this page. + description: Target pages sorted by number of referring domains (descending). + description: Target pages sorted by number of referring domains (descending). + top_tlds: + type: array + items: + type: object + properties: + tld: + type: string + description: Top-level domain (e.g., `.com`). + count: + type: integer + description: Number of backlinks originating from this TLD. + description: Top-level domains (TLDs) sorted by number of backlinks (descending). + description: Top-level domains (TLDs) sorted by number of backlinks (descending). + top_countries: + type: array + items: + type: object + properties: + country: + type: string + description: Country code. + count: + type: integer + description: Number of backlinks originating from this country. + description: Top countries sorted by number of backlinks (descending). + description: Top countries sorted by number of backlinks (descending). + example: + summary: + - target: seranking.com + backlinks: 22407 + refdomains: 2329 + subnets: 1403 + ips: 1961 + nofollow_backlinks: 3718 + dofollow_backlinks: 18689 + edu_backlinks: 40 + gov_backlinks: 0 + inlink_rank: 24 + domain_inlink_rank: 68 + from_home_page_backlinks: 88 + dofollow_from_home_page_backlinks: 60 + text_backlinks: 21427 + dofollow_refdomains: 1291 + from_home_page_refdomains: 64 + edu_refdomains: 6 + gov_refdomains: 0 + anchors: 720 + dofollow_anchors: 522 + pages_with_backlinks: 87 + top_anchors_by_backlinks: + - anchor: SE Ranking + backlinks: 1853 + - anchor: social listening + backlinks: 1542 + - anchor: seranking.com + backlinks: 1209 + - anchor: Buy SE Ranking tools - place secure order online + backlinks: 1157 + - anchor: Search Engine Optimization + backlinks: 890 + - anchor: the website + backlinks: 872 + - anchor: SEO + backlinks: 864 + - anchor: search bar (I’ve + backlinks: 849 + - anchor: the site + backlinks: 836 + - anchor: search bar (I have actually + backlinks: 831 + top_anchors_by_refdomains: + - anchor: SE Ranking + refdomains: 454 + - anchor: seranking.com + refdomains: 192 + - anchor: SE Ranking + refdomains: 155 + - anchor: https://www.seranking.com/ + refdomains: 116 + - anchor: SE Ranking Pro + refdomains: 111 + - anchor: seranking + refdomains: 106 + - anchor: SEO software tools for results-driven site owners. + refdomains: 66 + - anchor: "" + refdomains: 64 + - anchor: SEO software tools for results-driven site owners + refdomains: 56 + - anchor: Go Now + refdomains: 44 + top_pages_by_backlinks: + - url: https://www.seranking.com/ + backlinks: 16724 + - url: http://seranking.com/ + backlinks: 1932 + - url: https://www.seranking.com/buy.html + backlinks: 1188 + - url: http://www.seranking.com/ + backlinks: 900 + - url: https://www.seranking.com/rank-tracker/ + backlinks: 356 + top_pages_by_refdomains: + - url: https://www.seranking.com/ + refdomains: 1235 + - url: http://www.seranking.com/ + refdomains: 236 + - url: http://seranking.com/ + refdomains: 221 + - url: https://www.seranking.com/rank-tracker/ + refdomains: 172 + - url: https://www.seranking.com/site-audit/ + refdomains: 88 + top_tlds: + - tld: com + count: 1183 + - tld: pw + count: 112 + - tld: net + count: 96 + - tld: org + count: 65 + - tld: it + count: 63 + top_countries: + - country: us + count: 1140 + - country: co + count: 166 + - country: sg + count: 124 + - country: de + count: 87 + - country: gb + count: 84 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: POST (multiple targets) + source: |- + curl -X POST \ + 'https://api.seranking.com/v1/backlinks/summary?output=json' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -d '{ + "target": [ + "https://www.seranking.com/", + "https://www.seranking.com/" + ], + "mode": "host" + }' /v1/backlinks/metrics: get: operationId: getBacklinksMetrics tags: - - backlinks - summary: metrics + - Backlinks + summary: Get backlink metrics description: >- - Retrieves key backlink statistics (e.g., backlink, referring domain, and - IP counts) for one or more targets. + Returns key statistics for a target, including the number of backlinks and referring domains. This endpoint + supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as + GET parameters separated by `&` or in the POST body (JSON format). + + + **Cost:** 10 credits per target + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#metrics parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." schema: type: string - example: target-rfunqmac.com - name: mode in: query + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. schema: type: string - enum: - - domain - - host - - url default: host - example: domain - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - enum: - - json - - xml default: json - example: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + metrics: + type: array + items: + type: object + properties: + target: + type: string + description: "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + backlinks: + type: integer + description: Number of live backlinks linking to the target. + refdomains: + type: integer + description: Number of unique domains linking to the target. + subnets: + type: integer + description: Number of unique subnets (C-blocks) linking to the target. + ips: + type: integer + description: Number of unique IP addresses linking to the target. + nofollow_backlinks: + type: integer + description: Number of backlinks classified as nofollow. + dofollow_backlinks: + type: integer + description: Number of backlinks classified as dofollow. + edu_backlinks: + type: integer + description: Number of backlinks originating from `.edu` domains. + gov_backlinks: + type: integer + description: Number of backlinks originating from `.gov` domains. + example: + metrics: + - target: seranking.com + backlinks: 22402 + refdomains: 2325 + subnets: 1399 + ips: 1957 + nofollow_backlinks: 3717 + dofollow_backlinks: 18685 + edu_backlinks: 40 + gov_backlinks: 0 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: GET (single target) + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/metrics?target=https://www.seranking.com&mode=url&output=json' \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: GET (multiple targets) + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/metrics?target=https://www.seranking.com&target=https://www.seranking.com&mode=url&output=json' + \ + -H 'Authorization: Token YOUR_API_KEY' post: operationId: createBacklinksMetrics tags: - - backlinks - summary: metrics + - Backlinks + summary: Get backlink metrics description: >- - Retrieves key backlink statistics (e.g., backlink, referring domain, and - IP counts) for one or more targets. + Returns key statistics for a target, including the number of backlinks and referring domains. This endpoint + supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as + GET parameters separated by `&` or in the POST body (JSON format). + + + **Cost:** 10 credits per target + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#metrics + parameters: + - name: output + in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. + schema: + type: string + default: json requestBody: + required: true content: application/json: schema: type: object - example: + properties: target: - - https://www.seranking.com/ - - https://www.seranking.com/ - mode: url - parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - - name: output - in: query - schema: - type: string - example: json + type: array + items: + type: string + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + mode: + type: string + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. + required: + - target + example: + target: + - https://www.seranking.com/ + - https://www.seranking.com/ + mode: url responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + metrics: + type: array + items: + type: object + properties: + target: + type: string + description: "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + backlinks: + type: integer + description: Number of live backlinks linking to the target. + refdomains: + type: integer + description: Number of unique domains linking to the target. + subnets: + type: integer + description: Number of unique subnets (C-blocks) linking to the target. + ips: + type: integer + description: Number of unique IP addresses linking to the target. + nofollow_backlinks: + type: integer + description: Number of backlinks classified as nofollow. + dofollow_backlinks: + type: integer + description: Number of backlinks classified as dofollow. + edu_backlinks: + type: integer + description: Number of backlinks originating from `.edu` domains. + gov_backlinks: + type: integer + description: Number of backlinks originating from `.gov` domains. + example: + metrics: + - target: seranking.com + backlinks: 22402 + refdomains: 2325 + subnets: 1399 + ips: 1957 + nofollow_backlinks: 3717 + dofollow_backlinks: 18685 + edu_backlinks: 40 + gov_backlinks: 0 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: POST (multiple targets) + source: |- + curl -X POST 'https://api.seranking.com/v1/backlinks/metrics?output=json' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "target": [ + "https://www.seranking.com/", + "https://www.seranking.com/" + ], + "mode": "url" + }' /v1/backlinks/all: get: operationId: getBacklinksAll tags: - - backlinks - summary: all + - Backlinks + summary: List all backlinks description: >- - Retrieves a detailed, filterable, and sortable list of backlinks - pointing to a single target. + Returns information about backlinks pointing to a target. This endpoint supports GET and POST requests, but + doesn’t support batching. Only a single target can be specified per request. + + + **Note:** The `inlink_rank` value in the response is based on background-processed data. It can be up to one + month behind the real-time value shown in the [Get page and domain + authority](https://seranking.com/api/data/backlinks/#authority) method. + + + **Cost:** 1 credit per backlink + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#all parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." schema: type: string - example: http://accordconsultants.in/ - name: mode in: query + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. schema: type: string - example: url - - name: output - in: query - schema: - type: string - example: json + default: host - name: limit in: query + description: "Maximum number of results to return. Must be within the range: `[1, 10,000]`." schema: type: integer - example: 10000 + default: 100 - name: per_domain in: query + description: >- + Number of backlinks to return per referring domain. Must be within the range: `[1, 100]`. For example, when + set to `1`, each returned backlink comes from a different referring domain. + + + If empty, all backlinks are returned. schema: type: integer - example: 1 - - name: order_by + - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - example: inlink_rank - - name: url_from_filter + default: json + - name: order_by in: query + description: |- + Field by which results are sorted: + • `date_found` – returns the most recent backlinks first. + • `domain_inlink_rank` – returns backlinks with the highest Domain InLink Rank first. + • `inlink_rank` – returns backlinks with the highest InLink Rank first. schema: type: string - example: unsam.edu.ar - - name: url_to_filter + default: date_found + - name: inlink_rank_from in: query + description: "Minimum InLink Rank. Returns backlinks ≥ this value. Must be within the range: `[0, 100]`." schema: - type: string - example: .jpg - - name: url_to_filter_mode + type: integer + default: 0 + - name: inlink_rank_to in: query + description: "Maximum InLink Rank. Returns backlinks ≤ this value. Must be within the range: `[0, 100]`." schema: - type: string - enum: - - contains - - does_not_contain - example: does_not_contain - - name: url_from_filter_mode + type: integer + default: 100 + - name: domain_inlink_rank_from in: query + description: "Minimum Domain InLink Rank. Returns backlinks ≥ this value. Must be within the range: `[0, 100]`." schema: - type: string - enum: - - contains - - does_not_contain - default: contains - example: contains - - name: anchor_filter + type: integer + default: 0 + - name: domain_inlink_rank_to in: query - description: Filter by anchor text. Max 2063 characters. + description: "Maximum Domain InLink Rank. Returns backlinks ≤ this value. Must be within the range: `[0, 100]`." + schema: + type: integer + default: 100 + - name: url_from_filter + in: query + description: Text filter for referring page URL (e.g., `seo-software`). Maximum 2063 ASCII symbols. schema: type: string - maxLength: 2063 - - name: anchor_filter_mode + - name: url_from_filter_mode in: query + description: |- + Filter mode: + • `contains` – returns backlinks where `url_from` contains `url_from_filter` text. + • `does_not_contain` – returns backlinks where `url_from` doesn’t contain `url_from_filter` text. + + Ignored if `url_from_filter` parameter is not set. schema: type: string - enum: - - contains - - does_not_contain default: contains - example: contains - - name: nofollow_filter + - name: url_to_filter in: query + description: Text filter for destination URL (e.g., `seranking.com/blog/`). Maximum 2063 ASCII symbols. schema: type: string - enum: - - nofollow_only - - dofollow_only - - name: inlink_rank_from + - name: url_to_filter_mode in: query - description: Minimum InLink Rank (0-100). + description: |- + Filter mode: + • `contains` – returns backlinks where `url_to` contains `url_to_filter` text. + • `does_not_contain` – returns backlinks where `url_to` doesn’t contain `url_to_filter` text. + + Ignored if `url_to_filter` parameter is not set. schema: - type: integer - minimum: 0 - maximum: 100 - - name: inlink_rank_to + type: string + default: contains + - name: anchor_filter in: query - description: Maximum InLink Rank (0-100). + description: Text filter for link anchor (e.g., `seo`). Maximum 2063 ASCII symbols. schema: - type: integer - minimum: 0 - maximum: 100 - - name: domain_inlink_rank_from + type: string + - name: anchor_filter_mode in: query - description: Minimum Domain InLink Rank (0-100). + description: |- + Filter mode: + • `contains` – returns backlinks where `anchor` contains `anchor_filter` text. + • `does_not_contain` – returns backlinks where `anchor` doesn’t contain `anchor_filter` text. + + Ignored if `anchor_filter` parameter is not set. schema: - type: integer - minimum: 0 - maximum: 100 - - name: domain_inlink_rank_to + type: string + default: contains + - name: nofollow_filter in: query - description: Maximum Domain InLink Rank (0-100). + description: |- + Filter mode: + • `nofollow_only` – returns only backlinks classified as nofollow. + • `dofollow_only` – returns only backlinks classified as dofollow. + + If empty, all backlinks are returned. schema: - type: integer - minimum: 0 - maximum: 100 + type: string responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + backlinks: + type: array + items: + type: object + properties: + url_from: + type: string + description: Referring page URL. + url_to: + type: string + description: Destination page URL. + title: + type: string + description: Referring page title. + anchor: + type: string + description: Link anchor text (or image alt text if the link contains an image). + alt: + type: string + nofollow: + type: boolean + description: Indicates whether the backlink is noffolow. + image: + type: boolean + description: Indicates whether the backlink contains an image. + image_source: + type: string + description: Source URL of the image if present. + inlink_rank: + type: integer + description: Page Authority of the referring page. + domain_inlink_rank: + type: integer + description: Domain Authority of the referring page’s root domain. + first_seen: + type: string + description: Date the backlink was first found (YYYY-MM-DD). + last_visited: + type: string + description: Date the referring page was last crawled (YYYY-MM-DD). + example: + backlinks: + - url_from: https://zoekmachine-optimalisatie-seo.beginthier.nl/ + url_to: https://www.seranking.com/ + title: Zoekmachine Optimalisatie (SEO) + anchor: SEO software tools + alt: "" + nofollow: false + image: false + image_source: "" + inlink_rank: 67 + domain_inlink_rank: 77 + first_seen: "2021-11-05" + last_visited: "2023-06-01" + - url_from: https://zoekmachine-optimalisatie.verzamelgids.nl/ + url_to: https://www.seranking.com/ + title: Zoekmachine Optimalisatie (SEO) + anchor: SEO software tools + alt: "" + nofollow: false + image: false + image_source: "" + inlink_rank: 66 + domain_inlink_rank: 75 + first_seen: "2021-11-12" + last_visited: "2023-06-01" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: GET + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/all?target=seranking.com&mode=domain&limit=100&order_by=inlink_rank&per_domain=1&output=json' + \ + -H 'Authorization: Token YOUR_API_KEY' post: operationId: createBacklinksAll tags: - - backlinks - summary: all + - Backlinks + summary: List all backlinks description: >- - Retrieves a detailed, filterable, and sortable list of backlinks - pointing to a single target. - requestBody: - content: - application/json: - schema: - type: object - example: - target: https://www.seranking.com/ - mode: domain - limit: 10 - per_domain: 1 - order_by: date_found + Returns information about backlinks pointing to a target. This endpoint supports GET and POST requests, but + doesn’t support batching. Only a single target can be specified per request. + + + **Note:** The `inlink_rank` value in the response is based on background-processed data. It can be up to one + month behind the real-time value shown in the [Get page and domain + authority](https://seranking.com/api/data/backlinks/#authority) method. + + + **Cost:** 1 credit per backlink + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#all parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - example: json + default: json + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + target: + type: string + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + mode: + type: string + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. + limit: + type: integer + description: "Maximum number of results to return. Must be within the range: `[1, 10,000]`." + per_domain: + type: integer + description: >- + Number of backlinks to return per referring domain. Must be within the range: `[1, 100]`. For + example, when set to `1`, each returned backlink comes from a different referring domain. + + + If empty, all backlinks are returned. + order_by: + type: string + description: |- + Field by which results are sorted: + • `date_found` – returns the most recent backlinks first. + • `domain_inlink_rank` – returns backlinks with the highest Domain InLink Rank first. + • `inlink_rank` – returns backlinks with the highest InLink Rank first. + inlink_rank_from: + type: integer + description: "Minimum InLink Rank. Returns backlinks ≥ this value. Must be within the range: `[0, 100]`." + inlink_rank_to: + type: integer + description: "Maximum InLink Rank. Returns backlinks ≤ this value. Must be within the range: `[0, 100]`." + domain_inlink_rank_from: + type: integer + description: "Minimum Domain InLink Rank. Returns backlinks ≥ this value. Must be within the range: `[0, 100]`." + domain_inlink_rank_to: + type: integer + description: "Maximum Domain InLink Rank. Returns backlinks ≤ this value. Must be within the range: `[0, 100]`." + url_from_filter: + type: string + description: Text filter for referring page URL (e.g., `seo-software`). Maximum 2063 ASCII symbols. + url_from_filter_mode: + type: string + description: |- + Filter mode: + • `contains` – returns backlinks where `url_from` contains `url_from_filter` text. + • `does_not_contain` – returns backlinks where `url_from` doesn’t contain `url_from_filter` text. + + Ignored if `url_from_filter` parameter is not set. + url_to_filter: + type: string + description: Text filter for destination URL (e.g., `seranking.com/blog/`). Maximum 2063 ASCII symbols. + url_to_filter_mode: + type: string + description: |- + Filter mode: + • `contains` – returns backlinks where `url_to` contains `url_to_filter` text. + • `does_not_contain` – returns backlinks where `url_to` doesn’t contain `url_to_filter` text. + + Ignored if `url_to_filter` parameter is not set. + anchor_filter: + type: string + description: Text filter for link anchor (e.g., `seo`). Maximum 2063 ASCII symbols. + anchor_filter_mode: + type: string + description: |- + Filter mode: + • `contains` – returns backlinks where `anchor` contains `anchor_filter` text. + • `does_not_contain` – returns backlinks where `anchor` doesn’t contain `anchor_filter` text. + + Ignored if `anchor_filter` parameter is not set. + nofollow_filter: + type: string + description: |- + Filter mode: + • `nofollow_only` – returns only backlinks classified as nofollow. + • `dofollow_only` – returns only backlinks classified as dofollow. + + If empty, all backlinks are returned. + required: + - target + example: + target: https://www.seranking.com/ + order_by: date_found + mode: domain + limit: 10 + per_domain: 1 responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + backlinks: + type: array + items: + type: object + properties: + url_from: + type: string + description: Referring page URL. + url_to: + type: string + description: Destination page URL. + title: + type: string + description: Referring page title. + anchor: + type: string + description: Link anchor text (or image alt text if the link contains an image). + alt: + type: string + nofollow: + type: boolean + description: Indicates whether the backlink is noffolow. + image: + type: boolean + description: Indicates whether the backlink contains an image. + image_source: + type: string + description: Source URL of the image if present. + inlink_rank: + type: integer + description: Page Authority of the referring page. + domain_inlink_rank: + type: integer + description: Domain Authority of the referring page’s root domain. + first_seen: + type: string + description: Date the backlink was first found (YYYY-MM-DD). + last_visited: + type: string + description: Date the referring page was last crawled (YYYY-MM-DD). + example: + backlinks: + - url_from: https://zoekmachine-optimalisatie-seo.beginthier.nl/ + url_to: https://www.seranking.com/ + title: Zoekmachine Optimalisatie (SEO) + anchor: SEO software tools + alt: "" + nofollow: false + image: false + image_source: "" + inlink_rank: 67 + domain_inlink_rank: 77 + first_seen: "2021-11-05" + last_visited: "2023-06-01" + - url_from: https://zoekmachine-optimalisatie.verzamelgids.nl/ + url_to: https://www.seranking.com/ + title: Zoekmachine Optimalisatie (SEO) + anchor: SEO software tools + alt: "" + nofollow: false + image: false + image_source: "" + inlink_rank: 66 + domain_inlink_rank: 75 + first_seen: "2021-11-12" + last_visited: "2023-06-01" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: POST + source: |- + curl -X POST 'https://api.seranking.com/v1/backlinks/all?output=json' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "target": "https://www.seranking.com/", + "order_by": "date_found", + "mode": "domain", + "limit": 10, + "per_domain": 1 + }' /v1/backlinks/raw: get: operationId: getBacklinksRaw tags: - - backlinks - summary: raw + - Backlinks + summary: Fetch backlinks in batches description: >- - Fetches the complete list of backlinks for a target in batches using - cursor-based pagination. + Returns all backlinks pointing to a target using cursor-based pagination. Backlinks are delivered in sequential + batches. This method supports pagination and doesn’t provide sorting or filtering. Unlike the [List all + backlinks](https://seranking.com/api/data/backlinks#all) method, which supports ordering (e.g., by InLink Rank + or recency), this endpoint is designed for complete backlink retrieval, batch by batch. + + + Pagination is handled via a cursor (`next` parameter). The cursor marks a specific position in the dataset and + remains valid unless the item is removed. Cursors are typically valid for up to 24 hours, even if new backlinks + are added. + + + - The `next` parameter must **not** be included when requesting the first page of data. Doing so will return an + error. + + + - If the response doesn’t return `next`, you have reached the last page of data. + + + **Cost:** 1 credit per backlink + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#raw parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." schema: type: string - example: teilon.com - name: mode in: query + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. schema: type: string - example: host + default: host - name: limit in: query + description: |- + Maximum number of results to return in one page. Must be within the range: `[1, 100,000]`. + + Default: 10,000 schema: type: integer - example: 100 - name: next in: query + description: |- + Cursor pointing to the end of the previously returned page. + • Must not be included for the first page request. + • Not returned in the last page of data. schema: type: string - example: >- - Pju9uZR4A2dylhvnUQ1UAu1NWfBjWoutYn_z2MHcVcZqH2eGVtT6Z6j2DjgyJKqyLem4yIj_it6xfHqasMXnj7/_zbLyBX93MmSekLiLxHa_gA9MRIrnPC2sxL4mDNzCzAsbK54U4UCScqvMexsrDx2obPcxHWZMl_yU7hQDa/9GJwcutpU0_v7TbtefRP9EVw/5eFZjvsNERYxl8jORIyNxL4N5t5LK75BaM51pYQ5q8bfuw/F42rIB8xKM0vD0i090_65JHrZPsDoAkKce/XELUwhGcoDqyRgG2P3AXAbZOe5RDFV/vz0YFTyI9tqynHJtP2olEKQ079f3hwroR6YML5AgTsVPwIynxNILAd_OHU5aFTReKIy686fBoIFZWR2dsyeGgN3r/n0jolcHNg== - - name: output - in: query - schema: - type: string - example: json - name: per_domain in: query + description: >- + Number of sample backlinks to return per referring domain instead of all backlinks. Must be within the + range: `[1, 100]`. For example, when set to `1`, each returned backlink comes from a different referring + domain. + + + If empty, all backlinks are returned. schema: type: integer - minimum: 1 - maximum: 100 - example: 1 - - name: order_by + - name: output in: query + description: Response format (`json` or `xml`). schema: type: string - enum: - - date_found - - domain_inlink_rank - - inlink_rank - default: date_found - example: date_found + default: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + backlinks: + type: array + items: + type: object + properties: + url_from: + type: string + description: Referring page URL. + url_to: + type: string + description: Destination page URL. + title: + type: string + description: Referring page title. + anchor: + type: string + description: Link anchor text (or image alt text if the link contains an image). + alt: + type: string + nofollow: + type: boolean + description: Indicates whether the backlink is nofollow. + image: + type: boolean + description: Indicates whether the backlink contains an image. + image_source: + type: string + description: Source URL of the image if present. + inlink_rank: + type: integer + description: Page Authority of the referring page. + domain_inlink_rank: + type: integer + description: Domain Authority of the referring page’s root domain. + first_seen: + type: string + description: Date the backlink was first found (YYYY-MM-DD). + last_visited: + type: string + description: Date the referring page was last crawled (YYYY-MM-DD). + next: + type: string + description: Cursor pointing to the end of the returned page of data. Not included if this is the last page. + examples: + example1: + summary: Example 1 + value: + backlinks: + - url_from: https://www.pbmug.org/efficient-backlinks-checking.html + url_to: https://seranking.com/backlinks-checker.html + title: "Backlinks Checker " + anchor: "" + alt: "" + nofollow: false + image: false + image_source: "" + inlink_rank: 16 + domain_inlink_rank: 45 + first_seen: "2021-05-06" + last_visited: "2021-05-06" + - url_from: https://www.pbmug.org/seranking-enterprise-6-40-8.html + url_to: https:// seranking.com/themes/standard/images/index-scr-3-big.png + title: The best SEO software - Pbmug.org + anchor: "" + alt: "" + nofollow: false + image: false + image_source: "" + inlink_rank: 15 + domain_inlink_rank: 45 + first_seen: "2021-05-06" + last_visited: "2021-05-06" + next: >- + ezDLWp6Peqx6tE77/mV9XtWGP92lrdwTI3ZZ2b24ZPMXA/NpRCJm45biWgPerwN_0uqT9iHmZTYjeS2VRiNL7ySiFgV0KFGv9O9Y= + example2: + summary: Example 2 + value: + backlinks: + - url_from: https://fity.club/lists/1/seo-software-tools-for-resultsdriven-site-owners/ + url_to: https://cdn.seranking.com/themes/standard/images/works-on.png + title: Seo Software Tools For Resultsdriven Site Owners + anchor: seranking.com + alt: "" + nofollow: true + image: false + image_source: "" + inlink_rank: 9 + domain_inlink_rank: 13 + first_seen: "2023-08-07" + last_visited: "2023-08-07" + - url_from: https://www.bjskqx.com/11043.html + url_to: https://cn.seranking.com/seranking.html + title: seo外链发布有用吗,seo外链发布平台有哪些-帮发锚文本外链网 + anchor: SE Ranking + alt: "" + nofollow: false + image: false + image_source: "" + inlink_rank: 15 + domain_inlink_rank: 38 + first_seen: "2023-07-08" + last_visited: "2023-07-08" + next: sPpKCdfMEKN5zO3RsuyEZIMp7wHaJF5wuT/1tebFkazXfosEFuotIQYeHxV/beypHQ3a9DHFgCkNnh_f0cP9EoHBtcyYFuGA== + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/raw?target=seranking.com&mode=domain&limit=50000&output=json&next=YYY' + \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/raw?target=seranking.com&mode=domain&limit=2&output=json' \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/raw?target=seranking.com&mode=domain&limit=2&output=json&next=ezDLWp6Peqx6tE77/mV9XtWGP92lrdwTI3ZZ2b24ZPMXA/NpRCJm45biWgPerwN_0uqT9iHmZTYjeS2VRiNL7ySiFgV0KFGv9O9Y=' + \ + -H 'Authorization: Token YOUR_API_KEY' /v1/backlinks/count: get: operationId: getBacklinksCount tags: - - backlinks - summary: count - description: Returns the total number of live backlinks for one or more targets. + - Backlinks + summary: Get total backlinks count + description: >- + Returns the total number of backlinks for a target. This endpoint supports GET and POST requests and allows + batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the + POST body (JSON format). + + + **Cost:** 2 credits per target + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#count parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." schema: type: string - description: Supports multiple targets by repeating this parameter. - example: anandaioga.com - name: mode in: query + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. schema: type: string - enum: - - domain - - host - - url default: host - example: url - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - enum: - - json - - xml default: json - example: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + metrics: + type: array + items: + type: object + properties: + target: + type: string + description: "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + backlinks: + type: integer + description: Total number of live backlinks pointing to the target. + example: + metrics: + - target: seranking.com + backlinks: 22402 + - target: www.seranking.com + backlinks: 341415 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: GET (single target) + source: |- + curl -X GET 'https://api.seranking.com/v1/backlinks/count?target=seranking.com&mode=host&output=json' \ + -H 'Authorization: Token YOUR_API_KEY' post: operationId: createBacklinksCount tags: - - backlinks - summary: count - description: Returns the total number of live backlinks for one or more targets. + - Backlinks + summary: Get total backlinks count + description: >- + Returns the total number of backlinks for a target. This endpoint supports GET and POST requests and allows + batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the + POST body (JSON format). + + + **Cost:** 2 credits per target + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#count + parameters: + - name: output + in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. + schema: + type: string + default: json requestBody: + required: true content: application/json: schema: type: object - example: + properties: target: - - https://www.seranking.com/ - - https://www.google.com/ - mode: host - parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - - name: output - in: query - schema: - type: string - example: json + type: array + items: + type: string + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + mode: + type: string + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. + required: + - target + example: + target: + - https://www.seranking.com/ + - https://www.seranking.com/ + mode: host responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + metrics: + type: array + items: + type: object + properties: + target: + type: string + description: "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + backlinks: + type: integer + description: Total number of live backlinks pointing to the target. + example: + metrics: + - target: seranking.com + backlinks: 22402 + - target: www.seranking.com + backlinks: 341415 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: POST (multiple targets) + source: |- + curl -X POST 'https://api.seranking.com/v1/backlinks/count?output=json' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "target": [ + "https://www.seranking.com/", + "https://www.seranking.com/" + ], + "mode": "host" + }' /v1/backlinks/export: get: operationId: getBacklinksExport tags: - - backlinks - summary: export + - Backlinks + summary: Export backlinks data description: >- - Initiates an asynchronous task to export all backlinks for a target to a - downloadable CSV file. + Exports information about all backlinks pointing to a target. Due to the potentially large data volume, this + endpoint works asynchronously and returns the complete dataset as a downloadable `.csv.gz` file once processing + is complete. + + + **Cost:** 1 credit per backlink + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#export parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." schema: type: string - example: https://seranking.com - name: mode in: query + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. schema: type: string - enum: - - domain - - host - - url default: host - example: domain - name: output in: query + description: Response format (`json` or `xml`). schema: type: string - enum: - - json - - xml default: json - example: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} - /v1/backlinks/export/status: + application/json: + schema: + type: object + properties: + task_status: + type: string + description: |- + Status of the export task: + • `queued_for_processing` – task accepted and queued. + • `processing` – task is running. + • `complete` – export is ready for download. + • `rejected` – another export task is already in progress. + • `unknown` — task ID is invalid or inaccessible. + task_id: + type: string + description: Unique ID of the export task. + download_file: + type: string + description: Location of the generated `.csv.gz` file (available when status is `complete`). + examples: + example1: + summary: Example 1 + value: + task_status: queued_for_processing + task_id: d1d2bb44-6c66-4791-a634-26103551e2da + example2: + summary: Example 2 + value: + task_status: complete + task_id: d1d2bb44-6c66-4791-a634-26103551e2da + download_file: http://116.202.112.205/export/b/seranking.com-1695672292259.csv.gz + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/export?target=https://seranking.com&mode=domain&output=json' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/backlinks/history: get: - operationId: getBacklinksExportStatus + operationId: getBacklinksHistory tags: - - backlinks - summary: export/status + - Backlinks + summary: List new and lost backlinks description: >- - Status of the asynchronous task to export all backlinks for a target to - a downloadable CSV file. + Returns backlinks that were newly found or lost within a specified date range for a target. This endpoint + supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request. + + + **Cost:** 1 credit per backlink + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#history parameters: - - name: apikey + - name: target in: query + required: true + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." schema: type: string - example: '{{secret_key_data}}' - - name: task_id + - name: mode in: query - required: true + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. schema: type: string - example: '1_878619' - - name: output + default: host + - name: new_lost_type in: query + description: |- + Backlink status filter: + • `new` – returns newly found backlinks. + • `lost` – returns backlinks tagged as lost. + + If empty, both are returned. schema: type: string - enum: - - json - - xml - default: json - example: json - responses: - '200': - description: Successful response - content: - application/json: {} - /v1/backlinks/history: - get: - operationId: getBacklinksHistory - tags: - - backlinks - summary: history - description: >- - Returns a list of new or lost backlinks for a single target within a - specified date range. - parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - - name: target - in: query - schema: - type: string - example: https://www.seranking.com - - name: mode - in: query - schema: - type: string - example: domain - - name: new_lost_type - in: query - schema: - type: string - enum: - - new - - lost - example: new + default: “” - name: date_from in: query + description: Start date (`YYYY-MM-DD`), inclusive. schema: type: string - example: '2024-01-14' + default: yesterday - name: date_to in: query + description: End date (`YYYY-MM-DD`), inclusive. schema: type: string - example: '2025-08-28' + default: today - name: link_type in: query + description: |- + Type of backlink: + • `href` – returns standard hyperlinks. + • `redirect` – returns redirect links. + + If empty, all types are returned. schema: type: string - enum: - - href - - redirect - example: href + default: “” - name: anchor_type in: query + description: |- + Anchor type: + • `text` – returns text links. + • `image` – returns image links (if the anchor contains both text and an image, it is classified as image). + • `undefined` – returns undefined links. + + If empty, all types are returned. schema: type: string - enum: - - text - - image - - undefined - example: text + default: “” - name: dofollow in: query + description: |- + Follow status (`dofollow`, `nofollow`, `undefined`). + + If empty, all statuses are returned. schema: type: string - enum: - - dofollow - - nofollow - - undefined - example: dofollow - - name: output - in: query - schema: - type: string - enum: - - json - - xml - default: json - example: json + default: “” - name: url_from in: query - description: Filter by referring page URL. + description: |- + Referring domain filter (including subdomains). + Example: `http://seo.jouwlinkhier.nl/path` returns backlinks originating from `seo.jouwlinkhier.nl/*`. + + If empty, backlinks from all domains and subdomains are returned. schema: type: string + default: “” - name: limit in: query + description: "Maximum number of results to return. Must be within the range: `[1, 10,000]`." schema: type: integer - minimum: 1 - maximum: 10000 default: 100 - example: 100 - name: order_by in: query + description: >- + Field by which results are sorted: + + • `new_lost_date` – returns new or lost backlinks ordered by the date they were found or lost (most recent + first). + + • `domain_inlink_rank` – returns backlinks with the highest Domain InLink Rank first. + + • `inlink_rank` – returns backlinks with the highest InLink Rank first. schema: type: string - enum: - - new_lost_date - - domain_inlink_rank - - inlink_rank default: new_lost_date - example: new_lost_date + - name: output + in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. + schema: + type: string + default: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + new_lost_backlinks: + type: array + items: + type: object + properties: + new_lost_date: + type: string + description: Date when the backlink was found or lost (YYYY-MM-DD). + new_lost_type: + type: string + description: |- + Backlink status: + • `new` – newly found backlinks. + • `lost` – backlinks that were lost. + url_from: + type: string + description: Referring page URL. + url_to: + type: string + description: Destination pag URL. + title: + type: string + description: Referring page title. + anchor: + type: string + description: Link anchor text (or image alt text if the link contains an image). + alt: {} + link_type: + type: string + description: |- + Type of backlink: + • `href` – standard hyperlinks. + • `redirect` – redirect links. + nofollow: + type: boolean + description: Indicates whether the backlink is classified as nofollow. + image: + type: boolean + description: Indicates whether the backlink is an image link. + image_source: + nullable: true + description: Source URL of the image if present. + type: string + redirect_chain: + type: boolean + redirect_chain_urls: + type: array + items: {} + reason_lost: + type: string + nullable: true + inlink_rank: + type: integer + description: Page Authority of the referring page URL. + domain_inlink_rank: + type: integer + description: Domain Authority of the referring page’s root domain. + first_seen: + type: string + description: Date when the backlink was first found (YYYY-MM-DD). + example: + new_lost_backlinks: + - new_lost_date: "2023-01-15" + new_lost_type: new + url_from: https://agenciatgx.com.br/blog/melhores-ferramentas-de-seo-para-otimizar/ + url_to: http://www.seranking.com/ + title: Melhores Ferramentas de SEO Para Otimizar o Desempenho do Seu Site - Agência TGX + anchor: SE Ranking + alt: null + link_type: href + nofollow: false + image: false + image_source: null + redirect_chain: false + redirect_chain_urls: [] + reason_lost: null + inlink_rank: 1 + domain_inlink_rank: 18 + first_seen: "2023-01-15" + - new_lost_date: "2023-01-15" + new_lost_type: lost + url_from: http://technicalproducts.org/category/seoandperformance + url_to: https://www.seranking.com/ + title: SEO & Performance – Technical Products + anchor: SE Ranking + alt: null + link_type: href + nofollow: false + image: false + image_source: null + redirect_chain: false + redirect_chain_urls: [] + reason_lost: link_removed + inlink_rank: 1 + domain_inlink_rank: 1 + first_seen: "2023-01-15" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: GET + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/history?target=https://www.seranking.com&mode=domain&new_lost_type=new&date_from=2023-01-15&date_to=2023-01-15&link_type=href&anchor_type=text&dofollow=dofollow&output=json' + \ + -H 'Authorization: Token YOUR_API_KEY' post: operationId: createBacklinksHistory tags: - - backlinks - summary: history + - Backlinks + summary: List new and lost backlinks description: >- - Returns a list of new or lost backlinks for a single target within a - specified date range. - requestBody: - content: - application/json: - schema: - type: object - example: - target: https://www.seranking.com - mode: domain - date_from: '2025-09-15' - date_to: '2025-10-01' + Returns backlinks that were newly found or lost within a specified date range for a target. This endpoint + supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request. + + + **Cost:** 1 credit per backlink + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#history parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - example: json + default: json + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + target: + type: string + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + mode: + type: string + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. + new_lost_type: + type: string + description: |- + Backlink status filter: + • `new` – returns newly found backlinks. + • `lost` – returns backlinks tagged as lost. + + If empty, both are returned. + date_from: + type: string + description: Start date (`YYYY-MM-DD`), inclusive. + date_to: + type: string + description: End date (`YYYY-MM-DD`), inclusive. + link_type: + type: string + description: |- + Type of backlink: + • `href` – returns standard hyperlinks. + • `redirect` – returns redirect links. + + If empty, all types are returned. + anchor_type: + type: string + description: >- + Anchor type: + + • `text` – returns text links. + + • `image` – returns image links (if the anchor contains both text and an image, it is classified as + image). + + • `undefined` – returns undefined links. + + + If empty, all types are returned. + dofollow: + type: string + description: |- + Follow status (`dofollow`, `nofollow`, `undefined`). + + If empty, all statuses are returned. + url_from: + type: string + description: >- + Referring domain filter (including subdomains). + + Example: `http://seo.jouwlinkhier.nl/path` returns backlinks originating from + `seo.jouwlinkhier.nl/*`. + + + If empty, backlinks from all domains and subdomains are returned. + limit: + type: integer + description: "Maximum number of results to return. Must be within the range: `[1, 10,000]`." + order_by: + type: string + description: >- + Field by which results are sorted: + + • `new_lost_date` – returns new or lost backlinks ordered by the date they were found or lost (most + recent first). + + • `domain_inlink_rank` – returns backlinks with the highest Domain InLink Rank first. + + • `inlink_rank` – returns backlinks with the highest InLink Rank first. + required: + - target + example: + target: https://www.seranking.com + mode: domain + date_from: "2023-01-15" + date_to: "2023-01-15" responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + new_lost_backlinks: + type: array + items: + type: object + properties: + new_lost_date: + type: string + description: Date when the backlink was found or lost (YYYY-MM-DD). + new_lost_type: + type: string + description: |- + Backlink status: + • `new` – newly found backlinks. + • `lost` – backlinks that were lost. + url_from: + type: string + description: Referring page URL. + url_to: + type: string + description: Destination pag URL. + title: + type: string + description: Referring page title. + anchor: + type: string + description: Link anchor text (or image alt text if the link contains an image). + alt: {} + link_type: + type: string + description: |- + Type of backlink: + • `href` – standard hyperlinks. + • `redirect` – redirect links. + nofollow: + type: boolean + description: Indicates whether the backlink is classified as nofollow. + image: + type: boolean + description: Indicates whether the backlink is an image link. + image_source: + nullable: true + description: Source URL of the image if present. + type: string + redirect_chain: + type: boolean + redirect_chain_urls: + type: array + items: {} + reason_lost: + type: string + nullable: true + inlink_rank: + type: integer + description: Page Authority of the referring page URL. + domain_inlink_rank: + type: integer + description: Domain Authority of the referring page’s root domain. + first_seen: + type: string + description: Date when the backlink was first found (YYYY-MM-DD). + example: + new_lost_backlinks: + - new_lost_date: "2023-01-15" + new_lost_type: new + url_from: https://agenciatgx.com.br/blog/melhores-ferramentas-de-seo-para-otimizar/ + url_to: http://www.seranking.com/ + title: Melhores Ferramentas de SEO Para Otimizar o Desempenho do Seu Site - Agência TGX + anchor: SE Ranking + alt: null + link_type: href + nofollow: false + image: false + image_source: null + redirect_chain: false + redirect_chain_urls: [] + reason_lost: null + inlink_rank: 1 + domain_inlink_rank: 18 + first_seen: "2023-01-15" + - new_lost_date: "2023-01-15" + new_lost_type: lost + url_from: http://technicalproducts.org/category/seoandperformance + url_to: https://www.seranking.com/ + title: SEO & Performance – Technical Products + anchor: SE Ranking + alt: null + link_type: href + nofollow: false + image: false + image_source: null + redirect_chain: false + redirect_chain_urls: [] + reason_lost: link_removed + inlink_rank: 1 + domain_inlink_rank: 1 + first_seen: "2023-01-15" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: POST + source: |- + curl -X POST 'https://api.seranking.com/v1/backlinks/history?output=json' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "target": "https://www.seranking.com", + "mode": "domain", + "date_from": "2023-01-15", + "date_to": "2023-01-15" + }' /v1/backlinks/history/count: get: operationId: getBacklinksHistoryCount tags: - - backlinks - summary: history/count + - Backlinks + summary: Get daily count of new and lost backlinks description: >- - Returns the daily count of new and lost backlinks for a target over a - specified period. + Returns the daily count of newly found or lost backlinks for a specified target with the given date range. This + endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per + request. + + + **Cost:** 10 credits per target + 1 credit per date point returned + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#history-count parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." schema: type: string - example: https://www.seranking.com - name: mode in: query + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. schema: type: string - example: domain + default: host - name: new_lost_type in: query + description: |- + Backlink status filter: + • `new` – counts newly found backlinks. + • `lost` – returns backlinks tagged as lost. + + If empty, both are returned. schema: type: string - example: new + default: “” - name: date_from in: query + description: Start date (`YYYY-MM-DD`), inclusive. schema: type: string - example: '2025-09-14' + default: yesterday - name: date_to in: query + description: End date (`YYYY-MM-DD`), inclusive. schema: type: string - example: '2025-10-28' + default: today - name: link_type in: query + description: |- + Type of backlink: + • `href` – returns standard hyperlinks. + • `redirect` – returns redirect links. + + If empty, all types are counted. schema: type: string - example: href + default: “” - name: anchor_type in: query + description: |- + Anchor type: + • `text` – returns text links. + • `image` – returns image links (if the anchor contains both text and an image, it is classified as image). + • `undefined` – returns undefined links. + + If empty, all types are returned. schema: type: string - example: text + default: “” - name: dofollow in: query + description: |- + Follow status (`dofollow`, `nofollow`, `undefined`). + + If empty, all statuses are counted. schema: type: string - example: dofollow - - name: output + default: “” + - name: url_from in: query + description: |- + Referring domain filter (including subdomains). + Example: `http://seo.jouwlinkhier.nl/path` returns backlinks originating from `seo.jouwlinkhier.nl/*`. + + If empty, backlinks from all domains and subdomains are returned. schema: type: string - enum: - - json - - xml - default: json - example: json - - name: url_from + default: “” + - name: output in: query - description: Filter by referring page URL. + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string + default: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + new_lost_backlinks_count: + type: array + items: + type: object + properties: + date: + type: string + description: Date for which the count is provided (YYYY-MM-DD). + new: + type: integer + description: Number of newly found backlinks on this date matching the request filters. + lost: + type: integer + description: Number of backlinks lost on this date matching the request filters. + example: + new_lost_backlinks_count: + - date: "2023-01-16" + new: 5 + lost: 0 + - date: "2023-01-15" + new: 5 + lost: 0 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: GET + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/history/count?target=https://www.seranking.com&mode=domain&new_lost_type=new&date_from=2019-01-14&date_to=2019-01-16&link_type=href&anchor_type=text&dofollow=dofollow&output=json' + \ + -H 'Authorization: Token YOUR_API_KEY' post: operationId: createBacklinksHistoryCount tags: - - backlinks - summary: history/count + - Backlinks + summary: Get daily count of new and lost backlinks description: >- - Returns the daily count of new and lost backlinks for a target over a - specified period. - requestBody: - content: - application/json: - schema: - type: object - example: - target: https://www.seranking.com - mode: domain - date_from: '2025-09-15' - date_to: '2025-10-15' + Returns the daily count of newly found or lost backlinks for a specified target with the given date range. This + endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per + request. + + + **Cost:** 10 credits per target + 1 credit per date point returned + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#history-count parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - example: json + default: json + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + target: + type: string + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + mode: + type: string + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. + new_lost_type: + type: string + description: |- + Backlink status filter: + • `new` – counts newly found backlinks. + • `lost` – returns backlinks tagged as lost. + + If empty, both are returned. + date_from: + type: string + description: Start date (`YYYY-MM-DD`), inclusive. + date_to: + type: string + description: End date (`YYYY-MM-DD`), inclusive. + link_type: + type: string + description: |- + Type of backlink: + • `href` – returns standard hyperlinks. + • `redirect` – returns redirect links. + + If empty, all types are counted. + anchor_type: + type: string + description: >- + Anchor type: + + • `text` – returns text links. + + • `image` – returns image links (if the anchor contains both text and an image, it is classified as + image). + + • `undefined` – returns undefined links. + + + If empty, all types are returned. + dofollow: + type: string + description: |- + Follow status (`dofollow`, `nofollow`, `undefined`). + + If empty, all statuses are counted. + url_from: + type: string + description: >- + Referring domain filter (including subdomains). + + Example: `http://seo.jouwlinkhier.nl/path` returns backlinks originating from + `seo.jouwlinkhier.nl/*`. + + + If empty, backlinks from all domains and subdomains are returned. + required: + - target + example: + target: https://www.seranking.com + mode: domain + date_from: "2023-01-15" + date_to: "2023-01-15" responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + new_lost_backlinks_count: + type: array + items: + type: object + properties: + date: + type: string + description: Date for which the count is provided (YYYY-MM-DD). + new: + type: integer + description: Number of newly found backlinks on this date matching the request filters. + lost: + type: integer + description: Number of backlinks lost on this date matching the request filters. + example: + new_lost_backlinks_count: + - date: "2023-01-16" + new: 5 + lost: 0 + - date: "2023-01-15" + new: 5 + lost: 0 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: POST + source: |- + curl -X POST 'https://api.seranking.com/v1/backlinks/history/count?output=json' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "target": "https://www.seranking.com", + "mode": "domain", + "date_from": "2023-01-15", + "date_to": "2023-01-15" + }' /v1/backlinks/history/cumulative: get: operationId: getBacklinksHistoryCumulative tags: - - backlinks - summary: history/cumulative + - Backlinks + summary: Get cumulative backlinks over time description: >- - Returns the total number of live backlinks for a target for each day in - a specified date range. + Returns the number of live backlinks for each day within the given date range for a target. This endpoint + supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request. + + + **Cost:** 10 credits per target + 1 credit per date point returned + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#history-cumulative parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: "Target to analyze: only full page URL is supported (e.g., `http://seranking.com/index.html`)." schema: type: string - example: https://www.seranking.com - name: mode in: query + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. schema: type: string - enum: - - domain - - host - - url default: host - example: domain - name: date_from in: query + description: Start date (`YYYY-MM-DD`), inclusive. schema: type: string - example: '2024-01-14' + default: yesterday - name: date_to in: query + description: End date (`YYYY-MM-DD`), inclusive. schema: type: string - example: '2024-08-28' + default: today - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - enum: - - json - - xml default: json - example: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + backlinks_count: + type: array + items: + type: object + properties: + date: + type: string + description: Date for which the count is provided (YYYY-MM-DD). + backlinks: + type: integer + description: Number of live backlinks on that date matching the filters specified in the request. + example: + backlinks_count: + - date: "2023-01-16" + backlinks: 5 + - date: "2023-01-15" + backlinks: 5 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: GET + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/history/cumulative?target=https://www.seranking.com&mode=domain&date_from=2019-01-14&date_to=2019-01-16&output=json' + \ + -H 'Authorization: Token YOUR_API_KEY' post: operationId: createBacklinksHistoryCumulative tags: - - backlinks - summary: history/cumulative + - Backlinks + summary: Get cumulative backlinks over time description: >- - Returns the total number of live backlinks for a target for each day in - a specified date range. - requestBody: - content: - application/json: - schema: - type: object - example: - target: https://www.seranking.com - mode: domain - date_from: '2024-01-14' - date_to: '2024-08-28' - output: json + Returns the number of live backlinks for each day within the given date range for a target. This endpoint + supports GET and POST requests, but doesn’t support batching. Only a single target can be specified per request. + + + **Cost:** 10 credits per target + 1 credit per date point returned + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#history-cumulative parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - example: json + default: json + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + target: + type: string + description: "Target to analyze: only full page URL is supported (e.g., `http://seranking.com/index.html`)." + mode: + type: string + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. + date_from: + type: string + description: Start date (`YYYY-MM-DD`), inclusive. + date_to: + type: string + description: End date (`YYYY-MM-DD`), inclusive. + required: + - target + example: + target: https://www.seranking.com + mode: domain + date_from: "2023-01-15" + date_to: "2023-01-15" responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + backlinks_count: + type: array + items: + type: object + properties: + date: + type: string + description: Date for which the count is provided (YYYY-MM-DD). + backlinks: + type: integer + description: Number of live backlinks on that date matching the filters specified in the request. + example: + backlinks_count: + - date: "2023-01-16" + backlinks: 5 + - date: "2023-01-15" + backlinks: 5 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: POST + source: |- + curl -X POST 'https://api.seranking.com/v1/backlinks/history/cumulative?output=json' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "target": "https://www.seranking.com", + "mode": "domain", + "date_from": "2023-01-15", + "date_to": "2023-01-15" + }' /v1/backlinks/anchors: get: operationId: getBacklinksAnchors tags: - - backlinks - summary: anchors + - Backlinks + summary: Get backlink anchor texts description: >- - Returns information about the anchor texts used in backlinks that point - to a single target. + Returns information about anchor texts of backlinks pointing to a target. This endpoint supports GET and POST + requests, but doesn’t support batching. Only a single target can be specified per request. + + + **Cost:** 1 credit per anchor text + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#anchors parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." schema: type: string - example: https://seranking.com - name: mode in: query + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. schema: type: string - enum: - - domain - - host - - url default: host - example: domain - name: order_by in: query + description: |- + Field by which results are sorted (descending): + • `backlinks` – total number of backlinks using the anchor text. + • `refdomains` – total number of referring domains using the anchor text. schema: type: string - enum: - - backlinks - - refdomains - example: backlinks + default: backlinks - name: limit in: query + description: "Maximum number of results to return. Must be within the range: `[1, 10,000]`." schema: type: integer - example: 2 + default: 100 - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - enum: - - json - - xml default: json - example: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + anchors: + type: array + items: + type: object + properties: + anchor: + type: string + description: Case-sensitive anchor text (may be empty). + backlinks: + type: integer + description: Number of backlinks using this anchor text (> 0). + refdomains: + type: integer + description: Number of referring domains using this anchor text (> 0). + dofollow_backlinks: + type: integer + description: Number of backlinks not classified as nofollow. + nofollow_backlinks: + type: integer + description: Number of backlinks classified as nofollow. + first_seen: + type: string + description: Date of the earliest backlink with this anchor text in the index (YYYY-MM-DD). + last_visited: + type: string + description: Last date the backlink with this anchor text was seen (YYYY-MM-DD). + example: + anchors: + - anchor: SE Ranking + backlinks: 1844 + refdomains: 445 + dofollow_backlinks: 1595 + nofollow_backlinks: 249 + first_seen: "2016-12-07" + last_visited: "2023-10-19" + - anchor: social listening + backlinks: 1542 + refdomains: 7 + dofollow_backlinks: 1542 + nofollow_backlinks: 0 + first_seen: "2020-04-30" + last_visited: "2022-04-01" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: GET + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/anchors?target=https://seranking.com&mode=domain&limit=2&order_by=backlinks&output=json' + \ + -H 'Authorization: Token YOUR_API_KEY' post: operationId: createBacklinksAnchors tags: - - backlinks - summary: anchors + - Backlinks + summary: Get backlink anchor texts description: >- - Returns information about the anchor texts used in backlinks that point - to a single target. - requestBody: - content: - application/json: - schema: - type: object - example: - target: https://www.seranking.com/ - order_by: backlinks - mode: domain - limit: 2 + Returns information about anchor texts of backlinks pointing to a target. This endpoint supports GET and POST + requests, but doesn’t support batching. Only a single target can be specified per request. + + + **Cost:** 1 credit per anchor text + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#anchors parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - example: json + default: json + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + target: + type: string + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + mode: + type: string + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. + order_by: + type: string + description: |- + Field by which results are sorted (descending): + • `backlinks` – total number of backlinks using the anchor text. + • `refdomains` – total number of referring domains using the anchor text. + limit: + type: integer + description: "Maximum number of results to return. Must be within the range: `[1, 10,000]`." + required: + - target + example: + target: https://www.seranking.com/ + order_by: backlinks + mode: domain + limit: 2 responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + anchors: + type: array + items: + type: object + properties: + anchor: + type: string + description: Case-sensitive anchor text (may be empty). + backlinks: + type: integer + description: Number of backlinks using this anchor text (> 0). + refdomains: + type: integer + description: Number of referring domains using this anchor text (> 0). + dofollow_backlinks: + type: integer + description: Number of backlinks not classified as nofollow. + nofollow_backlinks: + type: integer + description: Number of backlinks classified as nofollow. + first_seen: + type: string + description: Date of the earliest backlink with this anchor text in the index (YYYY-MM-DD). + last_visited: + type: string + description: Last date the backlink with this anchor text was seen (YYYY-MM-DD). + example: + anchors: + - anchor: SE Ranking + backlinks: 1844 + refdomains: 445 + dofollow_backlinks: 1595 + nofollow_backlinks: 249 + first_seen: "2016-12-07" + last_visited: "2023-10-19" + - anchor: social listening + backlinks: 1542 + refdomains: 7 + dofollow_backlinks: 1542 + nofollow_backlinks: 0 + first_seen: "2020-04-30" + last_visited: "2022-04-01" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: POST + source: |- + curl -X POST 'https://api.seranking.com/v1/backlinks/anchors?output=json' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "target": "https://www.seranking.com/", + "order_by": "backlinks", + "mode": "domain", + "limit": 2 + }' /v1/backlinks/refdomains: get: operationId: getBacklinksRefdomains tags: - - backlinks - summary: refdomains + - Backlinks + summary: List referring domains description: >- - Retrieves a list of referring domains pointing to a single target, with - sorting options. + Returns information about referring domains pointing to a target. This endpoint supports GET and POST requests, + but doesn’t support batching. Only a single target can be specified per request. + + + **Cost:** 1 credit per refdomain + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#refdomains parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." schema: type: string - example: https://seranking.com - name: mode in: query + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. schema: type: string - enum: - - domain - - host - - url default: host - example: domain - name: order_by in: query + description: |- + Field by which results are sorted: + • `new_lost_date` – returns most recent referring domains first. + • `domain_inlink_rank` – returns referring domains with the highest Domain InLink Rank first. + • `inlink_rank` – returns referring domains with the highest InLink Rank first. schema: type: string - enum: - - date_found - - domain_inlink_rank - - inlink_rank default: date_found - example: date_found - name: limit in: query + description: "Maximum number of results to return. Must be within the range: `[1, 10,000]`." schema: type: integer - example: 10 + default: 100 - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - enum: - - json - - xml default: json - example: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + refdomains: + type: array + items: + type: object + properties: + refdomain: + type: string + description: Name of the referring domain. + backlinks: + type: integer + description: Number of live backlinks linking to the target from this referring domain. + dofollow_backlinks: + type: integer + description: Number of backlinks classified as dofollow. + first_seen: + type: string + description: Date the oldest live backlink from this referring domain was found (YYYY-MM-DD). + domain_inlink_rank: + type: integer + description: Domain Authority of the referring domain. + example: + refdomains: + - refdomain: daveyandkrista.com + backlinks: 1 + dofollow_backlinks: 1 + first_seen: "2022-06-30" + domain_inlink_rank: 73 + - refdomain: isearch.avg.com + backlinks: 72 + dofollow_backlinks: 72 + first_seen: "2019-02-22" + domain_inlink_rank: 90 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: GET + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/refdomains?target=seranking.com&mode=domain&limit=2&order_by=inlink_rank&output=json' + \ + -H 'Authorization: Token YOUR_API_KEY' post: operationId: createBacklinksRefdomains tags: - - backlinks - summary: refdomains + - Backlinks + summary: List referring domains description: >- - Retrieves a list of referring domains pointing to a single target, with - sorting options. - requestBody: - content: - application/json: - schema: - type: object - example: - target: https://www.seranking.com/ - order_by: date_found - mode: domain - limit: 2 + Returns information about referring domains pointing to a target. This endpoint supports GET and POST requests, + but doesn’t support batching. Only a single target can be specified per request. + + + **Cost:** 1 credit per refdomain + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#refdomains parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - example: json + default: json + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + target: + type: string + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + mode: + type: string + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. + order_by: + type: string + description: |- + Field by which results are sorted: + • `new_lost_date` – returns most recent referring domains first. + • `domain_inlink_rank` – returns referring domains with the highest Domain InLink Rank first. + • `inlink_rank` – returns referring domains with the highest InLink Rank first. + limit: + type: integer + description: "Maximum number of results to return. Must be within the range: `[1, 10,000]`." + required: + - target + example: + target: seranking.com + mode: domain + limit: 2 responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + refdomains: + type: array + items: + type: object + properties: + refdomain: + type: string + description: Name of the referring domain. + backlinks: + type: integer + description: Number of live backlinks linking to the target from this referring domain. + dofollow_backlinks: + type: integer + description: Number of backlinks classified as dofollow. + first_seen: + type: string + description: Date the oldest live backlink from this referring domain was found (YYYY-MM-DD). + domain_inlink_rank: + type: integer + description: Domain Authority of the referring domain. + example: + refdomains: + - refdomain: daveyandkrista.com + backlinks: 1 + dofollow_backlinks: 1 + first_seen: "2022-06-30" + domain_inlink_rank: 73 + - refdomain: isearch.avg.com + backlinks: 72 + dofollow_backlinks: 72 + first_seen: "2019-02-22" + domain_inlink_rank: 90 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: POST + source: |- + curl -X POST 'https://api.seranking.com/v1/backlinks/refdomains?output=json' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "target":"seranking.com", + "mode":"domain", + "limit":2 + }' /v1/backlinks/refdomains/count: get: operationId: getBacklinksRefdomainsCount tags: - - backlinks - summary: refdomains/count + - Backlinks + summary: Get total referring domains count description: >- - Returns the total number of unique referring domains for one or more - targets. + Returns the number of unique domains linking to a target. This endpoint supports GET and POST requests and + allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in + the POST body (JSON format). + + + **Cost:** 2 credits per target + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#refdomains-count parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." schema: type: string - description: Supports multiple targets by repeating this parameter. - example: https://seranking.com - name: mode in: query + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. schema: type: string - example: domain + default: host - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - example: json + default: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + metrics: + type: array + items: + type: object + properties: + target: + type: string + description: "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + refdomains: + type: integer + description: Number of unique domains linking to the target. + example: + metrics: + - target: seranking.com + refdomains: 50234 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: GET (multiple targets) + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/refdomains/count?target=https://www.seranking.com&target=https://www.seranking.com&mode=url&output=json' + \ + -H 'Authorization: Token YOUR_API_KEY' post: operationId: createBacklinksRefdomainsCount tags: - - backlinks - summary: refdomains/count + - Backlinks + summary: Get total referring domains count description: >- - Returns the total number of unique referring domains for one or more - targets. + Returns the number of unique domains linking to a target. This endpoint supports GET and POST requests and + allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in + the POST body (JSON format). + + + **Cost:** 2 credits per target + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#refdomains-count + parameters: + - name: output + in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. + schema: + type: string + default: json requestBody: + required: true content: application/json: schema: type: object - example: + properties: target: - - https://www.seranking.com/ - - https://www.anandaioga.com/ - order_by: date_found - mode: domain - limit: 2 - parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - - name: output - in: query - schema: - type: string - example: json + type: array + items: + type: string + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + mode: + type: string + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. + required: + - target + example: + target: + - https://www.seranking.com/ + mode: domain responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + metrics: + type: array + items: + type: object + properties: + target: + type: string + description: "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + refdomains: + type: integer + description: Number of unique domains linking to the target. + example: + metrics: + - target: seranking.com + refdomains: 50234 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: POST (single target) + source: |- + curl -X POST 'https://api.seranking.com/v1/backlinks/refdomains/count?output=json' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "target": [ + "https://www.seranking.com/" + ], + "mode": "domain" + }' /v1/backlinks/refdomains/history: get: operationId: getBacklinksRefdomainsHistory tags: - - backlinks - summary: refdomains/history + - Backlinks + summary: List new and lost referring domains description: >- - Retrieves a list of new and lost referring domains for a target within a - specified date range. + Returns referring domains for which at least one backlink was newly found or lost in the given date range for a + target. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be + specified per request. + + + **Cost:** 1 credit per refdomain + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#refdomains-history parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." schema: type: string - example: https://seranking.com - name: mode in: query + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. schema: type: string - example: domain + default: host - name: new_lost_type in: query + description: |- + Refdomain status filter: + • `new` – returns referring domains from which at least one backlink was newly found. + • `lost` – returns referring domains from which at least one backlink was lost. + + If empty, both are returned. schema: type: string - example: new + default: “” - name: date_from in: query + description: Start date (`YYYY-MM-DD`), inclusive. schema: type: string - example: '2025-03-01' + default: yesterday - name: date_to in: query + description: End date (`YYYY-MM-DD`), inclusive. schema: type: string - example: '2025-06-01' + default: today - name: order_by in: query + description: >- + Field by which results are sorted: + + • `new_lost_date` – returns new or lost referring domains ordered by the date they were found or lost (most + recent first). + + • `domain_inlink_rank` – returns referring domains with the highest Domain InLink Rank first. + + • `inlink_rank` – returns referring domains with the highest InLink Rank first. schema: type: string - example: new_lost_date + default: new_lost_date - name: limit in: query + description: "Maximum number of results to return. Must be within the range: `[1, 10,000]`." schema: type: integer - example: 10 + default: 100 - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - example: json + default: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + new_lost_refdomains: + type: array + items: + type: object + properties: + new_lost_date: + type: string + description: >- + Date when the oldest live backlink from this referring domain was found, or the last + backlink from this referring domain was lost (YYYY-MM-DD). + new_lost_type: + type: string + description: |- + Refdomain status: + • `new` – referring domains with at least one backlink newly found. + • `lost` – referring domains with at least one backlink lost. + refdomain: + type: string + description: Name of the referring domain. + backlinks: + type: integer + description: Number of backlinks linking to the target from this refdomain. + dofollow_backlinks: + type: integer + description: Number of backlinks from this referring domain classified as dofollow. + first_seen: + type: string + description: Date the oldest live backlink from this refdomain was found (YYYY-MM-DD). + domain_inlink_rank: + type: integer + description: Domain Authority of the referring domain. + example: + new_lost_refdomains: + - new_lost_date: "2023-01-16" + new_lost_type: new + refdomain: agenzia-seo.it + backlinks: 1 + dofollow_backlinks: 1 + first_seen: "2023-01-16" + domain_inlink_rank: 32 + - new_lost_date: "2023-01-15" + new_lost_type: lost + refdomain: doso.com.au + backlinks: 1 + dofollow_backlinks: 1 + first_seen: "2023-01-15" + domain_inlink_rank: 25 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: GET + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/refdomains/history?target=https://www.seranking.com&mode=domain&new_lost_type=new&date_from=2023-01-15&date_to=2023-01-16&output=json' + \ + -H 'Authorization: Token YOUR_API_KEY' post: operationId: createBacklinksRefdomainsHistory tags: - - backlinks - summary: refdomains/history + - Backlinks + summary: List new and lost referring domains description: >- - Retrieves a list of new and lost referring domains for a target within a - specified date range. + Returns referring domains for which at least one backlink was newly found or lost in the given date range for a + target. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target can be + specified per request. + + + **Cost:** 1 credit per refdomain + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#refdomains-history + parameters: + - name: output + in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. + schema: + type: string + default: json requestBody: + required: true content: application/json: schema: type: object + properties: + target: + type: string + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + mode: + type: string + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. + new_lost_type: + type: string + description: |- + Refdomain status filter: + • `new` – returns referring domains from which at least one backlink was newly found. + • `lost` – returns referring domains from which at least one backlink was lost. + + If empty, both are returned. + date_from: + type: string + description: Start date (`YYYY-MM-DD`), inclusive. + date_to: + type: string + description: End date (`YYYY-MM-DD`), inclusive. + order_by: + type: string + description: >- + Field by which results are sorted: + + • `new_lost_date` – returns new or lost referring domains ordered by the date they were found or + lost (most recent first). + + • `domain_inlink_rank` – returns referring domains with the highest Domain InLink Rank first. + + • `inlink_rank` – returns referring domains with the highest InLink Rank first. + limit: + type: integer + description: "Maximum number of results to return. Must be within the range: `[1, 10,000]`." + required: + - target + example: + target: https://www.seranking.com + mode: domain + new_lost_type: new + date_from: "2023-01-15" + date_to: "2023-01-16" + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + new_lost_refdomains: + type: array + items: + type: object + properties: + new_lost_date: + type: string + description: >- + Date when the oldest live backlink from this referring domain was found, or the last + backlink from this referring domain was lost (YYYY-MM-DD). + new_lost_type: + type: string + description: |- + Refdomain status: + • `new` – referring domains with at least one backlink newly found. + • `lost` – referring domains with at least one backlink lost. + refdomain: + type: string + description: Name of the referring domain. + backlinks: + type: integer + description: Number of backlinks linking to the target from this refdomain. + dofollow_backlinks: + type: integer + description: Number of backlinks from this referring domain classified as dofollow. + first_seen: + type: string + description: Date the oldest live backlink from this refdomain was found (YYYY-MM-DD). + domain_inlink_rank: + type: integer + description: Domain Authority of the referring domain. example: - target: https://www.seranking.com - mode: domain - new_lost_type: new - date_from: '2025-01-15' - date_to: '2025-04-16' - parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - - name: output - in: query - schema: - type: string - example: json - responses: - '200': - description: Successful response - content: - application/json: {} + new_lost_refdomains: + - new_lost_date: "2023-01-16" + new_lost_type: new + refdomain: agenzia-seo.it + backlinks: 1 + dofollow_backlinks: 1 + first_seen: "2023-01-16" + domain_inlink_rank: 32 + - new_lost_date: "2023-01-15" + new_lost_type: lost + refdomain: doso.com.au + backlinks: 1 + dofollow_backlinks: 1 + first_seen: "2023-01-15" + domain_inlink_rank: 25 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: POST + source: |- + curl -X POST 'https://api.seranking.com/v1/backlinks/refdomains/history?output=json' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "target": "https://www.seranking.com", + "mode": "domain", + "new_lost_type": "new", + "date_from": "2023-01-15", + "date_to": "2023-01-16" + }' /v1/backlinks/refdomains/history/count: get: operationId: getBacklinksRefdomainsHistoryCount tags: - - backlinks - summary: refdomains/history/count + - Backlinks + summary: Get daily count of new and lost referring domains description: >- - Returns the daily count of new and lost referring domains for a target - over a specified period. + Returns the number of referring domains with at least one backlink newly found or lost in the given date range + for a target. The data is broken down by day. This endpoint supports GET and POST requests, but doesn’t support + batching. Only a single target can be specified per request. + + + **Cost:** 10 credits per target + 1 credit per date point returned + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#refdomains-history-count parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." schema: type: string - example: https://seranking.com - name: mode in: query + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. schema: type: string - example: domain + default: host - name: new_lost_type in: query + description: |- + Refdomain status filter: + • `new` – returns referring domains from which at least one backlink was newly found. + • `lost` – returns referring domains from which at least one backlink was lost. + + If empty, both are returned. schema: type: string - example: new + default: “” - name: date_from in: query + description: Start date (`YYYY-MM-DD`), inclusive. schema: type: string - example: '2025-03-01' + default: yesterday - name: date_to in: query + description: End date (`YYYY-MM-DD`), inclusive. schema: type: string - example: '2025-06-01' + default: today - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - example: json + default: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + new_lost_refdomains_count: + type: array + items: + type: object + properties: + date: + type: string + description: Date for which new or lost referring domains were counted (`YYYY-MM-DD`). + new: + type: integer + description: Number of new referring domains on this date matching the request filters. + lost: + type: integer + description: Number of lost referring domains on this date matching the request filters. + example: + new_lost_refdomains_count: + - date: "2023-01-16" + new: 4 + lost: 0 + - date: "2023-01-15" + new: 3 + lost: 0 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: GET + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/refdomains/history/count?target=https://www.seranking.com&mode=domain&new_lost_type=new&date_from=2023-01-15&date_to=2023-01-16&output=json' + \ + -H 'Authorization: Token YOUR_API_KEY' post: operationId: createBacklinksRefdomainsHistoryCount tags: - - backlinks - summary: refdomains/history/count + - Backlinks + summary: Get daily count of new and lost referring domains description: >- - Returns the daily count of new and lost referring domains for a target - over a specified period. - requestBody: - content: - application/json: - schema: - type: object - example: - target: https://www.seranking.com - mode: domain - new_lost_type: new - date_from: '2025-01-15' - date_to: '2025-04-16' + Returns the number of referring domains with at least one backlink newly found or lost in the given date range + for a target. The data is broken down by day. This endpoint supports GET and POST requests, but doesn’t support + batching. Only a single target can be specified per request. + + + **Cost:** 10 credits per target + 1 credit per date point returned + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#refdomains-history-count parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - example: json + default: json + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + target: + type: string + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + mode: + type: string + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. + new_lost_type: + type: string + description: |- + Refdomain status filter: + • `new` – returns referring domains from which at least one backlink was newly found. + • `lost` – returns referring domains from which at least one backlink was lost. + + If empty, both are returned. + date_from: + type: string + description: Start date (`YYYY-MM-DD`), inclusive. + date_to: + type: string + description: End date (`YYYY-MM-DD`), inclusive. + required: + - target + example: + target: https://www.seranking.com + mode: domain + new_lost_type: new + date_from: "2023-01-15" + date_to: "2023-01-16" responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + new_lost_refdomains_count: + type: array + items: + type: object + properties: + date: + type: string + description: Date for which new or lost referring domains were counted (`YYYY-MM-DD`). + new: + type: integer + description: Number of new referring domains on this date matching the request filters. + lost: + type: integer + description: Number of lost referring domains on this date matching the request filters. + example: + new_lost_refdomains_count: + - date: "2023-01-16" + new: 4 + lost: 0 + - date: "2023-01-15" + new: 3 + lost: 0 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: POST + source: |- + curl -X POST 'https://api.seranking.com/v1/backlinks/refdomains/history/count?output=json' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "target": "https://www.seranking.com", + "mode": "domain", + "new_lost_type": "new", + "date_from": "2023-01-15", + "date_to": "2023-01-16" + }' /v1/backlinks/referring-ips: get: operationId: getBacklinksReferringIps tags: - - backlinks - summary: referring-ips + - Backlinks + summary: List referring IPs description: >- - Returns information about the IPv4 addresses that host backlinks - pointing to a single target. + Returns information about IPv4 addresses from which backlinks linking to a target originate. IPv6 addresses are + not supported. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target + can be specified per request. + + + **Cost:** 1 credit per referring IP + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#referring-ips parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." schema: type: string - example: https://seranking.com - name: mode in: query + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. schema: type: string - example: domain + default: host - name: order_by in: query + description: |- + Field by which results are sorted (descending): + • `backlinks` – returns IPs with the highest number of backlinks first. + • `refdomains` – returns IPs with the highest number of referring domains first. schema: type: string - example: backlinks + default: backlinks - name: limit in: query + description: "Maximum number of results to return. Must be within the range: `[1, 10,000]`." schema: type: integer - example: 10 + default: 100 - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - enum: - - json - - xml default: json - example: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + ips: + type: array + items: + type: object + properties: + ip: + type: string + description: IPv4 address that serves at least one page linking to the target. + backlinks: + type: integer + description: Number of live backlinks linking to the target from this IP (> 0). + refdomains: + type: integer + description: Number of referring domains linking to the target from this IP (> 0). + first_seen: + type: string + description: Date the earliest backlink from this IP was found (YYYY-MM-DD). + last_visited: + type: string + description: Date the most recent backlink from this IP was last seen (YYYY-MM-DD). + example: + ips: + - ip: 123.234.23.43 + backlinks: 188 + refdomains: 144 + first_seen: "2020-10-19" + last_visited: "2022-03-15" + - ip: 32.114.53.3 + backlinks: 68 + refdomains: 60 + first_seen: "2019-04-24" + last_visited: "2022-02-21" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: GET + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/referring-ips?target=https://seranking.com&mode=domain&limit=100&order_by=backlinks&output=json' + \ + -H 'Authorization: Token YOUR_API_KEY' post: operationId: createBacklinksReferringIps tags: - - backlinks - summary: referring-ips + - Backlinks + summary: List referring IPs description: >- - Returns information about the IPv4 addresses that host backlinks - pointing to a single target. - requestBody: - content: - application/json: - schema: - type: object - example: - target: https://www.seranking.com/ - order_by: refdomains - mode: domain - limit: 2 + Returns information about IPv4 addresses from which backlinks linking to a target originate. IPv6 addresses are + not supported. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single target + can be specified per request. + + + **Cost:** 1 credit per referring IP + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#referring-ips parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - example: json + default: json + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + target: + type: string + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + mode: + type: string + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. + order_by: + type: string + description: |- + Field by which results are sorted (descending): + • `backlinks` – returns IPs with the highest number of backlinks first. + • `refdomains` – returns IPs with the highest number of referring domains first. + limit: + type: integer + description: "Maximum number of results to return. Must be within the range: `[1, 10,000]`." + required: + - target + example: + target: https://www.seranking.com/ + order_by: backlinks + mode: domain + limit: 2 responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + ips: + type: array + items: + type: object + properties: + ip: + type: string + description: IPv4 address that serves at least one page linking to the target. + backlinks: + type: integer + description: Number of live backlinks linking to the target from this IP (> 0). + refdomains: + type: integer + description: Number of referring domains linking to the target from this IP (> 0). + first_seen: + type: string + description: Date the earliest backlink from this IP was found (YYYY-MM-DD). + last_visited: + type: string + description: Date the most recent backlink from this IP was last seen (YYYY-MM-DD). + example: + ips: + - ip: 123.234.23.43 + backlinks: 188 + refdomains: 144 + first_seen: "2020-10-19" + last_visited: "2022-03-15" + - ip: 32.114.53.3 + backlinks: 68 + refdomains: 60 + first_seen: "2019-04-24" + last_visited: "2022-02-21" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: POST + source: |- + curl -X POST 'https://api.seranking.com/v1/backlinks/referring-ips?output=json' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "target": "https://www.seranking.com/", + "order_by": "backlinks", + "mode": "domain", + "limit": 2 + }' /v1/backlinks/referring-ips/count: get: operationId: getBacklinksReferringIpsCount tags: - - backlinks - summary: referring-ips/count + - Backlinks + summary: Get total referring IPs count description: >- - Returns the total number of unique referring IPs for one or more - targets. + Returns the number of unique IPs linking to a target. This endpoint supports GET and POST requests and allows + batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the + POST body (JSON format). + + + **Cost:** 2 credits per target + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#referring-ips-count parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." schema: type: string - description: Supports multiple targets by repeating this parameter. - example: https://seranking.com - name: mode in: query + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. schema: type: string - example: domain + default: host - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - example: json + default: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + metrics: + type: array + items: + type: object + properties: + target: + type: string + description: "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + ips: + type: integer + description: Number of unique IP addresses linking to the target. + example: + metrics: + - target: https://seranking.com + ips: 75 + - target: https://www.us-seranking.com + ips: 2493 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: GET (multiple targets) + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/referring-ips/count?target=https://seranking.com&target=https://www.us-seranking.com&mode=url&output=json' + \ + -H 'Authorization: Token YOUR_API_KEY' post: operationId: createBacklinksReferringIpsCount tags: - - backlinks - summary: referring-ips/count + - Backlinks + summary: Get total referring IPs count description: >- - Returns the total number of unique referring IPs for one or more - targets. + Returns the number of unique IPs linking to a target. This endpoint supports GET and POST requests and allows + batching of up to 100 targets per request. Pass multiple targets as GET parameters separated by `&` or in the + POST body (JSON format). + + + **Cost:** 2 credits per target + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#referring-ips-count + parameters: + - name: output + in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. + schema: + type: string + default: json requestBody: + required: true content: application/json: schema: type: object - example: + properties: target: - - https://www.seranking.com/ - - https://www.us-seranking.com/ - mode: host - parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - - name: output - in: query - schema: - type: string - example: json + type: array + items: + type: string + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + mode: + type: string + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. + required: + - target + example: + target: + - https://www.seranking.com/ + - https://www.us-seranking.com/ + mode: host responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + metrics: + type: array + items: + type: object + properties: + target: + type: string + description: "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + ips: + type: integer + description: Number of unique IP addresses linking to the target. + example: + metrics: + - target: https://seranking.com + ips: 75 + - target: https://www.us-seranking.com + ips: 2493 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: POST (multiple targets) + source: |- + curl -X POST 'https://api.seranking.com/v1/backlinks/referring-ips/count?output=json' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "target": [ + "https://www.seranking.com/", + "https://www.us-seranking.com/" + ], + "mode": "host" + }' /v1/backlinks/referring-subnets/count: get: operationId: getBacklinksReferringSubnetsCount tags: - - backlinks - summary: referring-subnets/count + - Backlinks + summary: Get total referring subnets count description: >- - Returns the total number of unique referring subnets (C-blocks) for one - or more targets. + Returns the number of unique subnets (C-blocks) linking to a target. This endpoint supports GET and POST + requests and allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated + by `&` or in the POST body (JSON format). + + + **Cost:** 2 credits per target + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#referring-subnets-count parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." schema: type: string - description: Supports multiple targets by repeating this parameter. - example: https://seranking.com - name: mode in: query + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. schema: type: string - example: domain + default: host - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - example: json + default: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + metrics: + type: array + items: + type: object + properties: + target: + type: string + description: "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + subnets: + type: integer + description: Number of unique subnets (C-blocks) linking to the target (e.g., `50`). + example: + metrics: + - target: seranking.com + subnets: 1399 + - target: us-seranking.com + subnets: 7690 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: GET (multiple targets) + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/referring-subnets/count?target=seranking.com&target=us-seranking.com&mode=host&output=json' + \ + -H 'Authorization: Token YOUR_API_KEY' post: operationId: createBacklinksReferringSubnetsCount tags: - - backlinks - summary: referring-subnets/count + - Backlinks + summary: Get total referring subnets count description: >- - Returns the total number of unique referring subnets (C-blocks) for one - or more targets. + Returns the number of unique subnets (C-blocks) linking to a target. This endpoint supports GET and POST + requests and allows batching of up to 100 targets per request. Pass multiple targets as GET parameters separated + by `&` or in the POST body (JSON format). + + + **Cost:** 2 credits per target + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#referring-subnets-count + parameters: + - name: output + in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. + schema: + type: string + default: json requestBody: + required: true content: application/json: schema: type: object - example: + properties: target: - - https://www.seranking.com/ - - https://www.us-seranking.com/ - mode: host - parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - - name: output - in: query - schema: - type: string - example: json + type: array + items: + type: string + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + mode: + type: string + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. + required: + - target + example: + target: + - https://www.seranking.com/ + - https://www.us-seranking.com/ + mode: host responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + metrics: + type: array + items: + type: object + properties: + target: + type: string + description: "Target analyzed: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + subnets: + type: integer + description: Number of unique subnets (C-blocks) linking to the target (e.g., `50`). + example: + metrics: + - target: seranking.com + subnets: 1399 + - target: us-seranking.com + subnets: 7690 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: GET (multiple targets) + source: |- + curl -X POST 'https://api.seranking.com/v1/backlinks/referring-subnets/count?output=json' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "target": [ + "https://www.seranking.com/", + "https://www.us-seranking.com/" + ], + "mode": "host" + }' /v1/backlinks/indexed-pages: get: operationId: getBacklinksIndexedPages tags: - - backlinks - summary: indexed-pages + - Backlinks + summary: List indexed pages with backlinks description: >- - Retrieves a list of pages on a target site that have received at least - one backlink. + Returns information about pages that belong to a target under the following conditions: + + + - A page is included if it has at least one live backlink. + + + - Pages that no longer have backlinks are excluded. + + + The returned list contains no duplicate pages, with protocol differences taken into account when determining + page uniqueness. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single + target can be specified per request. + + + **Cost:** 1 credit per site page + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#indexed-pages parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." schema: type: string - example: https://seranking.com - name: mode in: query + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. schema: type: string - enum: - - domain - - host - - url default: host - example: domain - - name: output + - name: order_by in: query + description: |- + Field by which results are sorted (descending): + • `backlinks` – returns pages with the highest number of backlinks first. + • `refdomains` – returns pages with the highest number of referring domains first. schema: type: string - enum: - - json - - xml - default: json - example: json + default: backlinks - name: limit in: query + description: "Maximum number of results to return. Must be within the range: `[1, 10,000]`." schema: type: integer - example: 10 - - name: order_by + default: 100 + - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - example: backlinks + default: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + pages: + type: array + items: + type: object + properties: + url: + type: string + description: URL of a page that belongs to the target specified in the request. + backlinks: + type: integer + description: Number of live backlinks linking to the URL (> 0). + refdomains: + type: integer + description: Number of referring domains linking to the URL (> 0). + dofollow_backlinks: + type: integer + description: Number of backlinks classified as dofollow. + nofollow_backlinks: + type: integer + description: Number of backlinks classified as nofollow. + first_seen: + type: string + description: Date the earliest backlink pointing to the URL was found (YYYY-MM-DD). + last_visited: + type: string + description: Date the most recent backlink pointing to the URL was last seen (YYYY-MM-DD). + example: + pages: + - url: https://www.seranking.com/ + backlinks: 16696 + refdomains: 1227 + dofollow_backlinks: 14708 + nofollow_backlinks: 1978 + first_seen: "2017-01-03" + last_visited: "2023-10-23" + - url: http://seranking.com/ + backlinks: 1926 + refdomains: 220 + dofollow_backlinks: 1254 + nofollow_backlinks: 671 + first_seen: "2017-09-15" + last_visited: "2023-10-21" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: GET + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/indexed-pages?target=https://seranking.com&mode=domain&limit=100&order_by=backlinks&output=json' + \ + -H 'Authorization: Token YOUR_API_KEY' post: operationId: createBacklinksIndexedPages tags: - - backlinks - summary: indexed-pages + - Backlinks + summary: List indexed pages with backlinks description: >- - Retrieves a list of pages on a target site that have received at least - one backlink. - requestBody: - content: - application/json: - schema: - type: object - example: - target: https://www.seranking.com/ - order_by: backlinks - mode: domain - limit: 2 + Returns information about pages that belong to a target under the following conditions: + + + - A page is included if it has at least one live backlink. + + + - Pages that no longer have backlinks are excluded. + + + The returned list contains no duplicate pages, with protocol differences taken into account when determining + page uniqueness. This endpoint supports GET and POST requests, but doesn’t support batching. Only a single + target can be specified per request. + + + **Cost:** 1 credit per site page + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#indexed-pages parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - example: json + default: json + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + target: + type: string + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + mode: + type: string + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. + order_by: + type: string + description: |- + Field by which results are sorted (descending): + • `backlinks` – returns pages with the highest number of backlinks first. + • `refdomains` – returns pages with the highest number of referring domains first. + limit: + type: integer + description: "Maximum number of results to return. Must be within the range: `[1, 10,000]`." + required: + - target + example: + target: https://www.seranking.com/ + order_by: backlinks + mode: domain + limit: 2 responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + pages: + type: array + items: + type: object + properties: + url: + type: string + description: URL of a page that belongs to the target specified in the request. + backlinks: + type: integer + description: Number of live backlinks linking to the URL (> 0). + refdomains: + type: integer + description: Number of referring domains linking to the URL (> 0). + dofollow_backlinks: + type: integer + description: Number of backlinks classified as dofollow. + nofollow_backlinks: + type: integer + description: Number of backlinks classified as nofollow. + first_seen: + type: string + description: Date the earliest backlink pointing to the URL was found (YYYY-MM-DD). + last_visited: + type: string + description: Date the most recent backlink pointing to the URL was last seen (YYYY-MM-DD). + example: + pages: + - url: https://www.seranking.com/ + backlinks: 16696 + refdomains: 1227 + dofollow_backlinks: 14708 + nofollow_backlinks: 1978 + first_seen: "2017-01-03" + last_visited: "2023-10-23" + - url: http://seranking.com/ + backlinks: 1926 + refdomains: 220 + dofollow_backlinks: 1254 + nofollow_backlinks: 671 + first_seen: "2017-09-15" + last_visited: "2023-10-21" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: POST + source: |- + curl -X POST 'https://api.seranking.com/v1/backlinks/indexed-pages?output=json' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "target": "https://www.seranking.com/", + "order_by": "backlinks", + "mode": "domain", + "limit": 2 + }' /v1/backlinks/authority: get: operationId: getBacklinksAuthority tags: - - backlinks - summary: authority + - Backlinks + summary: Get page and domain authority description: >- - Returns the Page Authority (InLink Rank) and Domain Authority (Domain - InLink Rank) for one or more targets. + Returns the InLink Rank (Page Authority) and Domain InLink Rank (Domain Authority) for a target. This endpoint + supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as + GET parameters separated by `&` or in the POST body (JSON format). + + + **Note:** The `inlink_rank` value in the response is calculated in real time, so it may differ from the cached + value returned by [List all backlinks](https://seranking.com/api/data/backlinks#all). + + + **Cost:** 10 credits per target + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#authority parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: "Target to analyze: root domain, subdomain, or specific URL (e.g., `seranking.com`)." schema: type: string - example: https://seranking.com - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - example: json + default: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + pages: + type: array + items: + type: object + properties: + url: + type: string + description: URL of the analyzed page. + inlink_rank: + type: integer + description: Page Authority of the target URL. + domain_inlink_rank: + type: integer + description: Domain Authority of the target’s root domain. + example: + pages: + - url: https://www.seranking.com + inlink_rank: 40 + domain_inlink_rank: 68 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: GET (single target) + source: >- + curl -X GET 'https://api.seranking.com/v1/backlinks/authority?target=https://www.seranking.com&output=json' + \ + -H 'Authorization: Token YOUR_API_KEY' post: operationId: createBacklinksAuthority tags: - - backlinks - summary: authority + - Backlinks + summary: Get page and domain authority description: >- - Returns the Page Authority (InLink Rank) and Domain Authority (Domain - InLink Rank) for one or more targets. + Returns the InLink Rank (Page Authority) and Domain InLink Rank (Domain Authority) for a target. This endpoint + supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple targets as + GET parameters separated by `&` or in the POST body (JSON format). + + + **Note:** The `inlink_rank` value in the response is calculated in real time, so it may differ from the cached + value returned by [List all backlinks](https://seranking.com/api/data/backlinks#all). + + + **Cost:** 10 credits per target + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#authority + parameters: + - name: output + in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. + schema: + type: string + default: json requestBody: + required: true content: application/json: schema: type: object - example: + properties: target: - - https://www.seranking.com/ - - https://www.seranking.com/rank-tracker/ - parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - - name: output - in: query - schema: - type: string - example: json + type: array + items: + type: string + description: "Target to analyze: root domain, subdomain, or specific URL (e.g., `seranking.com`)." + required: + - target + example: + target: + - https://www.seranking.com/ + - https://www.seranking.com/rank-tracker/ responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + pages: + type: array + items: + type: object + properties: + url: + type: string + description: URL of the analyzed page. + inlink_rank: + type: integer + description: Page Authority of the target URL. + domain_inlink_rank: + type: integer + description: Domain Authority of the target’s root domain. + example: + pages: + - url: https://www.seranking.com + inlink_rank: 40 + domain_inlink_rank: 68 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: POST (multiple targets) + source: |- + curl -X POST 'https://api.seranking.com/v1/backlinks/authority?output=json' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "target": + [ + "https://www.seranking.com/", + "https://www.seranking.com/rank-tracker/" + ] + }' /v1/backlinks/authority/domain: get: operationId: getBacklinksAuthorityDomain tags: - - backlinks - summary: authority/domain + - Backlinks + summary: Get domain authority description: >- - Returns the Domain Authority (Domain InLink Rank) for one or more - targets. + Returns the [Domain InLink Rank](https://seranking.com/api/data/reference/#domain-inlink-rank) value of the + target page’s root domain. This endpoint supports GET and POST requests and allows batching of up to 100 targets + per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format). + + + **Cost:** 5 credits per target + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#authority-domain parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." schema: type: string - example: https://seranking.com - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - example: json + default: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + pages: + type: array + items: + type: object + properties: + url: + type: string + description: URL of the analyzed page. + domain_inlink_rank: + type: integer + description: Domain Authority of the target’s root domain. + example: + pages: + - url: https://seranking.com + domain_inlink_rank: 68 + - url: https://www.seranking.com + domain_inlink_rank: 87 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: GET (multiple targets) + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/authority/domain?target=https://seranking.com&target=https://www.seranking.com&output=json' + \ + -H 'Authorization: Token YOUR_API_KEY' post: operationId: createBacklinksAuthorityDomain tags: - - backlinks - summary: authority/domain + - Backlinks + summary: Get domain authority description: >- - Returns the Domain Authority (Domain InLink Rank) for one or more - targets. + Returns the [Domain InLink Rank](https://seranking.com/api/data/reference/#domain-inlink-rank) value of the + target page’s root domain. This endpoint supports GET and POST requests and allows batching of up to 100 targets + per request. Pass multiple targets as GET parameters separated by `&` or in the POST body (JSON format). + + + **Cost:** 5 credits per target + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#authority-domain + parameters: + - name: output + in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. + schema: + type: string + default: json requestBody: + required: true content: application/json: schema: type: object - example: + properties: target: - - https://www.seranking.com/ - - https://www.seranking.com/rank-tracker/ + type: array + items: + type: string + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + required: + - target + example: + target: + - https://seranking.com/ + - https://www.seranking.com/rank-tracker/ + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + pages: + type: array + items: + type: object + properties: + url: + type: string + description: URL of the analyzed page. + domain_inlink_rank: + type: integer + description: Domain Authority of the target’s root domain. + example: + pages: + - url: https://seranking.com + domain_inlink_rank: 68 + - url: https://www.seranking.com + domain_inlink_rank: 87 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: POST (multiple targets) + source: |- + curl -X POST 'https://api.seranking.com/v1/backlinks/authority/domain?output=json' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "target": [ + "https://seranking.com/", + "https://www.seranking.com/rank-tracker/" + ] + }' + /v1/backlinks/authority/domain/distribution: + get: + operationId: getBacklinksAuthorityDomainDistribution + tags: + - Backlinks + summary: Get domain authority distribution + description: >- + Returns the distribution of [Domain InLink Rank](https://seranking.com/api/data/reference/#domain-inlink-rank) + values for domains that link to a target. This endpoint doesn’t support batching. Only a single target can be + specified per request. + + + **Cost:** 1 credit per domain + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#authority-domain-distribution parameters: - - name: apikey + - name: target + in: query + required: true + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + schema: + type: string + - name: mode + in: query + description: |- + Mode of operation: + • `domain` – analyzes all URLs in the domain, including subdomains. + • `host` – analyzes all URLs under this host only (subdomains excluded). + • `url` – analyzes a single, specific URL. + schema: + type: string + default: host + - name: histogramMode in: query + description: |- + Mode of aggregation: + • `domain` – counts base domains per Domain InLink Rank. + • `host` – counts hosts per Domain InLink Rank. schema: type: string - example: '{{secret_key_data}}' + default: host - name: output in: query + description: Response format (`json` or `xml`). schema: type: string - example: json + default: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} - /v1/backlinks/authority/domain/distribution: + application/json: + schema: + type: object + properties: + histogram: + type: array + items: + type: object + properties: + domain_inlink_rank: + type: integer + description: Domain Authority value for which the distribution is calculated. + refdomains: + type: integer + description: Number of referring domains with the specified Domain InLink Rank. + example: + histogram: + - domain_inlink_rank: 0 + refdomains: 250 + - domain_inlink_rank: 1 + refdomains: 872 + - domain_inlink_rank: 2 + refdomains: 567 + - domain_inlink_rank: 3 + refdomains: 347 + - domain_inlink_rank: 4 + refdomains: 268 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/authority/domain/distribution?output=json&target=seranking.com&mode=host&histogramMode=domain' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/backlinks/authority/domain/history: get: - operationId: getBacklinksAuthorityDomainDistribution + operationId: getBacklinksAuthorityDomainHistory tags: - - backlinks - summary: authority/domain/distribution + - Backlinks + summary: Get domain authority history description: >- - Returns the distribution of Domain Authority scores for all domains - linking to a single target. + Returns historical [Domain InLink Rank](https://seranking.com/api/data/reference/#domain-inlink-rank) values for + a target. Results are returned for all dates in the requested range based on the selected granularity. This + endpoint doesn’t support batching. Only a single target can be specified per request. + + + **Cost:** 4 credits per target + 1 credit per date point returned + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#authority-domain-history parameters: - - name: apikey + - name: target in: query + required: true + description: >- + Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`). The + [PLD](https://seranking.com/api/data/reference/#pld) is extracted automatically. schema: type: string - example: '{{secret_key_data}}' - - name: target + - name: date_from in: query + description: Start date (`YYYY-MM-DD`, inclusive). schema: type: string - example: https://seranking.com - - name: mode + format: date + default: now − 1 month + - name: date_to in: query + description: End date (`YYYY-MM-DD`, inclusive). schema: type: string - enum: - - domain - - host - - url - default: host - example: host - - name: histogramMode + format: date + default: now + - name: granularity in: query + description: Granularity at which data is returned (`by_day`, `by_week`, or `by_month`). schema: type: string - enum: - - domain - - host - default: host - example: host + default: by_day - name: output in: query + description: Response format (`json` or `xml`). schema: type: string - example: json + default: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + ranks: + type: array + items: + type: object + properties: + date: + type: string + description: |- + Date associated with the rank value. Depends on granularity: + • `by_day` – exact day. + • `by_week` – first day of the week (Monday). + • `by_month` – first day of the month. + domain_inlink_rank: + type: integer + description: Domain Authority value for the specified date. + example: + ranks: + - date: "2025-09-01" + domain_inlink_rank: 72 + - date: "2025-08-01" + domain_inlink_rank: 70 + - date: "2025-07-01" + domain_inlink_rank: 68 + - date: "2025-06-01" + domain_inlink_rank: 65 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/authority/domain/history?output=json&target=seranking.com&date_from=2025-06-01&date_to=2025-09-01&granularity=by_month' + \ + -H 'Authorization: Token YOUR_API_KEY' /v1/backlinks/authority/page: get: operationId: getBacklinksAuthorityPage tags: - - backlinks - summary: authority/page - description: Returns the Page Authority (InLink Rank) for one or more target URLs. + - Backlinks + summary: Get page authority + description: >- + Returns the [InLink Rank](https://seranking.com/api/data/reference/#inlink-rank) value for a target URL. This + endpoint supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple + targets as GET parameters separated by `&` or in the POST body (JSON format). + + + **Cost:** 5 credits per target + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#authority-page parameters: - - name: apikey + - name: target in: query + required: true + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." schema: type: string - example: '{{secret_key_data}}' - - name: target + - name: output in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. schema: type: string - example: https://seranking.com - - name: output + default: json + - name: mode in: query + description: Shown in the documented request example. schema: type: string - example: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + pages: + type: array + items: + type: object + properties: + url: + type: string + description: URL of the analyzed page. + inlink_rank: + type: integer + description: Page Authority of the target URL. + example: + pages: + - url: https://seranking.com + inlink_rank: 19 + - url: https://www.seranking.com + inlink_rank: 49 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: GET (multiple targets) + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/authority/page?target=https://seranking.com&target=https://www.us-seranking.com&mode=url&output=json' + \ + -H 'Authorization: Token YOUR_API_KEY' post: operationId: createBacklinksAuthorityPage tags: - - backlinks - summary: authority/page - description: Returns the Page Authority (InLink Rank) for one or more target URLs. + - Backlinks + summary: Get page authority + description: >- + Returns the [InLink Rank](https://seranking.com/api/data/reference/#inlink-rank) value for a target URL. This + endpoint supports GET and POST requests and allows batching of up to 100 targets per request. Pass multiple + targets as GET parameters separated by `&` or in the POST body (JSON format). + + + **Cost:** 5 credits per target + + + - The `apikey` (required) and `output` (optional) parameters must always be included as GET parameters, even if + other parameters are sent via POST. + + + - Any POST data in the request body should be in JSON format. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#authority-page + parameters: + - name: output + in: query + description: Response format (`json` or `xml`). Must always be sent as a GET parameter. + schema: + type: string + default: json requestBody: + required: true content: application/json: schema: type: object - example: + properties: target: - - https://www.seranking.com/ - - https://www.seranking.com/rank-tracker/ - parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - - name: output - in: query - schema: - type: string - example: json + type: array + items: + type: string + description: "Target to analyze: root domain, host (subdomain), or specific URL (e.g., `seranking.com`)." + required: + - target + example: + target: + - https://www.seranking.com/ + - https://www.seranking.com/rank-tracker/ responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + pages: + type: array + items: + type: object + properties: + url: + type: string + description: URL of the analyzed page. + inlink_rank: + type: integer + description: Page Authority of the target URL. + example: + pages: + - url: https://seranking.com + inlink_rank: 19 + - url: https://www.seranking.com + inlink_rank: 49 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: POST (multiple targets) + source: |- + curl -X POST 'https://api.seranking.com/v1/backlinks/authority/page?output=json' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "target": [ + "https://www.seranking.com/", + "https://www.seranking.com/rank-tracker/" + ] + }' /v1/backlinks/authority/page/history: get: operationId: getBacklinksAuthorityPageHistory tags: - - backlinks - summary: authority/page/history + - Backlinks + summary: Get page authority history description: >- - Returns the historical Page Authority (InLink Rank) values for a single - target URL. + Returns historical [InLink Rank](https://seranking.com/api/data/reference/#inlink-rank) values for a page. This + endpoint doesn’t support batching. Only a single target can be specified per request. + + + **Cost:** 4 credits per target + 1 credit per date point returned + externalDocs: + description: Documentation + url: https://seranking.com/api/data/backlinks/#authority-page-history parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: "Target to analyze: only full page URL is supported (e.g., `http://seranking.com/index.html`)." schema: type: string - example: https://seranking.com - - name: date_from - in: query - schema: - type: string - example: '2025-01-01' - - name: date_to - in: query - schema: - type: string - example: '2025-05-30' - - name: granularity - in: query - schema: - type: string - example: by_week - - name: output - in: query - schema: - type: string - example: json - responses: - '200': - description: Successful response - content: - application/json: {} - /v1/backlinks/authority/domain/history: - get: - operationId: getBacklinksAuthorityDomainHistory - tags: - - backlinks - summary: authority/domain/history - description: >- - Returns historical Domain InLink Rank (Domain Authority) values for a - target domain. GET only, single target. - parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - - name: target - in: query - schema: - type: string - example: seranking.com - name: date_from in: query + description: Start date (`YYYY-MM-DD`), inclusive. schema: type: string + format: date + default: now – 1 month - name: date_to in: query + description: End date (`YYYY-MM-DD`), inclusive. schema: type: string + format: date + default: now - name: granularity in: query + description: >- + Granularity at which data is returned (`by_day`, `by_week`, or `by_month`). Aggregation uses the latest + value within the aggregated range. schema: type: string - example: by_day + default: by_day - name: output in: query + description: Response format (`json` or `xml`). schema: type: string + default: json responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + ranks: + type: array + items: + type: object + properties: + date: + type: string + description: |- + Date associated with the rank value. Depends on granularity: + • `by_day` – exact day. + • `by_week` – first day of the week (Monday). + • `by_month` – first day of the month. + inlink_rank: + type: integer + description: Page Authority value for the specified date. + example: + ranks: + - date: "2025-04-01" + inlink_rank: 54 + - date: "2025-03-01" + inlink_rank: 32 + - date: "2025-02-01" + inlink_rank: 21 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/backlinks/authority/page/history?output=json&target=seranking.com&date_from=2025-02-01&date_to=2025-04-01&granularity=by_month' + \ + -H 'Authorization: Token YOUR_API_KEY' /v1/domain/overview/db: get: operationId: getDomainOverviewDb tags: - Domain Analysis - summary: Regional database + summary: Get domain overview by region description: >- - Provides a detailed breakdown of a domain's organic and paid keyword - performance within a single specified regional database. + Returns detailed keyword statistics for a specified domain within a single, selected regional database. It + breaks down performance for both organic and paid traffic, offering insights into keyword rankings, traffic + estimates, and position changes. + + + **Cost:** 100 credits per request + + + If the request is successful, the server returns a JSON object with two primary keys: `organic` and `adv`. Each + of these keys details various keyword statistics for the selected database. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/domain-analysis/#regional-database parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: source in: query + required: true + description: >- + Country code of the regional keyword database (e.g., `us`). For acceptable values, see [Regional database + codes](https://seranking.com/api/data/reference#regional-database-codes). schema: type: string - example: us - name: domain in: query + required: true + description: Domain for which to retrieve the keyword statistics (e.g., `seranking.com`). schema: type: string - example: seranking.com - - name: url + - name: with_subdomains in: query + description: |- + Flag indicating whether subdomain data should be included in the analysis: + `1` – include subdomains + `0` – exclude subdomains schema: - type: string - example: https://seranking.com/api.html - - name: with_subdomains + type: integer + default: 1 + - name: url in: query + description: |- + Specific URL to analyze instead of the root domain + (e.g., `https://domain.com/path/page`). If provided, the `domain` parameter is ignored. schema: - type: boolean - default: true - example: false + type: string responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + organic: + type: object + properties: + base_domain: + type: string + price_sum: + type: integer + description: Estimated traffic value (PPC equivalent) for organic search data. + traffic_sum: + type: integer + description: Estimated monthly organic search traffic from ranking keywords. + keywords_new_count: + type: integer + description: Number of keywords for which the domain has newly started ranking. + keywords_down_count: + type: integer + description: Number of keywords for which the domain’s ranking has declined. + keywords_up_count: + type: integer + description: Number of keywords for which the domain’s ranking has improved. + keywords_equal_count: + type: integer + description: Number of keywords for which the domain’s ranking has not changed. + keywords_lost_count: + type: integer + description: Number of keywords for which the domain has dropped out of the SERPs. + keywords_count: + type: integer + description: Number of organic keywords for which the domain ranks in the selected database. + top1_5: + type: integer + description: Number of organic keywords ranked in positions 1–5. + top6_10: + type: integer + description: Number of organic keywords ranked in positions 6–10. + top11_20: + type: integer + description: Number of organic keywords ranked in positions 11–20. + top21_50: + type: integer + description: Number of organic keywords ranked in positions 21–50. + top51_100: + type: integer + description: Number of organic keywords ranked in positions 51–100. + year: + type: integer + description: Year of the data snapshot. + month: + type: integer + description: Month of the data snapshot. + adv: + type: object + properties: + base_domain: + type: string + price_sum: + type: integer + description: Estimated traffic value (PPC equivalent) from paid keywords. + traffic_sum: + type: integer + description: Estimated monthly traffic from paid keywords. + keywords_new_count: + type: integer + description: Number of new keywords targeted by paid ads. + keywords_down_count: + type: integer + description: Number of paid keywords where ad positions declined. + keywords_up_count: + type: integer + description: Number of paid keywords where ad positions improved. + keywords_equal_count: + type: integer + description: Number of paid keywords where ad positions remained unchanged. + keywords_lost_count: + type: integer + description: Number of keywords for which paid ads are no longer running or appearing in the SERPs. + keywords_count: + type: integer + description: Number of keywords for which the domain has paid ads in the selected database. + top1_2: + type: integer + description: Number of paid keywords with ads appearing in positions 1–2. + top3_5: + type: integer + description: Number of paid keywords with ads appearing in positions 3–5. + top6_8: + type: integer + description: Number of paid keywords with ads appearing in positions 6–8. + top9_11: + type: integer + description: Number of paid keywords with ads appearing in positions 9–11. + year: + type: integer + description: Year of the data snapshot. + month: + type: integer + description: Month of the data snapshot. + example: + organic: + base_domain: example.com + price_sum: 100000 + traffic_sum: 40000 + keywords_new_count: 250 + keywords_down_count: 70 + keywords_up_count: 65 + keywords_equal_count: 140000 + keywords_lost_count: 110 + keywords_count: 115000 + top1_5: 20000 + top6_10: 11000 + top11_20: 18000 + top21_50: 41000 + top51_100: 50000 + year: 2025 + month: 11 + adv: + base_domain: example.com + price_sum: 85 + traffic_sum: 40 + keywords_new_count: 0 + keywords_down_count: 0 + keywords_up_count: 0 + keywords_equal_count: 16 + keywords_lost_count: 0 + keywords_count: 16 + top1_2: 15 + top3_5: 1 + top6_8: 0 + top9_11: 0 + year: 2025 + month: 11 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/domain/overview/db?source=xx&domain=yourdomain.com&with_subdomains=1' \ + -H 'Authorization: Token YOUR_API_KEY' /v1/domain/overview/worldwide: get: operationId: getDomainOverviewWorldwide tags: - Domain Analysis - summary: Worldwide aggregate + summary: Get worldwide domain overview description: >- - Aggregates a domain’s current global search performance statistics for - both organic and paid traffic. + Aggregates and returns domain search performance statistics globally for the current month. The method provides + a comprehensive view of worldwide organic and paid traffic metrics, with options to customize the returned data, + including currency and specific fields. + + + **Cost:** 100 credits per request + + + If the request is successful, the server returns a JSON object with two primary keys: `organic` and `adv`. Each + of these keys holds an array of objects. + + + - The first object in each array always represents the aggregated “worldwide” statistics. + + + - If `show_zones_list` is set to “1” (or true), subsequent objects in the arrays will represent statistics for + individual regional zones (countries). + + + Each object within the `organic` and `adv` arrays can contain the following parameters (depending on the fields + requested): + externalDocs: + description: Documentation + url: https://seranking.com/api/data/domain-analysis/#worldwide-aggregate parameters: - - name: apikey + - name: domain in: query + required: true + description: Domain name for which to retrieve worldwide statistics (e.g., `seranking.com`). schema: type: string - example: '{{secret_key_data}}' - - name: domain + - name: currency in: query + description: >- + ISO 4217 currency code to be used for any monetary values (like traffic cost) returned in the response + (e.g., `USD`, `EUR`, `GBP`). schema: type: string - example: seranking.com + default: USD - name: fields in: query + description: |- + Comma-separated list specifying which data fields or categories to include in the response: + • `price` – shows traffic price/cost value + • `traffic` – shows traffic volume value + • `keywords` – shows keyword count statistics + • `positions_diff` – shows statistics on position changes + • `positions_tops` – shows statistics on top-ranking positions schema: type: string - example: price,traffic,keywords,positions_diff,positions_tops + default: price, traffic, keywords - name: show_zones_list in: query - schema: - type: integer - enum: - - 0 - - 1 - default: 0 - example: 0 - - name: currency - in: query - description: ISO 4217 currency code. + description: >- + Identifies whether the response should include a detailed breakdown of statistics by regional zone (country) + in addition to aggregated worldwide statistics: + + `1` – include stats for each zone + + `0` – return worldwide stats only schema: type: string - maxLength: 3 - default: USD - example: USD + default: "0" - name: with_subdomains in: query + description: |- + Flag indicating whether subdomain data should be included in the analysis: + `1` – include subdomains + `0` – exclude subdomains schema: - type: boolean - default: true - example: true + type: integer + default: 1 + - name: url + in: query + description: |- + Specific URL to analyze instead of the root domain + (e.g., `https://domain.com/path/page`). If provided, the `domain` parameter is ignored. + schema: + type: string responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + organic: + type: array + items: + type: object + properties: + source: + type: string + description: >- + Identifier of the data scope: + + `worldwide` for the global summary, or a specific country code for zone-specific data when + `show_zones_list` is enabled. + country: + type: string + description: >- + Descriptive name for the source: `worldwide` for the global summary, or country name for + zone-specific data (e.g., `United States`). + keywords_count: + type: integer + description: Number of keywords for this scope (organic or paid, depending on the parent object). + traffic_sum: + type: integer + description: Sum of estimated traffic for this scope (organic or paid). + price_sum: + type: number + description: Estimated traffic value (PPC equivalent) in the specified currency. + positions_new_count: + type: integer + description: >- + Number of keywords newly appearing in rankings for this scope (if `positions_diff` requested + in fields). + positions_up_count: + type: integer + description: >- + Number of keywords with improved rankings for this scope (if `positions_diff` requested in + fields). + positions_down_count: + type: integer + description: >- + Number of keywords with declined rankings for this scope (if `positions_diff` requested in + fields). + positions_lost_count: + type: integer + description: >- + Number of keywords that dropped out of rankings for this scope (if `positions_diff` + requested in fields). + positions_equal_count: + type: integer + description: >- + Number of keywords with unchanged rankings for this scope (if `positions_diff` requested in + fields). + positions_tops: + type: object + properties: + top1_5: + type: integer + description: "Organic: keywords in positions 1–5." + top6_10: + type: integer + description: "Organic: keywords in positions 6–10." + top11_20: + type: integer + description: "Organic: keywords in positions 11–20." + top21_50: + type: integer + description: "Organic: keywords in positions 21–50." + top51_100: + type: integer + description: "Organic: keywords in positions 51–100." + adv: + type: array + items: + type: object + properties: + source: + type: string + description: >- + Identifier of the data scope: + + `worldwide` for the global summary, or a specific country code for zone-specific data when + `show_zones_list` is enabled. + country: + type: string + description: >- + Descriptive name for the source: `worldwide` for the global summary, or country name for + zone-specific data (e.g., `United States`). + keywords_count: + type: integer + description: Number of keywords for this scope (organic or paid, depending on the parent object). + traffic_sum: + type: integer + description: Sum of estimated traffic for this scope (organic or paid). + price_sum: + type: number + description: Estimated traffic value (PPC equivalent) in the specified currency. + positions_new_count: + type: integer + description: >- + Number of keywords newly appearing in rankings for this scope (if `positions_diff` requested + in fields). + positions_up_count: + type: integer + description: >- + Number of keywords with improved rankings for this scope (if `positions_diff` requested in + fields). + positions_down_count: + type: integer + description: >- + Number of keywords with declined rankings for this scope (if `positions_diff` requested in + fields). + positions_lost_count: + type: integer + description: >- + Number of keywords that dropped out of rankings for this scope (if `positions_diff` + requested in fields). + positions_equal_count: + type: integer + description: >- + Number of keywords with unchanged rankings for this scope (if `positions_diff` requested in + fields). + positions_tops: + type: object + properties: + top1_2: + type: integer + description: "Paid (adv): keywords with ads in positions 1–2." + top3_5: + type: integer + description: "Paid (adv): keywords with ads in positions 3–5." + top6_8: + type: integer + description: "Paid (adv): keywords with ads in positions 6–8." + top9_11: + type: integer + description: "Paid (adv): keywords with ads in positions 9–11." + example: + organic: + - source: worldwide + country: Worldwide + keywords_count: 823967 + traffic_sum: 273150 + price_sum: 241482.11 + positions_new_count: 56042 + positions_up_count: 56326 + positions_down_count: 49834 + positions_lost_count: 47169 + positions_equal_count: 876005 + positions_tops: + top1_5: 91520 + top6_10: 95652 + top11_20: 165641 + top21_50: 332015 + top51_100: 353061 + adv: + - source: worldwide + country: Worldwide + keywords_count: 4947 + traffic_sum: 4369 + price_sum: 6509.45 + positions_new_count: 333 + positions_up_count: 7 + positions_down_count: 4 + positions_lost_count: 1742 + positions_equal_count: 5645 + positions_tops: + top1_2: 4905 + top3_5: 1046 + top6_8: 38 + top9_11: 0 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/domain/overview/worldwide?domain=seranking.com¤cy=USD&fields=price,traffic,keywords,positions_diff,positions_tops&show_zones_list=0' + \ + -H 'Authorization: Token YOUR_API_KEY' /v1/domain/overview/worldwide/url: get: operationId: getDomainOverviewWorldwideUrl tags: - Domain Analysis - summary: Worldwide aggregate for URL + summary: Get worldwide URL overview description: >- - Aggregates a domain’s current global search performance statistics for - both organic and paid traffic. + Aggregates and returns URL search performance statistics globally for the current month. The method provides a + comprehensive view of worldwide organic and paid traffic metrics for a specific URL, with options to customize + the returned data using selected fields. + + + **Cost:** 100 credits per request + + + If the request is successful, the server returns a JSON object containing two arrays: `organic` and `adv`. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/domain-analysis/#worldwide-aggregate-url parameters: - - name: apikey + - name: url in: query + required: true + description: Full URL to analyze (including protocol). schema: type: string - example: '{{secret_key_data}}' - name: fields in: query + description: "Comma-separated list of metrics to include in the response. Accepted values: `keywords`, `traffic`, `price`." schema: type: string - example: price,traffic,keywords - - name: url - in: query - schema: - type: string - example: https://seranking.com/api.html responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + organic: + type: array + items: + type: object + properties: + source: + type: string + description: Data source scope. Always `worldwide`. + keywords_count: + type: integer + description: Number of ranking keywords worldwide. + traffic_sum: + type: integer + description: Estimated total monthly traffic worldwide. + price_sum: + type: integer + description: Estimated traffic value (PPC equivalent). + adv: + type: array + items: + type: object + properties: + source: + type: string + description: Data source scope. Always `worldwide`. + keywords_count: + type: integer + description: Number of ranking keywords worldwide. + traffic_sum: + type: integer + description: Estimated total monthly traffic worldwide. + price_sum: + type: integer + description: Estimated traffic value (PPC equivalent). + example: + organic: + - source: worldwide + keywords_count: 1791 + traffic_sum: 1018 + price_sum: 1826 + adv: + - source: worldwide + keywords_count: 5 + traffic_sum: 0 + price_sum: 0 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/domain/overview/worldwide/url?fields=price,traffic,keywords&url=https://example.com/api.html' + \ + -H 'Authorization: Token YOUR_API_KEY' /v1/domain/overview/history: get: operationId: getDomainOverviewHistory tags: - Domain Analysis - summary: History Trends + summary: Get domain traffic and keyword history description: >- - Fetches historical data, including keyword counts and traffic trends, - for a domain's organic or paid performance in a specific region. + Retrieves historical data for a specified domain from a specific regional database. It tracks changes over time + for key metrics, including the number of keywords, estimated traffic (clicks), and traffic cost estimates, for + either organic or paid search. + + + **Cost:** 100 credits per request + + + If the request is successful, the server returns a JSON array. Each object in this array represents a historical + data point (typically for a specific month and year) and contains the following parameters. + + + - The `topX_Y` fields for ranking distribution correspond to the type of traffic requested—organic ranking + ranges or paid ad position ranges. + + + - The `topX_Y` fields count position occurrences, not unique keywords. If a domain has multiple links for a + single keyword, each link is counted separately in the relevant position range(s). As a result, the sum of + `top1_5` + `top6_10` + … + `top51_100` may exceed `keywords_count`. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/domain-analysis/#history-trends parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: source in: query + required: true + description: >- + Country code of the regional keyword database (e.g., `us`). For acceptable values, see [Regional database + codes](https://seranking.com/api/data/reference#regional-database-codes). schema: type: string - example: us - name: domain in: query + required: true + description: Domain name for which to retrieve historical performance data (e.g., `seranking.com`). schema: type: string - example: seranking.com - name: type in: query + description: |- + Search traffic type for which data is retrieved: + • `organic` – organic search traffic + • `adv` – paid search traffic schema: type: string - enum: - - organic - - adv default: organic - example: organic - name: with_subdomains in: query + description: |- + Flag indicating whether subdomain data should be included in the analysis: + `1` – include subdomains + `0` – exclude subdomains schema: - type: boolean - default: true - example: true + type: integer + default: 1 - name: url in: query - description: Specific URL to get history for instead of domain. + description: |- + Specific URL to analyze instead of the root domain + (e.g., `https://domain.com/path/page`). If provided, the `domain` parameter is ignored. schema: type: string responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: array + items: + type: object + properties: + keywords_count: + type: integer + description: >- + Number of unique keywords (organic or paid, depending on the request type) for which the domain + had at least one result during the period. + traffic_sum: + type: integer + description: >- + Estimation of the total search traffic (clicks) the domain received from these keywords during + that period. + top1_5: + type: integer + description: >- + If type is `organic`: total number of occurrences of organic keywords ranked in positions 1–5 + during that period. + top6_10: + type: integer + description: >- + If type is `organic`: total number of occurrences of organic keywords ranked in positions 6–10 + during that period. + top11_20: + type: integer + description: >- + If type is `organic`: total number of occurrences of organic keywords ranked in positions 11–20 + during that period. + top21_50: + type: integer + description: >- + If type is `organic`: total number of occurrences of organic keywords ranked in positions 21–50 + during that period. + top51_100: + type: integer + description: >- + If type is `organic`: total number of occurrences of organic keywords ranked in positions 51–100 + during that period. + year: + type: integer + description: Year of the historical data point. + month: + type: integer + description: Month of the historical data point (1–12). + price_sum: + type: number + description: Estimated traffic value (PPC equivalent) in the default currency of the database. + top1_2: + type: integer + description: >- + If type is `adv`: total number of occurrences of paid keywords with ads appearing in positions + 1–2 during that period. + top3_5: + type: integer + description: >- + If type is `adv`: total number of occurrences of paid keywords with ads appearing in positions + 3–5 during that period. + top6_8: + type: integer + description: >- + If type is `adv`: total number of occurrences of paid keywords with ads appearing in positions + 6–8 during that period. + top9_11: + type: integer + description: >- + If type is `adv`: total number of occurrences of paid keywords with ads appearing in positions + 9–11 during that period. + examples: + typeOrganic: + summary: Type=organic + value: + - keywords_count: 104199 + traffic_sum: 35838 + top1_5: 12629 + top6_10: 11401 + top11_20: 19134 + top21_50: 39725 + top51_100: 46089 + year: 2025 + month: 4 + price_sum: 85424.78 + - keywords_count: 103538 + traffic_sum: 34402 + top1_5: 9107 + top6_10: 11517 + top11_20: 19029 + top21_50: 39617 + top51_100: 45963 + year: 2025 + month: 5 + price_sum: 85721.73 + typeAdv: + summary: Type=adv + value: + - keywords_count: 7 + traffic_sum: 0 + top1_2: 7 + top3_5: 0 + top6_8: 0 + top9_11: 0 + year: 2025 + month: 4 + price_sum: 0 + - keywords_count: 8 + traffic_sum: 0 + top1_2: 8 + top3_5: 0 + top6_8: 0 + top9_11: 0 + year: 2025 + month: 5 + price_sum: 0 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: To retrieve organic historical data + source: >- + curl -X GET + 'https://api.seranking.com/v1/domain/overview/history?source=us&domain=seranking.com&type=organic' \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: To retrieve paid (advertising) historical data + source: |- + curl -X GET 'https://api.seranking.com/v1/domain/overview/history?source=us&domain=seranking.com&type=adv' \ + -H 'Authorization: Token YOUR_API_KEY' /v1/domain/keywords: get: operationId: getDomainKeywords tags: - Domain Analysis - summary: Domain keywords + summary: Get domain keyword rankings description: >- - Returns a filterable and sortable list of organic or paid keywords for - which a specific domain ranks in a given database. + Returns the keywords a domain (or a specific URL) ranks for in a regional database, organic or paid. Supports + historical month-by-month snapshots, advanced filtering across keyword properties, SERP-feature presence, search + intent, and traffic share. + + + **Cost:** 100 credits per request + + + Either `domain` or `url` must be supplied. **If both are sent, `url` takes precedence and `domain` is silently + dropped.** + + + **Historical snapshots (year / month)** + + + - Both omitted → current snapshot. + + + - Both supplied with a month within the retention window → historical snapshot. + + + - Only one of the two supplied → current snapshot (the lone parameter is silently ignored — there is no error). + + + - Future date → current snapshot (silent fallback). + + + - Date older than the retention window → empty array `[]`. + + + ⚠ **Historical responses use a different schema than current responses.** See [Response shape — + historical](#response-shape-historical-year-month) below. Clients that consume both must branch on whether + `year`/`month` were sent. + + + **Filters** + + + All filter keys use bracket-path syntax (`filter[name]=value` or `filter[name][from]=value`). Filters within a + single key combine with AND; multiple values within one filter combine with OR. + + + **Range filters (from / to)** + + + All accept any combination of `from` and `to`; either bound can be omitted. + + + **Text filters** + + + JSON-encoded value; see [Text search JSON structure](#). + + + **Current** + + + If the request succeeds, the server returns an HTTP 200 with a JSON array of keyword objects. The default + response includes 16 fields; request `cols=` to project a subset. + + + **Default response columns** + + + For `type=adv` (paid search), the `block` and `snippet_*` family are also returned when explicitly requested. + + + **Field reference** + + + 📝 `kei` (Keyword Effectiveness Index) is accepted as an `order_field` value but is **not** a selectable + response column. Requesting `cols=kei` silently drops it. + + + **Historical (year + month)** + + + When a request includes valid `year` and `month`, the upstream returns data from a different store with a + different schema. Five fields are renamed or retyped, and two are dropped: + + + Clients consuming both shapes should branch on whether `year`/`month` were sent. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/domain-analysis/#domain-keywords parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: source in: query + description: Country code of the regional keyword database (e.g., `us`, `uk`, `de`). See [Regional database codes](#). schema: type: string - example: us - name: domain in: query + description: Domain to retrieve rankings for (e.g., `booking.com`). Mutually exclusive with `url`. schema: type: string - example: wix.com - name: url in: query + description: >- + Exact URL to retrieve rankings for (e.g., `https://seranking.com/api.html`). When supplied, the + `with_subdomains` flag has no effect — only this exact URL is considered. schema: type: string - example: https://www.mywage.de/blog/baufinanzierung-trotz-schufa - name: type in: query + description: Search-traffic type. `adv` returns paid-search keywords with snippet fields populated. schema: type: string - enum: - - organic - - adv - example: organic + default: organic - name: with_subdomains in: query + description: >- + When `true`, include keywords ranking for any subdomain of `domain`. When `false`, restrict to the exact + `domain`. Ignored when `url` is used. Also accepts `1`/`0`. schema: type: boolean - example: true - - name: order_field - in: query - schema: - type: string - enum: - - traffic - - volume - - position - - cpc - - competition - - kei - - difficulty - example: traffic - - name: order_type - in: query - schema: - type: string - enum: - - asc - - desc - example: desc - - name: page + default: true + - name: page in: query + description: Page number for paginated results. schema: type: integer default: 1 - example: 1 - name: limit in: query + description: Page size. Values > 1000 are silently capped at 1000. schema: type: integer - example: 10 + default: 100 + - name: order_field + in: query + description: >- + Sort key. Valid values: `traffic`, `volume`, `position`, `cpc`, `competition`, `kei`, `difficulty`, + `traffic_percent`, `price`. + schema: + type: string + default: traffic + - name: order_type + in: query + description: Sort direction. + schema: + type: string + default: desc - name: cols in: query + description: >- + Comma-separated list of fields to return. See [Default response columns](#default-response-columns). Invalid + column names are silently dropped. schema: type: string + default: (default set) + - name: year + in: query + description: |- + Year of the historical snapshot to retrieve. **Must be supplied together with `month`.** + + Default: current + schema: + type: integer + - name: month + in: query + description: >- + Month of the historical snapshot. **Must be supplied together with `year`.** Out-of-range values return HTTP + 400 `invalid month`. + + + Default: current + schema: + type: integer - name: pos_change in: query + description: >- + Selects keywords by how their position changed vs. the previous snapshot. Values: `up` (improved), `down` + (worsened), `new` (`prev_pos: null`), `lost` (dropped from SERP), `diff` (any change — equivalent to `up ∪ + down`), `same` (unchanged). Unknown values are silently ignored (filter does not apply). schema: type: string - enum: - - up - - down - - new - - lost - - diff - - same - name: filter[volume][from] in: query + description: Monthly search volume. schema: type: integer - example: 500 - name: filter[volume][to] in: query + description: Monthly search volume. schema: type: integer - example: 2000 - - name: filter[difficulty][from] + - name: filter[traffic][from] in: query + description: Estimated monthly traffic to the ranking URL. schema: - type: string - - name: filter[difficulty][to] + type: integer + - name: filter[traffic][to] in: query + description: Estimated monthly traffic to the ranking URL. schema: - type: string - - name: filter[url] + type: integer + - name: filter[traffic_percent][from] in: query + description: Share (%) of the keyword’s total traffic captured by the domain. schema: - type: string - example: |- - [ - [ - { - "type": "contains", - "value": "/blog/" - } - ] - ] - - name: filter[multi_keyword_excluded] + type: number + - name: filter[traffic_percent][to] in: query + description: Share (%) of the keyword’s total traffic captured by the domain. schema: - type: string - example: |- - [ - [ - { "type": "contains", "value": "seo" }, - { "type": "contains", "value": "tools" } - ], - [ - { "type": "begins", "value": "find" }, - { "type": "contains", "value": "link" } - ], - [ - { "type": "contains", "value": "backlink" }, - { "type": "ends", "value": "checker" } - ], - [ - { "type": "exact", "value": "serankings" } - ] - ] - - name: filter[multi_keyword_included] + type: number + - name: filter[position][from] in: query + description: Ranking position. schema: - type: string - example: '[[{"type":"contains", "value":"seo"}]]' - - name: filter[serp_features] + type: integer + - name: filter[position][to] in: query + description: Ranking position. schema: - type: string - - name: filter[intents] + type: integer + - name: filter[keyword_count][from] in: query + description: Number of words in the keyword phrase. schema: - type: string - - name: filter[keyword] + type: integer + - name: filter[keyword_count][to] in: query + description: Number of words in the keyword phrase. schema: - type: string - example: scholar + type: integer - name: filter[characters_count][from] in: query + description: Character length of the keyword phrase. schema: - type: string + type: integer - name: filter[characters_count][to] in: query + description: Character length of the keyword phrase. schema: - type: string - - name: filter[keyword_count][from] + type: integer + - name: filter[cpc][from] in: query + description: Cost per click. USD. schema: - type: string - - name: filter[keyword_count][to] + type: number + - name: filter[cpc][to] in: query + description: Cost per click. USD. schema: - type: string - - name: filter[position][from] + type: number + - name: filter[price][from] in: query + description: Estimated traffic value (PPC-equivalent). USD. schema: - type: string - - name: filter[position][to] + type: number + - name: filter[price][to] in: query + description: Estimated traffic value (PPC-equivalent). USD. schema: - type: string + type: number - name: filter[competition][from] in: query + description: Competition score (0.00–1.00). schema: - type: string + type: number - name: filter[competition][to] in: query + description: Competition score (0.00–1.00). schema: - type: string - - name: filter[cpc][from] - in: query - schema: - type: string - - name: filter[cpc][to] + type: number + - name: filter[difficulty][from] in: query + description: Keyword difficulty. schema: - type: string - - name: filter[traffic][from] + type: integer + - name: filter[difficulty][to] in: query + description: Keyword difficulty. schema: - type: string - - name: filter[traffic][to] + type: integer + - name: filter[keyword] in: query + description: Keyword text to match. schema: type: string - - name: filter[traffic_percent][from] + - name: filter[multi_keyword_included] in: query + description: Must-include keyword tokens. schema: type: string - - name: filter[traffic_percent][to] + - name: filter[multi_keyword_excluded] in: query + description: Must-exclude keyword tokens. schema: type: string - - name: filter[price][from] + - name: filter[url] in: query + description: >- + Filter by ranking URL (substring/pattern). Single base array element only — no OR logic. Use the top-level + `url` request param for an exact single-URL match. schema: type: string - - name: filter[price][to] + - name: filter[intents] in: query + description: >- + Comma-separated short codes — `I` (informational), `N` (navigational), `T` (transactional), `C` + (commercial), `L` (local). Multi-value semantics: keyword passes if **any** listed intent matches. Unknown + codes are silently ignored. schema: type: string - - name: filter[serp_features_2][mode] + - name: filter[serp_features] in: query schema: type: string - example: with_link - - name: filter[serp_features_2][value][0] + - name: filter[serp_features_2] in: query schema: type: string - example: sge responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: array + items: + type: object + properties: + block_type: + description: >- + Type of SERP block where the result appears (e.g., `featured_snippets`, `tads`, `local_pack`, + `sitelinks`). `null` indicates an organic 10-blue-links result. + block_position: + type: integer + description: Position of the block on the SERP. + keyword: + type: string + description: The keyword phrase. + position: + type: integer + description: Current ranking position (organic) or ad position (paid). + prev_pos: + type: integer + description: Previous-period position. `null` for new keywords. + volume: + description: Average monthly search volume. + cpc: + type: number + description: Average cost per click, USD. + competition: + type: number + description: Competition score, 0.00 (low) – 1.00 (high). + url: + type: string + description: URL of the ranking page (or the URL used in the ad for paid). + difficulty: + type: integer + description: Keyword difficulty, 0–100. + total_sites: + description: Estimated number of sites ranking for this keyword. Often `null`. + traffic: + description: Estimated monthly traffic this keyword drives to the URL. + traffic_percent: + type: number + description: Share of the keyword’s total traffic the domain captures (%). + price: + type: number + description: Estimated traffic value (PPC equivalent), USD. + serp_features: + type: array + items: + type: string + description: SERP features present on this keyword’s SERP. See [SERP features](#). + description: SERP features present on this keyword’s SERP. See [SERP features](#). + intents: + type: array + items: + type: string + description: Detected intents — short codes `I` / `N` / `T` / `C` / `L`. + description: Detected intents — short codes `I` / `N` / `T` / `C` / `L`. + previous_position: + type: integer + examples: + example1: + summary: Example 1 + value: + - block_type: null + block_position: 4 + keyword: ranking + position: 4 + prev_pos: 4 + volume: 22400 + cpc: 0 + competition: 0 + url: https://seranking.com/ + difficulty: 59 + total_sites: null + traffic: 836 + traffic_percent: 2.09 + price: 0 + serp_features: + - sitelinks + - video + - sge + - related_searches + intents: + - I + - "N" + example2: + summary: Example 2 + value: + - competition: 0.13 + intents: + - INFORMATIONAL + - NAVIGATIONAL + serp_features: + - reviews + - sitelinks + - video + - people_also_ask + keyword: se rank + block_position: 0 + volume: "2900" + position: 1 + price: 797.75 + traffic: "1246" + difficulty: 62 + previous_position: 1 + traffic_percent: 3.58 + cpc: 0.64 + url: https://seranking.com/ + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl + 'https://api.seranking.com/v1/domain/keywords?source=us&domain=booking.com&type=adv&limit=2&cols=keyword,cpc,volume,block_type,block_position,snippet_title&order_field=cpc&order_type=desc' + \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: >- + curl + 'https://api.seranking.com/v1/domain/keywords?source=us&url=https://seranking.com/api.html&type=organic&limit=2&filter[serp_features]=sitelinks' + \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: >- + curl + 'https://api.seranking.com/v1/domain/keywords?source=us&domain=booking.com&filter[serp_features_2][mode]=with_link&filter[serp_features_2][value][0]=sge' + \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: >- + curl + 'https://api.seranking.com/v1/domain/keywords?source=us&domain=booking.com&filter[serp_features_2][mode]=without_link&filter[serp_features_2][value][0]=sge' + \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: >- + curl + 'https://api.seranking.com/v1/domain/keywords?source=us&domain=booking.com&filter[serp_features_2][mode]=with_link&filter[serp_features_2][value][0]=sge&filter[serp_features_2][value][1]=reviews' + \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: >- + curl 'https://api.seranking.com/v1/domain/keywords?source=us&domain=seranking.com&year=2024&month=6&limit=5' + \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: >- + # Keywords that gained positions vs. the previous period + + curl + 'https://api.seranking.com/v1/domain/keywords?source=us&domain=seranking.com&pos_change=up&order_field=position&order_type=asc&limit=20' + \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: |- + # New SERP entries in the period (prev_pos is null) + curl 'https://api.seranking.com/v1/domain/keywords?source=us&domain=seranking.com&pos_change=new&limit=20' \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: |- + curl 'https://api.seranking.com/v1/domain/keywords?source=us&domain=seranking.com\ + &filter[intents]=I\ + &filter[difficulty][to]=30\ + &filter[volume][from]=100\ + &filter[keyword_count][from]=4\ + &order_field=traffic_percent&order_type=desc&limit=50' \ + -H 'Authorization: Token YOUR_API_KEY' /v1/domain/pages: get: operationId: getDomainPages tags: - Domain Analysis - summary: Domain pages + summary: Get domain pages description: >- - Returns a filterable and sortable list of organic or paid keywords for - which a specific domain ranks in a given database. + Retrieves a list of individual pages ranking within a specified domain, along with their organic or paid search + performance metrics. This endpoint helps identify which specific URLs contribute the most to visibility, + traffic, and value in a regional database. + + + **Cost:** 100 credits per request + + + If the request is successful, the server returns a JSON array. Each object represents a single ranking page with + aggregated metrics. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/domain-analysis/#domain-pages parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: Root domain to analyze (e.g., `example.com`). schema: type: string - example: seranking.com - name: scope in: query + required: true + description: |- + Scope of analysis: + • `base_domain` – includes all subdomains under the registrable domain. + • `domain` – analyzes pages under the specified host only. + • `url` – analyzes a single, specific URL including its path and query parameters. schema: type: string - example: base_domain - name: source in: query + required: true + description: >- + Country code of the regional keyword database (e.g., `us`). For acceptable values, see [Regional database + codes](https://seranking.com/api/data/reference#regional-database-codes). schema: type: string - example: us - name: type in: query + description: |- + Search traffic type for which data is retrieved: + • `organic` – organic search traffic + • `adv` – paid search traffic schema: type: string - example: organic + default: organic - name: order_field in: query + description: |- + Field by which results are sorted: + • `keywords_count` + • `traffic_sum` + • `traffic_percent` + • `price_sum` schema: type: string - example: keywords_count + default: keywords_count - name: order_type in: query + description: |- + Sorting order: + • `asc` – ascending + • `desc` – descending schema: type: string - example: desc + default: desc - name: offset in: query + description: Starting position for the paginated list. schema: - type: string + type: integer - name: limit in: query + description: Maximum number of pages to return in a single response. schema: type: integer - example: 1000 + default: 1000 - name: filter[domain_url] in: query + description: >- + JSON string specifying the URL text that must be included. See [Text search JSON + structure](https://seranking.com/api/data/domain-analysis/#text-search-json-structure) for formatting + details. schema: type: string - name: filter[domain_traffic_percent][from] in: query + description: Minimum percentage of the total domain traffic contributed by the page to be included in the results. schema: - type: string + type: number - name: filter[domain_traffic_percent][to] in: query + description: Maximum percentage of the total domain traffic contributed by the page to be included in the results. schema: - type: string + type: number - name: filter[keywords_count][from] in: query + description: Minimum number of ranking keywords for the page to be included in the results. schema: - type: string + type: integer - name: filter[keywords_count][to] in: query + description: Maximum number of ranking keywords for the page to be included in the results. schema: - type: string + type: integer - name: filter[traffic_sum][from] in: query + description: Minimum estimated monthly traffic for the page to be included in the results. schema: - type: string + type: integer - name: filter[traffic_sum][to] in: query + description: Maximum estimated monthly traffic for the page to be included in the results. schema: - type: string + type: integer - name: filter[price_sum][from] in: query + description: Minimum estimated traffic value (PPC equivalent) for the page to be included in the results. schema: - type: string + type: number - name: filter[price_sum][to] in: query + description: Maximum estimated traffic value (PPC equivalent) for the page to be included in the results. schema: - type: string + type: number responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: array + items: + type: object + properties: + traffic_sum: + type: integer + description: Estimated monthly traffic from ranking keywords. + traffic_percent: + type: number + description: Percentage of total domain traffic attributed to the page. + price_sum: + type: number + description: Estimated traffic value (PPC equivalent). + keywords_count: + type: integer + description: Number of keywords the page ranks for. + url: + type: string + description: Full page URL. + title: + type: string + description: Page title as shown in search results. + intents: + type: object + properties: + I: + type: object + properties: + count: + type: integer + description: Number of keywords matching the intent. + traffic: + type: integer + description: Estimated traffic from keywords with this intent. + percents: + type: number + description: Share of this intent within the page’s total keyword set. + "N": + type: object + properties: + count: + type: integer + description: Number of keywords matching the intent. + traffic: + type: integer + description: Estimated traffic from keywords with this intent. + percents: + type: number + description: Share of this intent within the page’s total keyword set. + L: + type: object + properties: + count: + type: integer + description: Number of keywords matching the intent. + traffic: + type: integer + description: Estimated traffic from keywords with this intent. + percents: + type: number + description: Share of this intent within the page’s total keyword set. + C: + type: object + properties: + count: + type: integer + description: Number of keywords matching the intent. + traffic: + type: integer + description: Estimated traffic from keywords with this intent. + percents: + type: number + description: Share of this intent within the page’s total keyword set. + T: + type: object + properties: + count: + type: integer + description: Number of keywords matching the intent. + traffic: + type: integer + description: Estimated traffic from keywords with this intent. + percents: + type: number + description: Share of this intent within the page’s total keyword set. + description: |- + Distribution of keyword intent types for the page: + • `I` – informational + • `N` – navigational + • `L` – local + • `C` – commercial + • `T` – transactional + example: + - traffic_sum: 451267 + traffic_percent: 5.95 + price_sum: 403266.21 + keywords_count: 133271 + url: https://www.booking.com/ + title: Booking.com | Official site | The best hotels, flights, car rentals ... + intents: + I: + count: 85939 + traffic: 440725 + percents: 43.46 + "N": + count: 27623 + traffic: 374646 + percents: 13.97 + L: + count: 46758 + traffic: 10482 + percents: 23.64 + C: + count: 35928 + traffic: 7688 + percents: 18.17 + T: + count: 1503 + traffic: 80 + percents: 0.76 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.example.com/v1/domain/pages?target=seranking.com&scope=base_domain&source=us&type=organic' \ + -H 'Authorization: Token YOUR_API_KEY' /v1/domain/subdomains: get: operationId: getDomainSubdomains tags: - Domain Analysis - summary: Domain subdomains + summary: Get domain subdomains description: >- - Returns a filterable and sortable list of organic or paid keywords for - which a specific domain ranks in a given database. + Retrieves a list of subdomains for a specified domain, along with key organic or paid search performance + metrics. This endpoint helps identify which subdomains contribute the most to visibility, traffic, and value + within a regional database. + + + **Cost:** 100 credits per request + + + If the request is successful, the server returns a JSON array. Each object in this array represents a subdomain + with aggregated metrics. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/domain-analysis/#domain-subdomains parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: Root domain to analyze (e.g., `example.com`). schema: type: string - example: seranking.com - name: scope in: query + required: true + description: |- + Scope of analysis: + • `base_domain` – aggregates subdomains under the registrable domain. + • `domain` – aggregates subdomains under the specified host. schema: type: string - example: base_domain - name: source in: query + required: true + description: >- + Country code of the regional keyword database (e.g., `us`). For acceptable values, see [Regional database + codes](https://seranking.com/api/data/reference#regional-database-codes). schema: type: string - example: us - name: type in: query + description: |- + Search traffic type for which data is retrieved: + • `organic` – organic search traffic + • `adv` – paid search traffic schema: type: string - example: organic + default: organic - name: order_field in: query + description: |- + Field by which results are sorted: + • `keywords_count` + • `traffic_sum` + • `traffic_percent` + • `price_sum` schema: type: string - example: keywords_count + default: keywords_count - name: order_type in: query + description: |- + Sorting order: + • `asc` – ascending + • `desc` – descending schema: type: string - example: asc + default: desc - name: offset in: query + description: Starting position for the paginated list. schema: - type: string + type: integer - name: limit in: query + description: Maximum number of subdomains to return in a single response (per page). schema: type: integer - example: 1000 + default: 1000 - name: filter[domain_url] in: query + description: >- + JSON string specifying the subdomain or host text that must be included. See [Text search JSON + structure](https://seranking.com/api/data/domain-analysis/#text-search-json-structure) for formatting + details. schema: type: string - name: filter[domain_traffic_percent][from] in: query + description: >- + Minimum percentage of the total domain traffic contributed by the subdomain or URL to be included in the + results. schema: - type: string + type: number - name: filter[domain_traffic_percent][to] in: query + description: >- + Maximum percentage of the total domain traffic contributed by the subdomain or URL to be included in the + results. schema: - type: string + type: number - name: filter[keywords_count][from] in: query + description: Minimum number of ranking keywords for the subdomain or URL to be included in the results. schema: - type: string + type: integer - name: filter[keywords_count][to] in: query + description: Maximum number of ranking keywords for the subdomain or URL to be included in the results. schema: - type: string + type: integer - name: filter[traffic_sum][from] in: query + description: Minimum estimated monthly traffic for the subdomain or URL to be included in the results. schema: - type: string + type: integer - name: filter[traffic_sum][to] in: query + description: Maximum estimated monthly traffic for the subdomain or URL to be included in the results. schema: - type: string + type: integer - name: filter[price_sum][from] in: query + description: Minimum estimated traffic value (PPC equivalent) for the subdomain or URL to be included in the results. schema: - type: string + type: number - name: filter[price_sum][to] in: query + description: Maximum estimated traffic value (PPC equivalent) for the subdomain or URL to be included in the results. schema: - type: string + type: number responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: array + items: + type: object + properties: + traffic_sum: + type: integer + description: Estimated monthly traffic from ranking keywords. + traffic_percent: + type: number + description: Percentage of total domain traffic attributed to the subdomain. + price_sum: + type: number + description: Estimated traffic value (PPC equivalent). + keywords_count: + type: integer + description: Number of keywords the subdomain ranks for. + url: + type: string + description: Subdomain or root domain host (e.g., `blog.example.com`, `example.com`). + example: + - traffic_sum: 73909 + traffic_percent: 99.52 + price_sum: 149497.18 + keywords_count: 116181 + url: example.com + - traffic_sum: 209 + traffic_percent: 0.28 + price_sum: 56.34 + keywords_count: 33 + url: online.example.com + - traffic_sum: 146 + traffic_percent: 0.2 + price_sum: 175.67 + keywords_count: 1590 + url: help.example.com + - traffic_sum: 0 + traffic_percent: 0 + price_sum: 0 + keywords_count: 1 + url: academy.example.com + - traffic_sum: 0 + traffic_percent: 0 + price_sum: 0 + keywords_count: 4 + url: visible.example.com + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/domain/subdomains?target=example.com&scope=base_domain&source=us&type=organic&order_field=keywords_count&order_type=desc&limit=1000' + \ + -H 'Authorization: Token YOUR_API_KEY' /v1/domain/ads: get: operationId: getDomainAds tags: - Domain Analysis - summary: Paid ads for domain + summary: Get paid ads by keyword / Get paid ads for domain description: >- - Returns a list of keywords a specific domain is bidding on, along with - the ad creatives used for those keywords. + ### Get paid ads by keyword + + + Retrieves an overview of paid advertisements (PPC ads) run by various domains for a specific target keyword. The + method shows which domains are advertising on that keyword, the extent of their advertising efforts over a + period, and details of their ad creatives. + + + **Cost:** 100 credits per request + + + If successful, the server returns a JSON array. Each object in the array represents a unique domain that has run + paid ads for the specified keyword and contains an overview of that domain’s advertising activity for that + keyword. + + + ### Get paid ads for domain + + + Retrieves an overview of keywords a specific target domain is bidding on in paid search auctions. It details the + ads run by this domain for those keywords, including ad copy, landing pages, and observed performance metrics + over a specified period. + + + **Cost:** 100 credits per request + + + If successful, the server returns a JSON array. Each object in the array represents a unique keyword that the + specified domain has targeted with paid ads. It includes performance metrics for that keyword and details of the + ad snippets run by the domain for that keyword. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/domain-analysis/#paid-ads-keyword parameters: - - name: apikey + - name: source in: query + required: true + description: >- + Country code of the regional keyword database (e.g., `us`). For acceptable values, see [Regional database + codes](https://seranking.com/api/data/reference#regional-database-codes). schema: type: string - example: '{{secret_key_data}}' - - name: domain + - name: keyword in: query + description: >- + Specific keyword for which to retrieve paid ad data. Accepts any valid keyword string (e.g., `new york + hotels`). schema: type: string - example: booking.com - name: from in: query + description: Starting year and month for the data retrieval period, formatted as YYYY-MM (e.g., `2017-01`). schema: type: string - example: 2023-01 + default: N/A (implies current/all available data) - name: to in: query + description: >- + Ending year and month for the data retrieval period, formatted as YYYY-MM (e.g., `2023-12`). + + + Get paid ads for domain: Ending year and month for the data retrieval period, formatted as YYYY-MM (e.g., + `2018-12`). schema: type: string - example: 2023-12 - - name: limit + default: N/A (implies current/all available data) + - name: page in: query + description: >- + Page number for paginated results when retrieving domains advertising on the specified keyword (e.g., `1`). + Positive integer. + + + Get paid ads for domain: Page number for paginated results when retrieving keywords the domain is + advertising on (e.g., `1`). Positive integer. schema: type: integer - example: 10 - - name: source + default: 1 + - name: limit in: query - required: true + description: >- + Maximum number of domains advertising on the specified keyword to return per page. Accepts values from 1 to + 100 (e.g., `20`). + + + Get paid ads for domain: Maximum number of keywords the domain is advertising on to return per page. Accepts + values from 1 to 100 (e.g., `100`). schema: - type: string - example: us - - name: keyword + type: integer + default: 100 + - name: domain in: query - description: Search by keyword instead of domain. Mutually exclusive with domain. + description: Specific domain for which to retrieve its paid ad data (e.g., `booking.com`). schema: type: string - - name: page - in: query - schema: - type: integer - default: 1 - example: 1 responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} - /v1/domain/competitors: + application/json: + schema: + anyOf: + - type: array + items: + type: object + properties: + domain: + type: string + description: Domain name that ran ads for the target keyword (e.g., `hotels.com`). + ads_count: + type: integer + description: >- + Number of unique ad creatives or instances observed from this domain for the target keyword + within the specified period (e.g., `19`). + keywords_count: + type: integer + description: >- + Number of other keywords the domain was also seen advertising on, providing context on the + advertiser’s breadth (e.g., `78972`). + traffic_sum: + type: integer + description: >- + Estimation of the total traffic this domain received from its ads for all its keywords, not + just the target one (e.g., `3565364`). + price_sum: + type: number + description: Estimated traffic value (PPC equivalent) from paid keywords. + snippets: + type: object + properties: + 2023-05: + type: object + properties: + position: + type: integer + description: Observed position of the ad snippet on the SERP (e.g., `2`). + snippet_title: + type: string + description: Title text of the specific advertisement (e.g., `Booking`). + snippet_description: + type: string + description: >- + Descriptive text body of the specific advertisement (e.g., `Stay 10 nights & get 1 + free!...`). + snippet_display_url: + type: string + description: URL displayed in the specific advertisement (e.g., `www.hotels.com/`). + snippet_count: + type: string + description: Count or frequency of this specific snippet being observed (e.g., `1`). + url: + type: string + description: >- + Actual destination URL (landing page) of the specific advertisement (e.g., + `https://www.hotels.com/`). + title: Get paid ads by keyword + - type: array + items: + type: object + properties: + keyword: + type: string + description: >- + Keyword phrase that the specified domain was advertising on (e.g., `locanda vivaldi + venice`). + ads_count: + type: integer + description: >- + Number of unique ad creatives or instances observed from the specified domain for this + keyword within the given period (e.g., `24`). + competition: + type: string + description: Score representing keyword competition. Float from `0.00` (low) to `1.00` (high). + cpc: + type: string + description: Average CPC (Cost Per Click) for the keyword (e.g.,` 5.64`). + volume: + type: string + description: Average monthly search volume for this keyword (e.g., `100`). + snippets: + type: object + properties: + 2017-01: + type: object + properties: + position: + type: string + description: Observed position of the ad snippet on the SERP (e.g., `2`). + snippet_title: + type: string + description: >- + Title text of the specific advertisement (e.g., `Locanda Vivaldi, Venice - + Booking.com`). + snippet_description: + type: string + description: >- + Descriptive text body of the specific advertisement (e.g., `Book at Locanda Vivaldi, + Venice. No reservation costs...`). + snippet_display_url: + type: string + description: >- + URL displayed in the specific advertisement (e.g., + `www.booking.com/hotel/it/locanda-vivaldi.en.html?a`). + snippet_count: + type: string + description: Count or frequency of the specific snippet being observed (e.g., `1`). + snippet_num: + type: integer + description: Numerical identifier for the specific ad snippet (e.g., `125`). + url: + type: string + description: >- + Actual destination URL (landing page) of the specific advertisement (e.g., + `http://www.booking.com/hotel/it/locanda-vivaldi.en.html?aid=311088`). + title: Get paid ads for domain + examples: + getPaidAdsByKeyword: + summary: Get paid ads by keyword + value: + - domain: examplehotelchain.com + ads_count: 5 + keywords_count: 250 + traffic_sum: 150000 + price_sum: 75000.5 + snippets: + 2023-05: + position: 1 + snippet_title: Luxury London Stays | Example Hotels‎ + snippet_description: >- + Experience unparalleled luxury. Book your 5-star hotel in London today. Exclusive offers + available for a limited time. + snippet_display_url: www.examplehotelchain.com/london + snippet_count: "1" + url: https://www.examplehotelchain.com/offers/london-luxury + getPaidAdsForDomain: + summary: Get paid ads for domain + value: + - keyword: locanda vivaldi venice + ads_count: 24 + competition: "0.39" + cpc: "5.64" + volume: "100" + snippets: + 2017-01: + position: "2" + snippet_title: Locanda Vivaldi, Venice – Booking.com‎ + snippet_description: >- + Book at Locanda Vivaldi, Venice. No reservation costs. Great rates Amenities: Free Wifi, Non + Smoking Rooms, 24 Hour Front Desk, Air Conditioning + snippet_display_url: www.booking.com/hotel/it/locanda-vivaldi.en.html?a + snippet_count: "1" + snippet_num: 125 + url: http://www.booking.com/hotel/it/locanda-vivaldi.en.html?aid=311088 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/domain/ads?source=us&keyword=nyc+hotels&from=2023-01&to=2023-12&limit=10' \ + + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/domain/ads?source=us&domain=booking.com&from=2023-01&to=2023-12&limit=10' \ + + -H 'Authorization: Token YOUR_API_KEY' + /v1/domain/competitors: get: operationId: getDomainCompetitors tags: - Domain Analysis - summary: Competitors + summary: Get domain competitors description: >- - Identifies a list of top organic or paid competitors for a specified - domain and shows the number of keywords they have in common. + Retrieves a list of competitor domains for a specified target domain. The list can be tailored to show organic + or paid competitors, and can optionally include or exclude major industry players. Furthermore, the level of + detail in the response can be adjusted to include basic information or more extensive statistics for each + competitor. The maximum number of competitors returned is 500. + + + **Cost:** 100 credits per request + + + If the request is successful, the server returns a JSON array. Each object in this array represents a competitor + domain. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/domain-analysis/#competitors parameters: - - name: apikey + - name: source in: query + required: true + description: >- + Country code of the regional keyword database (e.g., `us`). For acceptable values, see [Regional database + codes](https://seranking.com/api/data/reference#regional-database-codes). schema: type: string - example: '{{secret_key_data}}' - name: domain in: query + required: true + description: Primary domain for which to find competitors (e.g., `seranking.com`). schema: type: string - example: seranking.com - name: type in: query + description: |- + Search traffic type for which data is retrieved: + • `organic` – organic search traffic + • `adv` – paid search traffic schema: type: string - enum: - - organic - - adv - example: organic + default: organic + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + domain: + type: string + description: Domain name of the competitor (e.g., `tripadvisor.com`). + common_keywords: + type: integer + description: Number of keywords for which both the analyzed domain and the competitor rank (e.g., `1076`). + domain_relevance: + type: number + description: >- + A score indicating how closely the competitor’s keyword profile overlaps with the analyzed + domain (e.g., `10.98`). Higher values indicate greater relevance. + total_keywords: + type: integer + description: >- + Number of keywords for which the competitor domain ranks within Google’s top 100 results in the + specified database (e.g., `2084`). + missing_keywords: + type: integer + description: >- + Number of keywords for which the competitor ranks but the analyzed domain does not (e.g., + `19511`). Calculated as `total_keywords - common_keywords`. + traffic_sum: + type: integer + description: >- + Estimated monthly traffic volume the competitor receives from its ranking keywords (e.g., + `291`). This is typically calculated based on expected CTR, search volume, and positions. + price_sum: + type: number + description: Estimated traffic value (PPC equivalent) of the competitor’s traffic. + example: + - domain: seoreviewtools.com + common_keywords: 29926 + domain_relevance: 10.98 + total_keywords: 49437 + missing_keywords: 19511 + traffic_sum: 40619 + price_sum: 68705.61 + - domain: keyword-tools.org + common_keywords: 10110 + domain_relevance: 2.7 + total_keywords: 11183 + missing_keywords: 1073 + traffic_sum: 19544 + price_sum: 26071.28 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/domain/competitors?source=us&domain=yourtargetdomain.com&type=organic' \ + + -H 'Authorization: Token YOUR_API_KEY' + /v1/domain/keywords/comparison: + get: + operationId: getDomainKeywordsComparison + tags: + - Domain Analysis + summary: Analyze keyword overlap and gaps + description: >- + Analyzes and compares the keyword rankings of two websites using either domains or full URLs. It can find + keywords they have in common or identify a ‘keyword gap’— keywords for which one site ranks, but the other does + not. This is useful for competitive analysis and identifying ranking opportunities. + + + **Cost:** 100 credits per request + + + **Note:** Either `domain` or `url` must be specified. + + When one option is provided, the other is ignored. + + + **Understanding the diff parameter** + + + The `diff` parameter controls the comparison mode by defining which set of keywords to return. For these + examples, let **A** be the primary `domain` and **B** be the `compare` domain. + + + **diff=0: common keywords (A ∩ B)** + + + Returns keywords for which **both** the primary `domain` (A) and the `compare` domain (B) rank. + + + **diff=1: keyword gap (A – B)** + + + Returns keywords for which the primary `domain` (A) ranks, but the `compare` domain (B) does **not**. + + + To find the keywords for which the compare domain ranks but your primary domain does not, simply swap the + domains in your request. Set the competitor’s domain as the primary domain and your domain as the compare + domain, while keeping `diff=1`. + + + For example, to see keywords `hotels.com` has that `booking.com` lacks, request: + `...&domain=hotels.com&compare=booking.com&diff=1...` + + + If the request is successful, the server returns a JSON array. Each object in this array represents a keyword + and includes metrics for both the primary domain and the compare domain (where applicable, depending on the diff + mode). + externalDocs: + description: Documentation + url: https://seranking.com/api/data/domain-analysis/#domain-comparison + parameters: - name: source in: query required: true + description: >- + Country code of the regional keyword database (e.g., `us`). For acceptable values, see [Regional database + codes](https://seranking.com/api/data/reference#regional-database-codes). + schema: + type: string + - name: domain + in: query + description: Primary domain for the comparison (e.g., `booking.com`). schema: type: string - example: us - name: url in: query - description: Specific URL to analyze instead of the full domain. + description: Primary full URL for the comparison (e.g., `https://www.booking.com`). + schema: + type: string + - name: compare + in: query + required: true + description: >- + Competitor domain or full URL to compare against the primary domain or URL. Must match the type of the + primary parameter (`domain` or `url`). + schema: + type: string + - name: type + in: query + description: |- + Search traffic type for which data is retrieved: + • `organic` – organic search traffic + • `adv` – paid search traffic schema: type: string - example: https://seranking.com/api.html - - name: stats + default: organic + - name: page in: query - description: Include additional statistics (0 or 1). + description: Page number for paginated results when retrieving keywords (e.g., `1`). Positive integer. schema: type: integer - enum: - - 0 - - 1 - default: 0 - example: 0 - responses: - '200': - description: Successful response - content: - application/json: {} - /v1/domain/keywords/comparison: - get: - operationId: getDomainKeywordsComparison - tags: - - Domain Analysis - summary: Domain keyword comparison - description: >- - Compares two domains to find either their common keywords or the - keywords for which one ranks and the other does not. - parameters: - - name: apikey + default: 1 + - name: limit in: query + description: Maximum number of keywords to return per page (e.g., `50`). Accepts values from 1 to 1000. + schema: + type: integer + default: 100 + - name: diff + in: query + description: "Controls the comparison mode. Accepts values: 0, 1. See the section below for a detailed explanation." schema: type: string - example: '{{secret_key_data}}' - - name: source + default: "0" + - name: order_field + in: query + description: |- + Field by which results are sorted: + • `keyword` + • `volume` + • `cpc` + • `competition` + • `difficulty` + • `position` + schema: + type: string + default: keyword + - name: order_type in: query + description: |- + Sorting order: + • `asc` – ascending + • `desc` – descending schema: type: string - example: us - - name: compare + default: asc + - name: cols in: query + description: >- + Comma-separated list of response fields to include. If omitted, a default set of relevant columns is + returned. schema: type: string - example: samsung.com - - name: domain + default: All relevant by default + - name: filter[keyword] in: query + description: Case-insensitive substring match on the keyword text (e.g., `vegas`). schema: type: string - example: apple.com - - name: url + - name: filter[multi_keyword_included] in: query - description: Specific URL to compare instead of full domain. + description: >- + JSON string specifying keyword text that must be included. See [Text search JSON + structure](https://seranking.com/api/data/domain-analysis/#text-search-json-structure) for formatting + details. schema: type: string - example: https://www.apple.com - - name: type + - name: filter[multi_keyword_excluded] in: query + description: >- + JSON string specifying keyword text that must be excluded. See [Text search JSON + structure](https://seranking.com/api/data/domain-analysis/#text-search-json-structure) for formatting + details. schema: type: string - example: organic - - name: diff + - name: filter[volume][from] in: query + description: Minimum monthly search volume for keywords to be included. Non-negative integer. schema: type: integer - example: 1 - - name: order_type + - name: filter[volume][to] in: query + description: Maximum monthly search volume for keywords to be included. Non-negative integer. schema: - type: string - enum: - - asc - - desc - example: desc - - name: order_field + type: integer + - name: filter[cpc][from] in: query + description: Minimum CPC (Cost Per Click) value (e.g., `0.1`). Non-negative float. schema: - type: string - enum: - - keyword - - volume - - cpc - - competition - - difficulty - - position - example: volume - - name: limit + type: number + - name: filter[cpc][to] + in: query + description: Maximum CPC (Cost Per Click) value (e.g., `2.5`). Non-negative float. + schema: + type: number + - name: filter[competition][from] + in: query + description: Minimum competition score. Float from `0.00` (low) to `1.00` (high). + schema: + type: number + - name: filter[competition][to] + in: query + description: Maximum competition score. Float from `0.00` (low) to `1.00` (high). + schema: + type: number + - name: filter[difficulty][from] in: query + description: Minimum keyword difficulty score (0–100). schema: type: integer - example: 1 - - name: page + - name: filter[difficulty][to] in: query + description: Maximum keyword difficulty score (0–100). schema: type: integer - example: 0 - - name: cols + - name: filter[intents] + in: query + description: >- + Comma-separated list of search intent codes. Returns keywords matching **any** of the specified intents (OR + logic): + + • `I` – informational + + • `N` – navigational + + • `T` – transactional + + • `C` – commercial + + • `L` – local + schema: + type: string + - name: filter[serp_features] in: query - description: Comma-separated list of columns to include in the response. + description: >- + Comma-separated list of SERP feature codes. Returns keywords where **any** of the specified features is + present on the SERP (OR logic), e.g., `sitelinks,hotel_pack,people_also_ask`. For acceptable values, see + [SERP features](https://seranking.com/api/data/reference/#serp-features). schema: type: string - example: keyword,position,volume,traffic,cpc,competition responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: array + items: + type: object + properties: + keyword: + type: string + description: Analyzed keyword phrase (e.g., `haworth hotel holland mi`). + volume: + type: integer + description: Average monthly number of Google searches for the specified keyword (e.g., `10`). + cpc: + type: number + description: CPC (Cost Per Click) for the keyword (e.g., `3.01`). + competition: + type: number + description: Score representing keyword competition. Float from `0.00` (low) to `1.00` (high). + difficulty: + type: integer + description: Keyword difficulty for this keyword (from `0` to `100`). + total_sites: + type: integer + description: Number of websites appearing in the search results for the query (e.g., `94`). + intents: + type: array + items: + type: string + description: |- + Search intent codes associated with the keyword. Possible values: + • `I` – informational + • `N` – navigational + • `T` – transactional + • `C` – commercial + • `L` – local + description: |- + Search intent codes associated with the keyword. Possible values: + • `I` – informational + • `N` – navigational + • `T` – transactional + • `C` – commercial + • `L` – local + serp_features: + type: array + items: + type: string + description: >- + SERP features present for this keyword on the SERP (e.g., `sitelinks`, `hotel_pack`, + `people_also_ask`). For acceptable values, see [SERP + features](https://seranking.com/api/data/reference/#serp-features). + description: >- + SERP features present for this keyword on the SERP (e.g., `sitelinks`, `hotel_pack`, + `people_also_ask`). For acceptable values, see [SERP + features](https://seranking.com/api/data/reference/#serp-features). + compare_position: + type: integer + description: Ranking position of the `compare` domain for this keyword (e.g., `5`). + compare_url: + type: string + description: >- + URL of the `compare` domain’s page that ranks for this keyword (e.g., + `https://www.hotels.com/ho576868/haworth/`). + compare_price: + type: number + description: >- + Estimated cost/value of the traffic the `compare` domain receives from this keyword (e.g., + `1.84`). + compare_traffic: + type: integer + description: Estimated traffic the `compare` domain receives from this keyword (e.g., `0.61`). + position: + type: integer + description: >- + Ranking position of the primary domain for the keyword (e.g., `4`). Can be null if `diff=1` and + the primary domain doesn’t rank. + url: + type: string + description: >- + URL of the primary domain’s page that ranks for this keyword (e.g., + `https://www.booking.com/hotel/us/haworth-inn-center.html`). Can be null if `diff=1`. + price: + type: number + description: >- + Estimated cost/value of the traffic the primary domain receives from this keyword (e.g., + `2.44`). Can be null if `diff=1`. + traffic: + type: integer + description: >- + Estimated traffic the primary domain receives from this keyword (e.g., `0.81`). Can be null if + `diff=1`. + examples: + example1: + summary: Example 1 + value: + - keyword: "403" + volume: 33100 + cpc: 0.11 + competition: 0.05 + difficulty: 96 + total_sites: 0 + intents: + - I + serp_features: + - video + - images + - knowledge_graph + - sge + compare_position: 21 + compare_url: https://seranking.com/blog/401-vs-403-error-codes/ + compare_price: 3.52 + compare_traffic: 32 + position: 25 + url: https://www.wix.com/encyclopedia/definition/error-403 + price: 7.81 + traffic: 71 + example2: + summary: Example 2 + value: + - keyword: "403" + volume: 33100 + cpc: 0.11 + competition: 0.05 + difficulty: 96 + total_sites: 0 + intents: + - I + serp_features: + - video + - images + - knowledge_graph + - sge + compare_position: 21 + compare_url: https://seranking.com/blog/401-vs-403-error-codes/ + compare_price: 3.52 + compare_traffic: 32 + position: 25 + url: https://www.wix.com/encyclopedia/definition/error-403 + price: 7.81 + traffic: 71 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: Comparing domain names + source: >- + curl -X GET + 'https://api.seranking.com/v1/domain/keywords/comparison?source=us&domain=booking.com&compare=hotels.com&type=organic&diff=0&order_field=volume&order_type=desc' + \ + + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: Comparing URLs + source: >- + curl -X GET + 'https://api.seranking.com/v1/domain/keywords/comparison?source=us&url=https://www.booking.com&compare=https://www.hotels.com&type=organic&diff=1&order_type=desc&order_field=volume' + \ + + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: Comparing URLs + source: >- + curl -X GET + 'https://api.seranking.com/v1/domain/keywords/comparison?source=us&domain=booking.com&compare=hotels.com&type=organic&diff=0&filter[intents]=T&filter[volume][from]=1000&cols=keyword,volume,intents,position,compare_position' + \ + + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/domain/keywords/comparison?source=us&domain=booking.com&compare=hotels.com&type=organic&diff=0&limit=1' + \ + + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/domain/keywords/comparison?source=us&domain=booking.com&compare=hotels.com&type=organic&diff=1&limit=1' + \ + + -H 'Authorization: Token YOUR_API_KEY' /v1/keywords/export: post: operationId: createKeywordsExport tags: - Keyword Research - summary: Export Keywords Metrics + summary: Get Keyword Metrics (Bulk) description: >- - Retrieves bulk performance metrics like search volume, CPC, and - difficulty for a submitted list of up to 5,000 keywords. + Retrieves various data points for a list of specified keywords within a given regional database. It’s designed + for bulk analysis and returns metrics like search volume, CPC, competition, keyword difficulty, search intent, + and historical search volume trends for each submitted keyword. + + + By default, the returned `history_trend` covers the **12 most recent months, ending at the current month**. Use + the optional `history_to` parameter to end the window at an earlier month, and `history_from` to start it later + — together they return a custom date range (e.g. to reconstruct a keyword’s seasonality as of a past date). The + window is always **capped at 12 months**. + + + **Cost:** 100 credits per request + + + If successful, the server returns a JSON array. Each object in this array corresponds to one of the keywords + submitted in the request and contains the requested data points. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/keyword-research/#export + parameters: + - name: source + in: query + required: true + description: >- + Country code of the regional keyword database (e.g., `us`). For acceptable values, see Regional database + codes. + schema: + type: string requestBody: + required: true content: - multipart/form-data: + application/json: schema: type: object - required: - - keywords[] properties: - keywords[]: + keywords: type: array items: type: string - description: List of keywords (max 5,000). - maxItems: 5000 + description: >- + Array of keywords to analyze, e.g. `["seo platform", "seranking.com"]`. Between 1 and 5,000 keywords + per request. sort: type: string - enum: - - volume - - cpc - - difficulty - - competition - - history_trend + description: "Field the results are sorted by: `volume`, `cpc`, `difficulty`, or `competition`." sort_order: type: string - enum: - - asc - - desc - cols: + description: "Sorting order: `asc` (ascending) or `desc` (descending)." + history_from: type: string - description: Comma-separated list of columns to include. - parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - - name: source - in: query - required: true - schema: - type: string - example: us + description: >- + Start month of the `history_trend` window, `YYYY-MM-DD` (the day is ignored). **Only takes effect + together with `history_to`** — sent on its own it is ignored. The window then runs from + `history_from` through `history_to` inclusive, capped at the most recent 12 months. Must not be + later than `history_to`. + history_to: + type: string + description: >- + End month of the `history_trend` window, `YYYY-MM-DD` (the day is ignored). On its own it returns + the **12 months ending at this month** — e.g. `2024-05-01` returns `2023-06-01` through + `2024-05-01`. Combine with `history_from` for a shorter range. Must not be a future month. + required: + - keywords + example: + keywords: + - seo platform + - seranking.com + sort: cpc + sort_order: desc responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: array + items: + type: object + properties: + is_data_found: + type: boolean + description: >- + Indicates whether data was successfully found and retrieved for this specific keyword: `true` + (found) / `false` (otherwise). + keyword: + type: string + description: Keyword phrase as submitted in the request. + volume: + type: integer + description: Average monthly search volume for this keyword in the specified source database. + cpc: + type: number + description: Average Cost Per Click for this keyword. + competition: + type: number + description: Paid-search competition level for this keyword, on a 0–1 scale (higher = more competition). + difficulty: + type: integer + description: >- + Keyword difficulty — how hard it is to rank organically for this keyword, on a 0–100 scale + (higher = harder). + intents: + type: array + items: + type: string + description: >- + Array of search intent codes. Possible values: `I` (Informational — user is looking for + information), `C` (Commercial — user is investigating products, services, or brands), `T` + (Transactional — user wants to complete an action or purchase), `L` (Local — user is looking + for a location or something nearby), `N` (Navigational — user is looking for a specific + website or page). + description: >- + Array of search intent codes. Possible values: `I` (Informational — user is looking for + information), `C` (Commercial — user is investigating products, services, or brands), `T` + (Transactional — user wants to complete an action or purchase), `L` (Local — user is looking for + a location or something nearby), `N` (Navigational — user is looking for a specific website or + page). + history_trend: + type: object + properties: + "2024-06-01": + type: integer + "2024-07-01": + type: integer + "2024-08-01": + type: integer + "2024-09-01": + type: integer + "2024-10-01": + type: integer + "2024-11-01": + type: integer + "2024-12-01": + type: integer + "2025-01-01": + type: integer + "2025-02-01": + type: integer + "2025-03-01": + type: integer + "2025-04-01": + type: integer + "2025-05-01": + type: integer + description: >- + Object containing historical search volume data for the keyword. Each key is a `YYYY-MM-DD` + string representing the first day of a month, and the value is the search volume for that month. + By default the window covers the 12 months ending at the current month; it is shifted by + `history_to` and narrowed by `history_from` (see Request). + example: + - is_data_found: true + keyword: seo platform + volume: 160 + cpc: 3.87 + competition: 0.06 + difficulty: 31 + intents: + - C + - I + history_trend: + "2024-06-01": 70 + "2024-07-01": 70 + "2024-08-01": 80 + "2024-09-01": 140 + "2024-10-01": 140 + "2024-11-01": 140 + "2024-12-01": 110 + "2025-01-01": 160 + "2025-02-01": 200 + "2025-03-01": 240 + "2025-04-01": 240 + "2025-05-01": 300 + - is_data_found: true + keyword: seranking.com + volume: 480 + cpc: 2 + competition: 0.01 + difficulty: 16 + intents: + - C + - I + history_trend: + "2024-06-01": 30 + "2024-07-01": 50 + "2024-08-01": 40 + "2024-09-01": 70 + "2024-10-01": 20 + "2024-11-01": 30 + "2024-12-01": 40 + "2025-01-01": 260 + "2025-02-01": 1300 + "2025-03-01": 1600 + "2025-04-01": 1300 + "2025-05-01": 880 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST 'https://api.seranking.com/v1/keywords/export?source=us' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "keywords": ["seo platform", "seranking.com"], + "sort": "cpc", + "sort_order": "desc" + }' + - lang: Shell + label: cURL + source: |- + curl -X POST 'https://api.seranking.com/v1/keywords/export?source=us' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "keywords": ["seo platform"], + "history_from": "2024-01-01", + "history_to": "2024-05-01" + }' /v1/keywords/similar: get: operationId: getKeywordsSimilar @@ -3160,164 +8926,319 @@ paths: - Keyword Research summary: Get similar keywords description: >- - Discovers semantically similar keywords, including synonyms and close - variations, for a given seed term. + Retrieves keywords similar to a specified seed keyword within a regional database. Semantically similar keywords + include synonyms, close variations, or different phrasings with the same intent. The method returns metrics such + as search volume, CPC, competition, keyword difficulty, search intent, and historical trends. + + + **Cost:** 10 credits per returned keyword + + + If successful, the server returns a JSON object containing the total count of available similar keywords and an + array of keyword objects. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/keyword-research/#similar parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: source in: query + required: true + description: >- + Country code of the regional keyword database (e.g., `us`). For acceptable values, see [Regional database + codes](https://seranking.com/api/data/reference#regional-database-codes). schema: type: string - example: us - name: keyword in: query + required: true + description: Seed keyword used to find similar keywords (e.g., `avocado`). schema: type: string - example: seo - name: limit in: query + description: Maximum number of keywords to return per page (e.g., `10`). Positive integer. schema: type: integer - example: 100 + default: 100 - name: offset in: query + description: Starting offset for pagination (e.g., `0`). Non-negative integer. schema: type: integer - example: 0 + default: 0 - name: sort in: query + description: |- + Field by which keywords are sorted: + • `keyword` + • `volume` + • `cpc` + • `difficult`y + • `competition` schema: type: string - example: keyword - name: sort_order in: query + description: |- + Sorting order: + • `asc` – ascending + • `desc` – descending schema: type: string - example: asc + default: desc - name: history_trend in: query + description: |- + Indicates whether to include historical search volume trend data in the response: + • `true` + • `false` schema: type: boolean - example: true + default: false - name: filter[volume][from] in: query + description: Minimum monthly search volume (e.g., `50`). Non-negative integer. schema: type: integer - example: 100 - name: filter[volume][to] in: query + description: Maximum monthly search volume (e.g., `5000`). Non-negative integer. schema: type: integer - example: 100000 - name: filter[difficulty][from] in: query + description: Minimum keyword difficulty score. Integers from 0 to 100. schema: type: integer - example: 0 - name: filter[difficulty][to] in: query + description: Maximum keyword difficulty score. Integers from 0 to 100. schema: type: integer - example: 30 - name: filter[cpc][from] in: query + description: Minimum Cost Per Click (e.g., `0.1`). Non-negative float. schema: - type: integer - example: 0 + type: number - name: filter[cpc][to] in: query + description: Maximum Cost Per Click (e.g., `3`). Non-negative float. schema: - type: integer - example: 100 + type: number - name: filter[competition][from] in: query + description: Minimum competition score (e.g., `0.2`). Floats from 0.0 to 1.0. schema: - type: integer - example: 0 + type: number - name: filter[competition][to] in: query + description: Maximum competition score (e.g., `0.7`). Floats from 0.0 to 1.0. schema: type: number - example: 0.1 - name: filter[keyword_count][from] in: query + description: Minimum number of words in the keyword (e.g., `3`). Positive integer. schema: type: integer - example: 3 - name: filter[keyword_count][to] in: query + description: Maximum number of words in the keyword (e.g., `5`). Positive integer. schema: type: integer - example: 8 - name: filter[characters_count][from] in: query + description: Minimum character length of the keyword (e.g., `20`). Positive integer. schema: type: integer - example: 15 - name: filter[characters_count][to] in: query + description: Maximum character length of the keyword (e.g., `50`). Positive integer. schema: type: integer - example: 50 - name: filter[serp_features] in: query + description: >- + Comma-separated list of SERP features to filter results (e.g., `sge`, `images`, `top_stories`). For + acceptable values, see [SERP features](https://seranking.com/api/data/reference#serp-features). schema: type: string - example: sge,images - name: filter[intents] in: query + description: |- + Comma-separated list of intent codes: + • `I` – informational + • `N` – navigational + • `T` – transactional + • `C` – commercial + • `L` – local schema: type: string - example: I,C,T,L - name: filter[multi_keyword_included] in: query + description: >- + Keywords to include based on specific patterns. Each element is an array of objects with `type` (begins, + contains, ends, exact) and `value` (string to match). schema: - type: string - example: |- - [ - [ - { "type": "begins", "value": "find" }, - { "type": "contains", "value": "link" } - ], - [ - { "type": "contains", "value": "backlink" }, - { "type": "ends", "value": "checker" } - ], - [ - { "type": "exact", "value": "serankings" } - ] - ] + type: array + items: + type: string - name: filter[multi_keyword_excluded] in: query + description: >- + Keywords to exclude based on specific patterns. Each element is an array of objects with `type` (begins, + contains, ends, exact) and `value` (string to match). schema: - type: string - example: |- - [ - [ - { "type": "contains", "value": "seo" }, - { "type": "contains", "value": "tools" } - ], - [ - { "type": "begins", "value": "find" }, - { "type": "contains", "value": "link" } - ], - [ - { "type": "contains", "value": "backlink" }, - { "type": "ends", "value": "checker" } - ], - [ - { "type": "exact", "value": "serankings" } - ] - ] + type: array + items: + type: string responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + total: + type: integer + description: Total number of similar keywords matching the criteria (ignoring `limit` and `offset`). + keywords: + type: array + items: + type: object + properties: + keyword: + type: string + description: Similar keyword phrase. + volume: + type: integer + description: Average monthly search volume for this keyword in the specified source database. + cpc: + type: number + description: Average Cost Per Click for this keyword. + difficulty: + type: integer + description: Score indicating the keyword’s ranking difficulty (0-100). + competition: + type: number + description: Score indicating the level of competition for this keyword (0.0-1.0). + intents: + type: array + items: + type: string + description: Array of search intent codes. + description: Array of search intent codes. + serp_features: + type: array + items: + type: string + description: Array of SERP features associated with the keyword. + description: Array of SERP features associated with the keyword. + history_trend: + type: object + properties: + "2024-05-01": + type: integer + "2024-06-01": + type: integer + "2024-07-01": + type: integer + "2024-08-01": + type: integer + "2024-09-01": + type: integer + "2024-10-01": + type: integer + "2024-11-01": + type: integer + "2024-12-01": + type: integer + "2025-01-01": + type: integer + "2025-02-01": + type: integer + "2025-03-01": + type: integer + "2025-04-01": + type: integer + description: >- + If `history_trend=true` is included in the request, the object contains the historical + search volume for the keyword: + + • Each key is a date string in `YYYY-MM-DD` format (the first day of the month). + + • Each value is the search volume for that month. + + • Can be `null` if historical data is unavailable. + description: Array of objects, each representing a similar keyword with its metrics. + description: Array of objects, each representing a similar keyword with its metrics. + example: + total: 35 + keywords: + - keyword: can you cook with avocado oil + volume: 480 + cpc: 1.2 + difficulty: 6 + competition: 0.4 + intents: + - I + serp_features: + - featured_snippets + - videos + history_trend: + "2024-05-01": 400 + "2024-06-01": 450 + "2024-07-01": 480 + "2024-08-01": 500 + "2024-09-01": 520 + "2024-10-01": 480 + "2024-11-01": 460 + "2024-12-01": 440 + "2025-01-01": 500 + "2025-02-01": 550 + "2025-03-01": 600 + "2025-04-01": 0 + - keyword: avocado recipes + volume: 1000 + cpc: 0.8 + difficulty: 12 + competition: 0.3 + intents: + - I + - C + serp_features: + - recipes + - images + history_trend: + "2024-05-01": 900 + "2024-06-01": 950 + "2024-07-01": 1000 + "2024-08-01": 1050 + "2024-09-01": 1100 + "2024-10-01": 1000 + "2024-11-01": 950 + "2024-12-01": 900 + "2025-01-01": 1050 + "2025-02-01": 1100 + "2025-03-01": 1200 + "2025-04-01": 0 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location + 'https://api.seranking.com/v1/keywords/similar?source=us&keyword=avocado&limit=10&offset=0&sort=keyword&sort_order=asc&history_trend=true&filter[volume][from]=50&filter[volume][to]=5000&filter[difficulty][from]=18&filter[difficulty][to]=40&filter[cpc][from]=0.10&filter[cpc][to]=3.00&filter[competition][from]=0.2&filter[competition][to]=0.7&filter[keyword_count][from]=3&filter[keyword_count][to]=5&filter[characters_count][from]=20&filter[characters_count][to]=50&filter[serp_features]=featured_snippets,images&filter[intents]=I,C&filter[multi_keyword_included]=[[{"type":"contains","value":"oil"}],[{"type":"exact","value":"avocado + recipes"}]]' \ + + --header 'Authorization: Token YOUR_API_KEY' /v1/keywords/related: get: operationId: getKeywordsRelated @@ -3325,164 +9246,328 @@ paths: - Keyword Research summary: Get related keywords description: >- - Finds topically related keywords that share a high number of overlapping - URLs in the search results for a given seed term. + Retrieves keywords that are topically related to a specified seed keyword within a regional database. Topically + related keywords are based on having a high degree of overlapping URLs in their search results. The method + returns metrics such as search volume, CPC, competition, keyword difficulty, search intent, relevance score, and + optional historical search volume trends. + + + **Cost:** 10 credits per returned keyword + + + If successful, the server returns a JSON object containing the total count of available related keywords and an + array of keyword objects. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/keyword-research/#related parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: source in: query + required: true + description: >- + Country code of the regional keyword database (e.g., `us`, `uk`). For acceptable values, see [Regional + database codes](https://seranking.com/api/data/reference#regional-database-codes). schema: type: string - example: us - name: keyword in: query + required: true + description: Seed keyword used to find related keywords (e.g., `avocado`). schema: type: string - example: avocado - name: limit in: query + description: Maximum number of keywords to return per page (e.g., `10`). Positive integer. schema: type: integer - example: 10 + default: 100 - name: offset in: query + description: Starting offset for pagination (e.g., `0`). Non-negative integer. schema: type: integer - example: 0 + default: 0 - name: sort in: query + description: |- + Field by which keywords are sorted: + • `keyword` + **• **`volume` + • `cpc` + • `difficult`y + • `competition` schema: type: string - example: keyword - name: sort_order in: query + description: |- + Sorting order: + • `asc` – ascending + • `desc` – descending schema: type: string - example: asc + default: desc - name: history_trend in: query + description: |- + Indicates whether to include historical search volume trend data in the response: + • `true` + • `false` schema: type: boolean - example: true + default: false - name: filter[volume][from] in: query + description: Minimum monthly search volume (e.g., `50`). Non-negative integer. schema: type: integer - example: 100 - name: filter[volume][to] in: query + description: Maximum monthly search volume (e.g., `5000`). Non-negative integer. schema: type: integer - example: 100000 - name: filter[difficulty][from] in: query + description: Minimum keyword difficulty score. Integers from 0 to 100. schema: type: integer - example: 0 - name: filter[difficulty][to] in: query + description: Maximum keyword difficulty score. Integers from 0 to 100. schema: type: integer - example: 30 - name: filter[cpc][from] in: query + description: Minimum Cost Per Click (e.g., `0.1`). Non-negative float. schema: - type: integer - example: 0 + type: number - name: filter[cpc][to] in: query + description: Maximum Cost Per Click (e.g., `3`). Non-negative float. schema: - type: integer - example: 100 + type: number - name: filter[competition][from] in: query + description: Minimum competition score (e.g., `0.2`). Floats from 0.0 to 1.0. schema: - type: integer - example: 0 + type: number - name: filter[competition][to] in: query + description: Maximum competition score (e.g., `0.7`). Floats from 0.0 to 1.0. schema: type: number - example: 0.1 - name: filter[keyword_count][from] in: query + description: Minimum number of words in the keyword (e.g., `3`). Positive integer. schema: type: integer - example: 3 - name: filter[keyword_count][to] in: query + description: Maximum number of words in the keyword (e.g., `5`). Positive integer. schema: type: integer - example: 8 - name: filter[characters_count][from] in: query + description: Minimum character length of the keyword (e.g., `20`). Positive integer. schema: type: integer - example: 15 - name: filter[characters_count][to] in: query + description: Maximum character length of the keyword (e.g., `50`). Positive integer. schema: type: integer - example: 50 - name: filter[serp_features] in: query + description: |- + Comma-separated list of SERP features to filter results (e.g., `sge`, `images`, `top_stories`). + For acceptable values, see [SERP features](https://seranking.com/api/data/reference#serp-features). schema: type: string - example: sge,images - name: filter[intents] in: query + description: |- + Comma-separated list of intent codes: + • `I` – informational + • `N` – navigational + • `T` – transactional + • `C` – commercial + • `L` – local schema: type: string - example: I,C,T,L - name: filter[multi_keyword_included] in: query + description: >- + Keywords to include based on specific patterns. Each element is an array of objects with `type` (begins, + contains, ends, exact) and `value` (string to match). schema: - type: string - example: |- - [ - [ - { "type": "begins", "value": "find" }, - { "type": "contains", "value": "link" } - ], - [ - { "type": "contains", "value": "backlink" }, - { "type": "ends", "value": "checker" } - ], - [ - { "type": "exact", "value": "serankings" } - ] - ] + type: array + items: + type: string - name: filter[multi_keyword_excluded] in: query + description: >- + Keywords to exclude based on specific patterns. Each element is an array of objects with `type` (begins, + contains, ends, exact) and `value` (string to match). schema: - type: string - example: |- - [ - [ - { "type": "contains", "value": "seo" }, - { "type": "contains", "value": "tools" } - ], - [ - { "type": "begins", "value": "find" }, - { "type": "contains", "value": "link" } - ], - [ - { "type": "contains", "value": "backlink" }, - { "type": "ends", "value": "checker" } - ], - [ - { "type": "exact", "value": "serankings" } - ] - ] + type: array + items: + type: string responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + total: + type: integer + description: Total number of related keywords matching the criteria (ignoring `limit` and `offset`). + keywords: + type: array + items: + type: object + properties: + keyword: + type: string + description: Related keyword phrase. + cpc: + type: integer + description: Average Cost Per Click for this keyword. + difficulty: + type: integer + description: Score indicating the keyword’s ranking difficulty (0-100). + volume: + type: integer + description: Average monthly search volume for this keyword in the specified source database. + competition: + type: number + description: Score indicating the level of competition for this keyword (0.0-1.0). + serp_features: + type: array + items: + type: string + description: Array of SERP features associated with the keyword. + description: Array of SERP features associated with the keyword. + relevance: + type: integer + description: Relevance score of the returned keyword in relation to the queried keyword. + intents: + type: array + items: + type: string + description: Array of search intent codes. + description: Array of search intent codes. + history_trend: + type: object + properties: + "2024-06-01": + type: integer + "2024-07-01": + type: integer + "2024-08-01": + type: integer + "2024-09-01": + type: integer + "2024-10-01": + type: integer + "2024-11-01": + type: integer + "2024-12-01": + type: integer + "2025-01-01": + type: integer + "2025-02-01": + type: integer + "2025-03-01": + type: integer + "2025-04-01": + type: integer + "2025-05-01": + type: integer + description: >- + If `history_trend=true` is included in the request, the object contains the historical + search volume for the keyword: + + • Each key is a date string in `YYYY-MM-DD` format (the first day of the month). + + • Each value is the search volume for that month. + + • Can be `null` if historical data is unavailable. + description: Array of objects, each representing a related keyword with its metrics. + description: Array of objects, each representing a related keyword with its metrics. + example: + total: 21 + keywords: + - keyword: avocado anbauen deutschland + cpc: 0 + difficulty: 9 + volume: 140 + competition: 0.06 + serp_features: + - images + - sge + - related_searches + relevance: 6 + intents: + - I + history_trend: + "2024-06-01": 140 + "2024-07-01": 170 + "2024-08-01": 140 + "2024-09-01": 140 + "2024-10-01": 110 + "2024-11-01": 90 + "2024-12-01": 110 + "2025-01-01": 170 + "2025-02-01": 140 + "2025-03-01": 260 + "2025-04-01": 140 + "2025-05-01": 170 + - keyword: avocado baum deutschland + cpc: 0 + difficulty: 9 + volume: 110 + competition: 0.09 + serp_features: + - featured_snippets + - reviews + - images + - sge + - related_searches + relevance: 6 + intents: + - I + history_trend: + "2024-06-01": 90 + "2024-07-01": 110 + "2024-08-01": 110 + "2024-09-01": 110 + "2024-10-01": 110 + "2024-11-01": 90 + "2024-12-01": 90 + "2025-01-01": 70 + "2025-02-01": 110 + "2025-03-01": 170 + "2025-04-01": 140 + "2025-05-01": 140 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location + 'https://api.seranking.com/v1/keywords/related?source=us&keyword=avocado&limit=10&offset=0&sort=keyword&sort_order=asc&history_trend=true&filter[volume][from]=50&filter[volume][to]=5000&filter[difficulty][from]=18&filter[difficulty][to]=40&filter[cpc][from]=0.10&filter[cpc][to]=3.00&filter[competition][from]=0.2&filter[competition][to]=0.7&filter[keyword_count][from]=3&filter[keyword_count][to]=5&filter[characters_count][from]=20&filter[characters_count][to]=50&filter[serp_features]=featured_snippets,images&filter[intents]=I,C&filter[multi_keyword_included]=[[{"type":"contains","value":"oil"}],[{"type":"exact","value":"avocado + recipes"}]]' \ + + --header 'Authorization: Token YOUR_API_KEY' /v1/keywords/questions: get: operationId: getKeywordsQuestions @@ -3490,164 +9575,335 @@ paths: - Keyword Research summary: Get question keywords description: >- - Generates a list of keywords phrased as common user questions that are - relevant to a given seed term. + Retrieves keywords phrased as common user questions related to a specified seed keyword within a regional + database. The method returns metrics such as search volume, CPC, competition, keyword difficulty, search intent, + and optional historical search volume trends. + + + **Cost:** 10 credits per returned keyword + + + If successful, the server returns a JSON object containing the total count of available question keywords and an + array of keyword objects. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/keyword-research/#questions parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: source in: query + required: true + description: >- + Country code of the regional keyword database (e.g., `us`). For acceptable values, see [Regional database + codes](https://seranking.com/api/data/reference#regional-database-codes). schema: type: string - example: us - name: keyword in: query + required: true + description: Seed keyword to retrieve question-style keywords (e.g., `avocado`). schema: type: string - example: avocado - name: limit in: query + description: Maximum number of keywords to return per page (e.g., `10`). Positive integer. schema: type: integer - example: 10 + default: 100 - name: offset in: query + description: Starting offset for pagination (e.g., `0`). Non-negative integer. schema: type: integer - example: 0 + default: 0 - name: sort in: query + description: |- + Field by which keywords are sorted: + • `keyword` + • `volume` + • `cpc` + • `difficult`y + • `competition` schema: type: string - example: keyword - name: sort_order in: query + description: |- + Sorting order: + • `asc` – ascending + • `desc` – descending schema: type: string - example: asc + default: desc - name: history_trend in: query + description: |- + Indicates whether to include historical search volume trend data in the response: + • `true` + • `false` schema: type: boolean - example: true + default: false - name: filter[volume][from] in: query + description: Minimum monthly search volume (e.g., `50`). Non-negative integer. schema: type: integer - example: 100 - name: filter[volume][to] in: query + description: Maximum monthly search volume (e.g., `5000`). Non-negative integer. schema: type: integer - example: 100000 - name: filter[difficulty][from] in: query + description: Minimum keyword difficulty score. Integers from 0 to 100. schema: type: integer - example: 0 - name: filter[difficulty][to] in: query + description: Maximum keyword difficulty score. Integers from 0 to 100. schema: type: integer - example: 30 - name: filter[cpc][from] in: query + description: Minimum Cost Per Click (e.g., `0.1`). Non-negative float. schema: - type: integer - example: 0 + type: number - name: filter[cpc][to] in: query + description: Maximum Cost Per Click (e.g., `3`). Non-negative float. schema: - type: integer - example: 100 + type: number - name: filter[competition][from] in: query + description: Minimum competition score (e.g., `0.2`). Floats from 0.0 to 1.0. schema: - type: integer - example: 0 + type: number - name: filter[competition][to] in: query + description: Maximum competition score (e.g., `0.7`). Floats from 0.0 to 1.0. schema: type: number - example: 0.1 - name: filter[keyword_count][from] in: query + description: Minimum number of words in the keyword (e.g., `3`). Positive integer. schema: type: integer - example: 3 - name: filter[keyword_count][to] in: query + description: Maximum number of words in the keyword (e.g., `5`). Positive integer. schema: type: integer - example: 8 - name: filter[characters_count][from] in: query + description: Minimum character length of the keyword (e.g., `20`). Positive integer. schema: type: integer - example: 15 - name: filter[characters_count][to] in: query + description: Maximum character length of the keyword (e.g., `50`). Positive integer. schema: type: integer - example: 50 - name: filter[serp_features] in: query + description: >- + Comma-separated list of SERP features to filter results (e.g., `sge`, `images`, `top_stories`). For + acceptable values, see [SERP features](https://seranking.com/api/data/reference#serp-features). schema: type: string - example: sge,images - name: filter[intents] in: query + description: |- + Comma-separated list of intent codes: + • `I` – informational + • `N` – navigational + • `T` – transactional + • `C` – commercial + • `L` – local schema: type: string - example: I,C,T,L - name: filter[multi_keyword_included] in: query + description: >- + Keywords to include based on specific patterns. Each element is an array of objects with `type` (begins, + contains, ends, exact) and `value` (string to match). schema: - type: string - example: |- - [ - [ - { "type": "begins", "value": "find" }, - { "type": "contains", "value": "link" } - ], - [ - { "type": "contains", "value": "backlink" }, - { "type": "ends", "value": "checker" } - ], - [ - { "type": "exact", "value": "serankings" } - ] - ] + type: array + items: + type: string - name: filter[multi_keyword_excluded] in: query + description: >- + Keywords to exclude based on specific patterns. Each element is an array of objects with `type` (begins, + contains, ends, exact) and `value` (string to match). schema: - type: string - example: |- - [ - [ - { "type": "contains", "value": "seo" }, - { "type": "contains", "value": "tools" } - ], - [ - { "type": "begins", "value": "find" }, - { "type": "contains", "value": "link" } - ], - [ - { "type": "contains", "value": "backlink" }, - { "type": "ends", "value": "checker" } - ], - [ - { "type": "exact", "value": "serankings" } - ] - ] + type: array + items: + type: string responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + total: + type: integer + description: Total number of question keywords matching the criteria (ignoring `limit` and `offset`). + keywords: + type: array + items: + type: object + properties: + keyword: + type: string + description: Question keyword phrase. + cpc: + type: integer + description: Average Cost Per Click for this keyword. + difficulty: + type: integer + description: Score indicating the keyword’s ranking difficulty (0-100). + volume: + type: integer + description: Average monthly search volume for this keyword in the specified source database. + competition: + type: number + description: Score indicating the level of competition for this keyword (0.0-1.0). + serp_features: + type: array + items: + type: string + description: Array of SERP features associated with the keyword. + description: Array of SERP features associated with the keyword. + intents: + type: array + items: + type: string + description: Array of search intent codes. + description: Array of search intent codes. + history_trend: + type: object + properties: + "2024-06-01": + type: integer + "2024-07-01": + type: integer + "2024-08-01": + type: integer + "2024-09-01": + type: integer + "2024-10-01": + type: integer + "2024-11-01": + type: integer + "2024-12-01": + type: integer + "2025-01-01": + type: integer + "2025-02-01": + type: integer + "2025-03-01": + type: integer + "2025-04-01": + type: integer + "2025-05-01": + type: integer + nullable: true + description: >- + If `history_trend=true` is included in the request, the object contains the historical + search volume for the keyword: + + • Each key is a date string in `YYYY-MM-DD` format (the first day of the month). + + • Each value is the search volume for that month. + + • Can be `null` if historical data is unavailable. + description: Array of objects, each representing a question keyword with its metrics. + description: Array of objects, each representing a question keyword with its metrics. + example: + total: 3 + keywords: + - keyword: für welche organe sind avocados gut + cpc: 0 + difficulty: 11 + volume: 140 + competition: 0 + serp_features: + - images + - sge + - related_searches + intents: + - I + history_trend: null + - keyword: how are avocados grown + cpc: 0 + difficulty: 24 + volume: 110 + competition: 0.03 + serp_features: + - featured_snippets + - reviews + - images + - related_searches + intents: + - I + history_trend: + "2024-06-01": 140 + "2024-07-01": 140 + "2024-08-01": 110 + "2024-09-01": 90 + "2024-10-01": 140 + "2024-11-01": 90 + "2024-12-01": 70 + "2025-01-01": 110 + "2025-02-01": 90 + "2025-03-01": 110 + "2025-04-01": 90 + "2025-05-01": 140 + - keyword: how to ripen avocados fast + cpc: 0 + difficulty: 19 + volume: 170 + competition: 0.01 + serp_features: + - featured_snippets + - people_also_ask + - sge + - related_searches + intents: + - I + history_trend: + "2024-06-01": 210 + "2024-07-01": 170 + "2024-08-01": 140 + "2024-09-01": 110 + "2024-10-01": 170 + "2024-11-01": 170 + "2024-12-01": 140 + "2025-01-01": 210 + "2025-02-01": 140 + "2025-03-01": 140 + "2025-04-01": 210 + "2025-05-01": 210 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --globoff + 'https://api.seranking.com/v1/keywords/questions?source=us&keyword=avocado&limit=10&offset=0&sort=keyword&sort_order=asc&history_trend=true&filter[volume][from]=100&filter[volume][to]=100000&filter[difficulty][from]=0&filter[difficulty][to]=30&filter[cpc][from]=0&filter[cpc][to]=100&filter[competition][from]=0&filter[competition][to]=0.1&filter[keyword_count][from]=3&filter[keyword_count][to]=8&filter[characters_count][from]=15&filter[characters_count][to]=50&filter[serp_features]=sge,images&filter[intents]=I,C&filter[multi_keyword_included]=[[{"type":"contains","value":"oil"}],[{"type":"exact","value":"avocado + recipes"}]]' \ + + --header 'Authorization: Token YOUR_API_KEY' /v1/keywords/longtail: get: operationId: getKeywordsLongtail @@ -3655,701 +9911,1153 @@ paths: - Keyword Research summary: Get longtail keywords description: >- - Provides a list of longer, more specific long-tail keyword variations - related to a given seed term. + Retrieves long-tail keywords related to a specified seed keyword within a regional database. Long-tail keywords + have a lower search volume, often indicating more specific user intent and less competition. + + + **Cost:** 1 credit per returned keyword + + + If successful, the server returns a JSON object containing the total count of available longtail keywords and an + array of keyword strings. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/keyword-research/#longtail parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: source in: query + required: true + description: >- + Country code of the regional keyword database (e.g., `us`). For acceptable values, see [Regional database + codes](https://seranking.com/api/data/reference#regional-database-codes). schema: type: string - example: us - name: keyword in: query + required: true + description: Seed keyword used to find longtail keywords (e.g., `avocado`). schema: type: string - example: avocado - name: limit in: query + description: Maximum number of keywords to return per page (e.g., `10`). Positive integer. schema: type: integer - example: 10 + default: 100 - name: offset in: query + description: Starting offset for pagination (e.g., `0`). Non-negative integer. schema: type: integer - example: 0 - - name: sort - in: query - schema: - type: string - enum: - - keyword - - volume - - cpc - - difficulty - - competition - example: volume - - name: sort_order + default: 0 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + total: + type: integer + description: Total number of longtail keywords matching the criteria (ignoring `limit` and `offset`). + keywords: + type: array + items: + type: string + description: Array of longtail keyword strings. + description: Array of longtail keyword strings. + example: + total: 40717 + keywords: + - 1 1/2 oz avocado + - 1 1/2 oz of avocado + - 1 2 medium avocado protein + - 1 8 avocado calories + - 1 avocado brownies + - 1 avocado dip recipe + - 1 avocado eiweiß + - 1 avocado fett + - 1 avocado gewicht ohne kern + - 1 avocado guacamole calories + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --globoff + 'https://api.seranking.com/v1/keywords/longtail?source=us&keyword=avocado&limit=10&offset=0' \ + + --header 'Authorization: Token YOUR_API_KEY' + /v1/ai-search/overview/by-engine/time-series: + get: + operationId: getAiSearchOverviewByEngineTimeSeries + tags: + - AI Search + summary: Get AI search overview + description: >- + Retrieves a high-level overview of a domain’s brand presence in an LLM, including historical trends over time + and other metrics like link presence, average position, and AI traffic. + + + **Cost:** 800 credits per request + + + If successful, the server returns a JSON object containing aggregated metrics, changes from the previous period, + and time-series data for generating charts. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/ai-search/#overview + parameters: + - name: engine in: query + required: true + description: LLM to query (e.g., `ai-overview`, `chatgpt`, `gemini`, `ai-mode`). schema: type: string - enum: - - asc - - desc - example: desc - - name: filter[volume][from] - in: query - schema: - type: integer - - name: filter[volume][to] - in: query - schema: - type: integer - - name: filter[difficulty][from] - in: query - schema: - type: integer - - name: filter[difficulty][to] - in: query - schema: - type: integer - - name: filter[cpc][from] - in: query - schema: - type: number - - name: filter[cpc][to] - in: query - schema: - type: number - - name: filter[competition][from] - in: query - schema: - type: number - - name: filter[competition][to] - in: query - schema: - type: number - - name: filter[keyword_count][from] - in: query - schema: - type: integer - - name: filter[keyword_count][to] - in: query - schema: - type: integer - - name: filter[characters_count][from] - in: query - schema: - type: integer - - name: filter[characters_count][to] - in: query - schema: - type: integer - - name: filter[serp_features] + - name: target in: query + required: true + description: >- + Target to analyze for LLM performance. Can be a root domain, subdomain, or a specific URL (e.g., + `seranking.com`). schema: type: string - - name: filter[intents] + - name: source in: query + required: true + description: >- + Country code for the regional prompt database (e.g., `us` for the United States results). For acceptable + values, see [Regional database codes](https://seranking.com/api/data/reference#regional-database-codes). schema: type: string - - name: filter[multi_keyword_included] + - name: scope in: query + description: |- + Scope of analysis: + • `base_domain` – aggregate by registrable domain, includes all subdomains. + • `domain` – exact host only, no subdomain aggregation. + • `url` – exact URL including path and query. schema: type: string - - name: filter[multi_keyword_excluded] + default: base_domain + - name: brand in: query + description: Brand to filter the brand presence analysis (e.g., `SE Ranking`). schema: type: string responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} - /v1/ai-search/overview/aggregated/time-series: + application/json: + schema: + type: object + properties: + summary: + type: object + properties: + brand_presence: + type: object + properties: + current: + type: integer + description: Value for the current period. + previous: + type: integer + description: Value for the previous period. + change_absolute: + type: integer + description: Absolute difference between the current and previous periods. + change_percent: + type: number + description: Percentage change between the current and previous periods. + link_presence: + type: object + properties: + current: + type: integer + description: Value for the current period. + previous: + type: integer + description: Value for the previous period. + change_absolute: + type: integer + description: Absolute difference between the current and previous periods. + change_percent: + type: number + description: Percentage change between the current and previous periods. + average_position: + type: object + properties: + current: + type: number + description: Value for the current period. + previous: + type: number + description: Value for the previous period. + change_absolute: + type: number + description: Absolute difference between the current and previous periods. + change_percent: + type: number + description: Percentage change between the current and previous periods. + ai_opportunity_traffic: + type: object + properties: + current: + type: integer + description: Value for the current period. + previous: + type: integer + description: Value for the previous period. + change_absolute: + type: integer + description: Absolute difference between the current and previous periods. + change_percent: + type: number + description: Percentage change between the current and previous periods. + description: >- + Object containing key performance metrics like `brand_presence`, `link_presence`, + `average_position`, and `ai_opportunity_traffic`. + time_series: + type: object + properties: + overall_traffic: + type: array + items: + type: object + properties: + date: + type: string + description: Month and year of the data point in `YYYY-MM` format. + value: + type: integer + description: Metric’s value for that month. + organic_traffic: + type: array + items: + type: object + properties: + date: + type: string + description: Month and year of the data point in `YYYY-MM` format. + value: + type: integer + description: Metric’s value for that month. + ai_traffic: + type: array + items: + type: object + properties: + date: + type: string + description: Month and year of the data point in `YYYY-MM` format. + value: + type: integer + description: Metric’s value for that month. + link_presence: + type: array + items: + type: object + properties: + date: + type: string + description: Month and year of the data point in `YYYY-MM` format. + value: + type: integer + description: Metric’s value for that month. + average_position: + type: array + items: + type: object + properties: + date: + type: string + description: Month and year of the data point in `YYYY-MM` format. + value: + type: number + description: Metric’s value for that month. + description: >- + Object containing historical data arrays for `overall_traffic`, `organic_traffic`, `ai_traffic`, + `link_presence`, and `average_position`. + example: + summary: + brand_presence: + current: 50 + previous: 45 + change_absolute: 5 + change_percent: 11.1 + link_presence: + current: 120 + previous: 110 + change_absolute: 10 + change_percent: 9.1 + average_position: + current: 8.5 + previous: 9.2 + change_absolute: 0.7 + change_percent: 7.6 + ai_opportunity_traffic: + current: 2000 + previous: 1800 + change_absolute: 200 + change_percent: 11.1 + time_series: + overall_traffic: + - date: 2025-08 + value: 43000 + - date: 2025-09 + value: 45000 + organic_traffic: + - date: 2025-08 + value: 40000 + - date: 2025-09 + value: 42000 + ai_traffic: + - date: 2025-08 + value: 3000 + - date: 2025-09 + value: 3000 + link_presence: + - date: 2025-08 + value: 110 + - date: 2025-09 + value: 120 + average_position: + - date: 2025-08 + value: 9.2 + - date: 2025-09 + value: 8.5 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location + 'https://api.seranking.com/v1/ai-search/overview/by-engine/time-series?target=seranking.com&source=us&engine=ai-overview' + \ + + --header 'Authorization: Token YOUR_API_KEY' + /v1/ai-search/overview/leaderboard: + post: + operationId: createAiSearchOverviewLeaderboard + tags: + - AI Search + summary: Get AI search leaderboard + description: >- + Compares a primary domain against up to 10 competitors across multiple LLM engines and returns a share of voice + leaderboard showing which domains have the highest AI search visibility. The leaderboard is calculated based on + both brand and link presence across the selected engines. + + + **Cost:** 7,500 credits per request (flat) + + + If successful, the server returns a JSON object containing leaderboard and per-domain, per-engine metrics. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/ai-search/ + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + primary: + type: object + description: Primary domain and brand information. + properties: + target: + type: string + brand: + type: string + competitors: + type: array + items: + type: object + properties: + target: + type: string + brand: + type: string + description: List of competitors to compare (1–10 items). + scope: + type: string + description: |- + Scope of the analysis: + • `base_domain` – aggregate by registrable domain, includes all subdomains. + • `domain` – exact host only, no subdomain aggregation. + • `url` – exact URL including path and query. + source: + type: string + description: >- + Country code for the regional database (e.g., `us` for United States results). For acceptable + values, see [Regional database + codes](https://seranking.com/api/data/reference#regional-database-codes). + engines: + type: array + items: + type: string + description: LLM engines to query (`ai-overview`, `chatgpt`, `gemini`, `ai-mode`). + target: + type: string + description: >- + Competitor to analyze for LLM performance. Can be a root domain, subdomain, or a specific URL (e.g., + `semrush.com`). + brand: + type: string + description: Competitor brand name (e.g., `Semrush`). + required: + - primary + - competitors + - source + - engines + example: + primary: + target: example.com + brand: Example + competitors: + - target: example1.com + brand: Example 1 + - target: example2.com + brand: Example 2 + scope: base_domain + source: us + engines: + - ai-overview + - chatgpt + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + results: + type: object + properties: + example.com: + type: object + properties: + chatgpt: + type: object + properties: + brand_presence: + type: integer + description: Total brand mentions across selected engines. + link_presence: + type: integer + description: Total link citations across selected engines. + ai-overview: + type: object + properties: + brand_presence: + type: integer + description: Total brand mentions across selected engines. + link_presence: + type: integer + description: Total link citations across selected engines. + example1.com: + type: object + properties: + chatgpt: + type: object + properties: + brand_presence: + type: integer + description: Total brand mentions across selected engines. + link_presence: + type: integer + description: Total link citations across selected engines. + ai-overview: + type: object + properties: + brand_presence: + type: integer + description: Total brand mentions across selected engines. + link_presence: + type: integer + description: Total link citations across selected engines. + example2.com: + type: object + properties: + chatgpt: + type: object + properties: + brand_presence: + type: integer + description: Total brand mentions across selected engines. + link_presence: + type: integer + description: Total link citations across selected engines. + ai-overview: + type: object + properties: + brand_presence: + type: integer + description: Total brand mentions across selected engines. + link_presence: + type: integer + description: Total link citations across selected engines. + description: Detailed per-domain, per-engine metrics. + request_metadata: + type: object + properties: + engines: + type: array + items: + type: string + description: Engines used for the comparison. + description: Engines used for the comparison. + competitors: + type: array + items: + type: string + description: Competitor domains included in the request. + description: Competitor domains included in the request. + source: + type: string + description: Country code for the regional database. + primary: + type: string + description: Primary target domain. + description: Metadata describing the request. + leaderboard: + type: array + items: + type: object + properties: + rank: + type: integer + description: Position in the leaderboard (1 = highest share of voice). + link_presence: + type: integer + description: Total link citations across selected engines. + share_of_voice: + type: number + description: Calculated share of voice. + is_primary_target: + type: boolean + description: Indicates whether this is the primary domain. + brand_presence: + type: integer + description: Total brand mentions across selected engines. + domain: + type: string + description: Domain name. + description: Leaderboard of domains sorted by share of voice. + description: Leaderboard of domains sorted by share of voice. + example: + results: + example.com: + chatgpt: + brand_presence: 5 + link_presence: 18 + ai-overview: + brand_presence: 4798 + link_presence: 9245 + example1.com: + chatgpt: + brand_presence: 3042 + link_presence: 287 + ai-overview: + brand_presence: 13688 + link_presence: 10083 + example2.com: + chatgpt: + brand_presence: 55 + link_presence: 324 + ai-overview: + brand_presence: 20161 + link_presence: 37952 + request_metadata: + engines: + - ai-overview + - chatgpt + competitors: + - example1.com + - example2.com + source: us + primary: example.com + leaderboard: + - rank: 1 + link_presence: 41092 + share_of_voice: 0.5719 + is_primary_target: false + brand_presence: 20682 + domain: example2.com + - rank: 2 + link_presence: 11100 + share_of_voice: 0.2923 + is_primary_target: false + brand_presence: 17467 + domain: example1.com + - rank: 3 + link_presence: 9679 + share_of_voice: 0.1358 + is_primary_target: true + brand_presence: 4965 + domain: example.com + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl --location 'https://api.seranking.com/v1/ai-search/overview/leaderboard' \ + --header 'Authorization: Token YOUR_API_KEY' \ + --header 'Content-Type: application/json' \ + --data '{ + "primary": { + "target": "example.com", + "brand": "Example" + }, + "competitors": [ + { "target": "example1.com", "brand": "Example 1" }, + { "target": "example2.com", "brand": "Example 2" } + ], + "scope": "base_domain", + "source": "us", + "engines": ["ai-overview", "chatgpt"] + }' + /v1/ai-search/discover-brand: get: + operationId: getAiSearchDiscoverBrand tags: - - AI search - summary: overview (aggregated) + - AI Search + summary: Discover brand by URL description: >- - Retrieves a high-level aggregated summary of a domain's key performance - metrics and historical trends across all LLM engines. - operationId: getAiOverviewAggregated + Identifies the brand name associated with the specified target domain. This utility endpoint is useful for + programmatically finding a brand before using it in other queries. + + + **Cost:** 100 credits per request + + + If successful, the server returns a JSON object containing an array of discovered brand names. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/ai-search/#discover-brand-by-url parameters: - name: target in: query required: true + description: >- + Target to analyze for LLM performance. Can be a root domain, subdomain, or a specific URL (e.g., + `seranking.com`). schema: type: string - example: seranking.com - name: source in: query required: true + description: >- + Country code for the regional prompt database (e.g., `us` for United States results). For acceptable values, + see [Regional database codes](https://seranking.com/api/data/reference#regional-database-codes). schema: type: string - example: us - - name: brand - in: query - schema: - type: string - example: SE Ranking - name: scope in: query - schema: - type: string - enum: - - domain - - base_domain - - url - default: base_domain - example: base_domain - responses: - '200': + required: true description: |- - Successful response. - - Changes since 2026-09-29 (new AI Search data source): - - - `summary.average_position` is always `null`. - - `time_series.organic_traffic`, `time_series.overall_traffic` and - `time_series.average_position` are empty arrays. - - `summary.brand_presence` counts the prompts whose answer mentions the - brand as a recognized entity, instead of a text match on the brand - name. - - `summary.*.previous` is the value of the previous monthly snapshot - (`null` when unknown), and `change_absolute` / `change_percent` are - computed from it and signed. Before, `previous` was always `null` - and the change was reported as the current value and 100%. - content: - application/json: {} - /v1/ai-search/overview/by-engine/time-series: - get: - operationId: getAiSearchOverviewByEngineTimeSeries - tags: - - AI search - summary: overview - description: >- - Retrieves a high-level summary of a domain’s key performance metrics and - historical trends within a specified LLM. - parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - - name: target - in: query - schema: - type: string - example: seranking.com - - name: source - in: query - schema: - type: string - example: us - - name: engine - in: query + Scope of analysis: + • `base_domain` – aggregate by registrable domain, includes all subdomains. + • `domain` – exact host only, no subdomain aggregation. + • `url` – exact URL including path and query. schema: type: string - example: ai-overview - - name: brand - in: query - schema: - type: string - example: SE Ranking - - name: scope - in: query - schema: - type: string - enum: - - domain - - base_domain - - url default: base_domain - example: base_domain responses: - '200': - description: |- - Successful response. - - Changes since 2026-09-29 (new AI Search data source): - - - `summary.average_position` is always `null`. - - `time_series.organic_traffic`, `time_series.overall_traffic` and - `time_series.average_position` are empty arrays. - - `summary.brand_presence` counts the prompts whose answer mentions the - brand as a recognized entity, instead of a text match on the brand - name. - - `summary.*.previous` is the value of the previous monthly snapshot - (`null` when unknown), and `change_absolute` / `change_percent` are - computed from it and signed. Before, `previous` was always `null` - and the change was reported as the current value and 100%. + "200": + description: Successful response. content: - application/json: {} - /v1/ai-search/overview/leaderboard: - post: - operationId: createAiSearchOverviewLeaderboard - tags: - - AI search - summary: leaderboard - description: >- - Retrieves a high-level summary of a domain’s key performance metrics and - historical trends within a specified LLM. - requestBody: - content: - application/json: - schema: - type: object + application/json: + schema: + type: object + properties: + brands: + type: array + items: + type: string + description: Array of strings, each a potential brand name. + description: Array of strings, each a potential brand name. example: - primary: - target: seranking.com - brand: SE Ranking - competitors: - - target: semrush.com - brand: Semrush - - target: ahrefs.com - brand: Ahrefs - scope: base_domain - source: us - engines: - - ai-overview - - chatgpt - - perplexity - parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - - name: brand - in: query - schema: - type: string - example: SE Ranking - - name: scope - in: query - schema: - type: string - example: base_domain - responses: - '200': - description: |- - Successful response. + brands: + - Microsoft + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location + 'https://api.seranking.com/v1/ai-search/discover-brand?target=microsoft.com&scope=domain&source=us' \ - Since 2026-09-29 (new AI Search data source) `brand_presence` counts - the prompts whose answer mentions the brand as a recognized entity, - instead of a text match on the brand name. - content: - application/json: {} - /v1/ai-search/discover-brand: - get: - operationId: getAiSearchDiscoverBrand - tags: - - AI search - summary: discover brand - description: >- - Identifies and returns the brand name associated with a given target - domain, subdomain, or URL. - parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - - name: target - in: query - schema: - type: string - example: seranking.com - - name: scope - in: query - schema: - type: string - enum: - - domain - - base_domain - - url - default: domain - description: >- - base_domain (aggregate by registrable domain, includes all - subdomains), domain (exact host only, no subdomain aggregation), url - (exact URL including path and query) - example: domain - - name: source - in: query - schema: - type: string - example: us - responses: - '200': - description: Successful response - content: - application/json: {} + --header 'Authorization: Token YOUR_API_KEY' /v1/ai-search/prompts-by-target: get: operationId: getAiSearchPromptsByTarget tags: - - AI search - summary: prompts by target - description: >- - Fetches a list of prompts where a specified domain, subdomain, or URL - appears in the results of a chosen LLM. + - AI Search + summary: Get prompts by target + description: |- + Retrieves a paginated list of prompts where the specified domain, subdomain, or URL appears in LLM results. + **Cost:** 200 credits per returned prompt - The `filter[volume]`, `filter[keyword_count]` and - `filter[characters_count]` filters were removed - on 2026-10-14. A page holds at most 1000 prompts (`limit`). + If successful, the server returns a JSON object containing a list of prompts and metadata. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/ai-search/#get-prompts-by-target parameters: - - name: apikey + - name: engine in: query + required: true + description: LLM to query (e.g., `ai-overview`, `chatgpt`, `gemini`, `ai-mode`). schema: type: string - example: '{{secret_key_data}}' - name: target in: query + required: true + description: Target to analyze for LLM performance. Can be a root domain, subdomain, or a specific URL. schema: type: string - example: seranking.com - - name: scope - in: query - schema: - type: string - description: >- - base_domain (aggregate by registrable domain, includes all - subdomains), domain (exact host only, no subdomain aggregation), url - (exact URL including path and query) - example: domain - name: source in: query + required: true + description: >- + Country code for the regional prompt database (e.g., `us` for United States results). + + + For acceptable values, see [Regional database + codes](https://seranking.com/api/data/reference#regional-database-codes). schema: type: string - example: us - - name: engine + - name: scope in: query + required: true + description: |- + Scope of the analysis: + • `base_domain` – aggregate by registrable domain, includes all subdomains. + • `domain` – exact host only, no subdomain aggregation. + • `url` – exact URL including path and query. schema: type: string - example: ai-mode + default: base_domain - name: sort in: query + description: "Field to sort the results by: `volume`, `type`, `snippet_length`." schema: type: string - enum: - - volume - - type - - snippet_length default: volume - example: volume - name: sort_order in: query + description: |- + Sort order for the results: + • `asc` – for ascending + • `desc` – for descending schema: type: string - enum: - - asc - - desc default: desc - example: desc - - name: offset - in: query - schema: - type: integer - example: 0 - name: limit in: query + description: Maximum number of prompts to return per page (max 1000). schema: type: integer - maximum: 1000 - description: >- - Number of prompts per page, at most 1000. A larger value is rejected - with 400. - example: 100 - - name: filter[multi_keyword_included] - in: query - schema: - type: string - example: |- - [ - [ - { - "type": "contains", - "value": "seo" - } - ] - ] - - name: filter[multi_keyword_excluded] - in: query - schema: - type: string - example: |- - [ - [ - { "type": "contains", "value": "seo" }, - { "type": "contains", "value": "tools" } - ], - [ - { "type": "contains", "value": "backlinks" } - ] - ] - - name: filter[volume][from] - in: query - deprecated: true - description: >- - Removed on 2026-10-14; requests that use it get 400 unsupported - filter. - schema: - type: integer - example: 100 - - name: filter[volume][to] - in: query - deprecated: true - description: >- - Removed on 2026-10-14; requests that use it get 400 unsupported - filter. - schema: - type: integer - example: 100000 - - name: filter[keyword_count][from] - in: query - deprecated: true - description: >- - Removed on 2026-10-14; requests that use it get 400 unsupported - filter. - schema: - type: integer - example: 5 - - name: filter[keyword_count][to] - in: query - deprecated: true - description: >- - Removed on 2026-10-14; requests that use it get 400 unsupported - filter. - schema: - type: integer - example: 8 - - name: filter[characters_count][from] + default: 100 + - name: offset in: query - deprecated: true - description: >- - Removed on 2026-10-14; requests that use it get 400 unsupported - filter. + description: Starting position for the paginated list. schema: type: integer - example: 15 - - name: filter[characters_count][to] + default: 0 + - name: filter in: query - deprecated: true description: >- - Removed on 2026-10-14; requests that use it get 400 unsupported - filter. + Object for filtering results. See the [Filtering + results](https://seranking.com/api/data/ai-search#filtering-results) section for details. + style: deepObject + explode: true schema: - type: integer - example: 50 + type: object responses: - '200': - description: |- - Successful response. - - Changes since 2026-09-29 (new AI Search data source): - - - `prompts[].volume` is `null` for `engine=ai-overview` and `0` for - the LLM engines. - - `date` is the current month. - content: - application/json: {} - '400': - description: >- - Invalid request, e.g. `limit` above 1000 or a filter that is no - longer supported (`unsupported filter`). + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + total: + type: integer + description: Total number of prompts found for the target. + date: + type: string + description: Date of the data snapshot in `YYYY-MM-DD` format. + prompts: + type: array + items: + type: object + properties: + prompt: + type: string + description: User query or prompt text that triggered the LLM response. + volume: + type: integer + description: Estimated monthly search volume for the prompt. + type: + type: string + description: Type of appearance for the target in the LLM result (e.g., `Link`, `Brand`). + answer: + type: object + properties: + text: + type: string + description: Full text of the snippet generated by the LLM. + links: + type: array + items: + type: string + description: Array of URL strings that were included as links within the LLM’s answer. + description: Array of URL strings that were included as links within the LLM’s answer. + description: Object containing the detailed response from the LLM. + description: Array of objects, each representing a found prompt. + description: Array of objects, each representing a found prompt. + example: + total: 5448 + date: "2025-09-01" + prompts: + - prompt: peliculas en netflix + volume: 14800 + type: Link + answer: + text: Hay una gran variedad de peliculas disponibles en Netflix... + links: + - >- + [https://movies.sitioficial.netflix.com/browse/genre/34399](https://movies.sitioficial.netflix.com/browse/genre/34399) + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --globoff + 'https://api.seranking.com/v1/ai-search/prompts-by-target?target=seranking.com&scope=domain&source=us&engine=ai-mode&limit=1' + \ + + --header 'Authorization: Token YOUR_API_KEY' /v1/ai-search/prompts-by-brand: get: operationId: getAiSearchPromptsByBrand tags: - - AI search - summary: prompts by brand - description: >- - Retrieves a list of prompts where a specified brand name is mentioned in - the results of a chosen LLM. + - AI Search + summary: Get prompts by brand + description: |- + Retrieves a paginated list of prompts where the specified brand name is mentioned in LLM results. + **Cost:** 200 credits per returned prompt - The `filter[volume]`, `filter[keyword_count]` and - `filter[characters_count]` filters were removed - on 2026-10-14. A page holds at most 1000 prompts (`limit`). + If successful, the server returns a JSON object containing a list of prompts that mention the specified brand. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/ai-search/#get-prompts-by-brand parameters: - - name: apikey + - name: engine in: query + required: true + description: LLM to query (e.g., `ai-overview`, `chatgpt`, `gemini`, `ai-mode`). schema: type: string - example: '{{secret_key_data}}' - name: brand in: query + required: true + description: Brand name to search for in LLM snippets. schema: type: string - example: SE Ranking - name: source in: query + required: true + description: >- + Country code for the regional prompt database (e.g., `us` for United States results). For acceptable values, + see [Regional database codes](https://seranking.com/api/data/reference#regional-database-codes). schema: type: string - example: us - - name: engine - in: query - schema: - type: string - example: perplexity - name: sort in: query + description: "Field to sort the results by: `volume`, `type`, `snippet_length`." schema: type: string - enum: - - volume - - type - - snippet_length default: volume - example: volume - name: sort_order in: query + description: |- + Sort order for the results: + • `asc` – for ascending + • `desc` – for descending schema: - type: string - enum: - - asc - - desc - default: desc - example: desc - - name: offset - in: query - schema: - type: integer - example: 0 - - name: limit - in: query - schema: - type: integer - maximum: 1000 - description: >- - Number of prompts per page, at most 1000. A larger value is rejected - with 400. - example: 10 - - name: filter[multi_keyword_included] - in: query - schema: - type: string - example: |- - [ - [ - { - "type": "contains", - "value": "seo" - } - ] - ] - - name: filter[multi_keyword_excluded] - in: query - schema: - type: string - example: |- - [ - [ - { "type": "contains", "value": "seo" }, - { "type": "contains", "value": "tools" } - ], - [ - { "type": "contains", "value": "backlinks" } - ] - ] - - name: filter[volume][from] - in: query - deprecated: true - description: >- - Removed on 2026-10-14; requests that use it get 400 unsupported - filter. - schema: - type: integer - example: 100 - - name: filter[volume][to] - in: query - deprecated: true - description: >- - Removed on 2026-10-14; requests that use it get 400 unsupported - filter. - schema: - type: integer - example: 100000 - - name: filter[keyword_count][from] - in: query - deprecated: true - description: >- - Removed on 2026-10-14; requests that use it get 400 unsupported - filter. - schema: - type: integer - example: 5 - - name: filter[keyword_count][to] + type: string + default: desc + - name: limit in: query - deprecated: true - description: >- - Removed on 2026-10-14; requests that use it get 400 unsupported - filter. + description: Maximum number of prompts to return per page (max 1000). schema: type: integer - example: 8 - - name: filter[characters_count][from] + default: 100 + - name: offset in: query - deprecated: true - description: >- - Removed on 2026-10-14; requests that use it get 400 unsupported - filter. + description: Starting position for the paginated list. schema: type: integer - example: 15 - - name: filter[characters_count][to] + default: 0 + - name: filter in: query - deprecated: true description: >- - Removed on 2026-10-14; requests that use it get 400 unsupported - filter. + Object for filtering results. See the [Filtering + results](https://seranking.com/api/data/ai-search#filtering-results) section for details. + style: deepObject + explode: true schema: - type: integer - example: 50 + type: object responses: - '200': - description: |- - Successful response. - - Changes since 2026-09-29 (new AI Search data source): - - - `prompts[].volume` is `null` for `engine=ai-overview` and `0` for - the LLM engines. - - `date` is the current month. + "200": + description: Successful response. content: - application/json: {} - '400': - description: >- - Invalid request, e.g. `limit` above 1000 or a filter that is no - longer supported (`unsupported filter`). - content: - application/json: {} + application/json: + schema: + type: object + properties: + total: + type: integer + description: Total number of times the brand has been mentioned in the specified LLM for the current month. + date: + type: string + description: Date of the data snapshot in `YYYY-MM-DD` format. + prompts: + type: array + items: + type: object + properties: + prompt: + type: string + description: User query or prompt text that triggered the LLM response. + volume: + type: integer + description: Estimated monthly search volume for the prompt. + type: + type: string + description: Type of appearance for the target in the LLM result (e.g., `Link`, `Brand`). + answer: + type: object + properties: + text: + type: string + description: Full text of the snippet generated by the LLM. + links: + type: array + items: + type: string + description: Array of URL strings that were included as links within the LLM’s answer. + description: Array of URL strings that were included as links within the LLM’s answer. + description: Object containing the detailed response from the LLM. + description: Array of objects, each representing a found prompt. See the structure below for details. + description: Array of objects, each representing a found prompt. See the structure below for details. + example: + total: 5448 + date: "2025-09-01" + prompts: + - prompt: peliculas en netflix + volume: 14800 + type: Link + answer: + text: Hay una gran variedad de peliculas disponibles en Netflix... + links: + - >- + [https://movies.sitioficial.netflix.com/browse/genre/34399](https://movies.sitioficial.netflix.com/browse/genre/34399) + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location + 'https://api.seranking.com/v1/ai-search/prompts-by-brand?brand=Netflix&source=us&engine=chatgpt&sort=volume&sort_order=desc&offset=0&limit=10' + \ + + --header 'Authorization: Token YOUR_API_KEY' /v1/serp/classic/tasks: post: operationId: createSerpClassicTasks tags: - - SERP Results > classic - summary: Add task + - SERP + summary: Add SERP tasks description: >- - Queues one or more keywords for SERP data collection and returns a - unique task ID for each. + Adds one or more search queries to the queue for SERP collection. Each task returns SERP results for the + specified keywords, retrievable via the [Get standard SERP + results](https://seranking.com/api/data/serp#standard-results) or [Get advanced SERP + results](https://seranking.com/api/data/serp#advanced-results) endpoints. + + + When tasks are complete, the system automatically sends webhook notifications if the `pingback_url` parameter is + set. This allows you to avoid repeatedly checking for task status (for more information, see [Pingback + notifications](https://seranking.com/api/data/serp/#pingback-notifications)). + + + **Note:** The method supports **Google** search results only. **Bing** and **Yahoo!** are in development — + contact [api@seranking.com](mailto:api@seranking.com) for release updates. + + + **Warning:** Up to **1500 SERP tasks** can run in parallel. Requests exceeding this limit return a `429 Too Many + Requests` response with a `processing_limit_exceeded` error, for example: + + + ``` + + { + "error": { + "code": "processing_limit_exceeded", + "details": { + "limit": 1500, + "current_active_count": 1503, + "requested_count": 10 + } + }, + "message": "Processing limit exceeded. You have 1503 active tasks, which exceeds the limit of 1500. Please wait for the pending tasks to complete." + } + + ``` + + + **Cost:** 10 credits per keyword + + + **Note:** One of `location_id` or `google_ads_location_id` must be provided. + + + **Pingback notifications** + + + When `pingback_url` is provided in the request, the system sends an HTTP GET request to the specified URL once + the asynchronous task finishes. + + + - Include `$id` and `$tag` as they are in your URL. + + + - Upon task completion, the system substitutes these with actual values and calls the URL. + + + **Note:** The `$tag` value is URL-encoded if it contains special characters. + + + - Request: `"pingback_url": "https://your-server.com/callback?id=$id&tag=$tag"`. + + + - Task completes with, e.g., ID `385103` and tag `campaign_abc`. + + + - System calls: `GET https://your-server.com/callback?id=385103&tag=campaign_abc`. + + + - Requests timeout after 5 seconds. + + + - Failed deliveries retry up to 3 times (at ~1 min, ~5 min, ~15 min intervals). + + + - Success requires an `HTTP` `2xx` response from your server. + + + - Requests use User-Agent: `SE-Ranking-Pingback/1.0`. + + + - Private and internal IPs are blocked (for SSRF protection). + + + **Expected SERP** + + + Use `expected_serp` to pass what you already know about the SERP of a keyword, for example the domains you saw + in its top 10 last time. It is a reference for checking the collected SERP. It does not filter or reorder the + returned results, and it does not change the cost. + + + - Every field is optional: the parameter itself, any item and any field of an item. + + + - Domains are host names such as `example.com`, not URLs. They are validated by syntax only, without a DNS + lookup. URLs, IP addresses and names without a top-level domain are rejected. + + + - Domains are converted to lower case and punycode. `www.` and duplicate domains are removed. + + + - `position` can only be set together with `domain`. + + + **Errors:** if any value is invalid, the request returns `400 Bad Request` and no tasks are created. The message + names the field, for example: + + + ``` + + { + "message": "Invalid expected_serp[1].top10_domains[1]. Must be a valid domain." + } + + ``` + + + If successful, the server returns an array of task objects, each representing a submitted query. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/serp/#add-tasks requestBody: + required: true content: application/json: schema: type: object - description: >- - One of `location_id` or `google_ads_location_id` must be - provided. + description: One of `location_id` or `google_ads_location_id` must be provided. required: - search_engine - device @@ -4373,21 +11081,17 @@ paths: location_id: type: integer description: >- - SE Ranking location ID, from `GET - /v1/serp/classic/locations`. One of `location_id` or + SE Ranking location ID, from `GET /v1/serp/classic/locations`. One of `location_id` or `google_ads_location_id` is required. google_ads_location_id: type: integer - description: >- - Google Ads geo target ID. One of `location_id` or - `google_ads_location_id` is required. + description: Google Ads geo target ID. One of `location_id` or `google_ads_location_id` is required. query: type: array minItems: 1 description: >- - Keywords to collect the SERP for; one task is created per - keyword. Up to 10 keywords per request by default; more - returns `400`. + Keywords to collect the SERP for; one task is created per keyword. Up to 10 keywords per request by + default; more returns `400`. items: type: string maxLength: 255 @@ -4397,23 +11101,18 @@ paths: pingback_url: type: string description: >- - HTTP or HTTPS webhook URL that receives a GET request when a - task completes. Literal `$id` and `$tag` placeholders are - replaced with the task ID and tag. + HTTP or HTTPS webhook URL that receives a GET request when a task completes. Literal `$id` and + `$tag` placeholders are replaced with the task ID and tag. expected_serp: type: array description: >- - Optional. What the SERP of each query is expected to - contain, as an array parallel to `query`: the item at index - i applies to the query at index i. Use `null` (or `{}`) for - a query without expectations. The array may be shorter than - `query`, but not longer. Domains are checked by syntax only - (no DNS lookup), then stored in lower case and punycode, - without `www` and duplicates. URLs, IP addresses and names - without a top-level domain are rejected. Any invalid value - or unknown field returns `400` with the path of the field, - for example `Invalid expected_serp[1].top10_domains[2]. Must - be a valid domain.`, and no tasks are created. + Optional. What the SERP of each query is expected to contain, as an array parallel to `query`: the + item at index i applies to the query at index i. Use `null` (or `{}`) for a query without + expectations. The array may be shorter than `query`, but not longer. Domains are checked by syntax + only (no DNS lookup), then stored in lower case and punycode, without `www` and duplicates. URLs, IP + addresses and names without a top-level domain are rejected. Any invalid value or unknown field + returns `400` with the path of the field, for example `Invalid expected_serp[1].top10_domains[2]. + Must be a valid domain.`, and no tasks are created. items: type: object nullable: true @@ -4440,9 +11139,7 @@ paths: type: integer minimum: 1 maximum: 100 - description: >- - The position `domain` is expected at. Requires - `domain`. + description: The position `domain` is expected at. Requires `domain`. example: 3 example: search_engine: google @@ -4464,170 +11161,1017 @@ paths: - moz.com tag: test_tag pingback_url: https://your-webhook.example.com?id=$id&user_tag=$tag - parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' + example: + search_engine: google + device: desktop + language_code: fr + google_ads_location_id: 2250 + query: + - avocado + - avocado recipes + expected_serp: + - top10_domains: + - wikipedia.org + - marmiton.org + domain: marmiton.org + position: 3 + - null + tag: test_tag + pingback_url: https://yourserver.com/serp-ready?id=$id&tag=$tag responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: integer + description: Unique ID assigned to each SERP collection task. + query: + type: string + description: Keyword for the task. + device: + type: string + description: Search device type. + location_id: + nullable: true + description: ID of the location for the search results. + type: integer + google_ads_location_id: + type: integer + description: Google Ads ID of the location for the search results. + language_code: + type: string + description: Language code for the search results. + is_completed: + type: boolean + description: Indicates whether the task is completed (`true` or `false`). + added: + type: string + description: Timestamp when the task was added in `YYYY-MM-DD HH:MM:SS` format. + example: + - id: 3005401 + query: avocado + device: desktop + location_id: null + google_ads_location_id: 2250 + language_code: fr + is_completed: false + added: "2025-12-17 23:05:09" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST 'https://api.seranking.com/v1/serp/classic/tasks' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + --data '{ + "search_engine": "google", + "device": "desktop", + "language_code": "fr", + "google_ads_location_id": 2250, + "query": ["avocado", "avocado recipes"], + "expected_serp": [ + {"top10_domains": ["wikipedia.org", "marmiton.org"], "domain": "marmiton.org", "position": 3}, + null + ], + "tag": "test_tag", + "pingback_url": "https://yourserver.com/serp-ready?id=$id&tag=$tag" + }' get: operationId: getSerpClassicTasks tags: - - SERP Results > classic - summary: List tasks / Get task results + - SERP + summary: Get standard SERP results / List SERP tasks description: >- - Without task_id: returns a list of all SERP tasks submitted within the - last 24 hours. With task_id: returns the status or results for a - specific task. + ### Get standard SERP results + + + Retrieves the status or standard results of a SERP task previously added via the **Add SERP tasks **endpoint. If + the SERP results have not yet been collected, the server returns a `status` object. Once the task is complete, + the server returns a `results` array containing the top 100 SERP results. Results are stored for 24 hours and + then deleted. + + + **Note:** This endpoint provides results for the following SERP item types only: `organic`, `ads`, and + `featured_snippet`. + + + **Cost:** 0 credits + + + ### List SERP tasks + + + Retrieves a list of all SERP tasks that were added to the queue in the last 24 hours. + + + **Cost:** 0 credits + + + No parameters are required for this request. + + + If successful, the server returns an array of task objects. Each object in the array represents a single task. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/serp/#standard-results parameters: - - name: apikey - in: query - schema: - type: string - example: '{{vault:api_key_project}}' - name: task_id in: query - description: >- - Task ID returned by the POST endpoint. When provided, returns - status or results for that specific task. + description: Unique ID of the query task created using the **Add SERP tasks** method. schema: type: integer - example: 62458525 responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + anyOf: + - type: object + properties: + status: + type: string + description: "Indicates that the task is currently being processed: `\"processing\"`." + request_metadata: + type: object + properties: + keyword: + type: string + description: Keyword used in the search query. + device: + type: string + description: Search device type. + location_id: + type: integer + description: ID of the location for the search results. + language_code: + type: string + description: Language code for the search results. + tag: + type: string + description: Custom tag for the request (optional). + crawled_at: + type: string + description: Timestamp when the SERP was crawled. + serp_url: + type: string + description: Full SERP URL. + description: Metadata about the request. + summary: + type: object + properties: + total_results: + type: integer + description: Total number of search results found. + organic_items_count: + type: integer + description: Number of organic results on the page. + SERP_features: + type: array + items: + type: string + description: List of all SERP features present. + description: List of all SERP features present. + description: Summary statistics for the search results. + items: + type: array + items: + type: object + properties: + type: + type: string + description: |- + Type of the SERP item. Possible values for this endpoint include: + – `organic + `– `ads + `– `featured_snippet` + rank_absolute: + type: integer + description: Absolute ranking of the item in the SERP. + rank_group: + type: integer + description: Rank within its group of similar items. + serp_features: + type: array + items: + type: string + description: List of SERP features associated with this result. + description: List of SERP features associated with this result. + position: + type: string + description: Position on the page (e.g., `top`, `bottom`). + title: + type: string + description: Title of the page as shown in the SERP. + links: + type: array + items: + type: object + properties: + url: + type: string + description: URL of the link. + title: + type: string + description: Title of the link. + description: Array of link objects. + description: Array of link objects. + displayUrl: + type: string + description: Displayed URL of the result as shown in the SERP. + description: Array of search result objects. + description: Array of search result objects. + title: Get standard SERP results + - type: array + items: + type: object + properties: + id: + type: integer + description: Unique ID of the query task. + query: + type: string + description: Keyword for the task. + location_id: + type: integer + description: ID of the location for the search results. + language_code: + type: string + description: Language code for the search results. + is_completed: + type: boolean + description: Completion status of the task (`true` if completed, `false` otherwise). + added: + type: string + description: Timestamp (UTC) when the task was added to the queue. + title: List SERP tasks + examples: + ifTheTaskIsStillInProgress: + summary: "- If the task is still in progress" + value: + status: processing + ifTheTaskIsComplete: + summary: "- If the task is complete" + value: + request_metadata: + keyword: seo report + device: desktop + location_id: 31808 + language_code: fr + tag: test_tag + crawled_at: "2025-11-03 17:50:45" + serp_url: https://www.google.com/search?q=seo+report&hl=fr&gl=FR&ie=UTF-8 + summary: + total_results: 1160000000 + organic_items_count: 99 + SERP_features: + - tads + - people_also_ask + - bads + - related_searches + - reviews + - video + items: + - type: organic + rank_absolute: 1 + rank_group: 1 + serp_features: + - tads + position: top + title: SEO Report Tool - SE Ranking SEO Software + links: + - url: https://seranking.com/easy-to-use.html + title: SEO Report Tool - SE Ranking SEO SoftwareSE Rankinghttps://www.seranking.com + displayUrl: https://www.seranking.com + listSERPTasks: + summary: List SERP tasks + value: + - id: 62 + query: seo report + location_id: 31808 + language_code: fr + is_completed: true + added: "2025-11-03 17:49:34" + - id: 65 + query: seo api + location_id: 31808 + language_code: fr + is_completed: true + added: "2025-11-03 17:49:34" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/serp/classic/tasks?task_id=14' \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/serp/classic/tasks' \ + -H 'Authorization: Token YOUR_API_KEY' /v1/serp/classic/tasks/results_advanced: get: operationId: getSerpClassicTasksResults_advanced tags: - - SERP Results > classic - summary: Get advanced results + - SERP + summary: Get advanced SERP results description: >- - Checks the status of a specific task and retrieves the top 100 SERP - results once the task is complete. + Retrieves the full, detailed SERP results of a task previously added via the **Add SERP tasks** endpoint. This + call returns summaries, SERP features, and detailed items (organic, videos, images, AI overviews, etc.). Results + are stored for 24 hours and then deleted. + + + **Note:** Advanced results for mobile searches do *not* include AI overviews and therefore cost 0 credits. + + + - If the SERP results have not yet been collected, the server returns a `status` object. + + + - Once the task is complete, the server returns a `results` array containing the advanced results. + + + **Cost:** 10 credits + externalDocs: + description: Documentation + url: https://seranking.com/api/data/serp/#advanced-results parameters: - name: task_id in: query + required: true + description: Unique ID of the query task for which advanced results are requested. schema: type: integer - example: 32 responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + status: + type: string + description: "Indicates that the task is currently being processed: `\"processing\"`." + request_metadata: + type: object + properties: + keyword: + type: string + description: Keyword submitted in the request. + device: + type: string + description: Search device type. + location_id: + type: integer + description: ID of the location for the search results. + language_code: + type: string + description: Language code for the search results. + tag: + type: string + description: Custom tag for the request (optional). + crawled_at: + type: string + description: Timestamp when the SERP was crawled. + serp_url: + type: string + description: Full SERP URL. + description: Metadata about the request. + summary: + type: object + properties: + total_results: + type: integer + description: Total number of search results found. + organic_items_count: + type: integer + description: Number of organic results on the page. + SERP_features: + type: array + items: + type: string + description: List of all SERP features present. + description: List of all SERP features present. + items: + type: array + items: + type: object + properties: + type: + type: string + description: |- + Type of the SERP item. Common values include: + – `organic + `– `ads + `– `featured_snippet` + – `ai_overview` + – `people_also_ask` + – `find_results_on` + – `related_searches` + – `images` + rank_absolute: + type: integer + description: Absolute ranking of the item in the SERP. + rank_group: + type: integer + description: Rank within its group of similar items. + position: + type: string + description: Position of the item on the SERP (e.g., `top`, `bottom`). + serp_features: + type: array + items: + type: string + description: List of SERP features associated with this result. + description: List of SERP features associated with this result. + domain: + type: string + description: Domain of the page (if available). + url: + type: string + description: URL of the page. + title: + type: string + description: Title of the page as shown in the SERP. + description: + type: string + description: Description snippet of the page (if available). + breadcrumb: + type: string + description: Breadcrumb or main URL path of the page. + highlighted_terms: + type: array + items: + type: string + description: Terms highlighted in the snippet matching the query. + description: Terms highlighted in the snippet matching the query. + links: + type: array + items: + type: object + properties: + url: + type: string + description: URL of the link. + title: + type: string + description: Title of the link. + description: Array of link objects. + description: Array of link objects. + searches: + type: array + items: + type: string + description: Array of related search queries (only present for `related_searches` items). + description: Array of related search queries (only present for `related_searches` items). + description: Array of search result objects. + description: Array of search result objects. + examples: + ifTheTaskIsStillInProgress: + summary: "- If the task is still in progress" + value: + status: processing + ifTheTaskIsComplete: + summary: "- If the task is complete" + value: + request_metadata: + keyword: seo report + device: desktop + location_id: 31808 + language_code: fr + tag: test_tag + crawled_at: "2025-11-18 16:12:29" + serp_url: >- + https://www.google.com/search?q=seo+report&hl=fr&source=hp&gl=US&ie=UTF-8&sclient=gws-wiz&uule=w+CAIQIFISCcVu4B8B2MJQEVDYwwkSgdS5&pws=0 + summary: + total_results: 1520000000 + organic_items_count: 100 + SERP_features: + - people_also_ask + - bads + - related_searches + - reviews + - video + items: + - type: organic + rank_absolute: 1 + rank_group: 1 + position: center + serp_features: [] + domain: www.seoptimer.com + url: https://www.seoptimer.com/ + title: "SEOptimer: Analyze Websites With Free SEO Audit ..." + description: >- + SEOptimer is a free SEO Audit Tool that will perform a detailed SEO Analysis across 100 + website data points, and provide clear and actionable recommendations. + breadcrumb: https://www.seoptimer.com + highlighted_terms: + - SEOptimer is a free SEO Audit Tool + - type: organic + rank_absolute: 2 + rank_group: 2 + position: center + serp_features: [] + domain: aioseo.com + url: https://aioseo.com/seo-analyzer/ + title: FREE SEO Analyzer Tool - Generate Website SEO Audit ... + description: >- + Analyze your WordPress site to detect critical errors and get actionable insights to boost + your SEO and get more traffic. + breadcrumb: https://aioseo.com › seo-analyzer + highlighted_terms: + - Analyze your WordPress site + - type: organic + rank_absolute: 110 + rank_group: 100 + position: center + serp_features: [] + domain: ahrefs.com + url: https://ahrefs.com/site-audit + title: A Free SEO Audit Tool by Ahrefs + description: >- + Scan your website for 170+ technical and on-page SEO issues to get a comprehensive website + analysis. Site Audit segments issues into errors, warnings, and ... + breadcrumb: https://ahrefs.com › site-audit + highlighted_terms: + - SEO + - type: related_searches + rank_absolute: 111 + rank_group: 10 + serp_features: + - related_searches + position: center + title: Recherches associées + links: + - url: "" + title: SEO Checker + - url: "" + title: SEO score + - url: "" + title: Aioseo seo analyzer + - url: "" + title: SEO checker free + - url: "" + title: SEO test Google + - url: "" + title: Audit SEO + - url: "" + title: Website Analyzer + - url: "" + title: SEO tools + searches: + - SEO Checker + - SEO score + - Aioseo seo analyzer + - SEO checker free + - SEO test Google + - Audit SEO + - Website Analyzer + - SEO tools + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/serp/classic/tasks/results_advanced?task_id=14' \ + -H 'Authorization: Token YOUR_API_KEY' /v1/serp/classic/tasks/html: get: operationId: getSerpClassicTasksHtml tags: - - SERP Results > classic - summary: Get HTML dump + - SERP + summary: Get HTML SERP dump description: >- - Checks the status of a specific task and retrieves the top 100 SERP - results once the task is complete. + Retrieves the raw HTML version of Google search results pages for a completed SERP task. This method delivers + the original SERP markup as rendered by Google, including pagination and layout. The response is returned as a + ZIP archive containing Google SERP HTML files and a manifest. + + + **Note:** Since the response is a ZIP archive, it must be saved to a file. + + + **Cost:** 0 credits + + + **Saving the response in Postman** + + + - Send the request. + + + - Click **Save Response**. + + + - Choose **Save response to file**. + + + - Save the file. + + + After saving the ZIP file, extract the HTML dump. Use the following command to extract all HTML files and + metadata into the `serp_data` directory: + + + ``` + + unzip SERP_00000_desktop_us_12345.zip -d serp_data + + ``` + + + The server returns a ZIP archive containing the HTML dump. The contents of the HTML dump depend on the + `device`parameter specified when creating the SERP task. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/serp/#html-dump parameters: - name: task_id in: query + required: true + description: Unique ID of the query task created using the **Add SERP tasks** method. schema: type: integer - example: 743834 responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + status: + type: string + description: "Indicates that the task is currently being processed: `\"processing\"`." + example: + status: processing + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/serp/classic/tasks/html?task_id=803249' \ + -H 'Authorization: Token YOUR_API_KEY' /v1/serp/classic/locations: get: operationId: getSerpClassicLocations tags: - - SERP Results > classic + - SERP summary: Get locations description: >- - Returns a list of all SERP tasks submitted by the user within the last - 24 hours. + Retrieves a list of available locations for SERP queries. + + + **Cost:** 0 credits + + + **Note:** If you plan to create SERP tasks using **google_ads_location_id**, make sure to include + `include=google_ads_location_id` when retrieving locations. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/serp/#locations parameters: - name: country_code in: query + description: >- + Country code to filter locations by country. + + + For acceptable values, see [Regional database + codes](https://seranking.com/api/data/reference#regional-database-codes). schema: type: string - example: ES - name: q in: query + description: Parameter for matching a specific city. schema: type: string - example: Barcelona - name: include in: query - description: Include additional fields in the response. + description: Additional data to include in the response; currently supports `google_ads_location_id`. schema: type: string - example: google_ads_location_id responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + data: + type: array + items: + type: object + properties: + location_id: + type: string + description: Location identifier for the search query. + location_name: + type: string + description: Full name of the location returned in the search. + country_code: + type: string + description: Country code of the location returned in the search. + google_ads_location_id: + type: string + description: Google Ads location ID associated with the location (optional). + example: + data: + - location_id: LOCATION_ID_1 + location_name: Barcelona, Catalonia, Spain + country_code: ES + google_ads_location_id: GOOGLE_ADS_ID_1 + - location_id: LOCATION_ID_2 + location_name: Province of Barcelona, Catalonia, Spain + country_code: ES + google_ads_location_id: GOOGLE_ADS_ID_2 + - location_id: LOCATION_ID_3 + location_name: Barcelona, Catalonia, Spain + country_code: ES + google_ads_location_id: GOOGLE_ADS_ID_3 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/serp/classic/locations?country_code=ES&q=Barcelona&include=google_ads_location_id' + \ + -H 'Authorization: Token YOUR_API_KEY' /v1/site-audit/audits/standard: post: operationId: createSiteAuditAuditsStandard tags: - Website Audit summary: Create standard audit - description: Launches a new website audit by crawling the site's raw HTML. + description: >- + Launches a standard audit that crawls the HTML of a website. This is suitable for most static and server-side + rendered sites. + + + **Cost:** 2 credits per crawled page + + + **Settings** + + + The settings object allows for detailed customization of the website crawl. All parameters are optional. + + + If successful, the server returns a JSON object containing the unique ID for the newly created audit. + + + If successful, the server returns a JSON object containing the unique ID for the newly created audit. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/website-audit/#create-audit-standard requestBody: + required: true content: application/json: schema: type: object - example: - domain: example.com - title: Example Audit Title + properties: + domain: + type: string + description: Domain to be audited (e.g., `domain.com`). + title: + type: string + description: Custom title for the audit report. Maximum 300 characters. settings: - source_site: 1 - source_sitemap: 1 - source_subdomain: 0 - source_file: 0 - check_robots: 1 - ignore_params: 0 - custom_params: utm_source,utm_medium,utm_term,utm_content,utm_campaign - ignore_noindex: 0 - ignore_nofollow: 0 - user_agent: 0 - login: '' - password: '' - max_pages: 10000 - max_depth: 10 - max_req: 500 - max_redirects: 5 - min_title_len: 20 - max_title_len: 65 - min_description_len: 1 - max_description_len: 158 - max_size: 3000 - min_words: 250 - max_h1_len: 100 - max_h2_len: 100 - allow: '' - disallow: '' - hide: '' - parameters: - - name: apikey - in: query - schema: - type: string - example: '{{vault:api_key_data_api}}' + type: object + description: >- + Object containing specific audit settings. Only include parameters you want to override. See the + **Audit settings** table below. + properties: + source_site: + type: integer + description: >- + Scan all pages by following internal links from the homepage. If 0, scans only from sitemap or a + provided list. + source_sitemap: + type: integer + description: Scan the sitemap.xml file. + source_subdomain: + type: integer + description: Scan subdomains. If 0, subdomain links are treated as external. + source_file: + type: integer + description: Use a custom list of pages for the audit. + check_robots: + type: integer + description: Follow the directives in the robots.txt file. + ignore_noindex: + type: integer + description: Ignore pages with a noindex tag. + ignore_nofollow: + type: integer + description: Ignore links with a nofollow attribute. + ignore_params: + type: integer + description: Ignore URL parameters. + custom_params: + type: string + user_agent: + type: integer + login: + type: string + password: + type: string + max_pages: + type: integer + description: Maximum number of pages to crawl. + max_depth: + type: integer + description: Maximum crawl depth. + max_req: + type: integer + description: Maximum number of requests per second. + max_redirects: + type: integer + description: Maximum number of redirects to follow. + max_size: + type: integer + description: Maximum page size in kilobytes. + min_title_len: + type: integer + description: Minimum length for the <title> tag. + max_title_len: + type: integer + description: Maximum length for the <title> tag. + min_description_len: + type: integer + description: Minimum length for the meta description. + max_description_len: + type: integer + description: Maximum length for the meta description. + min_words: + type: integer + description: Minimum word count per page. + max_h1_len: + type: integer + description: Maximum length for <h1> tags. + max_h2_len: + type: integer + description: Maximum length for <h2> tags. + allow: + type: string + disallow: + type: string + hide: + type: string + send_report: + type: integer + description: Send an email report when the audit completes. + report_emails: + type: string + required: + - domain + example: + domain: example.com + title: Full Audit - example.com + settings: + source_site: 1 + source_sitemap: 1 + source_subdomain: 1 + source_file: 0 + check_robots: 1 + ignore_noindex: 1 + ignore_nofollow: 1 + ignore_params: 2 + custom_params: utm_source, utm_medium, utm_term, utm_content, utm_campaign, cid, PHPSESSID, fbclid, gclid + user_agent: 0 + login: "" + password: "" + max_pages: 10000 + max_depth: 15 + max_req: 300 + max_redirects: 10 + max_size: 5000 + min_title_len: 30 + max_title_len: 60 + min_description_len: 50 + max_description_len: 160 + min_words: 300 + max_h1_len: 70 + max_h2_len: 80 + allow: |- + /blog + /products + disallow: |- + /admin + /staging + hide: |- + /cdn-cgi + /wp-json + send_report: 1 + report_emails: seo-lead@example.com, devops@example.com responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + id: + type: integer + description: The unique identifier for the audit report. + example: + id: 700237036 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: To launch a standard audit + source: |- + curl --location 'https://api.seranking.com/v1/site-audit/audits/standard' \ + --header 'Content-Type: application/json' \ + --header 'Authorization: Token YOUR_API_KEY' \ + --data '{ + "domain": "example.com", + "title": "Full Audit - example.com", + "settings": { + "source_site": 1, + "source_sitemap": 1, + "source_subdomain": 1, + "source_file": 0, + "check_robots": 1, + "ignore_noindex": 1, + "ignore_nofollow": 1, + "ignore_params": 2, + "custom_params": "utm_source, utm_medium, utm_term, utm_content, utm_campaign, cid, PHPSESSID, fbclid, gclid", + "user_agent": 0, + "login": "", + "password": "", + "max_pages": 10000, + "max_depth": 15, + "max_req": 300, + "max_redirects": 10, + "max_size": 5000, + "min_title_len": 30, + "max_title_len": 60, + "min_description_len": 50, + "max_description_len": 160, + "min_words": 300, + "max_h1_len": 70, + "max_h2_len": 80, + "allow": "/blog\n/products", + "disallow": "/admin\n/staging", + "hide": "/cdn-cgi\n/wp-json", + "send_report": 1, + "report_emails": "seo-lead@example.com, devops@example.com" + } + }' /v1/site-audit/audits/advanced: post: operationId: createSiteAuditAuditsAdvanced @@ -4635,55 +12179,230 @@ paths: - Website Audit summary: Create advanced audit description: >- - Launches a new website audit that renders JavaScript to analyze - dynamically-loaded content, ideal for SPAs. + Launches an advanced audit that renders JavaScript before analyzing the page. Use this for single-page + applications (SPAs) or any site where content is loaded dynamically. + + + **Cost:** 20 credits per crawled page + + + **Settings** + + + The settings object allows for detailed customization of the website crawl. All parameters are optional. + + + If successful, the server returns a JSON object containing the unique ID for the newly created audit. + + + If successful, the server returns a JSON object containing the unique ID for the newly created audit. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/website-audit/#create-audit-advanced requestBody: + required: true content: application/json: schema: type: object - example: - domain: example.com - title: Example Audit Title + properties: + domain: + type: string + description: Domain to be audited (e.g., `domain.com`). + title: + type: string + description: Custom title for the audit report. Maximum 300 characters. settings: - source_site: 1 - source_sitemap: 1 - source_subdomain: 0 - source_file: 0 - check_robots: 1 - ignore_params: 0 - custom_params: utm_source,utm_medium,utm_term,utm_content,utm_campaign - ignore_noindex: 0 - ignore_nofollow: 0 - user_agent: 0 - login: '' - password: '' - max_pages: 100 - max_depth: 10 - max_req: 500 - max_redirects: 5 - min_title_len: 20 - max_title_len: 65 - min_description_len: 1 - max_description_len: 158 - max_size: 3000 - min_words: 250 - max_h1_len: 100 - max_h2_len: 100 - allow: '' - disallow: '' - hide: '' - parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' + type: object + description: >- + Object containing specific audit settings. Only include parameters you want to override. See the + **Audit settings** table below. + properties: + source_site: + type: integer + description: >- + Scan all pages by following internal links from the homepage. If 0, scans only from sitemap or a + provided list. + source_sitemap: + type: integer + description: Scan the sitemap.xml file. + source_subdomain: + type: integer + description: Scan subdomains. If 0, subdomain links are treated as external. + source_file: + type: integer + description: Use a custom list of pages for the audit. + check_robots: + type: integer + description: Follow the directives in the robots.txt file. + ignore_noindex: + type: integer + description: Ignore pages with a noindex tag. + ignore_nofollow: + type: integer + description: Ignore links with a nofollow attribute. + ignore_params: + type: integer + description: Ignore URL parameters. + custom_params: + type: string + user_agent: + type: integer + login: + type: string + password: + type: string + max_pages: + type: integer + description: Maximum number of pages to crawl. + max_depth: + type: integer + description: Maximum crawl depth. + max_req: + type: integer + description: Maximum number of requests per second. + max_redirects: + type: integer + description: Maximum number of redirects to follow. + max_size: + type: integer + description: Maximum page size in kilobytes. + min_title_len: + type: integer + description: Minimum length for the <title> tag. + max_title_len: + type: integer + description: Maximum length for the <title> tag. + min_description_len: + type: integer + description: Minimum length for the meta description. + max_description_len: + type: integer + description: Maximum length for the meta description. + min_words: + type: integer + description: Minimum word count per page. + max_h1_len: + type: integer + description: Maximum length for <h1> tags. + max_h2_len: + type: integer + description: Maximum length for <h2> tags. + allow: + type: string + disallow: + type: string + hide: + type: string + send_report: + type: integer + description: Send an email report when the audit completes. + report_emails: + type: string + required: + - domain + example: + domain: example.com + title: Full Audit - example.com + settings: + source_site: 1 + source_sitemap: 1 + source_subdomain: 1 + source_file: 0 + check_robots: 1 + ignore_noindex: 1 + ignore_nofollow: 1 + ignore_params: 2 + custom_params: utm_source, utm_medium, utm_term, utm_content, utm_campaign, cid, PHPSESSID, fbclid, gclid + user_agent: 0 + login: "" + password: "" + max_pages: 10000 + max_depth: 15 + max_req: 300 + max_redirects: 10 + max_size: 5000 + min_title_len: 30 + max_title_len: 60 + min_description_len: 50 + max_description_len: 160 + min_words: 300 + max_h1_len: 70 + max_h2_len: 80 + allow: |- + /blog + /products + disallow: |- + /admin + /staging + hide: |- + /cdn-cgi + /wp-json + send_report: 1 + report_emails: seo-lead@example.com, devops@example.com responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + id: + type: integer + description: The unique identifier for the audit report. + example: + id: 700237036 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: To launch an advanced audit + source: |- + curl --location 'https://api.seranking.com/v1/site-audit/audits/advanced' \ + --header 'Content-Type: application/json' \ + --header 'Authorization: Token YOUR_API_KEY' \ + --data '{ + "domain": "example.com", + "title": "Full Audit - example.com", + "settings": { + "source_site": 1, + "source_sitemap": 1, + "source_subdomain": 1, + "source_file": 0, + "check_robots": 1, + "ignore_noindex": 1, + "ignore_nofollow": 1, + "ignore_params": 2, + "custom_params": "utm_source, utm_medium, utm_term, utm_content, utm_campaign, cid, PHPSESSID, fbclid, gclid", + "user_agent": 0, + "login": "", + "password": "", + "max_pages": 10000, + "max_depth": 15, + "max_req": 300, + "max_redirects": 10, + "max_size": 5000, + "min_title_len": 30, + "max_title_len": 60, + "min_description_len": 50, + "max_description_len": 160, + "min_words": 300, + "max_h1_len": 70, + "max_h2_len": 80, + "allow": "/blog\n/products", + "disallow": "/admin\n/staging", + "hide": "/cdn-cgi\n/wp-json", + "send_report": 1, + "report_emails": "seo-lead@example.com, devops@example.com" + } + }' /v1/site-audit/audits: get: operationId: getSiteAuditAudits @@ -4691,101 +12410,262 @@ paths: - Website Audit summary: List audits description: >- - Retrieves a paginated list of all website audits associated with your - account, including their current status and summary stats. + Retrieves a list of all website audits associated with your account, providing key details and statistics for + each. + + + **Cost:** 0 credits + + + If successful, the server returns a JSON object containing the total count of audits and an array of audit + objects. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/website-audit/#list-audits parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: limit in: query + description: Number of audits to return in the list. schema: type: integer default: 100 - example: 100 - name: offset in: query + description: Starting position (offset) for the list of audits. schema: type: integer default: 0 - example: 0 - name: search in: query - description: Filter audits by title or URL. + description: Filters the list by a search term matching the audit’s title or URL. schema: type: string - name: date_start in: query - description: Filter audits created on or after this date (YYYY-MM-DD). + description: Start date for filtering audits (YYYY-MM-DD). schema: type: string - format: date - name: date_end in: query - description: Filter audits created on or before this date (YYYY-MM-DD). + description: End date for filtering audits (YYYY-MM-DD). schema: type: string - format: date responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + items: + type: array + items: + type: object + properties: + id: + type: integer + description: Unique identifier for the audit report (e.g., `700138456`). + group_id: + type: integer + url: + type: string + description: URL of the audited website (e.g., `http://booking.com`). + title: + type: string + description: Title of the audit report (e.g., `booking.com`). + has_project: + type: boolean + site_id: + type: integer + last_update: + type: string + description: Date the audit was last updated in YYYY-MM-DD format (e.g., `2025-07-08`). + status: + type: string + description: Current status of the audit (e.g., `finished`, `processing`). + error: {} + error_params: {} + stats: + type: object + properties: + score: + type: integer + errors: + type: integer + warnings: + type: integer + notices: + type: integer + crawled: + type: integer + description: >- + Object containing the latest statistics for the audit (`score`, `errors`, `warnings`, + `notices`, `crawled`). + prev_stats: + description: >- + Object containing statistics from the previous audit run. Can be `null` if no prior data + exists. + version: + type: string + owner_account_id: + type: integer + is_new: + type: integer + description: Array of objects, each representing a website audit. + description: Array of objects, each representing a website audit. + total: + type: integer + description: Total number of audits matching the filter criteria. + example: + items: + - id: 700138456 + group_id: 0 + url: http://booking.com + title: booking.com + has_project: true + site_id: 10113599 + last_update: "2025-07-08" + status: finished + error: null + error_params: null + stats: + score: 69 + errors: 2303 + warnings: 3710 + notices: 10875 + crawled: 1830 + prev_stats: null + version: "2.0" + owner_account_id: 4242308 + is_new: 1 + total: 1 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location + 'https://api.seranking.com/v1/site-audit/audits?limit=4&offset=0&search=booking.com&date_start=2025-07-01&date_end=2025-07-31' + \ + + --header 'Authorization: Token YOUR_API_KEY' patch: operationId: updateSiteAuditAudits tags: - Website Audit - summary: Update audit - description: Changes the display title of an existing website audit report. - requestBody: - content: - application/json: - schema: - type: object - example: - title: New Example Audit Title + summary: Update audit title + description: |- + Changes the title of an existing website audit report. + + **Cost:** 0 credits + + If successful, the server returns **HTTP 200 OK** with an empty response body. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/website-audit/#update-audit-title parameters: - name: audit_id in: query + required: true + description: Unique identifier of the audit to update. schema: type: integer - example: 700387192 - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + title: + type: string + description: New title for the audit report. Maximum 300 characters. + required: + - title + example: + title: New Title for Ananda Ioga Audit responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: array + items: {} + example: [] + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl --location --request PATCH 'https://api.seranking.com/v1/site-audit/audits?audit_id=89263' \ + --header 'Content-Type: application/json' \ + --header 'Authorization: Token YOUR_API_KEY' \ + --data '{ + "title": "New Title for Ananda Ioga Audit" + }' delete: operationId: deleteSiteAuditAudits tags: - Website Audit summary: Delete audit description: >- - Permanently deletes a specified website audit report and all of its - associated data. + Permanently deletes a specified website audit report and all of its associated data. This action can’t be + undone. + + + **Cost:** 0 credits + + + If successful, the server returns **HTTP 200 OK** with an empty response body. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/website-audit/#delete-audit parameters: - name: audit_id in: query + required: true + description: Unique identifier of the audit to delete. schema: type: integer - example: 700387192 - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: array + items: {} + example: [] + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl --location --request DELETE 'https://api.seranking.com/v1/site-audit/audits?audit_id=89263' \ + --header 'Authorization: Token YOUR_API_KEY' /v1/site-audit/audits/status: get: operationId: getSiteAuditAuditsStatus @@ -4793,24 +12673,77 @@ paths: - Website Audit summary: Get audit status description: >- - Checks the real-time progress of a specific audit, including the number - of pages crawled and issues found so far. + Checks the real-time status of a specific website audit, whether it’s queued, currently processing, or already + finished. This is useful for monitoring the progress of a crawl before fetching the full report. + + + **Cost:** 0 credits + + + If successful, the server returns a JSON object containing the current status and key metrics of the audit. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/website-audit/#get-audit-status parameters: - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: audit_id in: query + required: true + description: Unique identifier of the audit to check. schema: type: integer - example: 700313923 responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + total_pages: + type: integer + description: Number of pages crawled so far. + total_warnings: + type: integer + description: Current count of warnings found. + total_errors: + type: integer + description: Current count of critical issues found. + total_passed: + type: integer + description: Current count of checks that have passed. + status: + type: string + description: >- + Current status of the audit. Possible values: `queued`, `processing`, `finished`, `cancelled`, + `expired`. + start_time: + type: string + description: Timestamp for when the audit began. + audit_time: + type: string + description: Timestamp for when the audit was completed. This will be present if the status is finished. + example: + total_pages: 1009 + total_warnings: 979 + total_errors: 346 + total_passed: 77 + status: finished + start_time: "2025-07-29 11:06:23" + audit_time: "2025-07-29 11:19:33" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl --location 'https://api.seranking.com/v1/site-audit/audits/status?audit_id=700183831' \ + --header 'Authorization: Token YOUR_API_KEY' /v1/site-audit/audits/report: get: operationId: getSiteAuditAuditsReport @@ -4818,24 +12751,226 @@ paths: - Website Audit summary: Get audit report description: >- - Retrieves the full summary report for a completed audit, including the - overall health score and a breakdown of all issues. + Retrieves the full, detailed report for a completed website audit. The report includes the site’s overall health + score, domain properties, and a section-by-section breakdown of all checks performed, categorized by issue type + (errors, warnings, notices). + + + **Cost:** 0 credits + + + If successful, the server returns a JSON object containing the complete audit report. + + + Each object in the `sections` array contains a uid (unique ID), a name for the category, and a `props` object. + The `props` object lists all the individual checks for that category. Each check includes: + + + - `code`: A unique identifier for the check (e.g., no_https). + + + - `status`: The result of the check (error, warning, notice, passed). + + + - `name`: A human-readable name for the check. + + + - `value`: The number of pages affected by this issue. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/website-audit/#get-audit-report parameters: - name: audit_id in: query + required: true + description: Unique identifier of the audit for which to retrieve the report. schema: type: integer - example: 700183831 - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + total_pages: + type: integer + description: Total number of pages crawled during the audit. + total_warnings: + type: integer + description: Total count of warnings found. + total_errors: + type: integer + description: Total count of critical issues found. + total_passed: + type: integer + description: Total count of checks that passed successfully. + total_notices: + type: integer + description: Total count of minor issues or notices. + is_finished: + type: boolean + description: Indicates if the audit has completed. The report is only available if this is true. + domain_props: + type: object + properties: + dt: + type: integer + domain: + type: string + domains: + type: string + expdate: + type: string + description: Expiration date of the domain registration. + updated: + type: string + backlinks: + type: string + description: Total number of backlinks pointing to the domain. + index_bing: + type: integer + all_checked: + type: boolean + index_yahoo: + type: integer + index_google: + type: string + description: Number of pages indexed in Google. + description: Object containing general data about the audited domain. See details below. + sections: + type: array + items: + type: object + properties: + uid: + type: string + name: + type: string + props: + type: object + properties: + no_https: + type: object + properties: + code: + type: string + status: + type: string + name: + type: string + value: + type: integer + mixed_content: + type: object + properties: + code: + type: string + status: + type: string + name: + type: string + value: + type: integer + http4xx: + type: object + properties: + code: + type: string + status: + type: string + name: + type: string + value: + type: integer + blocked_by_noindex: + type: object + properties: + code: + type: string + status: + type: string + name: + type: string + value: + type: integer + description: >- + Array of objects, where each object represents a category of audit checks (e.g., `Security`, + `Content`). + description: >- + Array of objects, where each object represents a category of audit checks (e.g., `Security`, + `Content`). + score_percent: + type: integer + description: Overall health score of the website, from 0 to 100. + audit_time: + type: string + description: Timestamp for when the audit was completed. + version: + type: string + example: + total_pages: 1009 + total_warnings: 979 + total_errors: 346 + total_passed: 77 + total_notices: 3915 + is_finished: true + domain_props: + dt: 44 + domain: www.vitality.co.uk + domains: "3401" + expdate: "2025-08-30" + updated: "2025-07-29 12:07:28" + backlinks: "212249" + index_bing: 15500 + all_checked: true + index_yahoo: 15500 + index_google: "1380" + sections: + - uid: security_v2 + name: Security + props: + no_https: + code: no_https + status: error + name: No HTTPS encryption + value: 0 + mixed_content: + code: mixed_content + status: error + name: Mixed content + value: 0 + - uid: crawling_v2 + name: Crawling & Indexing + props: + http4xx: + code: http4xx + status: error + name: 4XX HTTP Status Codes + value: 28 + blocked_by_noindex: + code: blocked_by_noindex + status: notice + name: Blocked by noindex + value: 34 + score_percent: 80 + audit_time: "2025-07-29 11:19:33" + version: "2.0" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl --location 'https://api.seranking.com/v1/site-audit/audits/report?audit_id=700183831' \ + --header 'Authorization: Token YOUR_API_KEY' /v1/site-audit/audits/pages: get: operationId: getSiteAuditAuditsPages @@ -4843,34 +12978,365 @@ paths: - Website Audit summary: Get all crawled pages description: >- - Returns a paginated list of every URL discovered during an audit, along - with detailed on-page and technical metrics for each. + Returns a paginated list of all URLs found during an audit, providing a complete sitemap as discovered by the + crawler. This includes pages with and without detected issues. + + + **Cost:** 0 credits + + + If successful, the server returns a JSON object containing the total count of crawled pages and an array of page + objects. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/website-audit/#get-all-crawled-pages parameters: - name: audit_id in: query + required: true + description: Unique identifier of the audit report. schema: type: integer - example: 700183831 - name: limit in: query + description: Number of pages to return in the list. schema: type: integer - example: 10 + default: 100 - name: offset in: query + description: Starting position for the list of pages. schema: type: integer - example: 0 - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' + default: 0 responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + total: + type: integer + description: Total number of pages crawled in the audit. + items: + type: array + items: + type: object + properties: + id: + type: string + description: Unique internal identifier for the page (e.g., `50958380`). + url: + type: string + description: Full URL of the crawled page (e.g., `https://www.vitality.co.uk/`). + url_len: + type: string + type: + type: string + url_protocol: + type: string + sitemap: + type: string + status: + type: string + description: HTTP status code returned by the page (e.g., `200`). + size: + type: string + depth: + type: string + description: Crawl depth of the page, i.e., distance from the start page (e.g., `1`). + noindex: + type: string + first_ms: + type: string + load_ms: + type: string + description: Time it took for the page to load, in milliseconds (e.g., `1373`). + robots: + type: string + nofollow: + type: string + xrobots: {} + title_len: + type: string + description_len: + type: string + chars: + type: string + h1_len: + type: string + h2_len: + type: string + html_ratio: + type: string + blocked_robots: + type: string + img: + type: string + hreflang: {} + hreflang_link: {} + refresh_time: {} + meta_refresh: + type: string + redirect_url: {} + canonical_url: + type: string + description: Canonical URL specified for the page (e.g., `https://www.vitality.co.uk/`). + single_h1: + type: string + single_h2: + type: string + h3_count: + type: string + h4_count: + type: string + h5_count: + type: string + h6_count: + type: string + words_count: + type: string + description: Total number of words found on the page (e.g., `1621`). + total_links: + type: string + mixed_count: {} + mixed: {} + last_modified: {} + content_hash: + type: string + title: + type: string + description: Content of the `<title>` tag (e.g., `Vitality Insurance`). + description: + type: string + description: Content of the meta description tag (e.g., `Vitality is a leading UK insurer...`). + h1: + type: string + description: Content of the first `<h1>` tag (e.g., `Live longer with Vitality insurance`). + h2: + type: string + issues: + type: string + description: Total count of issues found on the page (e.g., `2`). + errors: + type: string + description: Total count of critical errors on the page (e.g., `0`). + warnings: + type: string + description: Total count of warnings on the page (e.g., `0`). + notices: + type: string + description: Total count of notices on the page (e.g., `2`). + refpages: + type: string + inlinks: + type: string + description: Number of internal links pointing to this page (e.g., `922`). + inlinks_nofollow: + type: string + inlinks_follow: + type: string + redirect_links: + type: string + redirect_count: + type: string + img_size: + type: string + css_size: + type: string + js_size: + type: string + outlinks_external: + type: string + description: Number of external links found on this page (e.g., `12`). + outlinks_internal: + type: string + description: Number of internal links found on this page (e.g., `83`). + title_duplicate: + type: string + description_duplicate: + type: string + h1_duplicate: + type: string + amp: + type: string + indexable: + type: string + indexable_status: + type: string + description: Indexability status of the page (e.g., `ok`). + traffic_forecast: + type: string + num_keywords: + type: string + recheck_status: {} + time_check: + type: string + description: Array of objects, each representing a crawled page with its detailed metrics. + description: Array of objects, each representing a crawled page with its detailed metrics. + example: + total: 1009 + items: + - id: "50958380" + url: "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)" + url_len: "27" + type: doc + url_protocol: https + sitemap: "0" + status: "200" + size: "156676" + depth: "1" + noindex: "0" + first_ms: "35" + load_ms: "1373" + robots: index, follow + nofollow: "0" + xrobots: null + title_len: "53" + description_len: "139" + chars: "153843" + h1_len: "35" + h2_len: "16" + html_ratio: "40" + blocked_robots: "0" + img: "21" + hreflang: null + hreflang_link: null + refresh_time: null + meta_refresh: "0" + redirect_url: null + canonical_url: "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)" + single_h1: "1" + single_h2: "0" + h3_count: "9" + h4_count: "33" + h5_count: "0" + h6_count: "0" + words_count: "1621" + total_links: "230" + mixed_count: null + mixed: null + last_modified: null + content_hash: 9d657683ebd385ba700d4301f1ef854f + title: Vitality Insurance | Award-Winning Insurance Provider + description: >- + Vitality is a leading UK insurer offering health and life insurance. Get your quote today and + unlock discounts and rewards from top brands. + h1: Live longer with Vitality insurance + h2: Health insurance + issues: "2" + errors: "0" + warnings: "0" + notices: "2" + refpages: "921" + inlinks: "922" + inlinks_nofollow: "0" + inlinks_follow: "922" + redirect_links: "4" + redirect_count: "5" + img_size: "700322" + css_size: "443163" + js_size: "543728" + outlinks_external: "12" + outlinks_internal: "83" + title_duplicate: "0" + description_duplicate: "0" + h1_duplicate: "0" + amp: "0" + indexable: "1" + indexable_status: ok + traffic_forecast: "10716" + num_keywords: "48369" + recheck_status: null + time_check: "2025-07-29 11:06:30" + - id: "50958398" + url: "[https://www.vitality.co.uk/health-insurance/](https://www.vitality.co.uk/health-insurance/)" + url_len: "44" + type: doc + url_protocol: https + sitemap: "1" + status: "200" + size: "181179" + depth: "2" + noindex: "0" + first_ms: "0" + load_ms: "496" + robots: index, follow + nofollow: "0" + xrobots: null + title_len: "52" + description_len: "121" + chars: "178088" + h1_len: "26" + h2_len: "33" + html_ratio: "42" + blocked_robots: "0" + img: "27" + hreflang: null + hreflang_link: null + refresh_time: null + meta_refresh: "0" + redirect_url: null + canonical_url: "[https://www.vitality.co.uk/health-insurance/](https://www.vitality.co.uk/health-insurance/)" + single_h1: "1" + single_h2: "0" + h3_count: "20" + h4_count: "39" + h5_count: "0" + h6_count: "0" + words_count: "3032" + total_links: "239" + mixed_count: null + mixed: null + last_modified: null + content_hash: 5b6d17dbcb03b2405450db10f86dd43a + title: Health Insurance in the UK | Get Private Health Care + description: >- + Get top-rated health insurance in the UK, with real benefits and incentives from your healthcare + plan. Get a quote today. + h1: Health insurance in the UK + h2: What is private health insurance? + issues: "3" + errors: "0" + warnings: "1" + notices: "2" + refpages: "896" + inlinks: "898" + inlinks_nofollow: "0" + inlinks_follow: "898" + redirect_links: "0" + redirect_count: "4" + img_size: "2316745" + css_size: "443163" + js_size: "543728" + outlinks_external: "12" + outlinks_internal: "86" + title_duplicate: "0" + description_duplicate: "0" + h1_duplicate: "0" + amp: "0" + indexable: "1" + indexable_status: ok + traffic_forecast: "4928" + num_keywords: "13021" + recheck_status: null + time_check: "2025-07-29 11:06:45" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl --location 'https://api.seranking.com/v1/site-audit/audits/pages?audit_id=700183831&limit=2&offset=0' \ + --header 'Authorization: Token YOUR_API_KEY' /v1/site-audit/audits/issue-pages: get: operationId: getSiteAuditAuditsIssuePages @@ -4878,84 +13344,370 @@ paths: - Website Audit summary: Get audit pages by issue description: >- - Returns a list of all URLs affected by a single, specific issue within - an audit report. + Retrieves a paginated list of all URLs affected by a specific issue within a given audit. You can identify the + code for an issue by first fetching the main audit report. + + + **Cost:** 0 credits + + + If successful, the server returns a JSON object containing the total count of affected URLs and an array of the + URLs themselves. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/website-audit/#get-audit-pages-by-issue parameters: - - name: code - in: query - schema: - type: string - example: title_duplicate - name: audit_id in: query + required: true + description: Unique identifier of the audit report. schema: type: integer - example: 700183831 + - name: code + in: query + required: true + description: >- + Unique code for the issue (e.g., `title_duplicate`). [Audit Issue + Codes](https://seranking.com/api/data/reference/#site-audit-issue-codes) for the full list of valid codes. + schema: + type: string - name: limit in: query + description: Number of URLs to return in the list. schema: type: integer - example: 10 + default: 100 - name: offset in: query + description: Starting position (offset) for the list of URLs. schema: type: integer - example: 0 - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' + default: 0 responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + total_urls: + type: integer + description: Total number of URLs affected by this specific issue. + urls: + type: array + items: + type: string + description: Array of strings, where each string is a URL affected by the issue. + description: Array of strings, where each string is a URL affected by the issue. + urls_type: + type: string + description: >- + Type of `urls` array returned. For this endpoint, it is `simple_urls_array`, meaning a plain array + of URL strings. + example: + total_urls: 143 + urls: + - https://www.vitality.co.uk/life-insurance/accident-and-fracture-cover/ + - https://www.vitality.co.uk/business/health-insurance/callback/ + - https://www.vitality.co.uk/media/vitality-employee-challenges-programme-goes-live/ + - https://www.vitality.co.uk/media/bbq-blunders-the-bbq-foods-fooling-brits/ + - >- + https://www.vitality.co.uk/media/vitality-launches-cpd-accredited-sustainability-webinar-series-for-advisers/ + - https://www.vitality.co.uk/media/vitality-welcomes-new-partners-to-the-programme/ + - https://www.vitality.co.uk/media/sneezing-season-slams-first-time-sufferers/ + - https://www.vitality.co.uk/media/vitality-calls-for-greater-focus-on-burnout/ + - >- + https://www.vitality.co.uk/media/vitality-research-reveals-gaps-in-employee-awareness-of-sick-leave-policies/ + - https://www.vitality.co.uk/media/vitality-parkrun-celebrate-record-breaking/ + urls_type: simple_urls_array + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location + 'https://api.seranking.com/v1/site-audit/audits/issue-pages?code=title_duplicate&audit_id=700183831&limit=10&offset=0' + \ + + --header 'Authorization: Token YOUR_API_KEY' /v1/site-audit/audits/issues: get: operationId: getSiteAuditAuditsIssues tags: - Website Audit - summary: Get All Issues for a Specific URL + summary: Get all issues by URL description: >- - Retrieves a detailed list of all technical and on-page issues found on a - single, specific page. + Retrieves a detailed list of all issues (errors, warnings, and notices) found on a single, specific page within + an audit. The response also includes the full `page_data` object for the complete context. + + + **Cost:** 0 credits + + + If successful, the server returns a JSON object containing the page’s URL, its full data object, and an array of + all issues found on that page. + + + The `snippet` value provides the specific evidence, such as a list of redirecting URLs or an oversized CSS file + with its size. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/website-audit/#get-all-issues-for-a-specific-url parameters: - name: audit_id in: query + required: true + description: Unique identifier of the audit. schema: type: integer - example: 700183831 - name: url_id in: query + description: >- + Unique identifier of the page obtained from the [Get all crawled + pages](https://seranking.com/api/data/website-audit/#get-all-crawled-pages) endpoint. Required if `url` is + not provided. schema: type: integer - example: 50958380 - name: url in: query + description: Full page URL. Required if `url_id` is not provided. schema: type: string - example: https://www.vitality.co.uk/ - - name: limit - in: query - schema: - type: integer - example: 10 - - name: offset - in: query - schema: - type: integer - example: 0 - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + url: + type: string + description: Full URL of the page being queried. + page_data: + type: object + properties: + h1: + type: string + h2: + type: string + js: + type: integer + css: + type: integer + doc: + type: integer + img: + type: integer + lang: + type: string + cache: + type: string + chars: + type: integer + title: + type: string + words: + type: integer + ext_js: + type: integer + h1_len: + type: integer + h2_len: + type: integer + robots: + type: string + ext_doc: + type: integer + h1_hash: + type: string + inlinks: + type: integer + js_size: + type: integer + css_size: + type: integer + encoding: + type: string + h1_count: + type: integer + h2_count: + type: integer + h3_count: + type: integer + h4_count: + type: integer + img_size: + type: integer + refpages: + type: integer + canonical: + type: string + title_len: + type: integer + html_ratio: + type: integer + time_check: + type: string + title_hash: + type: string + description: + type: string + total_links: + type: integer + errors_count: + type: integer + issues_count: + type: integer + num_keywords: + type: integer + notices_count: + type: integer + redirect_count: + type: integer + redirect_links: + type: integer + warnings_count: + type: integer + description_len: + type: integer + description_hash: + type: string + traffic_forecast: + type: integer + description: Snapshot of all metrics and metadata collected for the page during the crawl. + issues: + type: array + items: + type: object + properties: + code: + type: string + description: Unique, machine-readable identifier for the issue type (e.g., `css_big`). + type: + type: string + description: Severity of the issue (e.g., `error`, `warning`, `notice`). + group: + type: string + description: Category the issue belongs to (e.g., `links_v2`, `css`). + snippet: + type: object + properties: + type: + type: string + description: Severity of the issue (e.g., `error`, `warning`, `notice`). + value: + type: array + items: + type: object + properties: + status: + type: string + url: + type: string + description: Full URL of the page being queried. + size: + type: string + description: "Concrete, actionable details about the issue: `{...}`" + description: >- + Array of objects, where each object is a specific issue (error, warning, or notice) found on the + page. + description: >- + Array of objects, where each object is a specific issue (error, warning, or notice) found on the + page. + example: + url: "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)" + page_data: + h1: Live longer with Vitality insurance + h2: Health insurance + js: 6 + css: 1 + doc: 83 + img: 21 + lang: en + cache: no-cache, no-store + chars: 153843 + title: Vitality Insurance | Award-Winning Insurance Provider + words: 1621 + ext_js: 4 + h1_len: 35 + h2_len: 16 + robots: index, follow + ext_doc: 12 + h1_hash: 4c57f3fc38a26dcc202c11b8975f590e + inlinks: 922 + js_size: 543728 + css_size: 443163 + encoding: gzip + h1_count: 1 + h2_count: 14 + h3_count: 9 + h4_count: 33 + img_size: 700322 + refpages: 921 + canonical: "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)" + title_len: 53 + html_ratio: 40 + time_check: "2025-07-29 11:06:30" + title_hash: c33af508bc32002acac1e3a12606c626 + description: >- + Vitality is a leading UK insurer offering health and life insurance. Get your quote today and unlock + discounts and rewards from top brands. + total_links: 230 + errors_count: 0 + issues_count: 2 + num_keywords: 48369 + notices_count: 2 + redirect_count: 5 + redirect_links: 4 + warnings_count: 0 + description_len: 139 + description_hash: 3bb8e0f3905c4b7203a8b7cae91f890b + traffic_forecast: 10716 + issues: + - code: extlinks3xx + type: notice + group: links_v2 + snippet: + type: urls + value: + - status: "302" + url: >- + [https://members.vitality.co.uk/my-points/confirm-an-activity](https://members.vitality.co.uk/my-points/confirm-an-activity) + - status: "302" + url: "[https://members.vitality.co.uk/](https://members.vitality.co.uk/)" + - code: css_big + type: notice + group: css + snippet: + type: urls + value: + - status: "200" + url: >- + [https://www.vitality.co.uk/dist/vds/css/presales.css?v=2025.6.30121236](https://www.vitality.co.uk/dist/vds/css/presales.css?v=2025.6.30121236) + size: "443163" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl --location 'https://api.seranking.com/v1/site-audit/audits/issues?audit_id=700183831&url_id=50958380' \ + --header 'Authorization: Token YOUR_API_KEY' /v1/site-audit/audits/links: get: operationId: getSiteAuditAuditsLinks @@ -4963,70 +13715,224 @@ paths: - Website Audit summary: Get all found links description: >- - Fetches a complete, filterable list of every internal and external - hyperlink discovered across the entire site during an audit. + Returns a paginated list of every hyperlink (e.g., in `<a>` tags, canonicals) discovered across the entire site + during the audit. It allows for a complete analysis of all internal and outbound links. + + + **Cost:** 0 credits + + + **Advanced filtering** + + + To build complex queries, you can add an array of `filter` parameters to the URL query string. This allows you + to chain multiple conditions together using logical operators. + + + - `filter[index][param]`: **(Required)** The field you want to filter on. + + + - `filter[index][value]`: **(Required)** The value to match. + + + - `filter[index][type]`: The logical operator (`and` or `or`) to connect this condition to the previous one. + This is **required for the second condition onwards** (i.e., for `filter[1]`, `filter[2]`, etc.). + + + **Example 1: OR logic** + + + To find all internal links that have a status code of either `301` **OR** `302`. + + + - `filter[0]` sets the base condition (`status = 301`). + + + - `filter[1][type]=or` **explicitly connects** the next condition (`status = 302`) with an **OR**. + + + **Example 2: AND logic** + + + To find all broken (`404`) image links (`anchor_type = image`). + + + - `filter[0]` sets the base condition (`status = 404`). + + + - `filter[1][type]=and` **must be included** to connect the second condition (`anchor_type = image`) with an + **AND**. Omitting it would result in an error. + + + If successful, the server returns a JSON object containing the total count of links and an array of link + objects. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/website-audit/#get-all-found-links parameters: - name: audit_id in: query + required: true + description: Unique identifier of the audit. schema: type: integer - example: 700183831 - name: page_type in: query + description: |- + Filters links by type. Possible values: `internal`, `external`, `all`. + + Default: all schema: type: string - enum: - - all - - internal - - external - default: all - example: internal - - name: limit - in: query - schema: - type: integer - example: 10 - - name: filter[0][param] - in: query - schema: - type: string - example: status - - name: filter[0][value] - in: query - schema: - type: integer - example: 301 - - name: filter[1][param] + - name: filter in: query + description: >- + Array of `filter` objects to build complex queries. Allows for filtering on link properties like HTTP + status. See details below. schema: - type: string - example: status - - name: filter[1][value] + type: array + items: + type: string + - name: limit in: query + description: Number of links to return in the list. schema: type: integer - example: 302 - - name: filter[1][type] - in: query - schema: - type: string - example: or - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' - name: offset in: query + description: Starting position for the list of links. schema: type: integer - default: 0 - example: 0 responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + total: + type: integer + description: Total number of links matching the filter criteria. + items: + type: array + items: + type: object + properties: + url: + type: string + description: Destination URL of the link (e.g., `https://www.vitality.co.uk/`). + id: + type: string + description: Unique identifier for this specific link instance (e.g., `1153787496`). + status: + type: string + description: HTTP status code of the destination URL (e.g., `200`). + type: + type: string + description: Type of the link (e.g., `hyperlink`, `canonical`). + source_url: + type: string + description: >- + URL of the page where the link was discovered (e.g., + `https://www.vitality.co.uk/advisers/`). + source_noindex: + type: string + description: Indicates if the source page has a noindex directive (“1” for yes, “0” for no). + nofollow: + type: string + description: Indicates if the link has a rel=”nofollow” attribute (“1” for yes, “0” for no). + alt: + type: string + anchor_type: + type: string + anchor: + type: string + description: Visible, clickable text of the link (e.g., `Personal`). + title: + type: string + description: Array of objects, each representing a discovered link. + description: Array of objects, each representing a discovered link. + example: + total: 103624 + items: + - url: "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)" + id: "1153787496" + status: "200" + type: hyperlink + source_url: "[https://www.vitality.co.uk/advisers/](https://www.vitality.co.uk/advisers/)" + source_noindex: "1" + nofollow: "0" + alt: "" + anchor_type: text + anchor: Personal + title: "" + - url: "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)" + id: "1153787624" + status: "200" + type: hyperlink + source_url: "[https://www.vitality.co.uk/business/](https://www.vitality.co.uk/business/)" + source_noindex: "0" + nofollow: "0" + alt: "" + anchor_type: text + anchor: Personal + title: "" + - url: "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)" + id: "1153787774" + status: "200" + type: hyperlink + source_url: "[https://www.vitality.co.uk/community/](https://www.vitality.co.uk/community/)" + source_noindex: "0" + nofollow: "0" + alt: "" + anchor_type: text + anchor: Personal + title: "" + - url: "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)" + id: "1153787908" + status: "200" + type: hyperlink + source_url: >- + [https://www.vitality.co.uk/healthcare-providers/](https://www.vitality.co.uk/healthcare-providers/) + source_noindex: "0" + nofollow: "0" + alt: "" + anchor_type: text + anchor: Personal + title: "" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location + 'https://api.seranking.com/v1/site-audit/audits/links?audit_id=700183831&page_type=internal&limit=10&filter[0][param]=status&filter[0][value]=301&filter[1][param]=status&filter[1][value]=302&filter[1][type]=or' + \ + + --header 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: >- + curl --location + 'https://api.seranking.com/v1/site-audit/audits/links?audit_id=700183831&page_type=internal&limit=10&filter[0][param]=status&filter[0][value]=404&filter[1][param]=anchor_type&filter[1][value]=image&filter[1][type]=and' + \ + + --header 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: >- + curl --location + 'https://api.seranking.com/v1/site-audit/audits/links?audit_id=700183831&page_type=all&limit=4&offset=0' \ + + --header 'Authorization: Token YOUR_API_KEY' /v1/site-audit/audits/history: get: operationId: getSiteAuditAuditsHistory @@ -5034,128 +13940,492 @@ paths: - Website Audit summary: Get audit history by date description: >- - Retrieves a complete historical snapshot of a specific audit run, - including the settings, domain data, and issue counts for that date. + Retrieves a historical snapshot of a specific audit run, providing the full context of that audit, including the + settings used, domain data at the time, and a summary of all issues found. + + + **Cost:** 0 credits + + + If successful, the server returns a JSON object containing the complete historical data for the specified audit + run. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/website-audit/#get-audit-history-by-date parameters: - name: audit_id in: query + required: true + description: Unique identifier of the audit. schema: type: integer - example: 700183831 - name: date in: query + required: true + description: Specific date of the historical audit to retrieve (YYYY-MM-DD). schema: type: string - example: '2025-07-29' - - name: apikey - in: query - schema: - type: string - example: '{{secret_key_data}}' responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: object + properties: + audit_time: + type: string + description: Exact timestamp when the historical audit was completed. + domain_data: + type: object + properties: + dt: + type: integer + domain: + type: string + backlinks: + type: string + index_google: + type: string + description: >- + Object containing general data about the domain at the time of the audit (e.g., backlinks, indexed + pages). + settings: + type: object + properties: + source_site: + type: integer + source_sitemap: + type: integer + max_pages: + type: integer + max_depth: + type: integer + description: Object detailing all the configuration settings that were used for this specific audit run. + pages_data: + type: object + properties: + css3xx: + type: integer + css_big: + type: integer + h1_long: + type: integer + http4xx: + type: integer + title_duplicate: + type: integer + description_duplicate: + type: integer + description: >- + Object where each key is an issue code (e.g., `title_duplicate`) and the value is the number of + pages affected by that issue. + totals: + type: object + properties: + total_pages: + type: integer + total_warnings: + type: integer + total_errors: + type: integer + total_passed: + type: integer + description: >- + Object summarizing the final counts for the audit (`total_pages`, `total_warnings`, + `total_errors`). + version: + type: string + example: + audit_time: "2025-07-29 11:19:33" + domain_data: + dt: 44 + domain: www.vitality.co.uk + backlinks: "212249" + index_google: "1380" + settings: + source_site: 1 + source_sitemap: 1 + max_pages: 1000 + max_depth: 10 + pages_data: + css3xx: 1 + css_big: 880 + h1_long: 19 + http4xx: 28 + title_duplicate: 143 + description_duplicate: 169 + totals: + total_pages: 1009 + total_warnings: 979 + total_errors: 346 + total_passed: 77 + version: "2.0" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location 'https://api.seranking.com/v1/site-audit/audits/history?audit_id=700183831&date=2025-07-29' + \ + + --header 'Authorization: Token YOUR_API_KEY' /v1/site-audit/audits/recheck/standard: post: operationId: createSiteAuditAuditsRecheckStandard tags: - Website Audit - summary: Recheck audit standard - description: >- - Initiates a new standard (HTML) crawl for a previously completed audit - using its original settings. - requestBody: - content: {} + summary: Recheck standard audit + description: |- + Launches a new standard crawl for an existing audit. + + **Cost:** 2 credits per crawled page + + If successful, the server returns **HTTP 200 OK** with an empty response body. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/website-audit/#recheck-audit-standard parameters: - name: audit_id in: query - schema: - type: integer - example: 700237033 - - name: apikey - in: query + required: true + description: Unique identifier of the audit to recheck, passed as a query parameter. schema: type: string - example: '{{secret_key_data}}' responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: array + items: {} + example: [] + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: To launch a standard recheck + source: >- + curl --location --request POST + 'https://api.seranking.com/v1/site-audit/audits/recheck/standard?audit_id=700237033' \ + + --header 'Authorization: Token YOUR_API_KEY' /v1/site-audit/audits/recheck/advanced: post: operationId: createSiteAuditAuditsRecheckAdvanced tags: - Website Audit - summary: Recheck audit advanced - description: >- - Initiates a new advanced (JavaScript rendering) crawl for a previously - completed audit using its original settings. - requestBody: - content: {} + summary: Recheck advanced audit + description: |- + Launches a new advanced crawl with JavaScript rendering for an existing audit. + + **Cost:** 20 credits per crawled page + + If successful, the server returns **HTTP 200 OK** with an empty response body. + externalDocs: + description: Documentation + url: https://seranking.com/api/data/website-audit/#recheck-audit-advanced parameters: - name: audit_id in: query - schema: - type: integer - example: 700237033 - - name: apikey - in: query + required: true + description: Unique identifier of the audit to recheck, passed as a query parameter. schema: type: string - example: '{{secret_key_data}}' responses: - '200': - description: Successful response + "200": + description: Successful response. content: - application/json: {} + application/json: + schema: + type: array + items: {} + example: [] + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: To launch an advanced recheck + source: >- + curl --location --request POST + 'https://api.seranking.com/v1/site-audit/audits/recheck/advanced?audit_id=700237033' \ + + --header 'Authorization: Token YOUR_API_KEY' /v1/account/subscription: get: operationId: getAccountSubscription tags: - - Account & system - summary: subscription - description: >- - Retrieves detailed information about the API subscription plan, - including its status, dates, and remaining API units. + - Account System + summary: Get subscription details + description: |- + Returns information about your current subscription and the remaining API balance for the authenticated API key. + + **Cost:** 0 credits + externalDocs: + description: Documentation + url: https://seranking.com/api/data/account-system/#subscription + parameters: + - name: output + in: query + description: "Response format. Possible values: `json` (default) or `xml`." + schema: + type: string + default: json + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + subscription_info: + type: object + properties: + status: + type: string + description: "Current status of the API subscription plan: `active`, `inactive`, `expired`, or `disabled`." + start_date: + type: string + description: Subscription start date in `YYYY-MM-DD HH:MM:SS` format. + expiration_date: + type: string + description: Subscription expiration date in `YYYY-MM-DD HH:MM:SS` format. + units_limit: + type: integer + description: Total number of API units available for this subscription. + units_left: + type: integer + description: Current API balance, i.e., the number of remaining API units. + example: + subscription_info: + status: active + start_date: "2024-01-18 14:20:02" + expiration_date: "2024-02-18 14:20:02" + units_limit: 5000000 + units_left: 4975033 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/account/subscription?output=json' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/backlinks/export/status: + get: + operationId: getBacklinksExportStatus + tags: + - Backlinks + summary: export/status + description: Status of the asynchronous task to export all backlinks for a target to a downloadable CSV file. parameters: - - name: apikey + - name: task_id in: query + required: true schema: type: string + example: "1_878619" - name: output in: query schema: type: string + enum: + - json + - xml + default: json example: json responses: - '200': + "200": description: Successful response content: application/json: {} - /v1/account/credit-balance: + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + /v1/ai-search/overview/aggregated/time-series: get: - operationId: getAccountCreditBalance tags: - - Account & system - summary: credit-balance + - AI Search + summary: overview (aggregated) description: >- - Returns the current account-wide credit balance, showing the total limit - and the amount of credits used. + Retrieves a high-level aggregated summary of a domain's key performance metrics and historical trends across all + LLM engines. + operationId: getAiOverviewAggregated parameters: - - name: apikey + - name: target + in: query + required: true + schema: + type: string + example: seranking.com + - name: source + in: query + required: true + schema: + type: string + example: us + - name: brand + in: query + schema: + type: string + example: SE Ranking + - name: scope in: query schema: type: string + enum: + - domain + - base_domain + - url + default: base_domain + example: base_domain + responses: + "200": + description: |- + Successful response. + + Changes since 2026-09-29 (new AI Search data source): + + - `summary.average_position` is always `null`. + - `time_series.organic_traffic`, `time_series.overall_traffic` and + `time_series.average_position` are empty arrays. + - `summary.brand_presence` counts the prompts whose answer mentions the + brand as a recognized entity, instead of a text match on the brand + name. + - `summary.*.previous` is the value of the previous monthly snapshot + (`null` when unknown), and `change_absolute` / `change_percent` are + computed from it and signed. Before, `previous` was always `null` + and the change was reported as the current value and 100%. + content: + application/json: {} + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + /v1/account/credit-balance: + get: + operationId: getAccountCreditBalance + tags: + - Account System + summary: credit-balance + description: Returns the current account-wide credit balance, showing the total limit and the amount of credits used. + parameters: - name: output in: query schema: type: string example: json responses: - '200': + "200": description: Successful response content: application/json: {} + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" +components: + securitySchemes: + tokenAuth: + type: apiKey + in: header + name: Authorization + description: >- + Recommended. Send the API key in the `Authorization` header with the `Token` scheme: `Authorization: Token + YOUR_API_KEY`. + apikeyQuery: + type: apiKey + in: query + name: apikey + description: >- + Alternative. Send the API key as the `apikey` query parameter. It must always be a query parameter, even when + other data goes in the request body. + schemas: + GatewayError: + type: object + description: Error returned by the API gateway before the request reaches the API. + properties: + error_description: + type: string + description: Human-readable error message. + responses: + Unauthorized: + description: The API key is missing, unknown or disabled. + content: + application/json: + schema: + $ref: "#/components/schemas/GatewayError" + example: + error_description: >- + Authentication failed. Please ensure you have a valid, enabled API key. To get an API key, please contact + us at api@seranking.com. + PaymentRequired: + description: The account has no active subscription or not enough credits for this request. + content: + application/json: + schema: + $ref: "#/components/schemas/GatewayError" + example: + error_description: >- + Insufficient funds, API key is temporarily disabled. Please make a payment to enable you API key, or + contact us at api@seranking.com. + Forbidden: + description: The API key may not call this endpoint or use this HTTP method. + content: + application/json: + schema: + $ref: "#/components/schemas/GatewayError" + example: + error_description: >- + Authentication failed. Please ensure you have a valid, enabled API key. To get an API key, please contact + us at api@seranking.com. + TooManyRequests: + description: >- + The request rate limit of the API key was exceeded. See [API rate + limits](https://seranking.com/api/rate-limits/). + content: + application/json: + schema: + $ref: "#/components/schemas/GatewayError" + example: + error_description: You made 11 requests, which is over the allowed limit of 10 requests per second. Please try again later. diff --git a/openapi/local-marketing-api.json b/openapi/local-marketing-api.json new file mode 100644 index 0000000..5755b09 --- /dev/null +++ b/openapi/local-marketing-api.json @@ -0,0 +1,3253 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "SE Ranking Local Marketing API", + "version": "1.0.0", + "description": "**Local Marketing API** provides read-only endpoints to retrieve Local Marketing data for locations added to your account: location profiles and statistics, Google Business Profile reports, reviews, business listings (citations), local rankings, and audit reports.\n\nUsing the Local Marketing API, you can:\n\n- list your Local Marketing locations with key statistics, and read a location’s full business profile\n\n- pull a combined reporting overview for a location in a single request\n\n- track local rankings by keyword and tracking point, including the indexed percent\n\n- read Local Marketing audit reports and their history\n\n## Authentication\n\nAll endpoints are served from `https://api.seranking.com` and use one SE Ranking API key, the same key for the Data API, the Project API, the Local Marketing API and the SE Visible API. Send it in the `Authorization: Token YOUR_API_KEY` header (recommended) or as the `apikey` query parameter. See [Getting API access](https://seranking.com/api/how-to-get-api/).\n\nRate limits: [API rate limits](https://seranking.com/api/rate-limits/). Credits: [API credit system](https://seranking.com/api/api-credits-system/).", + "contact": { + "name": "SE Ranking API Support", + "url": "https://seranking.com/api/", + "email": "api@seranking.com" + }, + "license": { + "name": "MIT", + "url": "https://github.com/seranking/openapi/blob/main/LICENSE" + } + }, + "externalDocs": { + "description": "SE Ranking Local Marketing API documentation", + "url": "https://seranking.com/api/local-marketing-api/" + }, + "servers": [ + { + "url": "https://api.seranking.com", + "description": "Production" + } + ], + "security": [ + { + "tokenAuth": [] + }, + { + "apikeyQuery": [] + } + ], + "tags": [ + { + "name": "Locations", + "description": "**Locations API** provides endpoints to list Local Marketing locations available in your account and retrieve detailed information about a single location.\n\nDocumentation: [Locations](https://seranking.com/api/local-marketing-api/locations/)" + }, + { + "name": "Location Overview", + "description": "**Location overview API** returns a combined reporting overview for a location in a single request: location details, Google Business Profile metrics and searches, reviews overview, business listings overview, the latest audit report, and a rankings summary.\n\nDocumentation: [Location overview](https://seranking.com/api/local-marketing-api/location-overview/)" + }, + { + "name": "Local Rankings", + "description": "**Local Rankings API** provides endpoints to retrieve tracked keywords, position history by tracking point, and the indexed percent for a location.\n\nDocumentation: [Local Rankings](https://seranking.com/api/local-marketing-api/local-rankings/)" + }, + { + "name": "Google Business Profile", + "description": "**Google Business Profile API** provides endpoints to retrieve GBP performance metrics, the keyword report, and the searches trend for a location.\n\nDocumentation: [Google Business Profile](https://seranking.com/api/local-marketing-api/google-business-profile/)" + }, + { + "name": "Business Listings", + "description": "**Business Listings API** provides endpoints to list business listings for a location across connected directories and retrieve aggregated listing statistics. Note: endpoint paths use `citations`, the API term for directory listings.\n\nDocumentation: [Business Listings](https://seranking.com/api/local-marketing-api/business-listings/)" + }, + { + "name": "Reviews", + "description": "**Reviews API** provides endpoints to list reviews for a location across connected review sources and retrieve aggregated review statistics.\n\nDocumentation: [Reviews](https://seranking.com/api/local-marketing-api/reviews/)" + }, + { + "name": "Local Marketing Audit", + "description": "**Local Marketing Audit API** provides endpoints to retrieve the latest audit report and the audit report history for a location.\n\nDocumentation: [Local Marketing Audit](https://seranking.com/api/local-marketing-api/local-marketing-audit/)" + } + ], + "paths": { + "/v1/local-marketing/locations": { + "get": { + "operationId": "listLocations", + "tags": [ + "Locations" + ], + "summary": "List locations", + "description": "Returns a list of Local Marketing locations accessible to the authenticated user, with key statistics for each location.\n\nIf successful, the server returns the `200` HTTP status code, an array of locations in `items`, and a `pagination` object.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/local-marketing-api/locations/#list-locations" + }, + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Filter by a comma-separated list of location IDs, e.g. `15,18,21`.", + "schema": { + "type": "string" + } + }, + { + "name": "with_demo", + "in": "query", + "description": "Include demo locations. Default is `false`. Accounts with only demo locations receive an empty list unless this is set to `true`.", + "schema": { + "type": "boolean" + } + }, + { + "name": "is_active", + "in": "query", + "description": "Filter by active status.", + "schema": { + "type": "boolean" + } + }, + { + "name": "search", + "in": "query", + "description": "Search by location title or profile fields.", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of items to return (1–1000). Default is `100`.", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "Number of items to skip. Default is `0`.", + "schema": { + "type": "integer" + } + }, + { + "name": "sort", + "in": "query", + "description": "Field to sort by.", + "schema": { + "type": "string" + } + }, + { + "name": "sort_order", + "in": "query", + "description": "Sorting order: `asc` or `desc`. Default is `desc`.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Location ID." + }, + "account_id": { + "type": "integer", + "description": "Owning account ID." + }, + "account_name": { + "type": "string", + "description": "Owning account name (can be `null`)." + }, + "title": { + "type": "string", + "description": "Location title." + }, + "lang": { + "type": "string", + "description": "Location language." + }, + "is_active": { + "type": "boolean", + "description": "Whether the location is active." + }, + "is_demo": { + "type": "boolean", + "description": "Whether the location is a demo." + }, + "is_sub": { + "type": "boolean", + "description": "Whether the location belongs to a sub-account (can be `null`)." + }, + "is_shared": { + "type": "boolean", + "description": "Whether the location is shared (can be `null`)." + }, + "created_at": { + "type": "string", + "description": "Creation timestamp (can be `null`)." + }, + "updated_at": { + "type": "string", + "description": "Last update timestamp (can be `null`)." + }, + "connection_status": { + "type": "string", + "description": "Connection lifecycle status for the location in Local Marketing (can be `null`)." + }, + "sync_status": { + "type": "string", + "description": "Current synchronization status across connected directories (can be `null`)." + }, + "last_synced_at": { + "type": "string", + "description": "Last synchronization timestamp (can be `null`)." + }, + "statistics": { + "type": "object", + "properties": { + "reviews_count": { + "type": "integer", + "description": "Total number of reviews (can be `null`)." + }, + "average_rating": { + "type": "number", + "description": "Average review rating. Note: computed differently from `average_rating` in [Get reviews overview](https://seranking.com/api/local-marketing-api/reviews/#get-reviews-overview) — the two values are distinct metrics and may not match (can be `null`)." + }, + "unanswered_reviews_count": { + "type": "integer", + "description": "Reviews awaiting a reply (can be `null`)." + }, + "listings_count": { + "type": "integer", + "description": "Number of business listings (can be `null`)." + }, + "citations_score": { + "type": "number", + "description": "Citations score, 0–100 (can be `null`)." + }, + "citations_percentile": { + "type": "integer", + "description": "Citations score percentile. Distinct from `citations_score` (can be `null`)." + }, + "listed_directories_count": { + "type": "integer", + "description": "Directories where the location is listed (can be `null`)." + }, + "synced_directories_count": { + "type": "integer", + "description": "Directories currently synchronized. A listing can be listed but not yet synced (can be `null`)." + }, + "mismatched_directories_count": { + "type": "integer", + "description": "Directories with mismatched listing data (can be `null`)." + }, + "keywords_count": { + "type": "integer", + "description": "Tracked keywords. Note: counts keywords, while `top_3_keywords_count`/`top_10_keywords_count` count keyword × tracking-point pairs, so TOP-N values can exceed `keywords_count` (can be `null`)." + }, + "average_position": { + "type": "number", + "description": "Average local ranking position (can be `null`)." + }, + "top_3_keywords_count": { + "type": "integer", + "description": "Keywords ranking in the top 3 (can be `null`)." + }, + "top_10_keywords_count": { + "type": "integer", + "description": "Keywords ranking in the top 10 (can be `null`)." + }, + "audit_score_percent": { + "type": "integer", + "description": "Latest audit score, in percent (can be `null`)." + } + }, + "description": "Key statistics for the location." + } + }, + "description": "List of locations." + }, + "description": "List of locations." + }, + "pagination": { + "type": "object", + "properties": { + "total": { + "type": "integer" + }, + "limit": { + "type": "integer" + }, + "offset": { + "type": "integer" + } + }, + "description": "Pagination info: `total`, `limit`, `offset`." + } + } + }, + "example": { + "items": [ + { + "id": 15, + "account_id": 42, + "account_name": "Acme Agency", + "title": "Folk Osteria", + "lang": "en", + "is_active": true, + "is_demo": false, + "is_sub": false, + "is_shared": false, + "created_at": "2026-04-10 09:15:00", + "updated_at": "2026-08-04 12:00:00", + "connection_status": "connected", + "sync_status": "synced", + "last_synced_at": "2026-08-04 12:00:00", + "statistics": { + "reviews_count": 60, + "average_rating": 3.8, + "unanswered_reviews_count": 8, + "listings_count": 57, + "citations_score": 85, + "citations_percentile": 78, + "listed_directories_count": 66, + "synced_directories_count": 49, + "mismatched_directories_count": 3, + "keywords_count": 355, + "average_position": 10.97, + "top_3_keywords_count": 49, + "top_10_keywords_count": 167, + "audit_score_percent": 85 + } + } + ], + "pagination": { + "total": 2, + "limit": 100, + "offset": 0 + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/local-marketing/locations?is_active=true&limit=100&offset=0' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/local-marketing/locations/{location_id}": { + "get": { + "operationId": "getLocationDetails", + "tags": [ + "Locations" + ], + "summary": "Get location details", + "description": "Returns detailed information about a single location: its business profile, owner, permissions, Google connection state, and latest audit score.\n\nIf successful, the server returns the `200` HTTP status code and a location details object. Returns HTTP `404` if the location is not found.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/local-marketing-api/locations/#get-location-details" + }, + "parameters": [ + { + "name": "location_id", + "in": "path", + "required": true, + "description": "Location ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "account_id": { + "type": "integer" + }, + "account_name": { + "type": "string" + }, + "title": { + "type": "string" + }, + "lang": { + "type": "string" + }, + "is_active": { + "type": "boolean" + }, + "is_demo": { + "type": "boolean" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "connection_status": { + "type": "string" + }, + "sync_status": { + "type": "string" + }, + "last_synced_at": { + "type": "string" + }, + "statistics": { + "type": "object", + "properties": { + "reviews_count": { + "type": "integer" + }, + "average_rating": { + "type": "number" + }, + "listings_count": { + "type": "integer" + }, + "citations_score": { + "type": "number" + }, + "audit_score_percent": { + "type": "integer" + } + } + }, + "profile": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Business name." + }, + "primary_phone": { + "type": "string", + "description": "Primary phone number (can be `null`)." + }, + "additional_phones": { + "type": "array", + "items": { + "description": "Additional phone numbers." + }, + "description": "Additional phone numbers." + }, + "website": { + "type": "string", + "description": "Website URL (can be `null`)." + }, + "description": { + "type": "string", + "description": "Business description (can be `null`)." + }, + "address": { + "type": "object", + "properties": { + "postal_code": { + "type": "string" + }, + "region_code": { + "type": "string" + }, + "region_display_name": { + "type": "string" + }, + "administrative_area": { + "type": "string" + }, + "locality": { + "type": "string" + }, + "address_lines": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "Address: `postal_code`, `region_code`, `region_display_name`, `administrative_area`, `locality`, `address_lines`." + }, + "primary_category": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "display_name": { + "type": "string" + } + }, + "description": "Primary business category: `id`, `display_name`." + }, + "additional_categories": { + "type": "array", + "items": { + "description": "Additional business categories." + }, + "description": "Additional business categories." + }, + "working_hours": { + "type": "object", + "properties": {}, + "description": "Working hours." + }, + "service_area": { + "type": "object", + "properties": {}, + "description": "Service area settings." + }, + "social_profiles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "network": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "description": "Social profiles, each with `network` and `url`." + }, + "description": "Social profiles, each with `network` and `url`." + } + }, + "description": "Business profile of the location." + }, + "properties": { + "type": "object", + "properties": {}, + "description": "Additional location properties. Note: currently returned as an object when populated but as an empty array `[]` when empty — typed clients should handle both." + }, + "owner": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "parent_id": {}, + "email": { + "type": "string" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "lang": { + "type": "string" + } + }, + "description": "Location owner: `id`, `parent_id`, `email`, `first_name`, `last_name`, `lang`." + }, + "permissions": { + "type": "array", + "items": { + "type": "string", + "description": "Permissions the current user has for this location." + }, + "description": "Permissions the current user has for this location." + }, + "auth": { + "type": "object", + "properties": { + "google_connection_status": { + "type": "string", + "description": "Google connection status (can be `null`)." + }, + "requires_reconnect": { + "type": "boolean", + "description": "Whether the Google account needs to be reconnected (can be `null`)." + }, + "connected_at": { + "type": "string", + "description": "Connection timestamp (can be `null`)." + } + }, + "description": "Google connection state." + }, + "audit": { + "type": "object", + "properties": { + "score_percent": { + "type": "integer", + "description": "Latest audit score, in percent (can be `null`)." + } + }, + "description": "Audit summary." + } + } + }, + "example": { + "id": 15, + "account_id": 42, + "account_name": "Acme Agency", + "title": "Folk Osteria", + "lang": "en", + "is_active": true, + "is_demo": false, + "created_at": "2026-04-10 09:15:00", + "updated_at": "2026-08-04 12:00:00", + "connection_status": "connected", + "sync_status": "synced", + "last_synced_at": "2026-08-04 12:00:00", + "statistics": { + "reviews_count": 60, + "average_rating": 3.8, + "listings_count": 57, + "citations_score": 85, + "audit_score_percent": 85 + }, + "profile": { + "name": "Folk Osteria", + "primary_phone": "1 801-843-9517", + "additional_phones": [], + "website": "https://folkosteria.com", + "description": "Italian restaurant in Holladay.", + "address": { + "postal_code": "84117", + "region_code": "US", + "region_display_name": "United States", + "administrative_area": "UT", + "locality": "Holladay", + "address_lines": [ + "Highland Dr." + ] + }, + "primary_category": { + "id": "gcid:italian_restaurant", + "display_name": "Italian restaurant" + }, + "additional_categories": [], + "working_hours": {}, + "service_area": {}, + "social_profiles": [ + { + "network": "facebook", + "url": "https://facebook.com/folkosteria" + } + ] + }, + "properties": {}, + "owner": { + "id": 7, + "parent_id": null, + "email": "owner@acme.agency", + "first_name": "Jane", + "last_name": "Doe", + "lang": "en" + }, + "permissions": [ + "view", + "export" + ], + "auth": { + "google_connection_status": "connected", + "requires_reconnect": false, + "connected_at": "2026-04-10 09:20:00" + }, + "audit": { + "score_percent": 85 + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/local-marketing/locations/15' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/local-marketing/locations/{location_id}/overview": { + "get": { + "operationId": "getLocationOverview", + "tags": [ + "Location Overview" + ], + "summary": "Get location overview", + "description": "Returns a combined reporting overview for a location in a single request: location details, Google Business Profile metrics and searches, reviews overview, citations overview, the latest audit report, and rankings summary.\n\nIf successful, the server returns the `200` HTTP status code and a combined overview object. Returns HTTP `404` if the location is not found.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/local-marketing-api/location-overview/#get-location-overview" + }, + "parameters": [ + { + "name": "location_id", + "in": "path", + "required": true, + "description": "Location ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "from", + "in": "query", + "description": "Start date (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + }, + { + "name": "to", + "in": "query", + "description": "End date (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "location": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "account_id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "lang": { + "type": "string" + }, + "is_active": { + "type": "boolean" + }, + "is_demo": { + "type": "boolean" + }, + "statistics": { + "type": "object", + "properties": { + "reviews_count": { + "type": "integer" + }, + "average_rating": { + "type": "number" + }, + "audit_score_percent": { + "type": "integer" + } + } + } + }, + "description": "Location snapshot. Note: this block is its own projection and differs from [Get location details](https://seranking.com/api/local-marketing-api/locations/#get-location-details) in several fields — hours are returned as `regular_hours`/`special_hours`/`more_hours` (not `profile.working_hours`), coordinates come in `latlng`, there is no `auth` block, the `statistics` key set differs, and extra fields such as `attributes`, `owner.type`, and `is_claimed_by_others` appear." + }, + "gbp_metrics": { + "type": "object", + "properties": { + "location_id": { + "type": "integer" + }, + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "group_by": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "metrics": { + "type": "object", + "properties": { + "business_impressions_desktop_maps": { + "type": "integer" + }, + "business_impressions_desktop_search": { + "type": "integer" + }, + "business_impressions_mobile_maps": { + "type": "integer" + }, + "business_impressions_mobile_search": { + "type": "integer" + }, + "business_direction_requests": { + "type": "integer" + }, + "business_conversations": { + "type": "integer" + }, + "call_clicks": { + "type": "integer" + }, + "website_clicks": { + "type": "integer" + } + } + } + } + } + } + }, + "description": "Google Business Profile metrics (see [Get Google Business Profile metrics](https://seranking.com/api/local-marketing-api/google-business-profile/#get-google-business-profile-metrics))." + }, + "gbp_searches": { + "type": "object", + "properties": { + "location_id": { + "type": "integer" + }, + "last_updated_date": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "month": { + "type": "string" + }, + "direct": { + "type": "integer" + }, + "discovery": { + "type": "integer" + }, + "branded": { + "type": "integer" + } + } + } + } + }, + "description": "Google Business Profile searches trend (see [Get Google Business Profile searches trend](https://seranking.com/api/local-marketing-api/google-business-profile/#get-google-business-profile-searches-trend))." + }, + "reviews_overview": { + "type": "object", + "properties": { + "location_id": { + "type": "integer" + }, + "total_reviews": { + "type": "integer" + }, + "average_rating": { + "type": "number" + }, + "answered_reviews": { + "type": "integer" + }, + "unanswered_reviews": { + "type": "integer" + } + }, + "description": "Reviews overview (see [Get reviews overview](https://seranking.com/api/local-marketing-api/reviews/#get-reviews-overview))." + }, + "citations_overview": { + "type": "object", + "properties": { + "location_id": { + "type": "integer" + }, + "total_directories": { + "type": "integer" + }, + "active_directories": { + "type": "integer" + }, + "synced_directories": { + "type": "integer" + } + }, + "description": "Citations overview (see [Get business listings overview](https://seranking.com/api/local-marketing-api/business-listings/#get-business-listings-overview))." + }, + "latest_audit_report": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "location_id": { + "type": "integer" + }, + "created_at": { + "type": "string" + }, + "score_percent": { + "type": "integer" + }, + "issues": { + "type": "array", + "items": { + "type": "object", + "properties": { + "check_code": { + "type": "string" + }, + "category": { + "type": "string" + }, + "severity": { + "type": "string" + }, + "is_passed": { + "type": "boolean" + }, + "result_status": { + "type": "string" + }, + "issues_count": { + "type": "integer" + }, + "issues_count_prev": { + "type": "integer" + }, + "weight": { + "type": "number" + }, + "directories": { + "type": "object", + "properties": { + "failed": { + "type": "array", + "items": { + "type": "string" + } + }, + "not_checked": { + "type": "array", + "items": {} + }, + "new": { + "type": "array", + "items": {} + }, + "fixed": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "description": "The latest audit report: `id`, `location_id`, `created_at`, `score_percent`, and `issues` — the full per-check list with the same fields as `entries` in [Get latest audit report](https://seranking.com/api/local-marketing-api/local-marketing-audit/#get-latest-audit-report) (`check_code`, `category`, `severity`, `result_status`, `issues_count`, `weight`, and the `directories`/`reviews` drill-downs); only the envelope differs." + }, + "rankings": { + "type": "object", + "properties": { + "keywords_tracked": { + "type": "integer", + "description": "Number of tracked keywords (can be `null`)." + }, + "average_position": { + "type": "number", + "description": "Average keyword position (can be `null`)." + }, + "top_3_keywords_count": { + "type": "integer", + "description": "Number of keywords in the TOP 3 (can be `null`)." + }, + "top_10_keywords_count": { + "type": "integer", + "description": "Number of keywords in the TOP 10 (can be `null`)." + }, + "indexed_percent": { + "type": "number", + "description": "Percentage of indexed keywords (can be `null`)." + } + }, + "description": "Rankings summary for the location." + } + } + }, + "example": { + "location": { + "id": 15, + "account_id": 42, + "title": "Folk Osteria", + "lang": "en", + "is_active": true, + "is_demo": false, + "statistics": { + "reviews_count": 60, + "average_rating": 3.8, + "audit_score_percent": 85 + } + }, + "gbp_metrics": { + "location_id": 15, + "from": "2026-05-01", + "to": "2026-05-31", + "group_by": "DAY", + "items": [ + { + "date": "2026-05-01", + "metrics": { + "business_impressions_desktop_maps": 46, + "business_impressions_desktop_search": 307, + "business_impressions_mobile_maps": 230, + "business_impressions_mobile_search": 50, + "business_direction_requests": 5, + "business_conversations": 2, + "call_clicks": 1, + "website_clicks": 21 + } + } + ] + }, + "gbp_searches": { + "location_id": 15, + "last_updated_date": "2026-05-31", + "items": [ + { + "month": "2026-05-01", + "direct": 1200, + "discovery": 3400, + "branded": 800 + } + ] + }, + "reviews_overview": { + "location_id": 15, + "total_reviews": 60, + "average_rating": 3.8, + "answered_reviews": 52, + "unanswered_reviews": 8 + }, + "citations_overview": { + "location_id": 15, + "total_directories": 66, + "active_directories": 57, + "synced_directories": 49 + }, + "latest_audit_report": { + "id": 991, + "location_id": 15, + "created_at": "2026-05-30 08:00:00", + "score_percent": 85, + "issues": [ + { + "check_code": "nap_consistency", + "category": "listings", + "severity": "error", + "is_passed": false, + "result_status": "failed", + "issues_count": 3, + "issues_count_prev": 5, + "weight": 2.5, + "directories": { + "failed": [ + "foursquare" + ], + "not_checked": [], + "new": [], + "fixed": [ + "yelp" + ] + } + } + ] + }, + "rankings": { + "keywords_tracked": 40, + "average_position": 8.3, + "top_3_keywords_count": 9, + "top_10_keywords_count": 21, + "indexed_percent": 92.5 + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/local-marketing/locations/15/overview?from=2026-05-01&to=2026-05-31' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/local-marketing/locations/{location_id}/rankings/keywords": { + "get": { + "operationId": "getLocalRankingsKeywordList", + "tags": [ + "Local Rankings" + ], + "summary": "Get Local Rankings keyword list", + "description": "Returns the Local Rankings keyword list for a location with current and best positions, tracking point details, and a summary block.\n\nIf successful, the server returns the `200` HTTP status code, a `summary` block, an array of keywords in `items`, and a `pagination` object. Returns HTTP `404` if the location is not found.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/local-marketing-api/local-rankings/#get-local-rankings-keyword-list" + }, + "parameters": [ + { + "name": "location_id", + "in": "path", + "required": true, + "description": "Location ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "from", + "in": "query", + "description": "Start date (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + }, + { + "name": "to", + "in": "query", + "description": "End date (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of items to return (1–1000). Default is `100`.", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "Number of items to skip. Default is `0`.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "location_id": { + "type": "integer", + "description": "Location ID." + }, + "summary": { + "type": "object", + "properties": { + "keywords_tracked": { + "type": "integer", + "description": "Number of tracked keyword × tracking-point pairs." + }, + "indexed_keywords": { + "type": "integer", + "description": "Number of indexed keywords." + }, + "average_position": { + "type": "number", + "description": "Average position (can be `null`)." + }, + "top_3_keywords_count": { + "type": "integer", + "description": "Number of keywords in the TOP 3." + }, + "top_10_keywords_count": { + "type": "integer", + "description": "Number of keywords in the TOP 10." + } + }, + "description": "Summary across tracked keywords." + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "keyword_id": { + "type": "integer", + "description": "Keyword ID." + }, + "keyword": { + "type": "string", + "description": "Keyword." + }, + "current_position": { + "type": "integer", + "description": "Current position (can be `null`)." + }, + "best_position": { + "type": "integer", + "description": "Best position (can be `null`)." + }, + "found_at": { + "type": "string", + "description": "Date the keyword was first found (in `YYYY-MM-DD`, can be `null`)." + }, + "key_to_geopoint_id": { + "type": "integer", + "description": "Keyword-to-geopoint binding ID (can be `null`)." + }, + "tracking_point_details": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Tracking point ID (can be `null`)." + }, + "type": { + "type": "string", + "description": "Tracking point type: `geopoint` or `grid`." + }, + "label": { + "type": "string", + "description": "Tracking point label (can be `null`)." + }, + "address": { + "type": "string", + "description": "Tracking point address (can be `null`)." + }, + "latitude": { + "type": "number", + "description": "Latitude (can be `null`)." + }, + "longitude": { + "type": "number", + "description": "Longitude (can be `null`)." + }, + "key_to_geopoint_id": { + "type": "integer", + "description": "Keyword-to-geopoint binding ID, duplicated inside the tracking point details (can be `null`)." + } + }, + "description": "Tracking point details." + } + }, + "description": "List of keywords." + }, + "description": "List of keywords." + }, + "pagination": { + "type": "object", + "properties": { + "total": { + "type": "integer" + }, + "limit": { + "type": "integer" + }, + "offset": { + "type": "integer" + } + }, + "description": "Pagination info: `total`, `limit`, `offset`." + } + } + }, + "example": { + "location_id": 15, + "summary": { + "keywords_tracked": 40, + "indexed_keywords": 37, + "average_position": 8.3, + "top_3_keywords_count": 9, + "top_10_keywords_count": 21 + }, + "items": [ + { + "keyword_id": 7001, + "keyword": "italian restaurant holladay", + "current_position": 2, + "best_position": 1, + "found_at": "2026-04-15", + "key_to_geopoint_id": 88, + "tracking_point_details": { + "id": 12, + "type": "geopoint", + "label": "Downtown", + "address": "Holladay, UT", + "latitude": 40.6689, + "longitude": -111.8247, + "key_to_geopoint_id": 88 + } + } + ], + "pagination": { + "total": 40, + "limit": 100, + "offset": 0 + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/local-marketing/locations/15/rankings/keywords?from=2026-05-01&to=2026-05-31&limit=100&offset=0' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/local-marketing/locations/{location_id}/rankings/positions": { + "get": { + "operationId": "getLocalRankingsPositions", + "tags": [ + "Local Rankings" + ], + "summary": "Get Local Rankings positions", + "description": "Returns Local Rankings position history for a location by date and tracking point, with a summary block. Note: both `from` and `to` must be supplied — a partial or missing range returns an empty result set rather than the full history.\n\nIf successful, the server returns the `200` HTTP status code, a `summary` block, an array of position records in `items`, and a `pagination` object. Returns HTTP `404` if the location is not found.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/local-marketing-api/local-rankings/#get-local-rankings-positions" + }, + "parameters": [ + { + "name": "location_id", + "in": "path", + "required": true, + "description": "Location ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "from", + "in": "query", + "description": "Start date (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + }, + { + "name": "to", + "in": "query", + "description": "End date (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of items to return (1–1000). Default is `100`.", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "Number of items to skip. Default is `0`.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "location_id": { + "type": "integer", + "description": "Location ID." + }, + "summary": { + "type": "object", + "properties": { + "average_position": { + "type": "number", + "description": "Average position (can be `null`)." + }, + "best_position": { + "type": "integer", + "description": "Best position (can be `null`)." + }, + "worst_position": { + "type": "integer", + "description": "Worst position (can be `null`)." + } + }, + "description": "Summary across the selected period." + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Check date (in `YYYY-MM-DD`)." + }, + "keyword_id": { + "type": "integer", + "description": "Keyword ID." + }, + "position": { + "type": "integer", + "description": "Position on the check date (can be `null`)." + }, + "tracking_point": { + "type": "string", + "description": "Tracking point (can be `null`)." + }, + "key_to_geopoint_id": { + "type": "integer", + "description": "Keyword-to-geopoint binding ID (can be `null`)." + }, + "tracking_point_details": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "type": { + "type": "string" + }, + "label": { + "type": "string" + }, + "address": { + "type": "string" + }, + "latitude": { + "type": "number" + }, + "longitude": { + "type": "number" + }, + "key_to_geopoint_id": { + "type": "integer", + "description": "Keyword-to-geopoint binding ID (can be `null`)." + } + }, + "description": "Tracking point details (same structure as in [Get Local Rankings keyword list](#get-local-rankings-keyword-list))." + } + }, + "description": "Position records." + }, + "description": "Position records." + }, + "pagination": { + "type": "object", + "properties": { + "total": { + "type": "integer" + }, + "limit": { + "type": "integer" + }, + "offset": { + "type": "integer" + } + }, + "description": "Pagination info: `total`, `limit`, `offset`." + } + } + }, + "example": { + "location_id": 15, + "summary": { + "average_position": 8.3, + "best_position": 1, + "worst_position": 34 + }, + "items": [ + { + "date": "2026-05-30", + "keyword_id": 7001, + "position": 2, + "tracking_point": "Downtown", + "key_to_geopoint_id": 88, + "tracking_point_details": { + "id": 12, + "type": "geopoint", + "label": "Downtown", + "address": "Holladay, UT", + "latitude": 40.6689, + "longitude": -111.8247, + "key_to_geopoint_id": 88 + } + } + ], + "pagination": { + "total": 1875, + "limit": 100, + "offset": 0 + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/local-marketing/locations/15/rankings/positions?from=2026-05-01&to=2026-05-31&limit=100&offset=0' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/local-marketing/locations/{location_id}/rankings/indexed-percent": { + "get": { + "operationId": "getRankingsIndexedPercent", + "tags": [ + "Local Rankings" + ], + "summary": "Get rankings indexed percent", + "description": "Returns the percentage of tracked keywords for which the location is indexed.\n\nIf successful, the server returns the `200` HTTP status code and the indexed percent value. Returns HTTP `404` if the location is not found.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/local-marketing-api/local-rankings/#get-rankings-indexed-percent" + }, + "parameters": [ + { + "name": "location_id", + "in": "path", + "required": true, + "description": "Location ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "location_id": { + "type": "integer", + "description": "Location ID." + }, + "indexed_percent": { + "type": "number", + "description": "Percentage of indexed keywords." + } + } + }, + "example": { + "location_id": 15, + "indexed_percent": 92.5 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/local-marketing/locations/15/rankings/indexed-percent' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/local-marketing/locations/{location_id}/gbp-metrics": { + "get": { + "operationId": "getGoogleBusinessProfileMetrics", + "tags": [ + "Google Business Profile" + ], + "summary": "Get Google Business Profile metrics", + "description": "Returns Google Business Profile performance metrics for a location as a daily time series: impressions by platform and device (desktop/mobile × Search/Maps), direction requests, conversations, call clicks, and website clicks. Metric names inside each row follow Google’s own daily metric names, lowercased.\n\nIf successful, the server returns the `200` HTTP status code and a metrics time series. Returns HTTP `404` if the location is not found.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/local-marketing-api/google-business-profile/#get-google-business-profile-metrics" + }, + "parameters": [ + { + "name": "location_id", + "in": "path", + "required": true, + "description": "Location ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "from", + "in": "query", + "description": "Start date (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + }, + { + "name": "to", + "in": "query", + "description": "End date (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + }, + { + "name": "group_by", + "in": "query", + "description": "Time grouping. Available value: `DAY` (default).", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "location_id": { + "type": "integer", + "description": "Location ID." + }, + "from": { + "type": "string", + "description": "Start date of the range (in `YYYY-MM-DD`, can be `null`)." + }, + "to": { + "type": "string", + "description": "End date of the range (in `YYYY-MM-DD`, can be `null`)." + }, + "group_by": { + "type": "string", + "description": "Grouping applied to the series." + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Row date (in `YYYY-MM-DD`)." + }, + "metrics": { + "type": "object", + "properties": { + "business_impressions_desktop_maps": { + "type": "integer" + }, + "business_impressions_desktop_search": { + "type": "integer" + }, + "business_impressions_mobile_maps": { + "type": "integer" + }, + "business_impressions_mobile_search": { + "type": "integer" + }, + "business_direction_requests": { + "type": "integer" + }, + "business_conversations": { + "type": "integer" + }, + "call_clicks": { + "type": "integer" + }, + "website_clicks": { + "type": "integer" + } + }, + "description": "Metric name to numeric value map for that date. Possible keys: `business_impressions_desktop_maps`, `business_impressions_desktop_search`, `business_impressions_mobile_maps`, `business_impressions_mobile_search`, `business_direction_requests`, `business_conversations`, `call_clicks`, `website_clicks`." + } + }, + "description": "Time series rows." + }, + "description": "Time series rows." + } + } + }, + "example": { + "location_id": 15, + "from": "2026-05-01", + "to": "2026-05-31", + "group_by": "DAY", + "items": [ + { + "date": "2026-05-01", + "metrics": { + "business_impressions_desktop_maps": 46, + "business_impressions_desktop_search": 307, + "business_impressions_mobile_maps": 230, + "business_impressions_mobile_search": 50, + "business_direction_requests": 5, + "business_conversations": 2, + "call_clicks": 1, + "website_clicks": 21 + } + }, + { + "date": "2026-05-02", + "metrics": { + "business_impressions_desktop_maps": 39, + "business_impressions_desktop_search": 284, + "business_impressions_mobile_maps": 211, + "business_impressions_mobile_search": 44, + "business_direction_requests": 3, + "business_conversations": 1, + "call_clicks": 2, + "website_clicks": 18 + } + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/local-marketing/locations/15/gbp-metrics?from=2026-05-01&to=2026-05-31&group_by=DAY' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/local-marketing/locations/{location_id}/gbp-keywords": { + "get": { + "operationId": "getGoogleBusinessProfileKeywordReport", + "tags": [ + "Google Business Profile" + ], + "summary": "Get Google Business Profile keyword report", + "description": "Returns the Google Business Profile keyword report for a location: search keywords with impressions and clicks, plus totals across the selected period. This endpoint uses token-based pagination.\n\nIf successful, the server returns the `200` HTTP status code and the keyword report. Returns HTTP `404` if the location is not found.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/local-marketing-api/google-business-profile/#get-google-business-profile-keyword-report" + }, + "parameters": [ + { + "name": "location_id", + "in": "path", + "required": true, + "description": "Location ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "from", + "in": "query", + "description": "Start date (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + }, + { + "name": "to", + "in": "query", + "description": "End date (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + }, + { + "name": "page_size", + "in": "query", + "description": "Number of items per page (1–1000). Default is `100`.", + "schema": { + "type": "integer" + } + }, + { + "name": "page_token", + "in": "query", + "description": "Token of the next page, taken from `next_page_token` of the previous response.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "location_id": { + "type": "integer", + "description": "Location ID." + }, + "totals": { + "type": "object", + "properties": { + "impressions": { + "type": "integer", + "description": "Total impressions (can be `null`)." + }, + "clicks": { + "type": "integer", + "description": "Total clicks (can be `null`)." + } + }, + "description": "Totals across all keywords in the range." + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "keyword": { + "type": "string", + "description": "Search keyword." + }, + "impressions": { + "type": "integer", + "description": "Impressions for the keyword (can be `null`)." + }, + "clicks": { + "type": "integer", + "description": "Clicks for the keyword (can be `null`)." + } + }, + "description": "Keyword rows." + }, + "description": "Keyword rows." + }, + "next_page_token": { + "type": "string", + "description": "Token to request the next page. `null` if there are no more pages." + } + } + }, + "example": { + "location_id": 15, + "totals": { + "impressions": 15230, + "clicks": 640 + }, + "items": [ + { + "keyword": "italian restaurant near me", + "impressions": 4200, + "clicks": 180 + }, + { + "keyword": "osteria holladay", + "impressions": 2100, + "clicks": 95 + } + ], + "next_page_token": "eyJvZmZzZXQiOjEwMH0" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/local-marketing/locations/15/gbp-keywords?from=2026-05-01&to=2026-05-31&page_size=100' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/local-marketing/locations/{location_id}/gbp-searches": { + "get": { + "operationId": "getGoogleBusinessProfileSearchesTrend", + "tags": [ + "Google Business Profile" + ], + "summary": "Get Google Business Profile searches trend", + "description": "Returns the Google Business Profile searches trend for a location by month, broken down into direct, discovery, and branded searches.\n\nIf successful, the server returns the `200` HTTP status code and the searches trend. Returns HTTP `404` if the location is not found.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/local-marketing-api/google-business-profile/#get-google-business-profile-searches-trend" + }, + "parameters": [ + { + "name": "location_id", + "in": "path", + "required": true, + "description": "Location ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "from", + "in": "query", + "description": "Start date (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + }, + { + "name": "to", + "in": "query", + "description": "End date (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "location_id": { + "type": "integer", + "description": "Location ID." + }, + "last_updated_date": { + "type": "string", + "description": "Date the data was last updated (in `YYYY-MM-DD`, can be `null`)." + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "month": { + "type": "string", + "description": "Month, returned as the first day of the month (in `YYYY-MM-DD`), e.g. `2026-05-01`." + }, + "direct": { + "type": "integer", + "description": "Direct searches — users searched for the business name or address (can be `null`)." + }, + "discovery": { + "type": "integer", + "description": "Discovery searches — users searched for a category, product, or service (can be `null`)." + }, + "branded": { + "type": "integer", + "description": "Branded searches — users searched for a brand related to the business (can be `null`)." + } + }, + "description": "Monthly rows." + }, + "description": "Monthly rows." + } + } + }, + "example": { + "location_id": 15, + "last_updated_date": "2026-05-31", + "items": [ + { + "month": "2026-04-01", + "direct": 1100, + "discovery": 3200, + "branded": 720 + }, + { + "month": "2026-05-01", + "direct": 1200, + "discovery": 3400, + "branded": 800 + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/local-marketing/locations/15/gbp-searches?from=2026-01-01&to=2026-05-31' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/local-marketing/locations/{location_id}/citations": { + "get": { + "operationId": "listBusinessListings", + "tags": [ + "Business Listings" + ], + "summary": "List business listings", + "description": "Returns a list of business listings for a location across connected directories, including sync state and NAP (name, address, phone) consistency status. Note: the endpoint path uses `citations`, the API term for directory listings. Sorting is currently not applied by the upstream service for this endpoint (pending fix).\n\nIf successful, the server returns the `200` HTTP status code, an array of citations in `items`, and a `pagination` object. Returns HTTP `404` if the location is not found.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/local-marketing-api/business-listings/#list-business-listings" + }, + "parameters": [ + { + "name": "location_id", + "in": "path", + "required": true, + "description": "Location ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of items to return (1–1000). Default is `100`.", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "Number of items to skip. Default is `0`.", + "schema": { + "type": "integer" + } + }, + { + "name": "sort", + "in": "query", + "description": "Field to sort by.", + "schema": { + "type": "string" + } + }, + { + "name": "sort_order", + "in": "query", + "description": "Sorting order: `asc` or `desc`. Default is `desc`.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Citation ID." + }, + "location_id": { + "type": "integer", + "description": "Location ID." + }, + "directory_code": { + "type": "string", + "description": "Directory code." + }, + "directory_name": { + "type": "string", + "description": "Directory name." + }, + "status": { + "type": "string", + "description": "Listing status in the directory." + }, + "url": { + "type": "string", + "description": "Listing URL (can be `null`)." + }, + "is_synced": { + "type": "boolean", + "description": "Whether the listing is synchronized (can be `null`)." + }, + "updated_at": { + "type": "string", + "description": "Last update timestamp (can be `null`)." + }, + "last_synced_at": { + "type": "string", + "description": "Last synchronization timestamp (can be `null`)." + }, + "sync_error": { + "nullable": true, + "description": "Synchronization error message (can be `null`).", + "type": "string" + }, + "nap_match_status": { + "type": "string", + "description": "Overall NAP consistency status for the directory listing (can be `null`)." + }, + "field_statuses": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "website": { + "type": "string", + "nullable": true + } + }, + "description": "Per-field match statuses: `name`, `address`, `phone`, `website` (each can be `null`)." + } + }, + "description": "List of citations." + }, + "description": "List of citations." + }, + "pagination": { + "type": "object", + "properties": { + "total": { + "type": "integer" + }, + "limit": { + "type": "integer" + }, + "offset": { + "type": "integer" + } + }, + "description": "Pagination info: `total`, `limit`, `offset`." + } + } + }, + "example": { + "items": [ + { + "id": 301, + "location_id": 15, + "directory_code": "yelp", + "directory_name": "Yelp", + "status": "active", + "url": "https://yelp.com/biz/folk-osteria", + "is_synced": true, + "updated_at": "2026-08-01 10:00:00", + "last_synced_at": "2026-08-01 10:00:00", + "sync_error": null, + "nap_match_status": "matched", + "field_statuses": { + "name": "matched", + "address": "matched", + "phone": "matched", + "website": "matched" + } + }, + { + "id": 302, + "location_id": 15, + "directory_code": "foursquare", + "directory_name": "Foursquare", + "status": "mismatched", + "url": "https://foursquare.com/v/folk-osteria", + "is_synced": false, + "updated_at": "2026-07-28 14:30:00", + "last_synced_at": "2026-07-20 09:00:00", + "sync_error": null, + "nap_match_status": "mismatched", + "field_statuses": { + "name": "matched", + "address": "mismatched", + "phone": "matched", + "website": null + } + } + ], + "pagination": { + "total": 66, + "limit": 100, + "offset": 0 + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/local-marketing/locations/15/citations?limit=100&offset=0' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/local-marketing/locations/{location_id}/citations/overview": { + "get": { + "operationId": "getBusinessListingsOverview", + "tags": [ + "Business Listings" + ], + "summary": "Get business listings overview", + "description": "Returns aggregated business listing statistics for a location: total, active, and synchronized directory counts. Counters reflect the current synchronization state. Note: the endpoint path uses `citations`, the API term for directory listings.\n\nIf successful, the server returns the `200` HTTP status code and aggregated citation statistics. Returns HTTP `404` if the location is not found.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/local-marketing-api/business-listings/#get-business-listings-overview" + }, + "parameters": [ + { + "name": "location_id", + "in": "path", + "required": true, + "description": "Location ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "location_id": { + "type": "integer", + "description": "Location ID." + }, + "total_directories": { + "type": "integer", + "description": "Total number of directories." + }, + "active_directories": { + "type": "integer", + "description": "Number of active directories." + }, + "synced_directories": { + "type": "integer", + "description": "Number of synchronized directories." + } + } + }, + "example": { + "location_id": 15, + "total_directories": 66, + "active_directories": 57, + "synced_directories": 49 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/local-marketing/locations/15/citations/overview' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/local-marketing/locations/{location_id}/reviews": { + "get": { + "operationId": "listReviews", + "tags": [ + "Reviews" + ], + "summary": "List reviews", + "description": "Returns a list of reviews for a location across all connected review sources.\n\nIf successful, the server returns the `200` HTTP status code, an array of reviews in `items`, and a `pagination` object. Returns HTTP `404` if the location is not found.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/local-marketing-api/reviews/#list-reviews" + }, + "parameters": [ + { + "name": "location_id", + "in": "path", + "required": true, + "description": "Location ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "from", + "in": "query", + "description": "Start date (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + }, + { + "name": "to", + "in": "query", + "description": "End date (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of items to return (1–1000). Default is `100`.", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "Number of items to skip. Default is `0`.", + "schema": { + "type": "integer" + } + }, + { + "name": "sort", + "in": "query", + "description": "Field to sort by: `created_at`, `rating`, `status`, `source`, or `lang`. An unsupported value returns an error.", + "schema": { + "type": "string" + } + }, + { + "name": "sort_order", + "in": "query", + "description": "Sorting order: `asc` or `desc`. Default is `desc`.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Review ID." + }, + "location_id": { + "type": "integer", + "description": "Location ID." + }, + "source": { + "type": "string", + "description": "Review source code (e.g. `google`)." + }, + "source_name": { + "type": "string", + "description": "Review source name (can be `null`)." + }, + "rating": { + "type": "integer", + "description": "Review rating (can be `null`)." + }, + "review": { + "type": "string", + "description": "Review text (can be `null`)." + }, + "reviewer_name": { + "type": "string", + "description": "Reviewer name (can be `null`)." + }, + "language": { + "type": "string", + "description": "Review language (can be `null`)." + }, + "created_at": { + "type": "string", + "description": "Review creation timestamp (can be `null`)." + }, + "status": { + "type": "string", + "description": "Review status (can be `null`)." + }, + "review_url": { + "type": "string", + "description": "Link to the review (can be `null`)." + }, + "is_answered": { + "type": "boolean", + "description": "Whether the review has a reply (can be `null`)." + }, + "reply_status": { + "type": "string", + "description": "Reply status (can be `null`)." + }, + "reply_text": { + "type": "string", + "description": "Reply text (can be `null`)." + }, + "replied_at": { + "type": "string", + "description": "Reply timestamp (can be `null`)." + }, + "sentiment": { + "type": "string", + "description": "Review sentiment (can be `null`)." + } + }, + "description": "List of reviews." + }, + "description": "List of reviews." + }, + "pagination": { + "type": "object", + "properties": { + "total": { + "type": "integer" + }, + "limit": { + "type": "integer" + }, + "offset": { + "type": "integer" + } + }, + "description": "Pagination info: `total`, `limit`, `offset`." + } + } + }, + "example": { + "items": [ + { + "id": 501, + "location_id": 15, + "source": "google", + "source_name": "Google", + "rating": 5, + "review": "Great pasta and friendly staff!", + "reviewer_name": "John S.", + "language": "en", + "created_at": "2026-05-12 18:40:00", + "status": "published", + "review_url": "https://maps.google.com/reviews/501", + "is_answered": true, + "reply_status": "published", + "reply_text": "Thank you, John! See you again soon.", + "replied_at": "2026-05-13 09:05:00", + "sentiment": "positive" + } + ], + "pagination": { + "total": 60, + "limit": 100, + "offset": 0 + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/local-marketing/locations/15/reviews?from=2026-05-01&to=2026-05-31&limit=100&offset=0' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/local-marketing/locations/{location_id}/reviews/overview": { + "get": { + "operationId": "getReviewsOverview", + "tags": [ + "Reviews" + ], + "summary": "Get reviews overview", + "description": "Returns aggregated review statistics for a location: totals, average rating, answered/unanswered counts, rating distribution, and a breakdown by source. When `from`/`to` are provided, aggregates are computed for that period; otherwise they cover the location’s entire history.\n\nIf successful, the server returns the `200` HTTP status code and aggregated review statistics. Returns HTTP `404` if the location is not found.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/local-marketing-api/reviews/#get-reviews-overview" + }, + "parameters": [ + { + "name": "location_id", + "in": "path", + "required": true, + "description": "Location ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "from", + "in": "query", + "description": "Start date (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + }, + { + "name": "to", + "in": "query", + "description": "End date (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "location_id": { + "type": "integer", + "description": "Location ID." + }, + "total_reviews": { + "type": "integer", + "description": "Total number of reviews, **including unrated ones** — while `average_rating` and `rating_distribution` cover rated reviews only, so `total_reviews` × `average_rating` does not give a weighted total." + }, + "average_rating": { + "type": "number", + "description": "Average rating across **rated** reviews only. A distinct metric from `statistics.average_rating` in the location endpoints — the two may not match (can be `null`)." + }, + "answered_reviews": { + "type": "integer", + "description": "Number of reviews with a reply." + }, + "unanswered_reviews": { + "type": "integer", + "description": "Number of reviews without a reply." + }, + "rating_distribution": { + "type": "object", + "properties": { + "1_star": { + "type": "integer" + }, + "2_star": { + "type": "integer" + }, + "3_star": { + "type": "integer" + }, + "4_star": { + "type": "integer" + }, + "5_star": { + "type": "integer" + } + }, + "description": "Number of reviews per rating: `1_star` … `5_star`." + }, + "items_by_source": { + "type": "array", + "items": { + "type": "object", + "properties": { + "source": { + "type": "string", + "description": "Review source code." + }, + "reviews_count": { + "type": "integer", + "description": "Number of reviews from this source." + }, + "average_rating": { + "type": "number", + "description": "Average rating across **rated** reviews only. A distinct metric from `statistics.average_rating` in the location endpoints — the two may not match (can be `null`)." + }, + "answered_reviews": { + "type": "integer", + "description": "Number of reviews with a reply." + }, + "unanswered_reviews": { + "type": "integer", + "description": "Number of reviews without a reply." + } + }, + "description": "Per-source breakdown." + }, + "description": "Per-source breakdown." + } + } + }, + "example": { + "location_id": 15, + "total_reviews": 60, + "average_rating": 3.8, + "answered_reviews": 52, + "unanswered_reviews": 8, + "rating_distribution": { + "1_star": 4, + "2_star": 5, + "3_star": 10, + "4_star": 21, + "5_star": 20 + }, + "items_by_source": [ + { + "source": "google", + "reviews_count": 55, + "average_rating": 3.9, + "answered_reviews": 50, + "unanswered_reviews": 5 + }, + { + "source": "facebook", + "reviews_count": 5, + "average_rating": 3.4, + "answered_reviews": 2, + "unanswered_reviews": 3 + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/local-marketing/locations/15/reviews/overview?from=2026-05-01&to=2026-05-31' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/local-marketing/locations/{location_id}/audit/reports/latest": { + "get": { + "operationId": "getLatestAuditReport", + "tags": [ + "Local Marketing Audit" + ], + "summary": "Get latest audit report", + "description": "Returns the latest Local Marketing audit report for a location. The response mirrors the report structure that drives the Local Marketing audit page: summary counters, per-check entries, previous issue counts, and optional directories/reviews payloads for checks with detailed drill-downs.\n\nIf successful, the server returns the `200` HTTP status code and the audit report. Returns HTTP `404` if the location is not found.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/local-marketing-api/local-marketing-audit/#get-latest-audit-report" + }, + "parameters": [ + { + "name": "location_id", + "in": "path", + "required": true, + "description": "Location ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "date", + "in": "query", + "description": "Report date (in `YYYY-MM-DD`). If omitted, the latest finished report is returned.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Report generation status (e.g. `finished`)." + }, + "date": { + "type": "string", + "description": "Report date (in `YYYY-MM-DD`)." + }, + "summary": { + "type": "object", + "properties": { + "score": { + "type": "integer", + "description": "Overall audit score, 0–100 — the same value exposed as `audit_score_percent`/`score_percent` in the location endpoints (can be `null`)." + }, + "total_errors": { + "type": "integer", + "description": "Total number of errors." + }, + "total_warnings": { + "type": "integer", + "description": "Total number of warnings." + }, + "total_notices": { + "type": "integer", + "description": "Total number of notices." + } + }, + "description": "Summary counters." + }, + "entries": { + "type": "array", + "items": { + "type": "object", + "properties": { + "check_code": { + "type": "string", + "description": "Stable audit check code used by frontend translations and navigation." + }, + "category": { + "type": "string", + "description": "Audit category used on the audit page (e.g. `profile`)." + }, + "severity": { + "type": "string", + "description": "Severity bucket: `error`, `warning`, or `notice`." + }, + "is_passed": { + "type": "boolean", + "description": "Deprecated compatibility field from the current frontend API." + }, + "result_status": { + "type": "string", + "description": "Actual result status: `passed`, `failed`, or `undefined`." + }, + "issues_count": { + "type": "integer", + "description": "Number of issues found by the check (can be `null`)." + }, + "issues_count_prev": { + "type": "integer", + "description": "Number of issues in the previous report (can be `null`)." + }, + "weight": { + "type": "number", + "description": "Check weight in the overall score." + }, + "directories": { + "type": "object", + "properties": { + "failed": { + "type": "array", + "items": { + "type": "string" + } + }, + "not_checked": { + "type": "array", + "items": {} + }, + "new": { + "type": "array", + "items": {} + }, + "fixed": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "Directory drill-down for directory checks: `failed`, `not_checked`, `new`, `fixed` (arrays of directory codes)." + }, + "reviews": { + "type": "object", + "properties": { + "failed": { + "type": "array", + "items": { + "type": "string" + } + }, + "new": { + "type": "array", + "items": { + "type": "string" + } + }, + "fixed": { + "type": "array", + "items": {} + } + }, + "description": "Review drill-down for review checks: `failed`, `new`, `fixed` (arrays)." + } + }, + "description": "Per-check entries." + }, + "description": "Per-check entries." + } + } + }, + "example": { + "status": "finished", + "date": "2026-05-30", + "summary": { + "score": 85, + "total_errors": 2, + "total_warnings": 5, + "total_notices": 3 + }, + "entries": [ + { + "check_code": "nap_consistency", + "category": "listings", + "severity": "error", + "is_passed": false, + "result_status": "failed", + "issues_count": 3, + "issues_count_prev": 5, + "weight": 2.5, + "directories": { + "failed": [ + "foursquare", + "hotfrog" + ], + "not_checked": [], + "new": [], + "fixed": [ + "yelp" + ] + } + }, + { + "check_code": "unanswered_reviews", + "category": "reviews", + "severity": "warning", + "is_passed": false, + "result_status": "failed", + "issues_count": 8, + "issues_count_prev": 12, + "weight": 1, + "reviews": { + "failed": [ + "501", + "502" + ], + "new": [ + "503" + ], + "fixed": [] + } + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/local-marketing/locations/15/audit/reports/latest?date=2026-05-30' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/local-marketing/locations/{location_id}/audit/reports": { + "get": { + "operationId": "getAuditReportHistory", + "tags": [ + "Local Marketing Audit" + ], + "summary": "Get audit report history", + "description": "Returns the audit report history for a location as date and summary pairs, sorted by date.\n\nIf successful, the server returns the `200` HTTP status code and a top-level JSON **array** (not an object) of history items. Each item is itself a two-element array: the report date (in `YYYY-MM-DD`) followed by a summary object with the fields below. Returns HTTP `404` if the location is not found.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/local-marketing-api/local-marketing-audit/#get-audit-report-history" + }, + "parameters": [ + { + "name": "location_id", + "in": "path", + "required": true, + "description": "Location ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "start_date", + "in": "query", + "description": "History start date (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of items to return (1–1000). Default is `10`.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + }, + "example": [ + [ + "2026-05-30", + { + "status": "finished", + "score": 85, + "total_errors": 2, + "total_warnings": 5, + "total_notices": 3 + } + ], + [ + "2026-05-23", + { + "status": "finished", + "score": 82, + "total_errors": 3, + "total_warnings": 6, + "total_notices": 3 + } + ] + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/local-marketing/locations/15/audit/reports?start_date=2026-05-01&limit=10' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + } + }, + "components": { + "securitySchemes": { + "tokenAuth": { + "type": "apiKey", + "in": "header", + "name": "Authorization", + "description": "Recommended. Send the API key in the `Authorization` header with the `Token` scheme: `Authorization: Token YOUR_API_KEY`." + }, + "apikeyQuery": { + "type": "apiKey", + "in": "query", + "name": "apikey", + "description": "Alternative. Send the API key as the `apikey` query parameter. It must always be a query parameter, even when other data goes in the request body." + } + }, + "schemas": { + "GatewayError": { + "type": "object", + "description": "Error returned by the API gateway before the request reaches the API.", + "properties": { + "error_description": { + "type": "string", + "description": "Human-readable error message." + } + } + } + }, + "responses": { + "Unauthorized": { + "description": "The API key is missing, unknown or disabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + }, + "example": { + "error_description": "Authentication failed. Please ensure you have a valid, enabled API key. To get an API key, please contact us at api@seranking.com." + } + } + } + }, + "PaymentRequired": { + "description": "The account has no active subscription or not enough credits for this request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + }, + "example": { + "error_description": "Insufficient funds, API key is temporarily disabled. Please make a payment to enable you API key, or contact us at api@seranking.com." + } + } + } + }, + "Forbidden": { + "description": "The API key may not call this endpoint or use this HTTP method.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + }, + "example": { + "error_description": "Authentication failed. Please ensure you have a valid, enabled API key. To get an API key, please contact us at api@seranking.com." + } + } + } + }, + "TooManyRequests": { + "description": "The request rate limit of the API key was exceeded. See [API rate limits](https://seranking.com/api/rate-limits/).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + }, + "example": { + "error_description": "You made 11 requests, which is over the allowed limit of 10 requests per second. Please try again later." + } + } + } + } + } + } +} diff --git a/openapi/local-marketing-api.yaml b/openapi/local-marketing-api.yaml new file mode 100644 index 0000000..2140547 --- /dev/null +++ b/openapi/local-marketing-api.yaml @@ -0,0 +1,2511 @@ +openapi: 3.0.3 +info: + title: SE Ranking Local Marketing API + version: 1.0.0 + description: >- + **Local Marketing API** provides read-only endpoints to retrieve Local Marketing data for locations added to your + account: location profiles and statistics, Google Business Profile reports, reviews, business listings (citations), + local rankings, and audit reports. + + + Using the Local Marketing API, you can: + + + - list your Local Marketing locations with key statistics, and read a location’s full business profile + + + - pull a combined reporting overview for a location in a single request + + + - track local rankings by keyword and tracking point, including the indexed percent + + + - read Local Marketing audit reports and their history + + + ## Authentication + + + All endpoints are served from `https://api.seranking.com` and use one SE Ranking API key, the same key for the Data + API, the Project API, the Local Marketing API and the SE Visible API. Send it in the `Authorization: Token + YOUR_API_KEY` header (recommended) or as the `apikey` query parameter. See [Getting API + access](https://seranking.com/api/how-to-get-api/). + + + Rate limits: [API rate limits](https://seranking.com/api/rate-limits/). Credits: [API credit + system](https://seranking.com/api/api-credits-system/). + contact: + name: SE Ranking API Support + url: https://seranking.com/api/ + email: api@seranking.com + license: + name: MIT + url: https://github.com/seranking/openapi/blob/main/LICENSE +externalDocs: + description: SE Ranking Local Marketing API documentation + url: https://seranking.com/api/local-marketing-api/ +servers: + - url: https://api.seranking.com + description: Production +security: + - tokenAuth: [] + - apikeyQuery: [] +tags: + - name: Locations + description: >- + **Locations API** provides endpoints to list Local Marketing locations available in your account and retrieve + detailed information about a single location. + + + Documentation: [Locations](https://seranking.com/api/local-marketing-api/locations/) + - name: Location Overview + description: >- + **Location overview API** returns a combined reporting overview for a location in a single request: location + details, Google Business Profile metrics and searches, reviews overview, business listings overview, the latest + audit report, and a rankings summary. + + + Documentation: [Location overview](https://seranking.com/api/local-marketing-api/location-overview/) + - name: Local Rankings + description: >- + **Local Rankings API** provides endpoints to retrieve tracked keywords, position history by tracking point, and + the indexed percent for a location. + + + Documentation: [Local Rankings](https://seranking.com/api/local-marketing-api/local-rankings/) + - name: Google Business Profile + description: >- + **Google Business Profile API** provides endpoints to retrieve GBP performance metrics, the keyword report, and + the searches trend for a location. + + + Documentation: [Google Business Profile](https://seranking.com/api/local-marketing-api/google-business-profile/) + - name: Business Listings + description: >- + **Business Listings API** provides endpoints to list business listings for a location across connected directories + and retrieve aggregated listing statistics. Note: endpoint paths use `citations`, the API term for directory + listings. + + + Documentation: [Business Listings](https://seranking.com/api/local-marketing-api/business-listings/) + - name: Reviews + description: >- + **Reviews API** provides endpoints to list reviews for a location across connected review sources and retrieve + aggregated review statistics. + + + Documentation: [Reviews](https://seranking.com/api/local-marketing-api/reviews/) + - name: Local Marketing Audit + description: >- + **Local Marketing Audit API** provides endpoints to retrieve the latest audit report and the audit report history + for a location. + + + Documentation: [Local Marketing Audit](https://seranking.com/api/local-marketing-api/local-marketing-audit/) +paths: + /v1/local-marketing/locations: + get: + operationId: listLocations + tags: + - Locations + summary: List locations + description: >- + Returns a list of Local Marketing locations accessible to the authenticated user, with key statistics for each + location. + + + If successful, the server returns the `200` HTTP status code, an array of locations in `items`, and a + `pagination` object. + externalDocs: + description: Documentation + url: https://seranking.com/api/local-marketing-api/locations/#list-locations + parameters: + - name: ids + in: query + description: Filter by a comma-separated list of location IDs, e.g. `15,18,21`. + schema: + type: string + - name: with_demo + in: query + description: >- + Include demo locations. Default is `false`. Accounts with only demo locations receive an empty list unless + this is set to `true`. + schema: + type: boolean + - name: is_active + in: query + description: Filter by active status. + schema: + type: boolean + - name: search + in: query + description: Search by location title or profile fields. + schema: + type: string + - name: limit + in: query + description: Maximum number of items to return (1–1000). Default is `100`. + schema: + type: integer + - name: offset + in: query + description: Number of items to skip. Default is `0`. + schema: + type: integer + - name: sort + in: query + description: Field to sort by. + schema: + type: string + - name: sort_order + in: query + description: "Sorting order: `asc` or `desc`. Default is `desc`." + schema: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + items: + type: array + items: + type: object + properties: + id: + type: integer + description: Location ID. + account_id: + type: integer + description: Owning account ID. + account_name: + type: string + description: Owning account name (can be `null`). + title: + type: string + description: Location title. + lang: + type: string + description: Location language. + is_active: + type: boolean + description: Whether the location is active. + is_demo: + type: boolean + description: Whether the location is a demo. + is_sub: + type: boolean + description: Whether the location belongs to a sub-account (can be `null`). + is_shared: + type: boolean + description: Whether the location is shared (can be `null`). + created_at: + type: string + description: Creation timestamp (can be `null`). + updated_at: + type: string + description: Last update timestamp (can be `null`). + connection_status: + type: string + description: Connection lifecycle status for the location in Local Marketing (can be `null`). + sync_status: + type: string + description: Current synchronization status across connected directories (can be `null`). + last_synced_at: + type: string + description: Last synchronization timestamp (can be `null`). + statistics: + type: object + properties: + reviews_count: + type: integer + description: Total number of reviews (can be `null`). + average_rating: + type: number + description: >- + Average review rating. Note: computed differently from `average_rating` in [Get reviews + overview](https://seranking.com/api/local-marketing-api/reviews/#get-reviews-overview) — + the two values are distinct metrics and may not match (can be `null`). + unanswered_reviews_count: + type: integer + description: Reviews awaiting a reply (can be `null`). + listings_count: + type: integer + description: Number of business listings (can be `null`). + citations_score: + type: number + description: Citations score, 0–100 (can be `null`). + citations_percentile: + type: integer + description: Citations score percentile. Distinct from `citations_score` (can be `null`). + listed_directories_count: + type: integer + description: Directories where the location is listed (can be `null`). + synced_directories_count: + type: integer + description: >- + Directories currently synchronized. A listing can be listed but not yet synced (can be + `null`). + mismatched_directories_count: + type: integer + description: Directories with mismatched listing data (can be `null`). + keywords_count: + type: integer + description: >- + Tracked keywords. Note: counts keywords, while + `top_3_keywords_count`/`top_10_keywords_count` count keyword × tracking-point pairs, so + TOP-N values can exceed `keywords_count` (can be `null`). + average_position: + type: number + description: Average local ranking position (can be `null`). + top_3_keywords_count: + type: integer + description: Keywords ranking in the top 3 (can be `null`). + top_10_keywords_count: + type: integer + description: Keywords ranking in the top 10 (can be `null`). + audit_score_percent: + type: integer + description: Latest audit score, in percent (can be `null`). + description: Key statistics for the location. + description: List of locations. + description: List of locations. + pagination: + type: object + properties: + total: + type: integer + limit: + type: integer + offset: + type: integer + description: "Pagination info: `total`, `limit`, `offset`." + example: + items: + - id: 15 + account_id: 42 + account_name: Acme Agency + title: Folk Osteria + lang: en + is_active: true + is_demo: false + is_sub: false + is_shared: false + created_at: "2026-04-10 09:15:00" + updated_at: "2026-08-04 12:00:00" + connection_status: connected + sync_status: synced + last_synced_at: "2026-08-04 12:00:00" + statistics: + reviews_count: 60 + average_rating: 3.8 + unanswered_reviews_count: 8 + listings_count: 57 + citations_score: 85 + citations_percentile: 78 + listed_directories_count: 66 + synced_directories_count: 49 + mismatched_directories_count: 3 + keywords_count: 355 + average_position: 10.97 + top_3_keywords_count: 49 + top_10_keywords_count: 167 + audit_score_percent: 85 + pagination: + total: 2 + limit: 100 + offset: 0 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/local-marketing/locations?is_active=true&limit=100&offset=0' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/local-marketing/locations/{location_id}: + get: + operationId: getLocationDetails + tags: + - Locations + summary: Get location details + description: >- + Returns detailed information about a single location: its business profile, owner, permissions, Google + connection state, and latest audit score. + + + If successful, the server returns the `200` HTTP status code and a location details object. Returns HTTP `404` + if the location is not found. + externalDocs: + description: Documentation + url: https://seranking.com/api/local-marketing-api/locations/#get-location-details + parameters: + - name: location_id + in: path + required: true + description: Location ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: integer + account_id: + type: integer + account_name: + type: string + title: + type: string + lang: + type: string + is_active: + type: boolean + is_demo: + type: boolean + created_at: + type: string + updated_at: + type: string + connection_status: + type: string + sync_status: + type: string + last_synced_at: + type: string + statistics: + type: object + properties: + reviews_count: + type: integer + average_rating: + type: number + listings_count: + type: integer + citations_score: + type: number + audit_score_percent: + type: integer + profile: + type: object + properties: + name: + type: string + description: Business name. + primary_phone: + type: string + description: Primary phone number (can be `null`). + additional_phones: + type: array + items: + description: Additional phone numbers. + description: Additional phone numbers. + website: + type: string + description: Website URL (can be `null`). + description: + type: string + description: Business description (can be `null`). + address: + type: object + properties: + postal_code: + type: string + region_code: + type: string + region_display_name: + type: string + administrative_area: + type: string + locality: + type: string + address_lines: + type: array + items: + type: string + description: >- + Address: `postal_code`, `region_code`, `region_display_name`, `administrative_area`, + `locality`, `address_lines`. + primary_category: + type: object + properties: + id: + type: string + display_name: + type: string + description: "Primary business category: `id`, `display_name`." + additional_categories: + type: array + items: + description: Additional business categories. + description: Additional business categories. + working_hours: + type: object + properties: {} + description: Working hours. + service_area: + type: object + properties: {} + description: Service area settings. + social_profiles: + type: array + items: + type: object + properties: + network: + type: string + url: + type: string + description: Social profiles, each with `network` and `url`. + description: Social profiles, each with `network` and `url`. + description: Business profile of the location. + properties: + type: object + properties: {} + description: >- + Additional location properties. Note: currently returned as an object when populated but as an + empty array `[]` when empty — typed clients should handle both. + owner: + type: object + properties: + id: + type: integer + parent_id: {} + email: + type: string + first_name: + type: string + last_name: + type: string + lang: + type: string + description: "Location owner: `id`, `parent_id`, `email`, `first_name`, `last_name`, `lang`." + permissions: + type: array + items: + type: string + description: Permissions the current user has for this location. + description: Permissions the current user has for this location. + auth: + type: object + properties: + google_connection_status: + type: string + description: Google connection status (can be `null`). + requires_reconnect: + type: boolean + description: Whether the Google account needs to be reconnected (can be `null`). + connected_at: + type: string + description: Connection timestamp (can be `null`). + description: Google connection state. + audit: + type: object + properties: + score_percent: + type: integer + description: Latest audit score, in percent (can be `null`). + description: Audit summary. + example: + id: 15 + account_id: 42 + account_name: Acme Agency + title: Folk Osteria + lang: en + is_active: true + is_demo: false + created_at: "2026-04-10 09:15:00" + updated_at: "2026-08-04 12:00:00" + connection_status: connected + sync_status: synced + last_synced_at: "2026-08-04 12:00:00" + statistics: + reviews_count: 60 + average_rating: 3.8 + listings_count: 57 + citations_score: 85 + audit_score_percent: 85 + profile: + name: Folk Osteria + primary_phone: 1 801-843-9517 + additional_phones: [] + website: https://folkosteria.com + description: Italian restaurant in Holladay. + address: + postal_code: "84117" + region_code: US + region_display_name: United States + administrative_area: UT + locality: Holladay + address_lines: + - Highland Dr. + primary_category: + id: gcid:italian_restaurant + display_name: Italian restaurant + additional_categories: [] + working_hours: {} + service_area: {} + social_profiles: + - network: facebook + url: https://facebook.com/folkosteria + properties: {} + owner: + id: 7 + parent_id: null + email: owner@acme.agency + first_name: Jane + last_name: Doe + lang: en + permissions: + - view + - export + auth: + google_connection_status: connected + requires_reconnect: false + connected_at: "2026-04-10 09:20:00" + audit: + score_percent: 85 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/local-marketing/locations/15' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/local-marketing/locations/{location_id}/overview: + get: + operationId: getLocationOverview + tags: + - Location Overview + summary: Get location overview + description: >- + Returns a combined reporting overview for a location in a single request: location details, Google Business + Profile metrics and searches, reviews overview, citations overview, the latest audit report, and rankings + summary. + + + If successful, the server returns the `200` HTTP status code and a combined overview object. Returns HTTP `404` + if the location is not found. + externalDocs: + description: Documentation + url: https://seranking.com/api/local-marketing-api/location-overview/#get-location-overview + parameters: + - name: location_id + in: path + required: true + description: Location ID (path parameter). + schema: + type: integer + - name: from + in: query + description: Start date (in `YYYY-MM-DD`). + schema: + type: string + - name: to + in: query + description: End date (in `YYYY-MM-DD`). + schema: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + location: + type: object + properties: + id: + type: integer + account_id: + type: integer + title: + type: string + lang: + type: string + is_active: + type: boolean + is_demo: + type: boolean + statistics: + type: object + properties: + reviews_count: + type: integer + average_rating: + type: number + audit_score_percent: + type: integer + description: >- + Location snapshot. Note: this block is its own projection and differs from [Get location + details](https://seranking.com/api/local-marketing-api/locations/#get-location-details) in several + fields — hours are returned as `regular_hours`/`special_hours`/`more_hours` (not + `profile.working_hours`), coordinates come in `latlng`, there is no `auth` block, the `statistics` + key set differs, and extra fields such as `attributes`, `owner.type`, and `is_claimed_by_others` + appear. + gbp_metrics: + type: object + properties: + location_id: + type: integer + from: + type: string + to: + type: string + group_by: + type: string + items: + type: array + items: + type: object + properties: + date: + type: string + metrics: + type: object + properties: + business_impressions_desktop_maps: + type: integer + business_impressions_desktop_search: + type: integer + business_impressions_mobile_maps: + type: integer + business_impressions_mobile_search: + type: integer + business_direction_requests: + type: integer + business_conversations: + type: integer + call_clicks: + type: integer + website_clicks: + type: integer + description: >- + Google Business Profile metrics (see [Get Google Business Profile + metrics](https://seranking.com/api/local-marketing-api/google-business-profile/#get-google-business-profile-metrics)). + gbp_searches: + type: object + properties: + location_id: + type: integer + last_updated_date: + type: string + items: + type: array + items: + type: object + properties: + month: + type: string + direct: + type: integer + discovery: + type: integer + branded: + type: integer + description: >- + Google Business Profile searches trend (see [Get Google Business Profile searches + trend](https://seranking.com/api/local-marketing-api/google-business-profile/#get-google-business-profile-searches-trend)). + reviews_overview: + type: object + properties: + location_id: + type: integer + total_reviews: + type: integer + average_rating: + type: number + answered_reviews: + type: integer + unanswered_reviews: + type: integer + description: >- + Reviews overview (see [Get reviews + overview](https://seranking.com/api/local-marketing-api/reviews/#get-reviews-overview)). + citations_overview: + type: object + properties: + location_id: + type: integer + total_directories: + type: integer + active_directories: + type: integer + synced_directories: + type: integer + description: >- + Citations overview (see [Get business listings + overview](https://seranking.com/api/local-marketing-api/business-listings/#get-business-listings-overview)). + latest_audit_report: + type: object + properties: + id: + type: integer + location_id: + type: integer + created_at: + type: string + score_percent: + type: integer + issues: + type: array + items: + type: object + properties: + check_code: + type: string + category: + type: string + severity: + type: string + is_passed: + type: boolean + result_status: + type: string + issues_count: + type: integer + issues_count_prev: + type: integer + weight: + type: number + directories: + type: object + properties: + failed: + type: array + items: + type: string + not_checked: + type: array + items: {} + new: + type: array + items: {} + fixed: + type: array + items: + type: string + description: >- + The latest audit report: `id`, `location_id`, `created_at`, `score_percent`, and `issues` — the + full per-check list with the same fields as `entries` in [Get latest audit + report](https://seranking.com/api/local-marketing-api/local-marketing-audit/#get-latest-audit-report) + (`check_code`, `category`, `severity`, `result_status`, `issues_count`, `weight`, and the + `directories`/`reviews` drill-downs); only the envelope differs. + rankings: + type: object + properties: + keywords_tracked: + type: integer + description: Number of tracked keywords (can be `null`). + average_position: + type: number + description: Average keyword position (can be `null`). + top_3_keywords_count: + type: integer + description: Number of keywords in the TOP 3 (can be `null`). + top_10_keywords_count: + type: integer + description: Number of keywords in the TOP 10 (can be `null`). + indexed_percent: + type: number + description: Percentage of indexed keywords (can be `null`). + description: Rankings summary for the location. + example: + location: + id: 15 + account_id: 42 + title: Folk Osteria + lang: en + is_active: true + is_demo: false + statistics: + reviews_count: 60 + average_rating: 3.8 + audit_score_percent: 85 + gbp_metrics: + location_id: 15 + from: "2026-05-01" + to: "2026-05-31" + group_by: DAY + items: + - date: "2026-05-01" + metrics: + business_impressions_desktop_maps: 46 + business_impressions_desktop_search: 307 + business_impressions_mobile_maps: 230 + business_impressions_mobile_search: 50 + business_direction_requests: 5 + business_conversations: 2 + call_clicks: 1 + website_clicks: 21 + gbp_searches: + location_id: 15 + last_updated_date: "2026-05-31" + items: + - month: "2026-05-01" + direct: 1200 + discovery: 3400 + branded: 800 + reviews_overview: + location_id: 15 + total_reviews: 60 + average_rating: 3.8 + answered_reviews: 52 + unanswered_reviews: 8 + citations_overview: + location_id: 15 + total_directories: 66 + active_directories: 57 + synced_directories: 49 + latest_audit_report: + id: 991 + location_id: 15 + created_at: "2026-05-30 08:00:00" + score_percent: 85 + issues: + - check_code: nap_consistency + category: listings + severity: error + is_passed: false + result_status: failed + issues_count: 3 + issues_count_prev: 5 + weight: 2.5 + directories: + failed: + - foursquare + not_checked: [] + new: [] + fixed: + - yelp + rankings: + keywords_tracked: 40 + average_position: 8.3 + top_3_keywords_count: 9 + top_10_keywords_count: 21 + indexed_percent: 92.5 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/local-marketing/locations/15/overview?from=2026-05-01&to=2026-05-31' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/local-marketing/locations/{location_id}/rankings/keywords: + get: + operationId: getLocalRankingsKeywordList + tags: + - Local Rankings + summary: Get Local Rankings keyword list + description: >- + Returns the Local Rankings keyword list for a location with current and best positions, tracking point details, + and a summary block. + + + If successful, the server returns the `200` HTTP status code, a `summary` block, an array of keywords in + `items`, and a `pagination` object. Returns HTTP `404` if the location is not found. + externalDocs: + description: Documentation + url: https://seranking.com/api/local-marketing-api/local-rankings/#get-local-rankings-keyword-list + parameters: + - name: location_id + in: path + required: true + description: Location ID (path parameter). + schema: + type: integer + - name: from + in: query + description: Start date (in `YYYY-MM-DD`). + schema: + type: string + - name: to + in: query + description: End date (in `YYYY-MM-DD`). + schema: + type: string + - name: limit + in: query + description: Maximum number of items to return (1–1000). Default is `100`. + schema: + type: integer + - name: offset + in: query + description: Number of items to skip. Default is `0`. + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + location_id: + type: integer + description: Location ID. + summary: + type: object + properties: + keywords_tracked: + type: integer + description: Number of tracked keyword × tracking-point pairs. + indexed_keywords: + type: integer + description: Number of indexed keywords. + average_position: + type: number + description: Average position (can be `null`). + top_3_keywords_count: + type: integer + description: Number of keywords in the TOP 3. + top_10_keywords_count: + type: integer + description: Number of keywords in the TOP 10. + description: Summary across tracked keywords. + items: + type: array + items: + type: object + properties: + keyword_id: + type: integer + description: Keyword ID. + keyword: + type: string + description: Keyword. + current_position: + type: integer + description: Current position (can be `null`). + best_position: + type: integer + description: Best position (can be `null`). + found_at: + type: string + description: Date the keyword was first found (in `YYYY-MM-DD`, can be `null`). + key_to_geopoint_id: + type: integer + description: Keyword-to-geopoint binding ID (can be `null`). + tracking_point_details: + type: object + properties: + id: + type: integer + description: Tracking point ID (can be `null`). + type: + type: string + description: "Tracking point type: `geopoint` or `grid`." + label: + type: string + description: Tracking point label (can be `null`). + address: + type: string + description: Tracking point address (can be `null`). + latitude: + type: number + description: Latitude (can be `null`). + longitude: + type: number + description: Longitude (can be `null`). + key_to_geopoint_id: + type: integer + description: >- + Keyword-to-geopoint binding ID, duplicated inside the tracking point details (can be + `null`). + description: Tracking point details. + description: List of keywords. + description: List of keywords. + pagination: + type: object + properties: + total: + type: integer + limit: + type: integer + offset: + type: integer + description: "Pagination info: `total`, `limit`, `offset`." + example: + location_id: 15 + summary: + keywords_tracked: 40 + indexed_keywords: 37 + average_position: 8.3 + top_3_keywords_count: 9 + top_10_keywords_count: 21 + items: + - keyword_id: 7001 + keyword: italian restaurant holladay + current_position: 2 + best_position: 1 + found_at: "2026-04-15" + key_to_geopoint_id: 88 + tracking_point_details: + id: 12 + type: geopoint + label: Downtown + address: Holladay, UT + latitude: 40.6689 + longitude: -111.8247 + key_to_geopoint_id: 88 + pagination: + total: 40 + limit: 100 + offset: 0 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/local-marketing/locations/15/rankings/keywords?from=2026-05-01&to=2026-05-31&limit=100&offset=0' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/local-marketing/locations/{location_id}/rankings/positions: + get: + operationId: getLocalRankingsPositions + tags: + - Local Rankings + summary: Get Local Rankings positions + description: >- + Returns Local Rankings position history for a location by date and tracking point, with a summary block. Note: + both `from` and `to` must be supplied — a partial or missing range returns an empty result set rather than the + full history. + + + If successful, the server returns the `200` HTTP status code, a `summary` block, an array of position records in + `items`, and a `pagination` object. Returns HTTP `404` if the location is not found. + externalDocs: + description: Documentation + url: https://seranking.com/api/local-marketing-api/local-rankings/#get-local-rankings-positions + parameters: + - name: location_id + in: path + required: true + description: Location ID (path parameter). + schema: + type: integer + - name: from + in: query + description: Start date (in `YYYY-MM-DD`). + schema: + type: string + - name: to + in: query + description: End date (in `YYYY-MM-DD`). + schema: + type: string + - name: limit + in: query + description: Maximum number of items to return (1–1000). Default is `100`. + schema: + type: integer + - name: offset + in: query + description: Number of items to skip. Default is `0`. + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + location_id: + type: integer + description: Location ID. + summary: + type: object + properties: + average_position: + type: number + description: Average position (can be `null`). + best_position: + type: integer + description: Best position (can be `null`). + worst_position: + type: integer + description: Worst position (can be `null`). + description: Summary across the selected period. + items: + type: array + items: + type: object + properties: + date: + type: string + description: Check date (in `YYYY-MM-DD`). + keyword_id: + type: integer + description: Keyword ID. + position: + type: integer + description: Position on the check date (can be `null`). + tracking_point: + type: string + description: Tracking point (can be `null`). + key_to_geopoint_id: + type: integer + description: Keyword-to-geopoint binding ID (can be `null`). + tracking_point_details: + type: object + properties: + id: + type: integer + type: + type: string + label: + type: string + address: + type: string + latitude: + type: number + longitude: + type: number + key_to_geopoint_id: + type: integer + description: Keyword-to-geopoint binding ID (can be `null`). + description: >- + Tracking point details (same structure as in [Get Local Rankings keyword + list](#get-local-rankings-keyword-list)). + description: Position records. + description: Position records. + pagination: + type: object + properties: + total: + type: integer + limit: + type: integer + offset: + type: integer + description: "Pagination info: `total`, `limit`, `offset`." + example: + location_id: 15 + summary: + average_position: 8.3 + best_position: 1 + worst_position: 34 + items: + - date: "2026-05-30" + keyword_id: 7001 + position: 2 + tracking_point: Downtown + key_to_geopoint_id: 88 + tracking_point_details: + id: 12 + type: geopoint + label: Downtown + address: Holladay, UT + latitude: 40.6689 + longitude: -111.8247 + key_to_geopoint_id: 88 + pagination: + total: 1875 + limit: 100 + offset: 0 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/local-marketing/locations/15/rankings/positions?from=2026-05-01&to=2026-05-31&limit=100&offset=0' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/local-marketing/locations/{location_id}/rankings/indexed-percent: + get: + operationId: getRankingsIndexedPercent + tags: + - Local Rankings + summary: Get rankings indexed percent + description: >- + Returns the percentage of tracked keywords for which the location is indexed. + + + If successful, the server returns the `200` HTTP status code and the indexed percent value. Returns HTTP `404` + if the location is not found. + externalDocs: + description: Documentation + url: https://seranking.com/api/local-marketing-api/local-rankings/#get-rankings-indexed-percent + parameters: + - name: location_id + in: path + required: true + description: Location ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + location_id: + type: integer + description: Location ID. + indexed_percent: + type: number + description: Percentage of indexed keywords. + example: + location_id: 15 + indexed_percent: 92.5 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/local-marketing/locations/15/rankings/indexed-percent' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/local-marketing/locations/{location_id}/gbp-metrics: + get: + operationId: getGoogleBusinessProfileMetrics + tags: + - Google Business Profile + summary: Get Google Business Profile metrics + description: >- + Returns Google Business Profile performance metrics for a location as a daily time series: impressions by + platform and device (desktop/mobile × Search/Maps), direction requests, conversations, call clicks, and website + clicks. Metric names inside each row follow Google’s own daily metric names, lowercased. + + + If successful, the server returns the `200` HTTP status code and a metrics time series. Returns HTTP `404` if + the location is not found. + externalDocs: + description: Documentation + url: https://seranking.com/api/local-marketing-api/google-business-profile/#get-google-business-profile-metrics + parameters: + - name: location_id + in: path + required: true + description: Location ID (path parameter). + schema: + type: integer + - name: from + in: query + description: Start date (in `YYYY-MM-DD`). + schema: + type: string + - name: to + in: query + description: End date (in `YYYY-MM-DD`). + schema: + type: string + - name: group_by + in: query + description: "Time grouping. Available value: `DAY` (default)." + schema: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + location_id: + type: integer + description: Location ID. + from: + type: string + description: Start date of the range (in `YYYY-MM-DD`, can be `null`). + to: + type: string + description: End date of the range (in `YYYY-MM-DD`, can be `null`). + group_by: + type: string + description: Grouping applied to the series. + items: + type: array + items: + type: object + properties: + date: + type: string + description: Row date (in `YYYY-MM-DD`). + metrics: + type: object + properties: + business_impressions_desktop_maps: + type: integer + business_impressions_desktop_search: + type: integer + business_impressions_mobile_maps: + type: integer + business_impressions_mobile_search: + type: integer + business_direction_requests: + type: integer + business_conversations: + type: integer + call_clicks: + type: integer + website_clicks: + type: integer + description: >- + Metric name to numeric value map for that date. Possible keys: + `business_impressions_desktop_maps`, `business_impressions_desktop_search`, + `business_impressions_mobile_maps`, `business_impressions_mobile_search`, + `business_direction_requests`, `business_conversations`, `call_clicks`, `website_clicks`. + description: Time series rows. + description: Time series rows. + example: + location_id: 15 + from: "2026-05-01" + to: "2026-05-31" + group_by: DAY + items: + - date: "2026-05-01" + metrics: + business_impressions_desktop_maps: 46 + business_impressions_desktop_search: 307 + business_impressions_mobile_maps: 230 + business_impressions_mobile_search: 50 + business_direction_requests: 5 + business_conversations: 2 + call_clicks: 1 + website_clicks: 21 + - date: "2026-05-02" + metrics: + business_impressions_desktop_maps: 39 + business_impressions_desktop_search: 284 + business_impressions_mobile_maps: 211 + business_impressions_mobile_search: 44 + business_direction_requests: 3 + business_conversations: 1 + call_clicks: 2 + website_clicks: 18 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/local-marketing/locations/15/gbp-metrics?from=2026-05-01&to=2026-05-31&group_by=DAY' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/local-marketing/locations/{location_id}/gbp-keywords: + get: + operationId: getGoogleBusinessProfileKeywordReport + tags: + - Google Business Profile + summary: Get Google Business Profile keyword report + description: >- + Returns the Google Business Profile keyword report for a location: search keywords with impressions and clicks, + plus totals across the selected period. This endpoint uses token-based pagination. + + + If successful, the server returns the `200` HTTP status code and the keyword report. Returns HTTP `404` if the + location is not found. + externalDocs: + description: Documentation + url: >- + https://seranking.com/api/local-marketing-api/google-business-profile/#get-google-business-profile-keyword-report + parameters: + - name: location_id + in: path + required: true + description: Location ID (path parameter). + schema: + type: integer + - name: from + in: query + description: Start date (in `YYYY-MM-DD`). + schema: + type: string + - name: to + in: query + description: End date (in `YYYY-MM-DD`). + schema: + type: string + - name: page_size + in: query + description: Number of items per page (1–1000). Default is `100`. + schema: + type: integer + - name: page_token + in: query + description: Token of the next page, taken from `next_page_token` of the previous response. + schema: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + location_id: + type: integer + description: Location ID. + totals: + type: object + properties: + impressions: + type: integer + description: Total impressions (can be `null`). + clicks: + type: integer + description: Total clicks (can be `null`). + description: Totals across all keywords in the range. + items: + type: array + items: + type: object + properties: + keyword: + type: string + description: Search keyword. + impressions: + type: integer + description: Impressions for the keyword (can be `null`). + clicks: + type: integer + description: Clicks for the keyword (can be `null`). + description: Keyword rows. + description: Keyword rows. + next_page_token: + type: string + description: Token to request the next page. `null` if there are no more pages. + example: + location_id: 15 + totals: + impressions: 15230 + clicks: 640 + items: + - keyword: italian restaurant near me + impressions: 4200 + clicks: 180 + - keyword: osteria holladay + impressions: 2100 + clicks: 95 + next_page_token: eyJvZmZzZXQiOjEwMH0 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/local-marketing/locations/15/gbp-keywords?from=2026-05-01&to=2026-05-31&page_size=100' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/local-marketing/locations/{location_id}/gbp-searches: + get: + operationId: getGoogleBusinessProfileSearchesTrend + tags: + - Google Business Profile + summary: Get Google Business Profile searches trend + description: >- + Returns the Google Business Profile searches trend for a location by month, broken down into direct, discovery, + and branded searches. + + + If successful, the server returns the `200` HTTP status code and the searches trend. Returns HTTP `404` if the + location is not found. + externalDocs: + description: Documentation + url: >- + https://seranking.com/api/local-marketing-api/google-business-profile/#get-google-business-profile-searches-trend + parameters: + - name: location_id + in: path + required: true + description: Location ID (path parameter). + schema: + type: integer + - name: from + in: query + description: Start date (in `YYYY-MM-DD`). + schema: + type: string + - name: to + in: query + description: End date (in `YYYY-MM-DD`). + schema: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + location_id: + type: integer + description: Location ID. + last_updated_date: + type: string + description: Date the data was last updated (in `YYYY-MM-DD`, can be `null`). + items: + type: array + items: + type: object + properties: + month: + type: string + description: Month, returned as the first day of the month (in `YYYY-MM-DD`), e.g. `2026-05-01`. + direct: + type: integer + description: Direct searches — users searched for the business name or address (can be `null`). + discovery: + type: integer + description: Discovery searches — users searched for a category, product, or service (can be `null`). + branded: + type: integer + description: Branded searches — users searched for a brand related to the business (can be `null`). + description: Monthly rows. + description: Monthly rows. + example: + location_id: 15 + last_updated_date: "2026-05-31" + items: + - month: "2026-04-01" + direct: 1100 + discovery: 3200 + branded: 720 + - month: "2026-05-01" + direct: 1200 + discovery: 3400 + branded: 800 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/local-marketing/locations/15/gbp-searches?from=2026-01-01&to=2026-05-31' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/local-marketing/locations/{location_id}/citations: + get: + operationId: listBusinessListings + tags: + - Business Listings + summary: List business listings + description: >- + Returns a list of business listings for a location across connected directories, including sync state and NAP + (name, address, phone) consistency status. Note: the endpoint path uses `citations`, the API term for directory + listings. Sorting is currently not applied by the upstream service for this endpoint (pending fix). + + + If successful, the server returns the `200` HTTP status code, an array of citations in `items`, and a + `pagination` object. Returns HTTP `404` if the location is not found. + externalDocs: + description: Documentation + url: https://seranking.com/api/local-marketing-api/business-listings/#list-business-listings + parameters: + - name: location_id + in: path + required: true + description: Location ID (path parameter). + schema: + type: integer + - name: limit + in: query + description: Maximum number of items to return (1–1000). Default is `100`. + schema: + type: integer + - name: offset + in: query + description: Number of items to skip. Default is `0`. + schema: + type: integer + - name: sort + in: query + description: Field to sort by. + schema: + type: string + - name: sort_order + in: query + description: "Sorting order: `asc` or `desc`. Default is `desc`." + schema: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + items: + type: array + items: + type: object + properties: + id: + type: integer + description: Citation ID. + location_id: + type: integer + description: Location ID. + directory_code: + type: string + description: Directory code. + directory_name: + type: string + description: Directory name. + status: + type: string + description: Listing status in the directory. + url: + type: string + description: Listing URL (can be `null`). + is_synced: + type: boolean + description: Whether the listing is synchronized (can be `null`). + updated_at: + type: string + description: Last update timestamp (can be `null`). + last_synced_at: + type: string + description: Last synchronization timestamp (can be `null`). + sync_error: + nullable: true + description: Synchronization error message (can be `null`). + type: string + nap_match_status: + type: string + description: Overall NAP consistency status for the directory listing (can be `null`). + field_statuses: + type: object + properties: + name: + type: string + address: + type: string + phone: + type: string + website: + type: string + nullable: true + description: "Per-field match statuses: `name`, `address`, `phone`, `website` (each can be `null`)." + description: List of citations. + description: List of citations. + pagination: + type: object + properties: + total: + type: integer + limit: + type: integer + offset: + type: integer + description: "Pagination info: `total`, `limit`, `offset`." + example: + items: + - id: 301 + location_id: 15 + directory_code: yelp + directory_name: Yelp + status: active + url: https://yelp.com/biz/folk-osteria + is_synced: true + updated_at: "2026-08-01 10:00:00" + last_synced_at: "2026-08-01 10:00:00" + sync_error: null + nap_match_status: matched + field_statuses: + name: matched + address: matched + phone: matched + website: matched + - id: 302 + location_id: 15 + directory_code: foursquare + directory_name: Foursquare + status: mismatched + url: https://foursquare.com/v/folk-osteria + is_synced: false + updated_at: "2026-07-28 14:30:00" + last_synced_at: "2026-07-20 09:00:00" + sync_error: null + nap_match_status: mismatched + field_statuses: + name: matched + address: mismatched + phone: matched + website: null + pagination: + total: 66 + limit: 100 + offset: 0 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/local-marketing/locations/15/citations?limit=100&offset=0' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/local-marketing/locations/{location_id}/citations/overview: + get: + operationId: getBusinessListingsOverview + tags: + - Business Listings + summary: Get business listings overview + description: >- + Returns aggregated business listing statistics for a location: total, active, and synchronized directory counts. + Counters reflect the current synchronization state. Note: the endpoint path uses `citations`, the API term for + directory listings. + + + If successful, the server returns the `200` HTTP status code and aggregated citation statistics. Returns HTTP + `404` if the location is not found. + externalDocs: + description: Documentation + url: https://seranking.com/api/local-marketing-api/business-listings/#get-business-listings-overview + parameters: + - name: location_id + in: path + required: true + description: Location ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + location_id: + type: integer + description: Location ID. + total_directories: + type: integer + description: Total number of directories. + active_directories: + type: integer + description: Number of active directories. + synced_directories: + type: integer + description: Number of synchronized directories. + example: + location_id: 15 + total_directories: 66 + active_directories: 57 + synced_directories: 49 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/local-marketing/locations/15/citations/overview' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/local-marketing/locations/{location_id}/reviews: + get: + operationId: listReviews + tags: + - Reviews + summary: List reviews + description: >- + Returns a list of reviews for a location across all connected review sources. + + + If successful, the server returns the `200` HTTP status code, an array of reviews in `items`, and a `pagination` + object. Returns HTTP `404` if the location is not found. + externalDocs: + description: Documentation + url: https://seranking.com/api/local-marketing-api/reviews/#list-reviews + parameters: + - name: location_id + in: path + required: true + description: Location ID (path parameter). + schema: + type: integer + - name: from + in: query + description: Start date (in `YYYY-MM-DD`). + schema: + type: string + - name: to + in: query + description: End date (in `YYYY-MM-DD`). + schema: + type: string + - name: limit + in: query + description: Maximum number of items to return (1–1000). Default is `100`. + schema: + type: integer + - name: offset + in: query + description: Number of items to skip. Default is `0`. + schema: + type: integer + - name: sort + in: query + description: >- + Field to sort by: `created_at`, `rating`, `status`, `source`, or `lang`. An unsupported value returns an + error. + schema: + type: string + - name: sort_order + in: query + description: "Sorting order: `asc` or `desc`. Default is `desc`." + schema: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + items: + type: array + items: + type: object + properties: + id: + type: integer + description: Review ID. + location_id: + type: integer + description: Location ID. + source: + type: string + description: Review source code (e.g. `google`). + source_name: + type: string + description: Review source name (can be `null`). + rating: + type: integer + description: Review rating (can be `null`). + review: + type: string + description: Review text (can be `null`). + reviewer_name: + type: string + description: Reviewer name (can be `null`). + language: + type: string + description: Review language (can be `null`). + created_at: + type: string + description: Review creation timestamp (can be `null`). + status: + type: string + description: Review status (can be `null`). + review_url: + type: string + description: Link to the review (can be `null`). + is_answered: + type: boolean + description: Whether the review has a reply (can be `null`). + reply_status: + type: string + description: Reply status (can be `null`). + reply_text: + type: string + description: Reply text (can be `null`). + replied_at: + type: string + description: Reply timestamp (can be `null`). + sentiment: + type: string + description: Review sentiment (can be `null`). + description: List of reviews. + description: List of reviews. + pagination: + type: object + properties: + total: + type: integer + limit: + type: integer + offset: + type: integer + description: "Pagination info: `total`, `limit`, `offset`." + example: + items: + - id: 501 + location_id: 15 + source: google + source_name: Google + rating: 5 + review: Great pasta and friendly staff! + reviewer_name: John S. + language: en + created_at: "2026-05-12 18:40:00" + status: published + review_url: https://maps.google.com/reviews/501 + is_answered: true + reply_status: published + reply_text: Thank you, John! See you again soon. + replied_at: "2026-05-13 09:05:00" + sentiment: positive + pagination: + total: 60 + limit: 100 + offset: 0 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/local-marketing/locations/15/reviews?from=2026-05-01&to=2026-05-31&limit=100&offset=0' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/local-marketing/locations/{location_id}/reviews/overview: + get: + operationId: getReviewsOverview + tags: + - Reviews + summary: Get reviews overview + description: >- + Returns aggregated review statistics for a location: totals, average rating, answered/unanswered counts, rating + distribution, and a breakdown by source. When `from`/`to` are provided, aggregates are computed for that period; + otherwise they cover the location’s entire history. + + + If successful, the server returns the `200` HTTP status code and aggregated review statistics. Returns HTTP + `404` if the location is not found. + externalDocs: + description: Documentation + url: https://seranking.com/api/local-marketing-api/reviews/#get-reviews-overview + parameters: + - name: location_id + in: path + required: true + description: Location ID (path parameter). + schema: + type: integer + - name: from + in: query + description: Start date (in `YYYY-MM-DD`). + schema: + type: string + - name: to + in: query + description: End date (in `YYYY-MM-DD`). + schema: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + location_id: + type: integer + description: Location ID. + total_reviews: + type: integer + description: >- + Total number of reviews, **including unrated ones** — while `average_rating` and + `rating_distribution` cover rated reviews only, so `total_reviews` × `average_rating` does not + give a weighted total. + average_rating: + type: number + description: >- + Average rating across **rated** reviews only. A distinct metric from `statistics.average_rating` + in the location endpoints — the two may not match (can be `null`). + answered_reviews: + type: integer + description: Number of reviews with a reply. + unanswered_reviews: + type: integer + description: Number of reviews without a reply. + rating_distribution: + type: object + properties: + 1_star: + type: integer + 2_star: + type: integer + 3_star: + type: integer + 4_star: + type: integer + 5_star: + type: integer + description: "Number of reviews per rating: `1_star` … `5_star`." + items_by_source: + type: array + items: + type: object + properties: + source: + type: string + description: Review source code. + reviews_count: + type: integer + description: Number of reviews from this source. + average_rating: + type: number + description: >- + Average rating across **rated** reviews only. A distinct metric from + `statistics.average_rating` in the location endpoints — the two may not match (can be + `null`). + answered_reviews: + type: integer + description: Number of reviews with a reply. + unanswered_reviews: + type: integer + description: Number of reviews without a reply. + description: Per-source breakdown. + description: Per-source breakdown. + example: + location_id: 15 + total_reviews: 60 + average_rating: 3.8 + answered_reviews: 52 + unanswered_reviews: 8 + rating_distribution: + 1_star: 4 + 2_star: 5 + 3_star: 10 + 4_star: 21 + 5_star: 20 + items_by_source: + - source: google + reviews_count: 55 + average_rating: 3.9 + answered_reviews: 50 + unanswered_reviews: 5 + - source: facebook + reviews_count: 5 + average_rating: 3.4 + answered_reviews: 2 + unanswered_reviews: 3 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/local-marketing/locations/15/reviews/overview?from=2026-05-01&to=2026-05-31' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/local-marketing/locations/{location_id}/audit/reports/latest: + get: + operationId: getLatestAuditReport + tags: + - Local Marketing Audit + summary: Get latest audit report + description: >- + Returns the latest Local Marketing audit report for a location. The response mirrors the report structure that + drives the Local Marketing audit page: summary counters, per-check entries, previous issue counts, and optional + directories/reviews payloads for checks with detailed drill-downs. + + + If successful, the server returns the `200` HTTP status code and the audit report. Returns HTTP `404` if the + location is not found. + externalDocs: + description: Documentation + url: https://seranking.com/api/local-marketing-api/local-marketing-audit/#get-latest-audit-report + parameters: + - name: location_id + in: path + required: true + description: Location ID (path parameter). + schema: + type: integer + - name: date + in: query + description: Report date (in `YYYY-MM-DD`). If omitted, the latest finished report is returned. + schema: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + status: + type: string + description: Report generation status (e.g. `finished`). + date: + type: string + description: Report date (in `YYYY-MM-DD`). + summary: + type: object + properties: + score: + type: integer + description: >- + Overall audit score, 0–100 — the same value exposed as `audit_score_percent`/`score_percent` + in the location endpoints (can be `null`). + total_errors: + type: integer + description: Total number of errors. + total_warnings: + type: integer + description: Total number of warnings. + total_notices: + type: integer + description: Total number of notices. + description: Summary counters. + entries: + type: array + items: + type: object + properties: + check_code: + type: string + description: Stable audit check code used by frontend translations and navigation. + category: + type: string + description: Audit category used on the audit page (e.g. `profile`). + severity: + type: string + description: "Severity bucket: `error`, `warning`, or `notice`." + is_passed: + type: boolean + description: Deprecated compatibility field from the current frontend API. + result_status: + type: string + description: "Actual result status: `passed`, `failed`, or `undefined`." + issues_count: + type: integer + description: Number of issues found by the check (can be `null`). + issues_count_prev: + type: integer + description: Number of issues in the previous report (can be `null`). + weight: + type: number + description: Check weight in the overall score. + directories: + type: object + properties: + failed: + type: array + items: + type: string + not_checked: + type: array + items: {} + new: + type: array + items: {} + fixed: + type: array + items: + type: string + description: >- + Directory drill-down for directory checks: `failed`, `not_checked`, `new`, `fixed` (arrays + of directory codes). + reviews: + type: object + properties: + failed: + type: array + items: + type: string + new: + type: array + items: + type: string + fixed: + type: array + items: {} + description: "Review drill-down for review checks: `failed`, `new`, `fixed` (arrays)." + description: Per-check entries. + description: Per-check entries. + example: + status: finished + date: "2026-05-30" + summary: + score: 85 + total_errors: 2 + total_warnings: 5 + total_notices: 3 + entries: + - check_code: nap_consistency + category: listings + severity: error + is_passed: false + result_status: failed + issues_count: 3 + issues_count_prev: 5 + weight: 2.5 + directories: + failed: + - foursquare + - hotfrog + not_checked: [] + new: [] + fixed: + - yelp + - check_code: unanswered_reviews + category: reviews + severity: warning + is_passed: false + result_status: failed + issues_count: 8 + issues_count_prev: 12 + weight: 1 + reviews: + failed: + - "501" + - "502" + new: + - "503" + fixed: [] + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET 'https://api.seranking.com/v1/local-marketing/locations/15/audit/reports/latest?date=2026-05-30' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/local-marketing/locations/{location_id}/audit/reports: + get: + operationId: getAuditReportHistory + tags: + - Local Marketing Audit + summary: Get audit report history + description: >- + Returns the audit report history for a location as date and summary pairs, sorted by date. + + + If successful, the server returns the `200` HTTP status code and a top-level JSON **array** (not an object) of + history items. Each item is itself a two-element array: the report date (in `YYYY-MM-DD`) followed by a summary + object with the fields below. Returns HTTP `404` if the location is not found. + externalDocs: + description: Documentation + url: https://seranking.com/api/local-marketing-api/local-marketing-audit/#get-audit-report-history + parameters: + - name: location_id + in: path + required: true + description: Location ID (path parameter). + schema: + type: integer + - name: start_date + in: query + description: History start date (in `YYYY-MM-DD`). + schema: + type: string + - name: limit + in: query + description: Maximum number of items to return (1–1000). Default is `10`. + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: array + items: {} + example: + - - "2026-05-30" + - status: finished + score: 85 + total_errors: 2 + total_warnings: 5 + total_notices: 3 + - - "2026-05-23" + - status: finished + score: 82 + total_errors: 3 + total_warnings: 6 + total_notices: 3 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/local-marketing/locations/15/audit/reports?start_date=2026-05-01&limit=10' \ + -H 'Authorization: Token YOUR_API_KEY' +components: + securitySchemes: + tokenAuth: + type: apiKey + in: header + name: Authorization + description: >- + Recommended. Send the API key in the `Authorization` header with the `Token` scheme: `Authorization: Token + YOUR_API_KEY`. + apikeyQuery: + type: apiKey + in: query + name: apikey + description: >- + Alternative. Send the API key as the `apikey` query parameter. It must always be a query parameter, even when + other data goes in the request body. + schemas: + GatewayError: + type: object + description: Error returned by the API gateway before the request reaches the API. + properties: + error_description: + type: string + description: Human-readable error message. + responses: + Unauthorized: + description: The API key is missing, unknown or disabled. + content: + application/json: + schema: + $ref: "#/components/schemas/GatewayError" + example: + error_description: >- + Authentication failed. Please ensure you have a valid, enabled API key. To get an API key, please contact + us at api@seranking.com. + PaymentRequired: + description: The account has no active subscription or not enough credits for this request. + content: + application/json: + schema: + $ref: "#/components/schemas/GatewayError" + example: + error_description: >- + Insufficient funds, API key is temporarily disabled. Please make a payment to enable you API key, or + contact us at api@seranking.com. + Forbidden: + description: The API key may not call this endpoint or use this HTTP method. + content: + application/json: + schema: + $ref: "#/components/schemas/GatewayError" + example: + error_description: >- + Authentication failed. Please ensure you have a valid, enabled API key. To get an API key, please contact + us at api@seranking.com. + TooManyRequests: + description: >- + The request rate limit of the API key was exceeded. See [API rate + limits](https://seranking.com/api/rate-limits/). + content: + application/json: + schema: + $ref: "#/components/schemas/GatewayError" + example: + error_description: You made 11 requests, which is over the allowed limit of 10 requests per second. Please try again later. diff --git a/openapi/project-api.json b/openapi/project-api.json new file mode 100644 index 0000000..da618c9 --- /dev/null +++ b/openapi/project-api.json @@ -0,0 +1,15267 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "SE Ranking Project API", + "version": "1.0.0", + "description": "The Project API manages the SE Ranking projects in your account: projects and project groups, tracked keywords and rankings, search engines, competitors, URL tags, Google Search Console data, the marketing plan, website audits, Backlink Checker and AI Results Tracker.\n\n## Authentication\n\nAll endpoints are served from `https://api.seranking.com` and use one SE Ranking API key, the same key for the Data API, the Project API, the Local Marketing API and the SE Visible API. Send it in the `Authorization: Token YOUR_API_KEY` header (recommended) or as the `apikey` query parameter. See [Getting API access](https://seranking.com/api/how-to-get-api/).\n\nRate limits: [API rate limits](https://seranking.com/api/rate-limits/). Credits: [API credit system](https://seranking.com/api/api-credits-system/).", + "contact": { + "name": "SE Ranking API Support", + "url": "https://seranking.com/api/", + "email": "api@seranking.com" + }, + "license": { + "name": "MIT", + "url": "https://github.com/seranking/openapi/blob/main/LICENSE" + } + }, + "externalDocs": { + "description": "SE Ranking Project API documentation", + "url": "https://seranking.com/api/project/" + }, + "servers": [ + { + "url": "https://api.seranking.com", + "description": "Production" + } + ], + "security": [ + { + "tokenAuth": [] + }, + { + "apikeyQuery": [] + } + ], + "tags": [ + { + "name": "Account Management", + "description": "**Account Management API** provides endpoints to manage user account and sub-accounts, including creation, modification, deletion, access configuration, limits management, and project sharing.\n\nDocumentation: [Account Management](https://seranking.com/api/project/account-management/)" + }, + { + "name": "Project Management", + "description": "**Project Management API** provides endpoints to manage projects and retrieve ranking-related data.\n\nIt allows you to:\n\n- create, update, and delete projects\n\n- configure search engines for a project\n\n- add, update, and delete project keywords\n\n- retrieve keyword rankings and historical data\n\n- access project-level summary statistics\n\n- trigger manual ranking checks\n\n- manage manual ranking positions\n\n- retrieve advertising and SERP feature statistics\n\nDocumentation: [Project Management](https://seranking.com/api/project/project-management/)" + }, + { + "name": "Project Groups", + "description": "**Project Groups API** provides endpoints to manage project groups within a user account.\n\nDocumentation: [Project Groups](https://seranking.com/api/project/project-groups/)" + }, + { + "name": "Search Engine Setup", + "description": "This page documents the lookup data you need to attach and configure a Google search engine on a project: the engine catalogue, the city catalogue used for sub-country targeting, and the language catalogue.\n\nAll three endpoints take no parameters, return data that changes rarely, and should be cached client-side.\n\nDocumentation: [Search Engine Setup](https://seranking.com/api/project/general-data/)" + }, + { + "name": "Keyword Groups", + "description": "**Keyword Groups API** provides endpoints to manage keyword groups within a project.\n\nDocumentation: [Keyword Groups](https://seranking.com/api/project/keyword-groups/)" + }, + { + "name": "Competitors", + "description": "**Competitors API** provides endpoints to manage competitors and retrieve competitor ranking data within a project.\n\nDocumentation: [Competitors](https://seranking.com/api/project/competitors/)" + }, + { + "name": "URL Tags", + "description": "**URL Tags API** provides endpoints to manage landing page tags within a site.\n\nDocumentation: [URL Tags](https://seranking.com/api/project/url-tags/)" + }, + { + "name": "Analytics Traffic", + "description": "**Analytics Traffic API** provides endpoints to retrieve analytics and traffic data for a project, including Google Search Console metrics, keyword traffic potential, and estimated SEO performance.\n\nDocumentation: [Analytics Traffic](https://seranking.com/api/project/analytics-traffic/)" + }, + { + "name": "Marketing Plan", + "description": "**Marketing Plan API** provides endpoints to retrieve and manage marketing plan checklists for a site. These endpoints allow you to view marketing plan sections and tasks, create custom tasks, update task details, delete tasks, and change task completion status.\n\nDocumentation: [Marketing Plan](https://seranking.com/api/project/marketing-plan/)" + }, + { + "name": "Website Audit", + "description": "The **Website Audit API** crawls sites on demand and surfaces technical SEO issues: broken links, missing tags, slow pages, indexability problems, and more. Results are retrieved on demand.\n\nPlan limits apply to the total number of pages crawled. Creating an audit and rechecking an audit both count crawled pages against that plan limit. All other operations (reads and configuration updates) are free.\n\nDocumentation: [Website Audit](https://seranking.com/api/project/audit/)" + }, + { + "name": "Backlink Checker", + "description": "**Backlink Checker API** provides endpoints to retrieve, manage, import, group, and disavow backlinks, as well as monitor backlink import status and statistics.\n\nDocumentation: [Backlink Checker](https://seranking.com/api/project/backlink-checker/)" + }, + { + "name": "AI Results Tracker", + "description": "**AI Results Tracker API** (AIRT) enables tracking of brand visibility across AI search engines. It covers three resource groups:\n\n- **Brands** — Configure which brand name to track for a site\n\n- **LLM engines** — Add and manage which AI engines to track (ChatGPT, Gemini, Google AI Overview, Google AI Mode)\n\n- **Prompts** — Manage prompts per engine and retrieve rankings data\n\nDocumentation: [AI Results Tracker](https://seranking.com/api/project/ai-result-tracker/)" + }, + { + "name": "AI Results Tracker – Prompt Groups", + "description": "Organize tracked prompts into groups for cleaner reporting and bulk operations. Groups live at the site level and are shared across every LLM engine configured for that site; prompts are assigned to groups per engine. Data in the AI Result Tracker is refreshed daily.\n\n**Note:**\n\n- Each site has one non-deletable default group. New prompts land in the default group unless a `group_id` is specified at creation.\n\n- Deleting a non-default group moves its prompts to the default group.\n\n- Group names must be non-empty and unique within a site, maximum 255 characters.\n\n- Aggregated per-group metrics are not yet available in the public API; tracked in a follow-up task.\n\nDocumentation: [AI Result Tracker – Prompt Groups](https://seranking.com/api/project/airt-groups/)" + }, + { + "name": "AI Results Tracker – Competitors", + "description": "AIRT Competitors API, part of the AI Results Tracker (AIRT), provides programmatic access to the per-prompt, per-day Competitors view: which brands and source URLs appear in AI answers for a tracked prompt over time, with a cached HTML copy of the answer page for human verification.\n\nAll endpoints are engine-scoped (`llm_id`). To inspect a prompt across several engines, list the engines via [List LLM engines](https://seranking.com/api/project/ai-result-tracker/#list-llm-engines) and iterate.\n\nUsing the API, you can:\n\n- retrieve the brands and source URLs cited in an AI answer for a prompt across a date range\n\n- list the dates on which a prompt was checked, so you can skip empty periods\n\n- get SEO metrics (Domain Trust, referring domains, organic keywords) for the cited sources\n\n**Note:**\n\n- `prompt_llm_id` values come from the `prompt_llm_id` field of [List prompts](https://seranking.com/api/project/ai-result-tracker/#list-prompts). The `prompt_id` field is a different value and is not accepted.\n\n- The full answer text is not returned by these endpoints. Fetch it per (prompt, date) via [Get prompt answer](https://seranking.com/api/project/ai-result-tracker/#get-prompt-answer); the `has_answer_text` flag tells you whether it is still available.\n\n**Data retention:**\n\n- Cached HTML copy: 30 days (`has_cached_copy`).\n\n- Answer text: 1 year (`has_answer_text`).\n\nDocumentation: [AI Results Tracker – Competitors](https://seranking.com/api/project/airt-competitors/)" + }, + { + "name": "AI Results Tracker – Sources", + "description": "**AIRTSources API**, part of the AI Results Tracker (AIRT), provides programmatic access to project-level AI-search visibility across a date range. This includes domains and pages are cited as sources in AI answers, how often the project’s brand and its competitors are mentioned, and where mention opportunities exist.\n\nUnlike the [Competitors endpoints](https://seranking.com/api/project/airt-competitors/) (which are scoped to a single LLM engine), Sources data is **aggregated across all the project’s LLM engines** by default. Use `site_llm_ids[]` to narrow the scope to specific engines.\n\nUsing the API, you can:\n\n- get a project-level summary of mention opportunities and per-competitor mention counts\n\n- list the source domains cited across your tracked prompts, with authority and mention metrics\n\n- list the individual source pages (URLs) cited, with per-page metrics\n\n- get outreach recommendations — high-impact sources and per-domain suggestions where your project is cited but not yet mentioned\n\nDocumentation: [AI Results Tracker – Sources](https://seranking.com/api/project/airt-sources/)" + } + ], + "paths": { + "/v1/project-management/users/me": { + "get": { + "operationId": "getUserProfile", + "tags": [ + "Account Management" + ], + "summary": "Get user profile", + "description": "Returns profile information of the authenticated user account.\n\nNo parameters.\n\nIf successful, the server returns the `200` HTTP status code and the user profile data.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/account-management/#get-user-profile" + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Account email." + }, + "email_verified": { + "type": "boolean", + "description": "Email confirmation status (`true` – verified, `false` – not verified)." + }, + "first_name": { + "type": "string", + "description": "User’s first name." + }, + "last_name": { + "type": "string", + "description": "User’s last name." + }, + "lang": { + "type": "string", + "description": "Account language (ISO 639-1 alpha-2)." + }, + "picture": { + "type": "string", + "description": "Link to the user’s avatar (can be `null`)." + } + } + }, + "example": { + "email": "john.doe@example.com", + "email_verified": true, + "first_name": "John", + "last_name": "Doe", + "lang": "en", + "picture": "https://online.seranking.com/files/public/avatar/se.png" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/users/me' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/users": { + "get": { + "operationId": "listSubAccounts", + "tags": [ + "Account Management" + ], + "summary": "List sub-accounts / Get sub-account details", + "description": "### List sub-accounts\n\nReturns a list of all sub-accounts associated with the authenticated user.\n\nIf successful, the server returns the `200` HTTP status code and a list of sub-accounts.\n\n### Get sub-account details\n\nReturns extended information about the specified sub-account, including settings, access permissions, and limits.\n\nIf successful, the server returns the `200` HTTP status code and sub-account details. Returns HTTP `404` if the sub-account is not found (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/account-management/#list-sub-accounts" + }, + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "Number of records per page. Defaults to `100`.", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "Number of records to skip for pagination.", + "schema": { + "type": "integer" + } + }, + { + "name": "user_id", + "in": "query", + "description": "Unique sub-account ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "type": "object", + "properties": { + "account_id": { + "type": "integer", + "description": "Unique sub-account ID." + }, + "account_email": { + "type": "string", + "description": "Sub-account email." + }, + "account_first_name": { + "type": "string", + "description": "Sub-account first name." + }, + "account_last_name": { + "type": "string", + "description": "Sub-account last name." + }, + "account_type": { + "type": "string", + "description": "Account type: `user` or `client`." + }, + "account_lang": { + "type": "string", + "description": "Account language (ISO 639-1 alpha-2)." + }, + "account_sites_count": { + "type": "integer", + "description": "Number of websites available to the sub-account." + }, + "is_blocked_by_limits": { + "type": "boolean", + "description": "Indicates whether limits are exceeded." + } + }, + "description": "Array of sub-account objects." + }, + "description": "Array of sub-account objects." + }, + "all_count": { + "type": "string", + "description": "Total number of sub-accounts." + }, + "settings": { + "type": "object", + "properties": { + "account_id": { + "type": "integer", + "description": "Unique sub-account ID." + }, + "account_email": { + "type": "string", + "description": "Sub-account email." + }, + "account_first_name": { + "type": "string", + "description": "Sub-account first name." + }, + "account_last_name": { + "type": "string", + "description": "Sub-account last name." + }, + "account_type": { + "type": "string", + "description": "Account type: `user` or `client`." + }, + "account_lang": { + "type": "string", + "description": "Account language (ISO 639-1 alpha-2)." + } + }, + "description": "Sub-account profile information." + }, + "access": { + "type": "array", + "items": { + "type": "string", + "description": "List of enabled [permissions](https://seranking.com/api/project/sub-account-management/#permissions)." + }, + "description": "List of enabled [permissions](https://seranking.com/api/project/sub-account-management/#permissions)." + }, + "limit": { + "type": "object", + "properties": { + "site": { + "type": "integer", + "description": "Website limit." + }, + "keyword": { + "type": "integer", + "description": "Keyword limit." + }, + "backlink": { + "type": "integer", + "description": "Backlink check limit." + }, + "audit_account": { + "type": "integer", + "description": "Website verification limit per account." + }, + "audit_site": { + "type": "integer", + "description": "Website check limit per site per month." + }, + "balance": { + "type": "object", + "properties": { + "amount": { + "type": "integer", + "description": "Monetary limit value." + }, + "period": { + "type": "string", + "description": "Limit period: `day`, `week`, or `month`." + } + }, + "description": "Payment limit configuration." + } + }, + "description": "Sub-account limits configuration." + } + } + }, + "examples": { + "listSubAccounts": { + "summary": "List sub-accounts", + "value": { + "list": [ + { + "account_id": 36865, + "account_email": "user1@gmail.com", + "account_first_name": "John", + "account_last_name": "Doe", + "account_type": "user", + "account_lang": "ru", + "account_sites_count": 2, + "is_blocked_by_limits": false + }, + { + "account_id": 36828, + "account_email": "user2@gmail.com", + "account_first_name": "Jane", + "account_last_name": "Doe", + "account_type": "client", + "account_lang": "ru", + "account_sites_count": 1, + "is_blocked_by_limits": false + } + ], + "all_count": "2" + } + }, + "getSubAccountDetails": { + "summary": "Get sub-account details", + "value": { + "settings": { + "account_id": 36828, + "account_email": "test@gmail.com", + "account_first_name": "Test", + "account_last_name": "Test", + "account_type": "user", + "account_lang": "ru" + }, + "access": [ + "add_website", + "audit_settings", + "report_manual", + "report_scheduled", + "report_template" + ], + "limit": { + "site": 10, + "keyword": 5, + "backlink": 10, + "audit_account": 4, + "audit_site": 3, + "balance": { + "amount": 5, + "period": "day" + } + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/users?limit=100&offset=0' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/users?user_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "post": { + "operationId": "createSubAccount", + "tags": [ + "Account Management" + ], + "summary": "Create sub-account", + "description": "Creates a new sub-account and sends a notification email to the specified sub-account address.\n\nThe request body must contain a `data` object with sub-account configuration.\n\nIf successful, the server returns the `201` HTTP status code and the created sub-account identifier.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/account-management/#create-sub-account" + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "setting": { + "type": "object", + "properties": { + "account_email": { + "type": "string", + "description": "Sub-account email." + }, + "account_first_name": { + "type": "string", + "description": "Sub-account first name." + }, + "account_last_name": { + "type": "string", + "description": "Sub-account last name." + }, + "account_password": { + "type": "string", + "description": "Sub-account password." + }, + "account_lang": { + "type": "string", + "description": "Sub-account language (ISO 639-1 alpha-2)." + }, + "account_type": { + "type": "string", + "description": "Account type: `user` or `client`." + } + } + }, + "limit": { + "type": "object", + "properties": { + "balance": { + "type": "object", + "properties": { + "period": { + "type": "string", + "description": "Limit period: `day`, `week`, `month`." + }, + "amount": { + "type": "integer", + "description": "Monetary limit value." + } + } + } + } + }, + "access": { + "type": "array", + "items": {}, + "description": "List of [permission codes](https://seranking.com/api/project/sub-account-management/#permissions)." + }, + "key": { + "type": "string" + }, + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "setting.account_email": { + "type": "string" + }, + "setting.account_first_name": { + "type": "string" + }, + "setting.account_last_name": { + "type": "string" + }, + "setting.account_password": { + "type": "string" + }, + "setting.account_type": { + "type": "string" + }, + "limit.balance.period": { + "type": "string" + }, + "limit.balance.amount": { + "type": "integer" + }, + "access": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "example": [ + { + "key": "data", + "value": [ + { + "setting.account_email": "test10@gmail.com" + }, + { + "setting.account_first_name": "Test" + }, + { + "setting.account_last_name": "Test" + }, + { + "setting.account_password": "TestPassword" + }, + { + "setting.account_type": "user" + }, + { + "limit.balance.period": "day" + }, + { + "limit.balance.amount": 10 + }, + { + "access": [ + "add_website", + "audit_settings", + "report_manual", + "report_scheduled", + "report_template" + ] + } + ] + } + ] + } + } + }, + "responses": { + "201": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Unique sub-account ID." + } + } + }, + "example": { + "id": 36872 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/project-management/users' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '[\n {\n \"key\": \"data\",\n \"value\": [\n {\"setting.account_email\": \"test10@gmail.com\"},\n {\"setting.account_first_name\": \"Test\"},\n {\"setting.account_last_name\": \"Test\"},\n {\"setting.account_password\": \"TestPassword\"},\n {\"setting.account_type\": \"user\"},\n {\"limit.balance.period\": \"day\"},\n {\"limit.balance.amount\": 10},\n {\"access\": [\n \"add_website\",\n \"audit_settings\",\n \"report_manual\",\n \"report_scheduled\",\n \"report_template\"\n ]}\n ]\n }\n]'" + } + ] + }, + "delete": { + "operationId": "deleteSubAccount", + "tags": [ + "Account Management" + ], + "summary": "Delete sub-account", + "description": "Deletes a sub-account.\n\nIf successful, the server returns an empty array. Returns HTTP `404` if the sub-account is not found (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/account-management/#delete-sub-account" + }, + "parameters": [ + { + "name": "user_id", + "in": "query", + "required": true, + "description": "Unique sub-account ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": {} + }, + "example": [] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X DELETE 'https://api.seranking.com/v1/project-management/users?user_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "patch": { + "operationId": "updateSubAccount", + "tags": [ + "Account Management" + ], + "summary": "Update sub-account", + "description": "Updates an existing sub-account.\n\nThe request body must contain a `data` object with sub-account configuration.\n\nIf successful, the server returns an empty array. Returns HTTP `404` if the sub-account is not found (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/account-management/#update-sub-account" + }, + "parameters": [ + { + "name": "user_id", + "in": "query", + "required": true, + "description": "Unique sub-account ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "setting": { + "type": "object", + "properties": { + "account_email": { + "type": "string", + "description": "Sub-account email." + }, + "account_first_name": { + "type": "string", + "description": "Sub-account first name." + }, + "account_last_name": { + "type": "string", + "description": "Sub-account last name." + }, + "account_password": { + "type": "string", + "description": "Sub-account password." + }, + "account_lang": { + "type": "string", + "description": "Sub-account language (ISO 639-1 alpha-2)." + }, + "account_type": { + "type": "string", + "description": "Account type: `user` or `client`." + } + } + }, + "limit": { + "type": "object", + "properties": { + "balance": { + "type": "object", + "properties": { + "period": { + "type": "string", + "description": "Limit period: `day`, `week`, `month`." + }, + "amount": { + "type": "integer", + "description": "Monetary limit value." + } + } + } + } + }, + "access": { + "type": "array", + "items": {}, + "description": "List of [permission codes](https://seranking.com/api/project/sub-account-management/#permissions)." + }, + "key": { + "type": "string" + }, + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "setting.account_email": { + "type": "string" + }, + "setting.account_first_name": { + "type": "string" + }, + "setting.account_last_name": { + "type": "string" + }, + "setting.account_password": { + "type": "string" + }, + "setting.account_type": { + "type": "string" + }, + "limit.balance.period": { + "type": "string" + }, + "limit.balance.amount": { + "type": "integer" + }, + "access": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "example": [ + { + "key": "data", + "value": [ + { + "setting.account_email": "test@gmail.com" + }, + { + "setting.account_first_name": "Test" + }, + { + "setting.account_last_name": "Test" + }, + { + "setting.account_password": "TestPassword" + }, + { + "setting.account_type": "user" + }, + { + "limit.balance.period": "day" + }, + { + "limit.balance.amount": 10 + }, + { + "access": [ + "add_website" + ] + } + ] + } + ] + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": {} + }, + "example": [] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X PATCH 'https://api.seranking.com/v1/project-management/users?user_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '[\n {\n \"key\":\"data\",\n \"value\": [\n {\"setting.account_email\":\"test@gmail.com\"},\n {\"setting.account_first_name\":\"Test\"},\n {\"setting.account_last_name\":\"Test\"},\n {\"setting.account_password\":\"TestPassword\"},\n {\"setting.account_type\":\"user\"},\n {\"limit.balance.period\":\"day\"},\n {\"limit.balance.amount\":10},\n {\"access\":[\"add_website\"]}\n ]\n }\n]'" + } + ] + } + }, + "/v1/project-management/users/shared-sites": { + "get": { + "operationId": "listSharedProjects", + "tags": [ + "Account Management" + ], + "summary": "List shared projects", + "description": "Returns website IDs shared with the sub-account.\n\nIf successful, the server returns the `200` HTTP status code and an array of website IDs.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/account-management/#list-shared-projects" + }, + "parameters": [ + { + "name": "user_id", + "in": "query", + "required": true, + "description": "Unique sub-account ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer" + } + }, + "example": [ + 39, + 44 + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/users/shared-sites?user_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "post": { + "operationId": "shareProjectWithSubAccount", + "tags": [ + "Account Management" + ], + "summary": "Share project with sub-account", + "description": "Shares websites with a sub-account.\n\nIf successful, the server returns an empty array.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/account-management/#share-projects-with-sub-account" + }, + "parameters": [ + { + "name": "user_id", + "in": "query", + "required": true, + "description": "Unique sub-account ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer" + } + }, + "example": [ + 39, + 42 + ] + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": {} + }, + "example": [] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/project-management/users/shared-sites?user_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '[39, 42]'" + } + ] + } + }, + "/v1/project-management/users/owned-sites": { + "get": { + "operationId": "listOwnedProjects", + "tags": [ + "Account Management" + ], + "summary": "List owned projects", + "description": "Returns a list of website IDs owned by the specified sub-account.\n\nIf successful, the server returns an array of unique website IDs.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/account-management/#list-owned-projects" + }, + "parameters": [ + { + "name": "user_id", + "in": "query", + "required": true, + "description": "Unique sub-account ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer" + } + }, + "example": [ + 39, + 40 + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/users/owned-sites?user_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/sites": { + "get": { + "operationId": "listProjects", + "tags": [ + "Project Management" + ], + "summary": "List projects", + "description": "Returns a list of all projects available in the user account.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-management/#list-projects" + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Unique project (site) ID." + }, + "title": { + "type": "string", + "description": "Project name." + }, + "name": { + "type": "string", + "description": "Website URL associated with the project." + }, + "group_id": { + "type": "integer", + "description": "Project group ID." + }, + "is_active": { + "type": "integer", + "description": "Project status:\n• `1` – active\n• `0` – delayed" + }, + "exact_url": { + "type": "integer", + "description": "If `1`, ranking positions are checked only for the specified URL, excluding subfolders and subdomains." + }, + "subdomain_match": { + "type": "integer", + "description": "If `1`, SERP subdomains are taken into account." + }, + "depth": { + "type": "integer", + "description": "Ranking position collection depth." + }, + "check_freq": { + "type": "string", + "description": "Frequency of ranking checks." + }, + "check_day": { + "nullable": true, + "description": "• If `check_freq` is `check_weekly`, represents the day of the week (1 – Monday to 7 – Sunday). \n• If `check_freq` is `check_monthly`, represents the day of the month (1 – 31).", + "type": "integer" + }, + "guest_link": { + "type": "string", + "description": "Guest link to view project statistics without authorization." + } + } + } + }, + "example": [ + { + "id": 1, + "title": "zniqpf tfallp mykqeg", + "name": "Cronin.info", + "group_id": 0, + "is_active": 1, + "exact_url": 0, + "subdomain_match": 0, + "depth": 100, + "check_freq": "check_daily", + "check_day": null, + "guest_link": "https://seranking.com/guest.html?site_id=1&hv=0&hash=432&tab=detailed" + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/sites' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "post": { + "operationId": "addProject", + "tags": [ + "Project Management" + ], + "summary": "Add project", + "description": "Creates a new project in the user account.\n\nIf successful, the server returns the `201` HTTP code and the ID of the project added to the account.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-management/#adding-a-project" + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Website URL." + }, + "title": { + "type": "string", + "description": "Project name." + }, + "depth": { + "type": "integer", + "description": "Ranking collection depth (100, 200). Defaults to 100." + }, + "subdomain_match": { + "type": "integer", + "description": "Include subdomains in SERPs (`1` – yes, `0` – no). Defaults to `0`." + }, + "exact_url": { + "type": "integer", + "description": "Track only the specified URL (`1` – yes, `0` – no). Defaults to `0`." + }, + "check_freq": { + "type": "string", + "description": "Check frequency (`check_daily`, `check_1in3`, `check_weekly`, `check_monthly`, `manual`). Defaults to `check_daily`." + }, + "auto_reports": { + "type": "integer", + "description": "Enable weekly reports (`1` – yes, `0` – no). Defaults to `1`." + }, + "disable_audit": { + "type": "integer", + "description": "Disable website audit (`1` – yes, `0` – no). Defaults to `0`." + }, + "site_group_id": { + "type": "integer", + "description": "Project group ID." + }, + "check_day": { + "type": "integer", + "description": "Day of week (1–7) for weekly checks or day of month (1–31) for monthly checks." + }, + "is_active": { + "type": "integer", + "description": "Project status (`1` – active, `0` – delayed)." + } + }, + "required": [ + "url", + "title" + ] + }, + "example": { + "url": "http://test.site/", + "title": "seo site" + } + } + } + }, + "responses": { + "201": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "site_id": { + "type": "integer", + "description": "ID of the created project." + } + } + }, + "example": { + "site_id": 507052 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/project-management/sites' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '[{\"url\": \"http://test.site/\",\"title\": \"seo site\"}]'" + } + ] + }, + "patch": { + "operationId": "changeProjectSettings", + "tags": [ + "Project Management" + ], + "summary": "Change project settings", + "description": "Updates the settings of the specified project.\n\nIf successful, the server returns the `200` HTTP code.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-management/#change-project-settings" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "description": "Shown in the documented request example.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Website URL." + }, + "title": { + "type": "string", + "description": "Project name." + }, + "depth": { + "type": "integer", + "description": "Ranking collection depth (100, 200). Defaults to 100." + }, + "subdomain_match": { + "type": "integer", + "description": "Include subdomains in SERPs (`1` – yes, `0` – no). Defaults to `0`." + }, + "exact_url": { + "type": "integer", + "description": "Track only the specified URL (`1` – yes, `0` – no). Defaults to `0`." + }, + "check_freq": { + "type": "string", + "description": "Check frequency (`check_daily`, `check_1in3`, `check_weekly`, `check_monthly`, `manual`). Defaults to `check_daily`." + }, + "site_group_id": { + "type": "integer", + "description": "Project group ID." + }, + "check_day": { + "type": "integer", + "description": "Day of week (1–7) for weekly checks or day of month (1–31) for monthly checks." + }, + "is_active": { + "type": "integer", + "description": "Project status (`1` – active, `0` – delayed)." + } + } + }, + "example": { + "title": "new site title" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + } + }, + "delete": { + "operationId": "deleteProject", + "tags": [ + "Project Management" + ], + "summary": "Delete project", + "description": "Deletes the specified project from the user account.\n\nIf successful, the server returns the `204` HTTP code.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-management/#delete-project" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Unique project (site) ID.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X DELETE 'https://api.seranking.com/v1/project-management/sites?site_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/sites/search-engines": { + "get": { + "operationId": "listProjectSearchEngines", + "tags": [ + "Project Management" + ], + "summary": "List project search engines", + "description": "Returns a list of search engines configured for the specified project.\n\nIf successful, the server returns the `200` HTTP code and a JSON array of search engines associated with the project. If an error occurs (e.g., unknown `search_engine_id` or `site_engine_id`), the API returns the corresponding HTTP status code and error message. See [Error handling](https://seranking.com/api/project/getting-started/#error-handling) for possible error codes.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-management/#list-project-search-engines" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "description": "Shown in the documented request example.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "site_engine_id": { + "type": "integer", + "description": "Unique ID of the search engine configuration within the project." + }, + "search_engine_id": { + "type": "integer", + "description": "Search engine ID (refer to `/system/search-engines`)." + }, + "region_id": { + "type": "integer", + "description": "Region ID." + }, + "region_name": { + "nullable": true, + "description": "Region name. Only applicable to Google.", + "type": "string" + }, + "lang_code": { + "type": "string", + "description": "Language code (refer to `/system/google-langs`)." + }, + "merge_map": { + "type": "integer", + "description": "Google Maps SERPs handling mode:\n• 0 – don’t include\n• 1 – include\n• 2 – include and display separately" + }, + "business_name": { + "nullable": true, + "description": "Business name used for Google Maps SERPs.", + "type": "string" + }, + "phone": { + "nullable": true, + "description": "Company phone number used for Google Maps SERPs.", + "type": "string" + }, + "paid_results": { + "type": "integer", + "description": "Track rankings in Google Ads: `1` – yes, `0` – no." + }, + "featured_snippet": { + "type": "integer", + "description": "Track Featured Snippet results:\n• 1 – include\n• 0 – exclude" + }, + "keyword_count": { + "type": "integer", + "description": "Number of keywords assigned to this search engine configuration." + } + } + } + }, + "example": [ + { + "site_engine_id": 1, + "search_engine_id": 339, + "region_id": 0, + "region_name": null, + "lang_code": "ru", + "merge_map": 0, + "business_name": null, + "phone": null, + "paid_results": 0, + "featured_snippet": 0, + "keyword_count": 10 + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/sites/search-engines?site_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "post": { + "operationId": "addSearchEngineToProject", + "tags": [ + "Project Management" + ], + "summary": "Add search engine to project", + "description": "Adds a new search engine configuration to the specified project.\n\nIf successful, the server returns the `201` HTTP code and the `site_engine_id` of the newly added search engine configuration. If an error occurs (e.g., unknown `search_engine_id`), the API returns the corresponding HTTP status code and error message (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-management/#add-search-engine-to-project" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Unique project (site) ID.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "search_engine_id": { + "type": "integer", + "description": "Search engine ID (refer to `/system/search-engines`)." + }, + "region_id": { + "type": "integer", + "description": "Region ID." + }, + "region_name": { + "type": "string", + "description": "Geographical name (region or city) in English. Only applicable to Google.", + "nullable": true + }, + "lang_code": { + "type": "string", + "description": "Language code (refer to `/system/google-langs`)." + }, + "merge_map": { + "type": "integer", + "description": "Google Maps SERPs handling mode:\n• 0 – don’t include\n• 1 – include\n• 2 – include and display separately" + }, + "business_name": { + "type": "string", + "description": "Business name for Google Maps SERPs.", + "nullable": true + }, + "phone": { + "type": "string", + "description": "Company phone number for Google Maps SERPs.", + "nullable": true + }, + "paid_results": { + "type": "integer", + "description": "Track rankings in Google Ads: `1` – yes, `0` – no." + }, + "featured_snippet": { + "type": "integer", + "description": "Track Featured Snippet results:\n• 1 – include\n• 0 – exclude" + } + }, + "required": [ + "search_engine_id" + ] + }, + "example": { + "search_engine_id": 339, + "region_id": 0, + "region_name": null, + "lang_code": "ru", + "merge_map": 0, + "business_name": null, + "phone": null, + "paid_results": 0, + "featured_snippet": 0 + } + } + } + }, + "responses": { + "201": { + "description": "Successful response." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/project-management/sites/search-engines?site_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"search_engine_id\": 339,\n \"region_id\": 0,\n \"region_name\": null,\n \"lang_code\": \"ru\",\n \"merge_map\": 0,\n \"business_name\": null,\n \"phone\": null,\n \"paid_results\": 0,\n \"featured_snippet\": 0\n}'" + } + ] + }, + "patch": { + "operationId": "changeSearchEngineInProject", + "tags": [ + "Project Management" + ], + "summary": "Change search engine in project", + "description": "Updates an existing search engine configuration for the specified project.\n\nIf successful, the server returns the `200` HTTP code. If an error occurs (e.g., unknown `site_engine_id`), the API returns the corresponding HTTP status code and error message (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-management/#change-search-engine-in-project" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Unique project (site) ID.", + "schema": { + "type": "integer" + } + }, + { + "name": "site_engine_id", + "in": "query", + "required": true, + "description": "Unique ID of the search engine configuration within the project.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "region_id": { + "type": "integer", + "description": "Region ID." + }, + "region_name": { + "type": "string", + "description": "Geographical name (region or city) in English. Only applicable to Google.", + "nullable": true + }, + "lang_code": { + "type": "string", + "description": "Language code (refer to `/system/google-langs`)." + }, + "merge_map": { + "type": "integer", + "description": "Google Maps SERPs handling mode:\n• 0 – don’t include\n• 1 – include\n• 2 – include and display separately" + }, + "business_name": { + "type": "string", + "description": "Business name for Google Maps SERPs.", + "nullable": true + }, + "phone": { + "type": "string", + "description": "Company phone number for Google Maps SERPs.", + "nullable": true + }, + "paid_results": { + "type": "integer", + "description": "Track rankings in Google Ads: `1` – yes, `0` – no." + }, + "featured_snippet": { + "type": "integer", + "description": "Track Featured Snippet results:\n• 1 – include\n• 0 – exclude" + } + } + }, + "example": { + "region_id": 0, + "region_name": null, + "lang_code": "ru", + "merge_map": 0, + "business_name": null, + "phone": null, + "paid_results": 0, + "featured_snippet": 0 + } + } + } + }, + "responses": { + "200": { + "description": "Successful response." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + } + }, + "delete": { + "operationId": "deleteSearchEngineFromProject", + "tags": [ + "Project Management" + ], + "summary": "Delete search engine from project", + "description": "Removes a search engine configuration from the specified project.\n\nIf successful, the server returns the `204` HTTP code. If an error occurs, the API returns the corresponding HTTP status code and error message (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-management/#delete-search-engine-from-project" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Unique project (site) ID.", + "schema": { + "type": "integer" + } + }, + { + "name": "site_engine_id", + "in": "query", + "required": true, + "description": "Unique ID of the search engine configuration within the project.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X DELETE 'https://api.seranking.com/v1/project-management/sites/search-engines?site_id=123&site_engine_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/keywords": { + "get": { + "operationId": "listWebsiteKeywords", + "tags": [ + "Project Management" + ], + "summary": "List website keywords", + "description": "Returns a list of keywords for the specified project, including their assigned target URLs and basic statistics.\n\nIf successful, the server returns the `200` HTTP code and a JSON array of project keywords. If an error occurs, the API returns the corresponding HTTP status code and error message (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-management/#website-keyword-list" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Unique project (site) ID.", + "schema": { + "type": "integer" + } + }, + { + "name": "site_engine_id", + "in": "query", + "description": "Unique ID of the search engine configuration within the project. If provided, `first_check_date` is returned.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique keyword ID." + }, + "name": { + "type": "string", + "description": "Keyword text." + }, + "group_id": { + "type": "string", + "description": "Keyword group ID." + }, + "link": { + "type": "string", + "nullable": true, + "description": "Target URL assigned to the keyword." + }, + "first_check_date": { + "type": "string", + "nullable": true, + "description": "Date of the first ranking check (`YYYY-MM-DD`)." + }, + "tags": { + "type": "array", + "items": { + "description": "List of tag IDs assigned to the keyword." + }, + "description": "List of tag IDs assigned to the keyword." + } + } + } + }, + "example": [ + { + "id": "1", + "name": "key1", + "group_id": "2", + "link": null, + "first_check_date": "2015-02-17" + }, + { + "id": "2", + "name": "key2", + "group_id": "2", + "link": "http://mysite.com/", + "first_check_date": null, + "tags": [] + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/keywords?site_id=123&site_engine_id=NNN' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "post": { + "operationId": "addKeywordsToProject", + "tags": [ + "Project Management" + ], + "summary": "Add keywords to project", + "description": "Adds new keywords to the specified project.\n\nIf successful, the server returns an object containing the number of added keywords. Returns HTTP `400` if no keywords are specified (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-management/#add-queries-to-project" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "description": "Shown in the documented request example.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "keyword": { + "type": "string", + "description": "Keyword text." + }, + "group_id": { + "type": "integer", + "description": "Keyword group ID. If omitted, the default group is used." + }, + "target_url": { + "type": "string", + "description": "Target URL assigned to the keyword." + }, + "is_strict": { + "type": "integer", + "description": "Check positions only for the specified target URL (`1` – yes, `0` – no). Defaults to `0`." + }, + "comment": { + "type": "string", + "description": "Comment for the keyword." + }, + "site_engine_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Array of search engine IDs where the keyword should be tracked." + } + }, + "required": [ + "keyword" + ] + } + }, + "example": [ + { + "keyword": "text", + "group_id": 1, + "target_url": "http://site.com/", + "is_strict": 0, + "comment": "text", + "site_engine_ids": [ + 20, + 21 + ] + } + ] + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "added": { + "type": "integer", + "description": "Number of successfully added queries to the project." + }, + "ids": { + "type": "array", + "items": { + "type": "integer", + "description": "Array of IDs of added keywords." + }, + "description": "Array of IDs of added keywords." + } + } + }, + "example": { + "added": 3, + "ids": [ + 123, + 456, + 789 + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/project-management/keywords?site_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '[\n {\n \"keyword\":\"text\",\n \"group_id\":1,\n \"target_url\": \"http://site.com/\",\n \"is_strict\": 0,\n \"comment\":\"text\",\n \"site_engine_ids\": [20,21]\n }\n]'" + } + ] + }, + "patch": { + "operationId": "updateKeywordFromProject", + "tags": [ + "Project Management" + ], + "summary": "Update keyword from project", + "description": "Adds new keywords to the specified project.\n\nIf successful, the server returns an object containing the number of added keywords. Returns HTTP `400` if no keywords are specified (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-management/#add-queries-to-project" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "description": "Shown in the documented request example.", + "schema": { + "type": "integer" + } + }, + { + "name": "keyword_id", + "in": "query", + "description": "Shown in the documented request example.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "keyword": { + "type": "string", + "description": "Keyword text." + }, + "group_id": { + "type": "integer", + "description": "Keyword group ID. If omitted, the default group is used." + }, + "target_url": { + "type": "string", + "description": "Target URL assigned to the keyword." + }, + "is_strict": { + "type": "integer", + "description": "Check positions only for the specified target URL (`1` – yes, `0` – no). Defaults to `0`." + }, + "comment": { + "type": "string", + "description": "Comment for the keyword." + }, + "site_engine_ids": { + "type": "array", + "items": {}, + "description": "Array of search engine IDs where the keyword should be tracked." + } + }, + "required": [ + "keyword" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "added": { + "type": "integer", + "description": "Number of successfully added queries to the project." + }, + "ids": { + "type": "array", + "items": { + "type": "integer", + "description": "Array of IDs of added keywords." + }, + "description": "Array of IDs of added keywords." + } + } + }, + "example": { + "added": 3, + "ids": [ + 123, + 456, + 789 + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + } + }, + "delete": { + "operationId": "deleteKeywords", + "tags": [ + "Project Management" + ], + "summary": "Delete keywords", + "description": "Deletes keywords from the specified project.\n\nIf successful, the server returns the `204` HTTP code. Returns HTTP `400` if no keyword IDs are specified (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-management/#delete-keywords" + }, + "parameters": [ + { + "name": "keywords_ids", + "in": "query", + "required": true, + "description": "Array of keyword IDs to delete.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "site_id", + "in": "query", + "description": "Shown in the documented request example.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X DELETE 'https://api.seranking.com/v1/project-management/keywords?site_id=123&keywords_ids[]=123&keywords_ids[]=123&123' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/sites/summary": { + "get": { + "operationId": "getProjectSummary", + "tags": [ + "Project Management" + ], + "summary": "Get project summary", + "description": "Returns summary statistics for the specified project.\n\nIf successful, the server returns HTTP `200` and a JSON object containing summary metrics.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-management/#summary-statistics" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Unique project (site) ID.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "site_id": { + "type": "integer", + "description": "Unique website ID." + }, + "name": { + "type": "string", + "description": "Website domain." + }, + "group_id": { + "nullable": true, + "description": "Project group ID.", + "type": "integer" + }, + "title": { + "type": "string", + "description": "Project title." + }, + "today_avg": { + "type": "integer", + "description": "Average position for the latest ranking check date." + }, + "yesterday_avg": { + "type": "integer", + "description": "Average position for the previous ranking check date." + }, + "total_up": { + "type": "integer", + "description": "Total number of positions that improved in SERPs." + }, + "total_down": { + "type": "integer", + "description": "Total number of positions that declined in SERPs." + }, + "process": { + "type": "string", + "description": "Percentage of processed website positions." + }, + "top5": { + "type": "integer", + "description": "Number of keywords ranking in the top 5." + }, + "top10": { + "type": "integer", + "description": "Number of keywords ranking in the top 10." + }, + "top30": { + "type": "integer", + "description": "Number of keywords ranking in the top 30." + }, + "visibility": { + "type": "integer", + "description": "Traffic forecast value." + }, + "visibility_percent": { + "type": "number", + "description": "Visibility percentage." + }, + "da": { + "type": "integer", + "description": "Moz Domain Authority." + }, + "index_google": { + "type": "integer", + "description": "Number of pages indexed in Google." + }, + "index_x": {} + } + }, + "example": { + "site_id": 123, + "name": "site1.com", + "group_id": null, + "title": "my site", + "today_avg": 123, + "yesterday_avg": 111, + "total_up": 0, + "total_down": 5, + "process": "99.9", + "top5": 1, + "top10": 2, + "top30": 3, + "visibility": 2, + "visibility_percent": 30, + "da": 4, + "index_google": 200, + "index_x": null + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/sites/summary?site_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/sites/positions": { + "get": { + "operationId": "getKeywordStatistics", + "tags": [ + "Project Management" + ], + "summary": "Get keyword statistics", + "description": "Returns keyword ranking statistics for the specified project within a selected time period.\n\nIf successful, the server returns a JSON array grouped by `site_engine_id`, containing keyword statistics for the specified period. If an error occurs (e.g., invalid `site_engine_id`), the API returns the corresponding HTTP status code and error message (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-management/#keyword-statistics" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Unique project (site) ID.", + "schema": { + "type": "integer" + } + }, + { + "name": "date_from", + "in": "query", + "description": "Start date of the time period (`YYYY-MM-DD`). The default is today minus one week.", + "schema": { + "type": "string" + } + }, + { + "name": "date_to", + "in": "query", + "description": "End date of the time period (`YYYY-MM-DD`). The default is today.", + "schema": { + "type": "string" + } + }, + { + "name": "site_engine_id", + "in": "query", + "description": "Search engine configuration ID. If not specified, data for all search engines is returned.", + "schema": { + "type": "integer" + } + }, + { + "name": "in_top", + "in": "query", + "description": "Filter by ranking position. Example: `in_top=10` returns keywords ranking in the TOP 10 at the last check date within the selected period.", + "schema": { + "type": "integer" + } + }, + { + "name": "with_landing_pages", + "in": "query", + "description": "Landing page URLs found in SERPs (`1` – include).", + "schema": { + "type": "integer" + } + }, + { + "name": "with_serp_features", + "in": "query", + "description": "Detected Google SERP features (`1` – include).", + "schema": { + "type": "integer" + } + }, + { + "name": "with_content_score", + "in": "query", + "description": "Per-keyword Content Score (`1` – include).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "site_engine_id": { + "type": "integer", + "description": "Search engine configuration ID." + }, + "keywords": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique keyword ID." + }, + "positions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Date (`YYYY-MM-DD`)." + }, + "pos": { + "type": "integer", + "description": "Current ranking position." + }, + "change": { + "type": "integer", + "description": "Change in position compared to the previous date (could be negative)." + }, + "price": { + "type": "integer", + "description": "Price calculated from financial report settings." + }, + "is_map": { + "type": "integer", + "description": "Results where the position was found:\n• `0` – organic search results\n• `1` – maps block" + }, + "map_position": { + "type": "integer", + "description": "Position in the maps block when `merge_map` is `2` (i.e., “Display organic and maps results separately” is enabled)." + }, + "paid_position": { + "type": "integer", + "description": "Position in paid Google SERPs." + } + }, + "description": "Ranking positions by date." + }, + "description": "Ranking positions by date." + }, + "volume": { + "type": "integer", + "description": "Search volume." + }, + "competition": { + "type": "integer", + "description": "Competition level." + }, + "suggested_bid": { + "type": "integer", + "description": "Estimated cost per click." + }, + "kei": { + "type": "integer", + "description": "Keyword Efficiency Index." + }, + "results": { + "type": "integer", + "description": "Number of search results in Google." + }, + "content_score": { + "type": "integer", + "description": "Content Score for the keyword (`0–100`), based on Top-10 competitors. `null` when no score is available." + }, + "content_score_change": { + "type": "integer", + "description": "Content Score change versus the previous check. `null` when there is no previous score to compare." + }, + "total_sum": { + "type": "integer", + "description": "Price per keyword (based on financial report settings)." + }, + "landing_pages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "date": { + "type": "string", + "description": "Date (`YYYY-MM-DD`)." + } + }, + "description": "Landing page data:\n`date` – ranking check date (`YYYY-MM-DD`)\n`url` – page URL in SERPs for the keyword" + }, + "description": "Landing page data:\n`date` – ranking check date (`YYYY-MM-DD`)\n`url` – page URL in SERPs for the keyword" + }, + "features": { + "type": "object", + "properties": { + "tads": { + "type": "boolean" + }, + "knowledge_graph": { + "type": "boolean" + }, + "images": { + "type": "boolean" + }, + "sitelinks": { + "type": "boolean" + }, + "reviews": { + "type": "boolean" + } + }, + "description": "Detected SERP features. Each field is `true` if the feature links to the project’s website; otherwise `false`." + } + }, + "description": "List of keywords with statistics." + }, + "description": "List of keywords with statistics." + } + } + } + }, + "example": [ + { + "site_engine_id": 1, + "keywords": [ + { + "id": "12", + "positions": [ + { + "date": "2017-12-19", + "pos": 18, + "change": 0, + "price": 0, + "is_map": 0, + "map_position": 0, + "paid_position": 0 + } + ], + "volume": 390, + "competition": 3, + "suggested_bid": 1, + "kei": 1, + "results": 100, + "content_score": 66, + "content_score_change": -2, + "total_sum": 0, + "landing_pages": [ + { + "url": "https://domain.com/page.html", + "date": "2017-12-14" + } + ], + "features": { + "tads": true, + "knowledge_graph": true, + "images": true, + "sitelinks": true, + "reviews": false + } + } + ] + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/sites/positions?site_id=123&date_from=2018-01-01&date_to=2018-01-07&site_engine_id=1&with_landing_pages=1&with_serp_features=1&with_content_score=1' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "patch": { + "operationId": "setManualKeywordPosition", + "tags": [ + "Project Management" + ], + "summary": "Set manual keyword position", + "description": "Sets a ranking position for a project keyword on a specified date.\n\nIf successful, the server returns the `200` HTTP code.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-management/#set-manual-position" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "description": "Shown in the documented request example.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "keyword_id": { + "type": "integer", + "description": "Unique keyword ID (refer to `https://api4.seranking.com/sites/{site_id}/keywords`)." + }, + "date": { + "type": "string", + "description": "Date of the ranking record." + }, + "site_engine_id": { + "type": "integer", + "description": "Search engine configuration ID (refer to `https://api4.seranking.com/sites/{site_id}/search-engines`)." + }, + "position": { + "type": "integer", + "description": "Position (0 – 200). `0` – means “not found”." + } + }, + "required": [ + "keyword_id", + "date", + "site_engine_id", + "position" + ] + }, + "example": { + "keyword_id": 1, + "date": "2018-01-01", + "position": 100, + "site_engine_id": 1 + } + } + } + }, + "responses": { + "200": { + "description": "Successful response." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X PATCH 'https://api.seranking.com/v1/project-management/sites/positions?site_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"keyword_id\": 1,\"date\": \"2018-01-01\",\"position\":100,\"site_engine_id\": 1}'" + } + ] + } + }, + "/v1/project-management/sites/ads-stats": { + "get": { + "operationId": "getTotalNumberOfAdsChart", + "tags": [ + "Project Management" + ], + "summary": "Get total number of ads chart", + "description": "Returns the total number of top and bottom advertisements in search results by date for the specified project. Data can be filtered by search engines, keywords, and date range.\n\nAll parameters are query parameters.\n\nIf successful, the server returns the HTTP `200` code and an array grouped by `site_engine_id`. A maximum of 100,000 records is returned.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-management/#total-number-of-ads-chart" + }, + "parameters": [ + { + "name": "date_from", + "in": "query", + "description": "Start date of the period (`YYYY-MM-DD` format). Defaults to today minus one week.", + "schema": { + "type": "string" + } + }, + { + "name": "date_to", + "in": "query", + "description": "End date of the period (`YYYY-MM-DD` format). Defaults to today.", + "schema": { + "type": "string" + } + }, + { + "name": "site_engine_ids", + "in": "query", + "description": "Search engine ID filter. If not specified, data for all search engines is returned.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "keywords_ids", + "in": "query", + "description": "Keyword ID filter. If not specified, data for all keywords is returned.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "site_id", + "in": "query", + "description": "Shown in the documented request example.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "site_engine_id": { + "type": "integer", + "description": "Search engine configuration ID." + }, + "keywords": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Keyword ID." + }, + "ads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Date (in `YYYY-MM-DD`)." + }, + "tads": { + "type": "integer", + "description": "Total number of top ads." + }, + "bads": { + "type": "integer", + "description": "Total number of bottom ads." + } + }, + "description": "Daily advertisement statistics." + }, + "description": "Daily advertisement statistics." + } + }, + "description": "Array of keywords with advertisement statistics." + }, + "description": "Array of keywords with advertisement statistics." + } + } + } + }, + "example": [ + { + "site_engine_id": 1, + "keywords": [ + { + "id": 1, + "ads": [ + { + "date": "2020-05-20", + "tads": 2, + "bads": 3 + }, + { + "date": "2020-05-21", + "tads": 3, + "bads": 2 + } + ] + }, + { + "id": 2, + "ads": [ + { + "date": "2020-05-20", + "tads": 0, + "bads": 0 + }, + { + "date": "2020-05-21", + "tads": 0, + "bads": 1 + } + ] + } + ] + }, + { + "site_engine_id": 2, + "keywords": [ + { + "id": 1, + "ads": [ + { + "date": "2020-05-20", + "tads": 1, + "bads": 1 + }, + { + "date": "2020-05-21", + "tads": 2, + "bads": 2 + } + ] + }, + { + "id": 2, + "ads": [ + { + "date": "2020-05-20", + "tads": 0, + "bads": 2 + }, + { + "date": "2020-05-21", + "tads": 5, + "bads": 1 + } + ] + } + ] + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/sites/ads-stats?site_id=123&date_from=2020-05-20&date_to=2020-05-21&site_engine_ids[]=1&site_engine_ids[]=2&keywords_ids[]=1&keywords_ids[]=1' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/sites/positions/checkpoints": { + "get": { + "operationId": "getHistoricalDates", + "tags": [ + "Project Management" + ], + "summary": "Get historical dates", + "description": "Returns a list of historical dates used to build ranking position comparison charts for the specified project.\n\nThe following logical periods are supported:\n\n- current\n\n- day_ago\n\n- 7days\n\n- 30days\n\n- 90days\n\n- 180days\n\n- first\n\nIf no ranking check occurred on a specific date, the closest available check date is returned.\n\nIf successful, the server returns the HTTP `200` code and an object containing date mappings.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-management/#historical-dates" + }, + "parameters": [ + { + "name": "site_engine_id", + "in": "query", + "description": "Search engine configuration ID. If omitted, dates are returned for all search engines.", + "schema": { + "type": "integer" + } + }, + { + "name": "site_id", + "in": "query", + "description": "Shown in the documented request example.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "current": { + "type": "string", + "description": "Current check date (in `YYYY-MM-DD`)." + }, + "day_ago": { + "type": "string", + "description": "Closest date to one day ago." + }, + "7days": { + "type": "string", + "description": "Closest date to seven days ago." + } + } + }, + "example": { + "current": "2019-02-20", + "day_ago": "2019-02-19", + "7days": "2019-02-14" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/sites/positions/checkpoints?site_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/sites/positions/recheck": { + "post": { + "operationId": "runPositionCheck", + "tags": [ + "Project Management" + ], + "summary": "Run position check", + "description": "Triggers a ranking position check for selected keywords or for an entire project.\n\n* Required unless `site_engine_id` alone is used to recheck all keywords for that search engine.\n\nIf successful, the server returns the number of keywords scheduled for recheck. Returns HTTP `400` if an unknown `site_engine_id` is provided (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-management/#run-position-check" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "description": "Shown in the documented request example.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "site_engine_id": { + "type": "integer", + "description": "Search engine configuration ID." + }, + "keywords": { + "type": "array", + "items": { + "type": "object", + "properties": { + "site_engine_id": { + "type": "integer" + }, + "keyword_id": { + "type": "integer" + } + } + }, + "description": "List of keyword objects to recheck. If provided, `site_engine_id` is ignored." + }, + "keyword_id": { + "type": "integer", + "description": "Keyword ID." + } + }, + "required": [ + "keywords" + ] + }, + "example": { + "keywords": [ + { + "site_engine_id": 1, + "keyword_id": 2 + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Number of keywords for which the position check was launched." + } + } + }, + "example": { + "total": 5 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/project-management/sites/positions/recheck?site_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{ \"keywords\":[ {\"site_engine_id\":1, \"keyword_id\":2} ]}'" + } + ] + } + }, + "/v1/project-management/sites/check-dates": { + "get": { + "operationId": "listCheckDates", + "tags": [ + "Project Management" + ], + "summary": "List check dates", + "description": "Returns the list of dates on which ranking positions were actually checked for the given project. Each returned date is a real check — pass these values directly as date bounds to other rank-tracking endpoints (e.g. `GET /sites/positions`, `GET /sites/positions/history`) when you need to anchor on a known check.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-management/#run-position-check" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Project ID (returned by `GET /sites`).", + "schema": { + "type": "integer" + } + }, + { + "name": "site_engine_id", + "in": "query", + "description": "Limit to a single project search engine. **Project engine ID** (returned by `GET /sites/search-engines` as `site_engine_id`) — *not* the global `search_engine_id`.", + "schema": { + "type": "integer" + } + }, + { + "name": "date_from", + "in": "query", + "description": "Start date `YYYY-MM-DD`, inclusive. Defaults to `today − 7 days`, clamped to the project’s first check date for younger projects.", + "schema": { + "type": "string" + } + }, + { + "name": "date_to", + "in": "query", + "description": "End date `YYYY-MM-DD`, inclusive. Defaults to today.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "string", + "description": "Check dates, ascending. Each entry is a day on which a position check actually ran for the project (or the single engine if filtered)." + }, + "description": "Check dates, ascending. Each entry is a day on which a position check actually ran for the project (or the single engine if filtered)." + } + } + }, + "example": { + "data": [ + "2026-05-10", + "2026-05-11", + "2026-05-12" + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/sites/check-dates?site_id=11991701&date_from=2026-05-10&date_to=2026-05-12' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d 'Authorization: Token'" + } + ] + } + }, + "/v1/project-management/sites/positions/history": { + "get": { + "operationId": "getRankingTrendsOverTime", + "tags": [ + "Project Management" + ], + "summary": "Get ranking trends over time", + "description": "Returns per-engine and cross-engine **time series** for a project’s rank-tracking metrics. This is the single endpoint behind trend analysis, regression detection, weekly/monthly performance reports, and the in-app position-history chart. By default the response contains:\n\n- **One series per project search engine** (`type: \"search_engine\"`), labelled with the engine’s name.\n\n- **One cross-engine aggregate** (`type: \"avg\"`, `name: \"Average for all\"`).\n\nThe `type` request parameter selects which metric the series carries — see [Metric semantics](#metric-semantics). The aggregation rule the `avg` row uses depends on `type` — see [Cross-engine aggregation](#cross-engine-aggregation).\n\nFilter parameters (`group_id`, `keywords_ids[]`, `tags_ids[]`) **intersect** — a keyword must satisfy every supplied filter to count toward the aggregate. `site_engine_id` is orthogonal: it narrows which engines’ series come back, not which keywords participate.\n\n**Cross-engine aggregation**\n\nFor multi-engine projects, the `avg` row aggregates **differently per `type`**. This is the single biggest thing to keep in mind on this endpoint.\n\n⚠️ **The `Average for all` row is a marketing-grade aggregate, not analytics-grade.** Engine weights are equal regardless of how many keywords each engine tracks, except for `top10` (sum) and `top10_percent` (project-total denominator). On any project with imbalanced engine keyword counts, the `avg` row will misrepresent the project’s true picture. For analytics, ignore `avg`, fetch per-engine series, and recompute with the weighting that matches your question.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-management/#get-ranking-trends-over-time" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Project ID (returned by `GET /sites`).", + "schema": { + "type": "integer" + } + }, + { + "name": "site_engine_id", + "in": "query", + "description": "Limit to a single project search engine. **Project-local engine ID** (from `GET /sites/search-engines`). **Setting this also drops the `avg` row from the response** — see [`avg` row presence](#avg-row-presence).", + "schema": { + "type": "integer" + } + }, + { + "name": "date_from", + "in": "query", + "description": "Start date `YYYY-MM-DD`, inclusive. Defaults to `today − 7 days`, clamped to the project’s first check date for younger projects.", + "schema": { + "type": "string" + } + }, + { + "name": "date_to", + "in": "query", + "description": "End date `YYYY-MM-DD`, inclusive. Defaults to today.", + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "description": "Chart metric. One of `avg_pos`, `visibility`, `visibility_percent`, `top10`, `top10_percent`. Defaults to `avg_pos`.", + "schema": { + "type": "string" + } + }, + { + "name": "group_id", + "in": "query", + "description": "Filter to a keyword group ID (from `GET /keywords/groups`).", + "schema": { + "type": "integer" + } + }, + { + "name": "keywords_ids[]", + "in": "query", + "description": "Filter to specific keyword IDs (from `GET /keywords`). Repeat the param for each ID — e.g. `keywords_ids[]=42&keywords_ids[]=99`.", + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + { + "name": "tags_ids[]", + "in": "query", + "description": "Filter to keywords associated with the given landing-page tag IDs (from `GET /sites/url-tags`). Repeat the param for each ID.", + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Human label. For `type: search_engine`, the **global** engine’s name (e.g. `Google USA`). For `type: avg`, the literal `Average for all`. **May be non-unique** — see [Engine `name` can be non-unique](#engine-name-can-be-non-unique)." + }, + "type": { + "type": "string", + "description": "`search_engine` for a per-engine series, `avg` for the cross-engine aggregate." + }, + "search_engine_id": { + "type": "integer", + "nullable": true, + "description": "**Project-local site_engine_id** — matches the `site_engine_id` value returned by `GET /sites/search-engines`, *not* the global engine catalogue ID. The response field is named `search_engine_id` for legacy reasons. `null` on the `avg` row." + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Check date `YYYY-MM-DD`." + }, + "value": { + "description": "Metric value for `type`. **Heterogeneous** — sometimes string, sometimes number. Always coerce with `Number(point.value)` — see [`value` type heterogeneity](#value-type-heterogeneity)." + } + }, + "description": "Time series points, ascending by date. One entry per check date in the requested range. May be **empty** for valid reasons (see [Empty per-engine series](#empty-per-engine-series))." + }, + "description": "Time series points, ascending by date. One entry per check date in the requested range. May be **empty** for valid reasons (see [Empty per-engine series](#empty-per-engine-series))." + } + }, + "description": "Time series points, ascending by date. One entry per check date in the requested range. May be **empty** for valid reasons (see [Empty per-engine series](#empty-per-engine-series))." + }, + "description": "Time series points, ascending by date. One entry per check date in the requested range. May be **empty** for valid reasons (see [Empty per-engine series](#empty-per-engine-series))." + } + } + }, + "example": { + "data": [ + { + "name": "Google USA", + "type": "search_engine", + "search_engine_id": 1167043, + "data": [ + { + "date": "2026-05-10", + "value": "94" + }, + { + "date": "2026-05-11", + "value": "88" + }, + { + "date": "2026-05-12", + "value": "88" + }, + { + "date": "2026-05-13", + "value": "88" + }, + { + "date": "2026-05-14", + "value": "88" + } + ] + }, + { + "name": "Average for all", + "type": "avg", + "search_engine_id": null, + "data": [ + { + "date": "2026-05-10", + "value": 94 + }, + { + "date": "2026-05-11", + "value": 88 + }, + { + "date": "2026-05-12", + "value": 88 + }, + { + "date": "2026-05-13", + "value": 88 + }, + { + "date": "2026-05-14", + "value": 88 + } + ] + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/sites/positions/history?site_id=11991701&type=visibility_percent&date_from=2026-05-10&date_to=2026-05-14' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d 'Authorization: Token'" + } + ] + } + }, + "/v1/project-management/sites/groups": { + "post": { + "operationId": "addProjectGroup", + "tags": [ + "Project Groups" + ], + "summary": "Add project group", + "description": "Adds a new project group to the user account.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-groups/#add-project-group" + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the project group to add." + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "New Project Group" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "description": "ID of the added project group." + } + } + }, + "example": { + "group_id": 9545 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/project-management/sites/groups' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{ \"name\" : \"New Project Group\" }'" + } + ] + }, + "patch": { + "operationId": "renameProjectGroup", + "tags": [ + "Project Groups" + ], + "summary": "Rename project group", + "description": "Renames an existing project group.\n\nIf successful, the server returns the `200` HTTP code. Returns HTTP `400` if no name is specified and HTTP `404` if the group is not found (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-groups/#rename-project-group" + }, + "parameters": [ + { + "name": "group_id", + "in": "query", + "description": "Shown in the documented request example.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "New name for the group." + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "New Group Name" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + } + }, + "delete": { + "operationId": "deleteProjectGroup", + "tags": [ + "Project Groups" + ], + "summary": "Delete project group", + "description": "Deletes a project group from the user account.\n\nIf successful, the server returns the `204` HTTP code. Returns HTTP `404` if the group is not found (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-groups/#delete-project-group" + }, + "parameters": [ + { + "name": "group_id", + "in": "query", + "required": true, + "description": "ID of the group to delete.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X DELETE 'https://api.seranking.com/v1/project-management/sites/groups?group_id=147' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "get": { + "operationId": "listProjectGroups", + "tags": [ + "Project Groups" + ], + "summary": "List project groups", + "description": "Retrieves all project groups for the user account.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-groups/#project-group-list" + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Project group ID." + }, + "name": { + "type": "string", + "description": "Project group name." + } + } + } + }, + "example": [ + { + "id": "123", + "name": "Group1" + }, + { + "id": "456", + "name": "Group2" + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/sites/groups' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/sites/groups/move": { + "post": { + "operationId": "moveProjectsToProjectGroup", + "tags": [ + "Project Groups" + ], + "summary": "Move projects to project group", + "description": "Transfers projects from one group to another.\n\nIf successful, the server returns the `204` HTTP code. Returns HTTP `404` if the group is not found (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/project-groups/#move-projects-to-project-group" + }, + "parameters": [ + { + "name": "group_id", + "in": "query", + "description": "Shown in the documented request example.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "site_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Array of project (site) IDs to move." + } + }, + "required": [ + "site_ids" + ] + }, + "example": { + "site_ids": [ + 1, + 2, + 3, + 4, + 5 + ] + } + } + } + }, + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/project-management/sites/groups/move?group_id=147' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"site_ids\" : [1,2,3,4,5]}'" + } + ] + } + }, + "/v1/project-management/system/search-engines": { + "get": { + "operationId": "listCountrySearchEngines", + "tags": [ + "Search Engine Setup" + ], + "summary": "List country search engines", + "description": "Returns a list of available search engines along with their regions, which can be added to projects for position tracking.\n\nNo parameters.\n\nIf successful, the server returns the `200` HTTP status code and an array of search engines.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/general-data/#list-search-engines" + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique search engine ID." + }, + "name": { + "type": "string", + "description": "Search engine name." + }, + "regionid": { + "type": "string", + "description": "Associated region ID." + } + } + } + }, + "example": [ + { + "id": "200", + "name": "Google USA", + "regionid": "182" + }, + { + "id": "201", + "name": "Google Andorra", + "regionid": "4" + }, + { + "id": "202", + "name": "Google United Arab Emirates", + "regionid": "178" + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/system/search-engines' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/system/google/regions": { + "get": { + "operationId": "listCitiesForSearchEnginesTargeting", + "tags": [ + "Search Engine Setup" + ], + "summary": "List cities for search engines targeting", + "description": "Returns every city and sub-region that search engines tracking can target, grouped by country. The `name` returned here is the value you pass as `region_name` to Add Search Engine / Update Search Engine when you want sub-country targeting (e.g. tracking USA specifically for New York).\n\nNo parameters.\n\nIf successful, the server returns the `200` HTTP status code and an array of regions.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/general-data/#list-regions-to-get-search-volume" + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Full canonical location string in English, formatted `{city}, {region}, {country}`" + }, + "region_id": { + "type": "integer", + "description": "**Country** ID (not city ID)." + } + } + } + }, + "example": [ + { + "name": "New York, New York, United States", + "region_id": 182 + }, + { + "name": "San Francisco, California, United States", + "region_id": 182 + }, + { + "name": "Berlin, Berlin, Germany", + "region_id": 61 + }, + { + "name": "Tokyo, Tokyo, Japan", + "region_id": 83 + }, + { + "name": "Kabul, Kabul, Afghanistan", + "region_id": 1 + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/system/google/regions' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/system/google/languages": { + "get": { + "operationId": "listLanguages", + "tags": [ + "Search Engine Setup" + ], + "summary": "List languages", + "description": "Returns a complete list of supported languages for the Google search engine.\n\nNo parameters.\n\nIf successful, the server returns the `200` HTTP status code and an array of language codes and names.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/general-data/#list-languages-for-google" + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "lang_code": { + "type": "string", + "description": "Language code (ISO 639-1)." + }, + "name": { + "type": "string", + "description": "Language name." + } + } + } + }, + "example": [ + { + "lang_code": "de", + "name": "Deutsch" + }, + { + "lang_code": "en", + "name": "English" + }, + { + "lang_code": "es", + "name": "Español" + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/system/google/languages' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/keywords/groups": { + "post": { + "operationId": "addKeywordGroup", + "tags": [ + "Keyword Groups" + ], + "summary": "Add keyword group", + "description": "Creates a new keyword group for the specified project.\n\nIf successful, the server returns the `201` HTTP status code. Returns HTTP `400` if no name or site ID is specified and HTTP `404` if the site is not found (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/keyword-groups/#add-keyword-group" + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the keyword group to create." + }, + "site_id": { + "type": "integer", + "description": "Project (site) ID to which the group will be added." + } + }, + "required": [ + "name", + "site_id" + ] + }, + "example": { + "name": "groupname", + "site_id": 1 + } + } + } + }, + "responses": { + "201": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "description": "ID of the created keyword group." + } + } + }, + "example": { + "group_id": 123456 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/project-management/keywords/groups' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"name\": \"groupname\",\"site_id\": 1}'" + } + ] + }, + "patch": { + "operationId": "renameKeywordGroup", + "tags": [ + "Keyword Groups" + ], + "summary": "Rename keyword group", + "description": "Renames the specified keyword group.\n\nIf successful, the server returns the `204` HTTP status code. Returns HTTP `400` if no name is specified and HTTP `404` if the group is not found (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/keyword-groups/#rename-keyword-group" + }, + "parameters": [ + { + "name": "group_id", + "in": "query", + "required": true, + "description": "Keyword group ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "New keyword group name." + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "Updated Group Name" + } + } + } + }, + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + } + }, + "delete": { + "operationId": "deleteKeywordGroup", + "tags": [ + "Keyword Groups" + ], + "summary": "Delete keyword group", + "description": "Deletes the specified keyword group.\n\nIf successful, the server returns the `204` HTTP status code. Returns HTTP `404` if the group is not found (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/keyword-groups/#delete-keyword-group" + }, + "parameters": [ + { + "name": "group_id", + "in": "query", + "required": true, + "description": "Keyword group ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X DELETE 'https://api.seranking.com/v1/project-management/keywords/groups?group_id=147' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "get": { + "operationId": "listKeywordGroups", + "tags": [ + "Keyword Groups" + ], + "summary": "List keyword groups", + "description": "Returns a list of keyword groups for the specified project.\n\nIf successful, the server returns the `200` HTTP status code and an array of keyword groups. Returns HTTP `404` if the site is not found (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/keyword-groups/#list-keyword-groups" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Project (site) ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Keyword group ID." + }, + "name": { + "type": "string", + "description": "Keyword group name." + }, + "creation_date": { + "type": "string", + "description": "Date the keyword group was created (in `YYYY-MM-DD`)." + } + } + } + }, + "example": [ + { + "id": "123", + "name": "NewKeyGroup", + "creation_date": "2018-08-27" + }, + { + "id": "456", + "name": "NewKeyGroup1", + "creation_date": "2018-08-27" + }, + { + "id": "789", + "name": "NewKeyGroup2", + "creation_date": "2018-08-27" + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/keywords/groups?site_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/keywords/groups/move": { + "post": { + "operationId": "moveKeywordsToAnotherGroup", + "tags": [ + "Keyword Groups" + ], + "summary": "Move keywords to another group", + "description": "Moves the specified keywords to the target keyword group.\n\nIf successful, the server returns the `204` HTTP status code. Returns HTTP `404` if the group is not found (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/keyword-groups/#move-keywords-to-another-group" + }, + "parameters": [ + { + "name": "group_id", + "in": "query", + "required": true, + "description": "Target keyword group ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "keyword_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Array of keyword IDs to move." + } + }, + "required": [ + "keyword_ids" + ] + }, + "example": { + "keyword_ids": [ + 1, + 2, + 3, + 4, + 5 + ] + } + } + } + }, + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/project-management/keywords/groups/move?group_id=147' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{ \"keyword_ids\": [1,2,3,4,5] }'" + } + ] + } + }, + "/v1/project-management/competitors": { + "post": { + "operationId": "addCompetitor", + "tags": [ + "Competitors" + ], + "summary": "Add competitor", + "description": "Adds a competitor’s website to a project for position tracking.\n\nIf successful, the server returns the `201` HTTP status code. Returns HTTP `400` if the URL is invalid.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/competitors/#add-competitor" + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "site_id": { + "type": "integer", + "description": "Unique project (site) ID." + }, + "url": { + "type": "string", + "description": "Competitor website URL." + }, + "name": { + "type": "string", + "description": "Competitor website name. If not specified, the URL is used." + }, + "subdomain_match": { + "type": "integer", + "description": "Include subdomains (`1` – yes, `0` – no)." + } + }, + "required": [ + "site_id", + "url" + ] + } + } + } + }, + "responses": { + "201": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Competitor ID." + } + } + }, + "example": { + "id": 123456 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/project-management/competitors' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n site_id : 1,\n name : \"name\",\n url : \"http://site.test.com/\"\n}'" + } + ] + }, + "get": { + "operationId": "listCompetitors", + "tags": [ + "Competitors" + ], + "summary": "List competitors", + "description": "Returns a list of competitors added to the specified project.\n\nIf successful, the server returns the `200` HTTP status code and an array of competitors.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/competitors/#list-competitors" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Unique project (site) ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Competitor ID." + }, + "name": { + "type": "string", + "description": "Competitor name." + }, + "url": { + "type": "string", + "description": "Competitor URL." + }, + "domain_trust": { + "type": "integer", + "description": "Competitor Domain Trust." + } + } + } + }, + "example": [ + { + "id": 1, + "name": "competitor1.com", + "url": "competitor1.com", + "domain_trust": 2 + }, + { + "id": 2, + "name": "competitor2.com", + "url": "http://competitor2.com/", + "domain_trust": 4 + }, + { + "id": 3, + "name": "competitor3.com", + "url": "http://competitor3.com", + "domain_trust": 6 + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/competitors?site_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "delete": { + "operationId": "deleteCompetitor", + "tags": [ + "Competitors" + ], + "summary": "Delete competitor", + "description": "Removes a competitor from the specified project.\n\nIf successful, the server returns the `204` HTTP status code. Returns HTTP `404` if the competitor is not found (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/competitors/#delete-competitor" + }, + "parameters": [ + { + "name": "competitor_id", + "in": "query", + "required": true, + "description": "Competitor ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X DELETE 'https://api.seranking.com/v1/project-management/competitors?competitor_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/competitors/positions": { + "get": { + "operationId": "getCompetitorKeywordPositions", + "tags": [ + "Competitors" + ], + "summary": "Get competitor keyword positions", + "description": "Returns ranking statistics for competitor keywords added to the project.\n\nIf successful, the server returns the `200` HTTP status code and ranking data grouped by search engine. Returns HTTP `400` if the `site_engine_id` is invalid and HTTP `404` if the competitor is not found (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/competitors/#get-competitor-keyword-positions" + }, + "parameters": [ + { + "name": "competitor_id", + "in": "query", + "required": true, + "description": "Competitor ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "date_from", + "in": "query", + "description": "Start date (in `YYYY-MM-DD`). Defaults to one week before today.", + "schema": { + "type": "string" + } + }, + { + "name": "date_to", + "in": "query", + "description": "End date (in `YYYY-MM-DD`). Defaults to today.", + "schema": { + "type": "string" + } + }, + { + "name": "site_engine_id", + "in": "query", + "description": "Search engine configuration ID. If not specified, all search engines are included.", + "schema": { + "type": "integer" + } + }, + { + "name": "with_serp_features", + "in": "query", + "description": "Include SERP features (`1` – yes, `0` – no).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "site_engine_id": { + "type": "integer", + "description": "Search engine configuration ID." + }, + "keywords": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Keyword ID." + }, + "positions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Check date (in `YYYY-MM-DD`)." + }, + "pos": { + "type": "integer", + "description": "Current position." + }, + "change": { + "type": "integer", + "description": "Position change compared to previous check." + } + }, + "description": "Array of positions containing statistics on competitor keyword rankings." + }, + "description": "Array of positions containing statistics on competitor keyword rankings." + }, + "name": { + "nullable": true, + "description": "Keyword name (can be `null`).", + "type": "string" + }, + "volume": { + "nullable": true, + "description": "Search volume (can be `null`).", + "type": "integer" + } + }, + "description": "List of keywords." + }, + "description": "List of keywords." + } + } + } + }, + "example": [ + { + "site_engine_id": 123, + "keywords": [ + { + "id": "123", + "positions": [ + { + "date": "2018-07-25", + "pos": 7, + "change": 1 + } + ], + "name": null, + "volume": null + } + ] + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/competitors/positions?competitor_id=123&date_from=2018-07-25&date_to=2018-07-25&site_engine_id=1' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/competitors/serp10": { + "get": { + "operationId": "getTOP10Results", + "tags": [ + "Competitors" + ], + "summary": "Get TOP 10 results", + "description": "Returns the TOP 10 ranking results for a tracked keyword.\n\nIf successful, the server returns the `200` HTTP status code and an array of results.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/competitors/#get-top-10-results" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Project (site) ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "date", + "in": "query", + "required": true, + "description": "Date of getting a list of sites from the TOP 10 (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + }, + { + "name": "site_engine_id", + "in": "query", + "required": true, + "description": "Search engine configuration ID (refer to `api.seranking.com/v1/project-management/keywords`).", + "schema": { + "type": "integer" + } + }, + { + "name": "keyword_id", + "in": "query", + "required": true, + "description": "Unique keyword ID (refer to `api.seranking.com/v1/project-management/keywords`).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "position": { + "type": "integer", + "description": "Position in SERP." + }, + "url": { + "type": "string", + "description": "Page URL." + }, + "keyword_id": { + "type": "integer", + "description": "Keyword ID." + }, + "backlinks": { + "type": "string", + "description": "Total backlinks." + }, + "domains": { + "type": "string", + "description": "Referring domains count." + } + } + } + }, + "example": [ + { + "position": 1, + "url": "https://anandaioga.com/ca/inici", + "keyword_id": 4843813, + "backlinks": "216", + "domains": "57" + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/competitors/serp10?site_id=123&date=2018-01-01&site_engine_id=1&keyword_id=1' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/competitors/serp100": { + "get": { + "operationId": "getTOP100Results", + "tags": [ + "Competitors" + ], + "summary": "Get TOP 100 results", + "description": "Returns a list of up to the TOP 100 results for keywords tracked in a project.\n\nIf successful, the server returns the `200` HTTP status code and ranking results.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/competitors/#get-top-100-results" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Project (site) ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "date", + "in": "query", + "required": true, + "description": "Date of getting a list of the TOP 100 results (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + }, + { + "name": "site_engine_id", + "in": "query", + "required": true, + "description": "Search engine configuration ID (refer to `api.seranking.com/v1/project-management/keywords`).", + "schema": { + "type": "integer" + } + }, + { + "name": "keyword_id", + "in": "query", + "required": true, + "description": "Unique keyword ID (refer to `api.seranking.com/v1/project-management/keywords`).", + "schema": { + "type": "integer" + } + }, + { + "name": "top", + "in": "query", + "description": "Maximum position (0–100).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Page URL." + }, + "position": { + "type": "integer", + "description": "Position in SERP." + }, + "date": { + "type": "string", + "description": "Check date (in `YYYY-MM-DD`)." + }, + "domain_trust": { + "type": "integer", + "description": "Domain Trust value." + } + } + } + }, + "example": [ + { + "url": "https://www.tests.com/login", + "position": 1, + "date": "2018-01-01", + "domain_trust": 2 + }, + { + "url": "https://www.test2.com", + "position": 2, + "domain_trust": 4 + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/competitors/serp100?site_id=123&date=2018-01-01&site_engine_id=1&keyword_id=1&top=50' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/competitors/metrics": { + "get": { + "operationId": "getAllCompetitors", + "tags": [ + "Competitors" + ], + "summary": "Get all competitors", + "description": "Returns domains ranked in the TOP 10 for tracked keywords. History is stored for 14 days.\n\nIf successful, the server returns the `200` HTTP status code and an array of domains.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/competitors/#get-all-competitors" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Project (site) ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "date", + "in": "query", + "required": true, + "description": "Date of getting domains ranked in the TOP 10 (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + }, + { + "name": "site_engine_id", + "in": "query", + "required": true, + "description": "Search engine configuration ID.", + "schema": { + "type": "integer" + } + }, + { + "name": "group_id", + "in": "query", + "description": "Keyword group ID.", + "schema": { + "type": "integer" + } + }, + { + "name": "tags", + "in": "query", + "description": "Keyword tag IDs.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain name." + }, + "domain_id": { + "type": "integer", + "description": "Domain ID." + }, + "visibility": { + "type": "integer", + "description": "Visibility value." + }, + "backlinks": { + "type": "string", + "description": "Total backlinks." + }, + "domains": { + "type": "string", + "description": "Referring domains count." + } + } + } + }, + "example": [ + { + "domain": "www.tests.com", + "domain_id": 10, + "visibility": 0, + "backlinks": "328", + "domains": "32" + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/competitors/metrics?site_id=123&date=2018-01-01&site_engine_id=1&group_id=1&tags[]=21' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/sites/url-tags": { + "get": { + "operationId": "listTags", + "tags": [ + "URL Tags" + ], + "summary": "List tags", + "description": "Returns a list of landing page tags added to domains and/or links within the specified site.\n\nIf successful, the server returns the `200` HTTP status code and an array of tags.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/url-tags/#list-tags" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Website ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Tag ID." + }, + "name": { + "type": "string", + "description": "Tag name." + }, + "url": { + "type": "array", + "items": { + "type": "string", + "description": "List of links the tag is added to." + }, + "description": "List of links the tag is added to." + }, + "domain": { + "type": "array", + "items": { + "type": "string", + "description": "List of domains the tag is added to." + }, + "description": "List of domains the tag is added to." + } + } + } + }, + "example": [ + { + "id": "51", + "name": "tag1", + "url": [ + "https://test.com" + ], + "domain": [ + "www.flotenk.com", + "google.com" + ] + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/sites/url-tags?site_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "post": { + "operationId": "addTag", + "tags": [ + "URL Tags" + ], + "summary": "Add tag", + "description": "Creates a tag within the specified site and optionally attaches it to links and/or domains. You can add a maximum of 20 tags to one site.\n\nIf successful, the server returns the `200` HTTP status code and the created tag ID. Returns HTTP `400` if the maximum number of tags per site is exceeded (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/url-tags/#add-tag" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Website ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Tag name." + }, + "urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of links the tag is added to." + }, + "domains": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of domains the tag is added to." + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "tag1", + "urls": [ + "http://url.com/path" + ], + "domains": [ + "test.com" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tag_id": { + "type": "integer", + "description": "Created tag ID." + } + } + }, + "example": { + "tag_id": 1 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/project-management/sites/url-tags?site_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"name\": \"tag1\",\n \"urls\": [\"http://url.com/path\"],\n \"domains\": [\"test.com\"]\n}'" + } + ] + }, + "patch": { + "operationId": "updateTagAssignment", + "tags": [ + "URL Tags" + ], + "summary": "Update tag assignment", + "description": "Assigns tags to the specified links and/or domains. All previously assigned tags for the submitted links and domains are removed and replaced with the provided tag IDs.\n\nIf successful, the server returns the `204` HTTP status code. Returns HTTP `404` if one or more tags are not found (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/url-tags/#update-tag-assignment" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Website ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tag_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "List of tag IDs to assign." + }, + "urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of links to update." + }, + "domains": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of domains to update." + } + }, + "required": [ + "tag_ids" + ] + }, + "example": { + "tag_ids": [ + 1, + 2 + ], + "urls": [ + "http://url.com/path" + ], + "domains": [ + "test.com" + ] + } + } + } + }, + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + } + }, + "delete": { + "operationId": "deleteTag", + "tags": [ + "URL Tags" + ], + "summary": "Delete tag", + "description": "Deletes a tag from the specified site.\n\nIf successful, the server returns the `204` HTTP status code. Returns HTTP `404` if the tag is not found (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/url-tags/#delete-tag" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Website ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "tag_id", + "in": "query", + "required": true, + "description": "Tag ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X DELETE 'https://api.seranking.com/v1/project-management/sites/url-tags?site_id=123&tag_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/analytics/gsc/queries": { + "get": { + "operationId": "getGoogleSearchConsoleData", + "tags": [ + "Analytics Traffic" + ], + "summary": "Get Google Search Console data", + "description": "Returns popular queries and performance metrics from Google Search Console for the specified site.\n\nIf successful, the server returns the `200` HTTP status code and an array of queries with performance metrics. Returns HTTP `400` if the site is not shared with the account (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/analytics-traffic/#google-search-console-data" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Project (site) ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "query": { + "type": "string", + "description": "Search query." + }, + "impressions": { + "type": "integer", + "description": "Number of impressions." + }, + "clicks": { + "type": "integer", + "description": "Number of clicks." + }, + "ctr": { + "type": "integer", + "description": "Click-through rate (%)." + }, + "avg": { + "type": "integer", + "description": "Average position." + } + } + } + }, + "example": [ + { + "query": "text", + "impressions": 100, + "clicks": 10, + "ctr": 10, + "avg": 5 + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/analytics/gsc/queries?site_id=123\\' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '-H 'Authorization: Token YOUR_API_KEY''" + } + ] + } + }, + "/v1/project-management/analytics/seo-potential": { + "get": { + "operationId": "calculateSEOPotential", + "tags": [ + "Analytics Traffic" + ], + "summary": "Calculate SEO potential", + "description": "Estimates traffic, cost, and potential leads for the specified site.\n\nIf successful, the server returns the `200` HTTP status code and an array of traffic forecasts per search engine. Returns HTTP `400` if `site_id` is not valid (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/analytics-traffic/#seo-potential" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Project (site) ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "top_n", + "in": "query", + "description": "If specified, calculates potential traffic assuming all queries reach the TOP. Otherwise, returns the current traffic estimate for queries added to the system.", + "schema": { + "type": "integer" + } + }, + { + "name": "lead_price", + "in": "query", + "description": "Estimated income per client.", + "schema": { + "type": "number" + } + }, + { + "name": "conversion_rate", + "in": "query", + "description": "Conversion rate to sales (%).", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "site_engine_id": { + "type": "integer", + "description": "Unique ID of the search engine configuration within the project." + }, + "traffic": { + "type": "integer", + "description": "Estimated traffic." + }, + "traffic_value": { + "type": "number", + "description": "Estimated cost of traffic." + }, + "leads_qty": { + "type": "integer", + "description": "Estimated number of clients." + }, + "leads_price": { + "type": "integer", + "description": "Estimated profit from leads." + } + } + } + }, + "example": [ + { + "site_engine_id": 586, + "traffic": 1, + "traffic_value": 5.85, + "leads_qty": 0, + "leads_price": 0 + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/analytics/seo-potential?site_id=123&top_n=10&lead_price=50&conversion_rate=100\\' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '-H 'Authorization: Token YOUR_API_KEY''" + } + ] + } + }, + "/v1/project-management/marketing-plan": { + "get": { + "operationId": "listPlanItems", + "tags": [ + "Marketing Plan" + ], + "summary": "List plan items", + "description": "Returns a list of marketing plan sections, items, and notes.\n\nIf successful, the server returns the `200` HTTP status code and an array of marketing plan sections.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/marketing-plan/#list-plan-items" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Unique site ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Section name." + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique section ID." + }, + "title": { + "type": "string", + "description": "Section name." + }, + "checked": { + "type": "boolean", + "description": "Item completion status." + } + }, + "description": "List of items in the section." + }, + "description": "List of items in the section." + }, + "id": { + "type": "string", + "description": "Unique section ID." + }, + "items_count": { + "type": "integer", + "description": "Number of items in the section." + }, + "items_checked": { + "type": "integer", + "description": "Number of completed items in the section." + } + } + } + }, + "example": [ + { + "title": "Step 1. Semantic core and keyword research", + "items": [ + { + "id": "analyze_competitors", + "title": "Analyze competitors’ keywords", + "checked": true + }, + { + "id": "makeup_final_list", + "title": "Collect core keywords", + "checked": true + } + ], + "id": "keywords_research", + "items_count": 3, + "items_checked": 3 + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/marketing-plan?site_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/marketing-plan/tasks": { + "post": { + "operationId": "addTask", + "tags": [ + "Marketing Plan" + ], + "summary": "Add task", + "description": "Creates a new custom task in the marketing plan.\n\nIf successful, the server returns the `200` HTTP status code and an object containing the created task ID. Returns HTTP `400` if the title or text is empty (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/marketing-plan/#add-task" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Unique site ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Task name." + }, + "text": { + "type": "string", + "description": "Task description." + }, + "for_all": { + "type": "boolean", + "description": "Indicates whether the task applies to all projects." + } + }, + "required": [ + "title", + "text" + ] + }, + "example": { + "title": "Create landing page", + "text": "Prepare and publish a new landing page for the campaign", + "for_all": false + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Unique ID of the created task." + } + } + }, + "example": { + "id": 1 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/project-management/marketing-plan/tasks?site_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"title\": \"Create landing page\",\n \"text\": \"Prepare and publish a new landing page for the campaign\",\n \"for_all\": false\n}'" + } + ] + }, + "patch": { + "operationId": "updateTask", + "tags": [ + "Marketing Plan" + ], + "summary": "Update task / Set task status", + "description": "### Update task\n\nUpdates the name and description of an existing task.\n\nIf successful, the server returns the `200` HTTP status code. Returns HTTP `400` if the title or text is empty (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).\n\n### Set task status\n\nUpdates the completion status of a task.\n\nIf successful, the server returns the `200` HTTP status code.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/marketing-plan/#update-task" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Unique site ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "task_id": { + "type": "string", + "description": "Unique task ID." + }, + "title": { + "type": "string", + "description": "Task name." + }, + "text": { + "type": "string", + "description": "Task description." + }, + "checked": { + "type": "boolean", + "description": "Task completion status." + } + }, + "required": [ + "task_id" + ] + }, + "examples": { + "updateTask": { + "summary": "Update task", + "value": { + "task_id": "makeup_final_list", + "title": "Update keyword list", + "text": "Add new high-priority keywords" + } + }, + "setTaskStatus": { + "summary": "Set task status", + "value": { + "task_id": "makeup_final_list", + "checked": true + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful response." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X PATCH 'https://api.seranking.com/v1/project-management/marketing-plan/tasks?site_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"task_id\": \"makeup_final_list\",\n \"title\": \"Update keyword list\",\n \"text\": \"Add new high-priority keywords\"\n}'" + } + ] + }, + "delete": { + "operationId": "deleteTask", + "tags": [ + "Marketing Plan" + ], + "summary": "Delete task", + "description": "Deletes a custom task from the marketing plan. Only tasks created using the [Add task endpoint](https://seranking.com/api/project/marketing-plan/#add-task) can be deleted.\n\nIf successful, the server returns the `204` HTTP status code.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/marketing-plan/#delete-task" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Unique site ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "task_id", + "in": "query", + "required": true, + "description": "Unique task ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X DELETE 'https://api.seranking.com/v1/project-management/marketing-plan/tasks?site_id=123&task_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/audits": { + "post": { + "operationId": "createAudit", + "tags": [ + "Website Audit" + ], + "summary": "Create audit / Add audit source pages", + "description": "### Create audit\n\nCreates a website audit that crawls the HTML of a target site. Suitable for static and server-side-rendered sites. Enable `csr` in `settings` for JavaScript-rendered pages.\n\n**Note:** Page crawl limit depends on your subscription plan.\n\nIf successful, the server returns a JSON object containing the unique ID for the newly created audit.\n\n### Add audit source pages\n\nUploads a custom list of URLs to crawl. The list is submitted as a multipart text file with one URL per line. Auto-sets `settings.source_file` to `1`.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/audit/#create-audit" + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain to be audited (e.g., `domain.com`)." + }, + "title": { + "type": "string", + "description": "Custom title of the audit report (max 300 characters). Defaults to `domain`." + }, + "settings": { + "type": "object", + "description": "Audit configuration settings. Only include parameters you want to override (see [settings object](https://seranking.com/api/project/audit/#settings-object) below).", + "properties": { + "source_site": { + "type": "integer" + }, + "source_sitemap": { + "type": "integer" + }, + "source_subdomain": { + "type": "integer" + }, + "source_file": { + "type": "integer" + }, + "check_robots": { + "type": "integer" + }, + "ignore_noindex": { + "type": "integer" + }, + "ignore_nofollow": { + "type": "integer" + }, + "ignore_params": { + "type": "integer" + }, + "custom_params": { + "type": "string" + }, + "csr": { + "type": "integer" + }, + "user_agent": { + "type": "integer" + }, + "login": { + "type": "string" + }, + "password": { + "type": "string" + }, + "max_pages": { + "type": "integer" + }, + "max_depth": { + "type": "integer" + }, + "max_req": { + "type": "integer" + }, + "max_redirects": { + "type": "integer" + }, + "max_size": { + "type": "integer" + }, + "min_title_len": { + "type": "integer" + }, + "max_title_len": { + "type": "integer" + }, + "min_description_len": { + "type": "integer" + }, + "max_description_len": { + "type": "integer" + }, + "min_words": { + "type": "integer" + }, + "max_h1_len": { + "type": "integer" + }, + "max_h2_len": { + "type": "integer" + }, + "allow": { + "type": "string" + }, + "disallow": { + "type": "string" + }, + "hide": { + "type": "string" + }, + "schedule_type": { + "type": "string" + }, + "schedule_wdays": { + "type": "array", + "items": { + "type": "integer" + } + }, + "schedule_hour": { + "type": "integer" + }, + "schedule_day": { + "type": "integer" + }, + "schedule_repeat": { + "type": "integer" + }, + "schedule_repeat_interval": { + "type": "integer" + }, + "send_report": { + "type": "integer" + }, + "report_emails": { + "type": "string" + } + } + } + }, + "required": [ + "domain" + ] + }, + "example": { + "domain": "example.com", + "title": "Full Audit - example.com", + "settings": { + "source_site": 1, + "source_sitemap": 1, + "source_subdomain": 1, + "source_file": 0, + "check_robots": 1, + "ignore_noindex": 1, + "ignore_nofollow": 1, + "ignore_params": 2, + "custom_params": "utm_source, utm_medium, utm_term, utm_content, utm_campaign, cid, PHPSESSID, fbclid, gclid", + "csr": 0, + "user_agent": 0, + "login": "", + "password": "", + "max_pages": 10000, + "max_depth": 15, + "max_req": 300, + "max_redirects": 10, + "max_size": 5000, + "min_title_len": 30, + "max_title_len": 60, + "min_description_len": 50, + "max_description_len": 160, + "min_words": 300, + "max_h1_len": 70, + "max_h2_len": 80, + "allow": "/blog\n/products", + "disallow": "/admin\n/staging", + "hide": "/cdn-cgi\n/wp-json", + "schedule_type": "week", + "schedule_wdays": [ + 1, + 2 + ], + "schedule_hour": 6, + "schedule_day": 1, + "schedule_repeat": 1, + "schedule_repeat_interval": 1, + "send_report": 1, + "report_emails": "seo-lead@example.com, devops@example.com" + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Unique identifier of the audit report." + } + } + }, + "examples": { + "createAudit": { + "summary": "Create audit", + "value": { + "id": 700237036 + } + }, + "addAuditSourcePages": { + "summary": "Add audit source pages", + "value": { + "id": 1732 + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/project-management/audits' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Token YOUR_API_KEY' \\\n--data '{\n \"domain\": \"example.com\",\n \"title\": \"Full Audit - example.com\",\n \"settings\": {\n \"source_site\": 1,\n \"source_sitemap\": 1,\n \"source_subdomain\": 1,\n \"source_file\": 0,\n \"check_robots\": 1,\n \"ignore_noindex\": 1,\n \"ignore_nofollow\": 1,\n \"ignore_params\": 2,\n \"custom_params\": \"utm_source, utm_medium, utm_term, utm_content, utm_campaign, cid, PHPSESSID, fbclid, gclid\",\n \"csr\": 0,\n \"user_agent\": 0,\n \"login\": \"\",\n \"password\": \"\",\n \"max_pages\": 10000,\n \"max_depth\": 15,\n \"max_req\": 300,\n \"max_redirects\": 10,\n \"max_size\": 5000,\n \"min_title_len\": 30,\n \"max_title_len\": 60,\n \"min_description_len\": 50,\n \"max_description_len\": 160,\n \"min_words\": 300,\n \"max_h1_len\": 70,\n \"max_h2_len\": 80,\n \"allow\": \"/blog\\n/products\",\n \"disallow\": \"/admin\\n/staging\",\n \"hide\": \"/cdn-cgi\\n/wp-json\",\n \"schedule_type\": \"week\",\n \"schedule_wdays\": [1, 2],\n \"schedule_hour\": 6,\n \"schedule_day\": 1,\n \"schedule_repeat\": 1,\n \"schedule_repeat_interval\": 1,\n \"send_report\": 1,\n \"report_emails\": \"seo-lead@example.com, devops@example.com\"\n }\n}'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request POST 'https://api.seranking.com/v1/project-management/audits/source-pages?audit_id=123' \\\n--header 'Authorization: Token YOUR_API_KEY' \\\n-F \"file=@priority-pages.txt\"" + } + ], + "parameters": [ + { + "name": "audit_id", + "in": "query", + "description": "Unique audit ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "file", + "in": "query", + "description": "UTF-8 text file with one URL per line.", + "schema": { + "type": "string" + } + } + ] + }, + "get": { + "operationId": "listAudits", + "tags": [ + "Website Audit" + ], + "summary": "List audits", + "description": "Returns all audits associated with the account, with pagination and filtering.\n\nIf successful, the server returns a JSON object containing the total number of audits and an array of audit objects.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/audit/#list-audits" + }, + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "Number of audits to return. Defaults to `100`.", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "Number of audits to skip before starting to collect the result set. Defaults to `0`.", + "schema": { + "type": "integer" + } + }, + { + "name": "search", + "in": "query", + "description": "Filters audits by matching title or URL.", + "schema": { + "type": "string" + } + }, + { + "name": "date_start", + "in": "query", + "description": "Start date for filtering audits (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + }, + { + "name": "date_end", + "in": "query", + "description": "End date for filtering audits (in `YYYY-MM-DD`).", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Unique identifier of the audit report." + }, + "group_id": { + "type": "integer", + "description": "Audit group identifier." + }, + "url": { + "type": "string", + "description": "URL of the audited website." + }, + "title": { + "type": "string", + "description": "Title of the audit report." + }, + "has_project": { + "type": "boolean", + "description": "Indicates whether the audit is linked to a project." + }, + "site_id": { + "type": "integer", + "description": "Internal site identifier." + }, + "last_update": { + "type": "string", + "description": "Date of last audit update ( in `YYYY-MM-DD`)." + }, + "status": { + "type": "string", + "description": "Current audit status (for example, `finished`, `processing`)." + }, + "error": { + "nullable": true, + "description": "Error message if the audit failed, otherwise `null`.", + "type": "string" + }, + "error_params": { + "description": "Error details if available." + }, + "stats": { + "type": "object", + "properties": { + "score": { + "type": "integer" + }, + "errors": { + "type": "integer" + }, + "warnings": { + "type": "integer" + }, + "notices": { + "type": "integer" + }, + "crawled": { + "type": "integer" + } + }, + "description": "Latest audit statistics." + }, + "prev_stats": { + "description": "Statistics from the previous audit run (can be `null`)." + }, + "version": { + "type": "string", + "description": "Audit engine version." + }, + "owner_account_id": { + "type": "integer", + "description": "Owner account identifier." + }, + "is_new": { + "type": "integer", + "description": "Indicates whether the audit is newly created (`1` – yes, `0` – no)." + } + }, + "description": "Array of audit objects." + }, + "description": "Array of audit objects." + }, + "total": { + "type": "integer", + "description": "Number of audits matching the filter criteria." + } + } + }, + "example": { + "items": [ + { + "id": 700138456, + "group_id": 0, + "url": "http://booking.com", + "title": "booking.com", + "has_project": true, + "site_id": 10113599, + "last_update": "2025-07-08", + "status": "finished", + "error": null, + "error_params": null, + "stats": { + "score": 69, + "errors": 2303, + "warnings": 3710, + "notices": 10875, + "crawled": 1830 + }, + "prev_stats": null, + "version": "2.0", + "owner_account_id": 4242308, + "is_new": 1 + } + ], + "total": 1 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/project-management/audits?limit=10&offset=0&search=booking.com&date_start=2025-07-01&date_end=2025-07-31' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "delete": { + "operationId": "deleteAudit", + "tags": [ + "Website Audit" + ], + "summary": "Delete audit / Delete audit source pages", + "description": "### Delete audit\n\nPermanently deletes the specified website audit report and all associated data. This action can’t be undone.\n\nIf successful, the server returns the `200` HTTP status code and an empty response body. Returns HTTP `404` if the audit is not found (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).\n\n### Delete audit source pages\n\nRemoves an uploaded custom page list. Does not toggle `settings.source_file` off. Use `updateAuditSettings` to disable custom-list crawling entirely.\n\nHTTP `204 No Content` on success.\n\nUsed by `createAudit`, `updateAuditSettings`, `getAuditSettings`, and `getAuditHistory`. Every field is optional. Send only the fields to change; other values stay untouched (exceptions are called out below).\n\n**URL filtering**\n\n**Note:** Multiple paths must be separated by newline.\n\n**Reporting**\n\n**Note:** Multiple emails must be comma-separated.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/audit/#delete-audit" + }, + "parameters": [ + { + "name": "audit_id", + "in": "query", + "required": true, + "description": "Unique audit ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "list_id", + "in": "query", + "description": "List identifier from `List Audit Source Pages`.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response." + }, + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request DELETE 'https://api.seranking.com/v1/project-management/audits?audit_id=123' \\\n--header 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request DELETE 'https://api.seranking.com/v1/project-management/audits/source-pages?audit_id=123&list_id=789' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "patch": { + "operationId": "updateAuditTitle", + "tags": [ + "Website Audit" + ], + "summary": "Update audit title", + "description": "Updates the title of an existing website audit report.\n\nIf successful, the server returns the `200` HTTP status code with an empty response body. Returns HTTP `404` if the audit is not found (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/audit/#update-audit-title" + }, + "parameters": [ + { + "name": "audit_id", + "in": "query", + "required": true, + "description": "Unique audit ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "New title for the audit report. Maximum length is 300 characters." + } + }, + "required": [ + "title" + ] + }, + "example": { + "title": "New Example Audit Title" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request PATCH 'https://api.seranking.com/v1/project-management/audits?audit_id=123' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Token YOUR_API_KEY' \\\n--data '{\n \"title\": \"New Example Audit Title\"\n}'" + } + ] + } + }, + "/v1/project-management/audits/status": { + "get": { + "operationId": "getAuditStatus", + "tags": [ + "Website Audit" + ], + "summary": "Get audit status", + "description": "Returns the real-time status of a specific audit. Useful for monitoring crawl progress before fetching the full report.\n\nIf successful, the server returns a JSON object containing the current audit status and key metrics.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/audit/#get-audit-status" + }, + "parameters": [ + { + "name": "audit_id", + "in": "query", + "required": true, + "description": "Unique audit ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total_pages": { + "type": "integer", + "description": "Number of pages crawled." + }, + "total_warnings": { + "type": "integer", + "description": "Number of warnings found." + }, + "total_errors": { + "type": "integer", + "description": "Number of errors found." + }, + "total_passed": { + "type": "integer", + "description": "Number of passed checks." + }, + "status": { + "type": "string", + "description": "Current audit status. Possible values: `queued`, `processing`, `finished`, `cancelled`, `expired`." + }, + "start_time": { + "type": "string", + "description": "Audit start timestamp." + }, + "audit_time": { + "type": "string", + "description": "Audit completion timestamp. Present if the audit is finished." + } + } + }, + "example": { + "total_pages": 1009, + "total_warnings": 979, + "total_errors": 346, + "total_passed": 77, + "status": "finished", + "start_time": "2025-07-29 11:06:23", + "audit_time": "2025-07-29 11:19:33" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/project-management/audits/status?audit_id=123' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/audits/report": { + "get": { + "operationId": "getAuditReport", + "tags": [ + "Website Audit" + ], + "summary": "Get audit report", + "description": "Returns a complete audit report, including health score, domain properties, and issues.\n\nIf successful, the server returns a JSON object containing the complete audit report.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/audit/#get-audit-report" + }, + "parameters": [ + { + "name": "audit_id", + "in": "query", + "required": true, + "description": "Unique audit ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total_pages": { + "type": "integer", + "description": "Number of pages crawled." + }, + "total_warnings": { + "type": "integer", + "description": "Number of warnings found." + }, + "total_errors": { + "type": "integer", + "description": "Number of errors found." + }, + "total_passed": { + "type": "integer", + "description": "Number of passed checks." + }, + "total_notices": { + "type": "integer", + "description": "Number of notices found." + }, + "is_finished": { + "type": "boolean", + "description": "Indicates whether the audit is completed." + }, + "domain_props": { + "type": "object", + "properties": { + "dt": { + "type": "integer", + "description": "Domain trust score." + }, + "domain": { + "type": "string", + "description": "Domain name." + }, + "domains": { + "type": "string", + "description": "Number of referring domains." + }, + "expdate": { + "type": "string", + "description": "Expiration date of domain registration." + }, + "updated": { + "type": "string", + "description": "Last update timestamp." + }, + "backlinks": { + "type": "string", + "description": "Number of backlinks pointing to the domain." + }, + "index_bing": { + "type": "integer" + }, + "all_checked": { + "type": "boolean", + "description": "Indicates whether all domain checks are completed." + }, + "index_yahoo": { + "type": "integer" + }, + "index_google": { + "type": "string", + "description": "Number of pages indexed in Google." + } + }, + "description": "Domain properties and metadata (see [domain_props object](https://seranking.com/api/project/audit/#domain-props) below)." + }, + "sections": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "description": "Section identifier." + }, + "name": { + "type": "string", + "description": "Section name." + }, + "props": { + "type": "object", + "properties": { + "no_https": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Unique check identifier." + }, + "status": { + "type": "string", + "description": "Check result. Possible values: `error`, `warning`, `notice`, `passed`." + }, + "name": { + "type": "string", + "description": "Section name." + }, + "value": { + "type": "integer", + "description": "Number of affected pages." + } + } + }, + "mixed_content": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Unique check identifier." + }, + "status": { + "type": "string", + "description": "Check result. Possible values: `error`, `warning`, `notice`, `passed`." + }, + "name": { + "type": "string", + "description": "Section name." + }, + "value": { + "type": "integer", + "description": "Number of affected pages." + } + } + }, + "http4xx": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Unique check identifier." + }, + "status": { + "type": "string", + "description": "Check result. Possible values: `error`, `warning`, `notice`, `passed`." + }, + "name": { + "type": "string", + "description": "Section name." + }, + "value": { + "type": "integer", + "description": "Number of affected pages." + } + } + }, + "blocked_by_noindex": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Unique check identifier." + }, + "status": { + "type": "string", + "description": "Check result. Possible values: `error`, `warning`, `notice`, `passed`." + }, + "name": { + "type": "string", + "description": "Section name." + }, + "value": { + "type": "integer", + "description": "Number of affected pages." + } + } + } + }, + "description": "Section checks and results.\nObject where each key is a check identifier and the value is a check result object (see structure below)." + } + }, + "description": "An array of objects, where each object represents a category of audit checks (see [sections array](https://seranking.com/api/project/audit/#sections-array) below)." + }, + "description": "An array of objects, where each object represents a category of audit checks (see [sections array](https://seranking.com/api/project/audit/#sections-array) below)." + }, + "score_percent": { + "type": "integer", + "description": "Overall website health score (0–100)." + }, + "audit_time": { + "type": "string", + "description": "Audit completion timestamp." + }, + "version": { + "type": "string" + } + } + }, + "example": { + "total_pages": 1009, + "total_warnings": 979, + "total_errors": 346, + "total_passed": 77, + "total_notices": 3915, + "is_finished": true, + "domain_props": { + "dt": 44, + "domain": "www.vitality.co.uk", + "domains": "3401", + "expdate": "2025-08-30", + "updated": "2025-07-29 12:07:28", + "backlinks": "212249", + "index_bing": 15500, + "all_checked": true, + "index_yahoo": 15500, + "index_google": "1380" + }, + "sections": [ + { + "uid": "security_v2", + "name": "Security", + "props": { + "no_https": { + "code": "no_https", + "status": "error", + "name": "No HTTPS encryption", + "value": 0 + }, + "mixed_content": { + "code": "mixed_content", + "status": "error", + "name": "Mixed content", + "value": 0 + } + } + }, + { + "uid": "crawling_v2", + "name": "Crawling & Indexing", + "props": { + "http4xx": { + "code": "http4xx", + "status": "error", + "name": "4XX HTTP Status Codes", + "value": 28 + }, + "blocked_by_noindex": { + "code": "blocked_by_noindex", + "status": "notice", + "name": "Blocked by noindex", + "value": 34 + } + } + } + ], + "score_percent": 80, + "audit_time": "2025-07-29 11:19:33", + "version": "2.0" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/project-management/audits/report?audit_id=123' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/audits/recheck": { + "post": { + "operationId": "recheckAudit", + "tags": [ + "Website Audit" + ], + "summary": "Recheck audit", + "description": "Re-runs the audit using the same settings. This allows you to track changes and verify that issues have been resolved.\n\n**Note:** Rechecking an audit consumes the same credits as creating a new audit.\n\nIf successful, the server returns the `200` HTTP status code with an empty response body. Returns HTTP `404` if the audit is not found (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/audit/#recheck-audit" + }, + "parameters": [ + { + "name": "audit_id", + "in": "query", + "required": true, + "description": "Unique audit ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request POST 'https://api.seranking.com/v1/project-management/audits/recheck?audit_id=123' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/audits/settings": { + "get": { + "operationId": "getAuditSettings", + "tags": [ + "Website Audit" + ], + "summary": "Get audit settings", + "description": "Returns the full saved configuration for an audit: crawl sources, limits, thresholds, schedule, notification recipients, disabled issue codes, external URL ignore list, and engine version.\n\nCall this before `updateAuditSettings` for partial updates, especially when modifying `disabled_issues` or `schedule_wdays` (both are replace operations).\n\nResponse fields match the [Audit settings object](#settings-object). The API returns every field with its current value.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/audit/#recheck-audit" + }, + "parameters": [ + { + "name": "audit_id", + "in": "query", + "required": true, + "description": "Unique audit ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "source_site": { + "type": "integer" + }, + "source_sitemap": { + "type": "integer" + }, + "source_subdomain": { + "type": "integer" + }, + "source_file": { + "type": "integer" + }, + "check_robots": { + "type": "integer" + }, + "ignore_noindex": { + "type": "integer" + }, + "ignore_nofollow": { + "type": "integer" + }, + "ignore_params": { + "type": "integer" + }, + "user_agent": { + "type": "integer" + }, + "csr": { + "type": "integer" + }, + "max_pages": { + "type": "integer" + }, + "max_depth": { + "type": "integer" + }, + "max_req": { + "type": "integer" + }, + "max_redirects": { + "type": "integer" + }, + "max_size": { + "type": "integer" + }, + "min_title_len": { + "type": "integer" + }, + "max_title_len": { + "type": "integer" + }, + "min_description_len": { + "type": "integer" + }, + "max_description_len": { + "type": "integer" + }, + "min_words": { + "type": "integer" + }, + "max_h1_len": { + "type": "integer" + }, + "max_h2_len": { + "type": "integer" + }, + "schedule_type": { + "type": "string" + }, + "schedule_hour": { + "type": "integer" + }, + "schedule_repeat": { + "type": "integer" + }, + "send_report": { + "type": "integer" + }, + "disabled_issues": { + "type": "array", + "items": { + "type": "string" + } + }, + "disallow_ext": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "example": { + "source_site": 1, + "source_sitemap": 1, + "source_subdomain": 0, + "source_file": 0, + "check_robots": 1, + "ignore_noindex": 0, + "ignore_nofollow": 0, + "ignore_params": 0, + "user_agent": 0, + "csr": 0, + "max_pages": 1000, + "max_depth": 10, + "max_req": 500, + "max_redirects": 5, + "max_size": 3000, + "min_title_len": 20, + "max_title_len": 65, + "min_description_len": 1, + "max_description_len": 158, + "min_words": 250, + "max_h1_len": 100, + "max_h2_len": 100, + "schedule_type": "manual", + "schedule_hour": 0, + "schedule_repeat": 0, + "send_report": 1, + "disabled_issues": [ + "slow_loading", + "speed_index" + ], + "disallow_ext": "cdn.example.com\nhttps://tracking.example.com/pixel", + "version": "2.0" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + } + }, + "patch": { + "operationId": "updateAuditSettings", + "tags": [ + "Website Audit" + ], + "summary": "Update audit settings", + "description": "Updates the configuration of an existing audit. Applies partial-update (merge) semantics: only the fields in the request body change.\n\n**Warning:** `disabled_issues` and `schedule_wdays` are REPLACE operations. The array you send replaces the full saved list. Fetch the current values with `getAuditSettings` before modifying them.\n\nSitemaps and custom page lists have their own endpoints. See [`addAuditSitemap`](#add-audit-sitemap) and [`addAuditSourcePages`](#add-audit-source-pages). Updating only the audit title has a dedicated endpoint. See [`updateAuditTitle`](#update-audit-title).\n\nHTTP `200 OK` with an empty body.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/audit/#recheck-audit" + }, + "parameters": [ + { + "name": "audit_id", + "in": "query", + "required": true, + "description": "Unique audit ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "settings": { + "type": "object", + "properties": { + "max_pages": { + "type": "integer" + }, + "max_depth": { + "type": "integer" + }, + "schedule_type": { + "type": "string" + }, + "schedule_wdays": { + "type": "array", + "items": { + "type": "integer" + } + }, + "disabled_issues": { + "type": "array", + "items": { + "type": "string" + } + }, + "disallow_ext": { + "type": "string" + } + } + } + } + }, + "example": { + "settings": { + "max_pages": 50000, + "max_depth": 20, + "schedule_type": "week", + "schedule_wdays": [ + 1, + 3, + 5 + ], + "disabled_issues": [ + "slow_loading" + ], + "disallow_ext": "cdn.example.com\nhttps://tracking.example.com/pixel" + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful response." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --globoff --request PATCH 'https://api.seranking.com/v1/project-management/audits/settings?audit_id={audit_id}' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Token YOUR_API_KEY' \\\n--data '{\n \"settings\": {\n \"max_pages\": 50000,\n \"max_depth\": 20,\n \"schedule_type\": \"week\",\n \"schedule_wdays\": [1, 3, 5],\n \"disabled_issues\": [\"slow_loading\"],\n \"disallow_ext\": \"cdn.example.com\\nhttps://tracking.example.com/pixel\"\n }\n}'" + } + ] + } + }, + "/v1/project-management/audits/settings/reset": { + "post": { + "operationId": "resetAuditSettings", + "tags": [ + "Website Audit" + ], + "summary": "Reset audit settings", + "description": "Restores every setting to its default value, including crawl sources, limits, thresholds, schedule, notifications, `disabled_issues`, and `disallow_ext`.\n\n**Note:** Sitemaps and source-pages lists are not removed by this call. Delete them through [`deleteAuditSitemap`](#delete-audit-sitemap) or [`deleteAuditSourcePages`](#delete-audit-source-pages) if needed.\n\nHTTP `200 OK` with an empty body.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/audit/#recheck-audit" + }, + "parameters": [ + { + "name": "audit_id", + "in": "query", + "required": true, + "description": "Unique audit ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + } + } + }, + "/v1/project-management/audits/pages": { + "get": { + "operationId": "getAllCrawledPages", + "tags": [ + "Website Audit" + ], + "summary": "Get all crawled pages", + "description": "Returns a paginated list of all URLs found during the audit. The response provides a complete sitemap as identified by the crawler, including pages with and without detected issues.\n\nIf successful, the server returns a JSON object containing the total number of crawled pages and an array of page objects.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/audit/#get-all-crawled-pages" + }, + "parameters": [ + { + "name": "audit_id", + "in": "query", + "required": true, + "description": "Unique audit ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of pages to return (query parameter). Defaults to `100`.", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "Number of pages to skip before starting to collect the result set (query parameter). Defaults to `0`.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of pages crawled during the audit." + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique internal identifier of the page." + }, + "url": { + "type": "string", + "description": "Full URL of the crawled page." + }, + "url_len": { + "type": "string" + }, + "type": { + "type": "string" + }, + "url_protocol": { + "type": "string" + }, + "sitemap": { + "type": "string" + }, + "status": { + "type": "string", + "description": "HTTP status code returned by the page." + }, + "size": { + "type": "string" + }, + "depth": { + "type": "string", + "description": "Crawl depth of the page (distance from the start page)." + }, + "noindex": { + "type": "string" + }, + "first_ms": { + "type": "string" + }, + "load_ms": { + "type": "string", + "description": "Page load time in milliseconds." + }, + "robots": { + "type": "string" + }, + "nofollow": { + "type": "string" + }, + "xrobots": {}, + "title_len": { + "type": "string" + }, + "description_len": { + "type": "string" + }, + "chars": { + "type": "string" + }, + "h1_len": { + "type": "string" + }, + "h2_len": { + "type": "string" + }, + "html_ratio": { + "type": "string" + }, + "blocked_robots": { + "type": "string" + }, + "img": { + "type": "string" + }, + "hreflang": {}, + "hreflang_link": {}, + "refresh_time": {}, + "meta_refresh": { + "type": "string" + }, + "redirect_url": {}, + "canonical_url": { + "type": "string", + "description": "Canonical URL specified for the page." + }, + "single_h1": { + "type": "string" + }, + "single_h2": { + "type": "string" + }, + "h3_count": { + "type": "string" + }, + "h4_count": { + "type": "string" + }, + "h5_count": { + "type": "string" + }, + "h6_count": { + "type": "string" + }, + "words_count": { + "type": "string", + "description": "Number of words found on the page." + }, + "total_links": { + "type": "string" + }, + "mixed_count": {}, + "mixed": {}, + "last_modified": {}, + "content_hash": { + "type": "string" + }, + "title": { + "type": "string", + "description": "Content of the title tag." + }, + "description": { + "type": "string", + "description": "Content of the meta description tag." + }, + "h1": { + "type": "string", + "description": "Content of the first h1 tag." + }, + "h2": { + "type": "string" + }, + "issues": { + "type": "string", + "description": "Number of issues found on the page." + }, + "errors": { + "type": "string", + "description": "Number of errors found on the page." + }, + "warnings": { + "type": "string", + "description": "Number of warnings found on the page." + }, + "notices": { + "type": "string", + "description": "Number of notices found on the page." + }, + "refpages": { + "type": "string" + }, + "inlinks": { + "type": "string", + "description": "Number of internal links pointing to the page." + }, + "inlinks_nofollow": { + "type": "string" + }, + "inlinks_follow": { + "type": "string" + }, + "redirect_links": { + "type": "string" + }, + "redirect_count": { + "type": "string" + }, + "img_size": { + "type": "string" + }, + "css_size": { + "type": "string" + }, + "js_size": { + "type": "string" + }, + "outlinks_external": { + "type": "string", + "description": "Number of external links found on the page." + }, + "outlinks_internal": { + "type": "string", + "description": "Number of internal links found on the page." + }, + "title_duplicate": { + "type": "string" + }, + "description_duplicate": { + "type": "string" + }, + "h1_duplicate": { + "type": "string" + }, + "amp": { + "type": "string" + }, + "indexable": { + "type": "string" + }, + "indexable_status": { + "type": "string", + "description": "Indexability status of the page." + }, + "traffic_forecast": { + "type": "string" + }, + "num_keywords": { + "type": "string" + }, + "recheck_status": {}, + "time_check": { + "type": "string" + } + }, + "description": "Array of objects representing individual crawled pages." + }, + "description": "Array of objects representing individual crawled pages." + } + } + }, + "example": { + "total": 1009, + "items": [ + { + "id": "50958380", + "url": "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)", + "url_len": "27", + "type": "doc", + "url_protocol": "https", + "sitemap": "0", + "status": "200", + "size": "156676", + "depth": "1", + "noindex": "0", + "first_ms": "35", + "load_ms": "1373", + "robots": "index, follow", + "nofollow": "0", + "xrobots": null, + "title_len": "53", + "description_len": "139", + "chars": "153843", + "h1_len": "35", + "h2_len": "16", + "html_ratio": "40", + "blocked_robots": "0", + "img": "21", + "hreflang": null, + "hreflang_link": null, + "refresh_time": null, + "meta_refresh": "0", + "redirect_url": null, + "canonical_url": "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)", + "single_h1": "1", + "single_h2": "0", + "h3_count": "9", + "h4_count": "33", + "h5_count": "0", + "h6_count": "0", + "words_count": "1621", + "total_links": "230", + "mixed_count": null, + "mixed": null, + "last_modified": null, + "content_hash": "9d657683ebd385ba700d4301f1ef854f", + "title": "Vitality Insurance | Award-Winning Insurance Provider", + "description": "Vitality is a leading UK insurer offering health and life insurance. Get your quote today and unlock discounts and rewards from top brands.", + "h1": "Live longer with Vitality insurance", + "h2": "Health insurance", + "issues": "2", + "errors": "0", + "warnings": "0", + "notices": "2", + "refpages": "921", + "inlinks": "922", + "inlinks_nofollow": "0", + "inlinks_follow": "922", + "redirect_links": "4", + "redirect_count": "5", + "img_size": "700322", + "css_size": "443163", + "js_size": "543728", + "outlinks_external": "12", + "outlinks_internal": "83", + "title_duplicate": "0", + "description_duplicate": "0", + "h1_duplicate": "0", + "amp": "0", + "indexable": "1", + "indexable_status": "ok", + "traffic_forecast": "10716", + "num_keywords": "48369", + "recheck_status": null, + "time_check": "2025-07-29 11:06:30" + }, + { + "id": "50958398", + "url": "[https://www.vitality.co.uk/health-insurance/](https://www.vitality.co.uk/health-insurance/)", + "url_len": "44", + "type": "doc", + "url_protocol": "https", + "sitemap": "1", + "status": "200", + "size": "181179", + "depth": "2", + "noindex": "0", + "first_ms": "0", + "load_ms": "496", + "robots": "index, follow", + "nofollow": "0", + "xrobots": null, + "title_len": "52", + "description_len": "121", + "chars": "178088", + "h1_len": "26", + "h2_len": "33", + "html_ratio": "42", + "blocked_robots": "0", + "img": "27", + "hreflang": null, + "hreflang_link": null, + "refresh_time": null, + "meta_refresh": "0", + "redirect_url": null, + "canonical_url": "[https://www.vitality.co.uk/health-insurance/](https://www.vitality.co.uk/health-insurance/)", + "single_h1": "1", + "single_h2": "0", + "h3_count": "20", + "h4_count": "39", + "h5_count": "0", + "h6_count": "0", + "words_count": "3032", + "total_links": "239", + "mixed_count": null, + "mixed": null, + "last_modified": null, + "content_hash": "5b6d17dbcb03b2405450db10f86dd43a", + "title": "Health Insurance in the UK | Get Private Health Care", + "description": "Get top-rated health insurance in the UK, with real benefits and incentives from your healthcare plan. Get a quote today.", + "h1": "Health insurance in the UK", + "h2": "What is private health insurance?", + "issues": "3", + "errors": "0", + "warnings": "1", + "notices": "2", + "refpages": "896", + "inlinks": "898", + "inlinks_nofollow": "0", + "inlinks_follow": "898", + "redirect_links": "0", + "redirect_count": "4", + "img_size": "2316745", + "css_size": "443163", + "js_size": "543728", + "outlinks_external": "12", + "outlinks_internal": "86", + "title_duplicate": "0", + "description_duplicate": "0", + "h1_duplicate": "0", + "amp": "0", + "indexable": "1", + "indexable_status": "ok", + "traffic_forecast": "4928", + "num_keywords": "13021", + "recheck_status": null, + "time_check": "2025-07-29 11:06:45" + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/project-management/audits/pages?audit_id=123&limit=10&offset=0' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/audits/issue-pages": { + "get": { + "operationId": "getAuditPagesByIssue", + "tags": [ + "Website Audit" + ], + "summary": "Get audit pages by issue", + "description": "Retrieves a paginated list of all URLs affected by a specific issue within the audit. The issue code can be obtained from the audit report.\n\nIf successful, the server returns a JSON object containing the total number of affected URLs and the list of URLs.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/audit/#get-audit-pages-by-issue" + }, + "parameters": [ + { + "name": "audit_id", + "in": "query", + "required": true, + "description": "Unique audit ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "code", + "in": "query", + "required": true, + "description": "Unique issue code (for example, `title_duplicate`).", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of URLs to return. Defaults to `100`.", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "Number of URLs to skip before starting to collect the result set. Defaults to `0`.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total_urls": { + "type": "integer", + "description": "Number of URLs affected by the issue." + }, + "urls": { + "type": "array", + "items": { + "type": "string", + "description": "Array of URLs affected by the issue." + }, + "description": "Array of URLs affected by the issue." + }, + "urls_type": { + "type": "string", + "description": "Format of the `urls` array. For this endpoint, it is typically `simple_urls_array`." + } + } + }, + "example": { + "total_urls": 143, + "urls": [ + "https://www.vitality.co.uk/life-insurance/accident-and-fracture-cover/", + "https://www.vitality.co.uk/business/health-insurance/callback/", + "https://www.vitality.co.uk/media/vitality-employee-challenges-programme-goes-live/", + "https://www.vitality.co.uk/media/bbq-blunders-the-bbq-foods-fooling-brits/", + "https://www.vitality.co.uk/media/vitality-launches-cpd-accredited-sustainability-webinar-series-for-advisers/", + "https://www.vitality.co.uk/media/vitality-welcomes-new-partners-to-the-programme/", + "https://www.vitality.co.uk/media/sneezing-season-slams-first-time-sufferers/", + "https://www.vitality.co.uk/media/vitality-calls-for-greater-focus-on-burnout/", + "https://www.vitality.co.uk/media/vitality-research-reveals-gaps-in-employee-awareness-of-sick-leave-policies/", + "https://www.vitality.co.uk/media/vitality-parkrun-celebrate-record-breaking/" + ], + "urls_type": "simple_urls_array" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/project-management/audits/issue-pages?audit_id=123&code=title_duplicate&limit=10&offset=0' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/audits/issues": { + "get": { + "operationId": "getIssuesByURL", + "tags": [ + "Website Audit" + ], + "summary": "Get issues by URL", + "description": "Retrieves detailed information about all issues detected on a specific page, including errors, warnings, and notices. The response also includes complete page metadata.\n\n**Note:** Either `url_id` or `url` must be provided.\n\nIf successful, the server returns a JSON object containing page data and issues.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/audit/#get-all-issues-for-url" + }, + "parameters": [ + { + "name": "audit_id", + "in": "query", + "required": true, + "description": "Unique audit ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "url_id", + "in": "query", + "description": "Unique page ID.", + "schema": { + "type": "integer" + } + }, + { + "name": "url", + "in": "query", + "description": "Full page URL.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Full URL of the page." + }, + "page_data": { + "type": "object", + "properties": { + "h1": { + "type": "string" + }, + "h2": { + "type": "string" + }, + "js": { + "type": "integer" + }, + "css": { + "type": "integer" + }, + "doc": { + "type": "integer" + }, + "img": { + "type": "integer" + }, + "lang": { + "type": "string" + }, + "cache": { + "type": "string" + }, + "chars": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "words": { + "type": "integer" + }, + "ext_js": { + "type": "integer" + }, + "h1_len": { + "type": "integer" + }, + "h2_len": { + "type": "integer" + }, + "robots": { + "type": "string" + }, + "ext_doc": { + "type": "integer" + }, + "h1_hash": { + "type": "string" + }, + "inlinks": { + "type": "integer" + }, + "js_size": { + "type": "integer" + }, + "css_size": { + "type": "integer" + }, + "encoding": { + "type": "string" + }, + "h1_count": { + "type": "integer" + }, + "h2_count": { + "type": "integer" + }, + "h3_count": { + "type": "integer" + }, + "h4_count": { + "type": "integer" + }, + "img_size": { + "type": "integer" + }, + "refpages": { + "type": "integer" + }, + "canonical": { + "type": "string" + }, + "title_len": { + "type": "integer" + }, + "html_ratio": { + "type": "integer" + }, + "time_check": { + "type": "string" + }, + "title_hash": { + "type": "string" + }, + "description": { + "type": "string" + }, + "total_links": { + "type": "integer" + }, + "errors_count": { + "type": "integer" + }, + "issues_count": { + "type": "integer" + }, + "num_keywords": { + "type": "integer" + }, + "notices_count": { + "type": "integer" + }, + "redirect_count": { + "type": "integer" + }, + "redirect_links": { + "type": "integer" + }, + "warnings_count": { + "type": "integer" + }, + "description_len": { + "type": "integer" + }, + "description_hash": { + "type": "string" + }, + "traffic_forecast": { + "type": "integer" + } + }, + "description": "Complete metadata and metrics for the page." + }, + "issues": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Unique identifier of the issue." + }, + "type": { + "type": "string", + "description": "Issue severity. Possible values: `error`, `warning`, `notice`." + }, + "group": { + "type": "string", + "description": "Issue category." + }, + "snippet": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Issue severity. Possible values: `error`, `warning`, `notice`." + }, + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "url": { + "type": "string", + "description": "Full URL of the page." + }, + "size": { + "type": "string" + } + } + } + } + }, + "description": "Detailed information about the issue. For example, a list of redirecting URLs or an oversized CSS file." + } + }, + "description": "Array of issue objects detected on the page." + }, + "description": "Array of issue objects detected on the page." + } + } + }, + "example": { + "url": "https://www.vitality.co.uk/", + "page_data": { + "h1": "Live longer with Vitality insurance", + "h2": "Health insurance", + "js": 6, + "css": 1, + "doc": 83, + "img": 21, + "lang": "en", + "cache": "no-cache, no-store", + "chars": 153843, + "title": "Vitality Insurance | Award-Winning Insurance Provider", + "words": 1621, + "ext_js": 4, + "h1_len": 35, + "h2_len": 16, + "robots": "index, follow", + "ext_doc": 12, + "h1_hash": "4c57f3fc38a26dcc202c11b8975f590e", + "inlinks": 922, + "js_size": 543728, + "css_size": 443163, + "encoding": "gzip", + "h1_count": 1, + "h2_count": 14, + "h3_count": 9, + "h4_count": 33, + "img_size": 700322, + "refpages": 921, + "canonical": "https://www.vitality.co.uk/", + "title_len": 53, + "html_ratio": 40, + "time_check": "2025-07-29 11:06:30", + "title_hash": "c33af508bc32002acac1e3a12606c626", + "description": "Vitality is a leading UK insurer offering health and life insurance. Get your quote today and unlock discounts and rewards from top brands.", + "total_links": 230, + "errors_count": 0, + "issues_count": 2, + "num_keywords": 48369, + "notices_count": 2, + "redirect_count": 5, + "redirect_links": 4, + "warnings_count": 0, + "description_len": 139, + "description_hash": "3bb8e0f3905c4b7203a8b7cae91f890b", + "traffic_forecast": 10716 + }, + "issues": [ + { + "code": "extlinks3xx", + "type": "notice", + "group": "links_v2", + "snippet": { + "type": "urls", + "value": [ + { + "status": "302", + "url": "https://members.vitality.co.uk/my-points/confirm-an-activity" + }, + { + "status": "302", + "url": "https://members.vitality.co.uk/" + } + ] + } + }, + { + "code": "css_big", + "type": "notice", + "group": "css", + "snippet": { + "type": "urls", + "value": [ + { + "status": "200", + "url": "https://www.vitality.co.uk/dist/vds/css/presales.css?v=2025.6.30121236", + "size": "443163" + } + ] + } + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "Example with url_id", + "source": "curl --location 'https://api.seranking.com/v1/project-management/audits/issues?audit_id=123&url_id=50958380' \\\n--header 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "Example with url", + "source": "curl --location 'https://api.seranking.com/v1/project-management/audits/issues?audit_id=123&url=https://www.vitality.co.uk/' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/audits/found-links": { + "get": { + "operationId": "getFoundLinks", + "tags": [ + "Website Audit" + ], + "summary": "Get found links", + "description": "Returns every hyperlink found across the site. Supports filter chains for advanced queries (e.g., all nofollow external links returning `4xx`).\n\nTo build complex queries, add an array of `filter` parameters to the URL query string. This allows you to chain multiple conditions together using logical operators. Each filter consists of three parts, formatted with an index in brackets (e.g., `filter[0]`, `filter[1]`).\n\n**Example 1: OR Logic**\n\n- `filter[0]` sets the base condition (`status = 301`).\n\n- `filter[1][type]=or` **explicitly connects** the next condition (`status = 302`) with an **OR**.\n\n**Example 2: AND Logic**\n\nTo find all broken (`404`) image links (`anchor_type = image`).\n\n- `filter[0]` sets the base condition (`status = 404`).\n\n- `filter[1][type]=and` **must be included** to connect the second condition (`anchor_type = image`) with an **AND**. Omitting it would result in an error.\n\nIf successful, the server returns the `200` HTTP status code and an object containing the total number of matching links and a list of link objects. Returns HTTP `404` if the audit is not found (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/audit/#recheck-audit" + }, + "parameters": [ + { + "name": "audit_id", + "in": "query", + "required": true, + "description": "Unique audit ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "page_type", + "in": "query", + "description": "Fields to change. See [Audit settings object](#audit-settings-object).", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of links to return.", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "Starting position for pagination.", + "schema": { + "type": "integer" + } + }, + { + "name": "filter", + "in": "query", + "description": "Filter chain. Each entry is `{ param, value, type? }`. See below.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of links matching the request criteria." + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Destination URL." + }, + "id": { + "type": "string", + "description": "Unique link identifier." + }, + "status": { + "type": "string", + "description": "HTTP status code of the destination URL." + }, + "type": { + "type": "string", + "description": "Logical operator used to combine conditions. Possible values: `and`, `or`. Required starting from the second filter condition." + }, + "source_url": { + "type": "string", + "description": "URL of the page where the link was found." + }, + "source_noindex": { + "type": "string", + "description": "Indicates whether the source page has a noindex directive (`1` –yes, `0` – no)." + }, + "nofollow": { + "type": "string", + "description": "Indicates whether the link has a nofollow attribute (`1` –yes, `0` – no)." + }, + "alt": { + "type": "string", + "description": "Alt attribute of the link, if available." + }, + "anchor_type": { + "type": "string", + "description": "Anchor type (for example, `text` or `image`)." + }, + "anchor": { + "type": "string", + "description": "Visible anchor text of the link." + }, + "title": { + "type": "string", + "description": "Title attribute of the link, if available." + } + }, + "description": "Array of link objects." + }, + "description": "Array of link objects." + } + } + }, + "example": { + "total": 103624, + "items": [ + { + "url": "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)", + "id": "1153787496", + "status": "200", + "type": "hyperlink", + "source_url": "[https://www.vitality.co.uk/advisers/](https://www.vitality.co.uk/advisers/)", + "source_noindex": "1", + "nofollow": "0", + "alt": "", + "anchor_type": "text", + "anchor": "Personal", + "title": "" + }, + { + "url": "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)", + "id": "1153787624", + "status": "200", + "type": "hyperlink", + "source_url": "[https://www.vitality.co.uk/business/](https://www.vitality.co.uk/business/)", + "source_noindex": "0", + "nofollow": "0", + "alt": "", + "anchor_type": "text", + "anchor": "Personal", + "title": "" + }, + { + "url": "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)", + "id": "1153787774", + "status": "200", + "type": "hyperlink", + "source_url": "[https://www.vitality.co.uk/community/](https://www.vitality.co.uk/community/)", + "source_noindex": "0", + "nofollow": "0", + "alt": "", + "anchor_type": "text", + "anchor": "Personal", + "title": "" + }, + { + "url": "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)", + "id": "1153787908", + "status": "200", + "type": "hyperlink", + "source_url": "[https://www.vitality.co.uk/healthcare-providers/](https://www.vitality.co.uk/healthcare-providers/)", + "source_noindex": "0", + "nofollow": "0", + "alt": "", + "anchor_type": "text", + "anchor": "Personal", + "title": "" + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "To find all internal links that have a status code of either 301 OR 302", + "source": "curl --location 'https://api.seranking.com/v1/project-management/audits/issue-pages?audit_id=123&page_type=internal&limit=10&filter[0][param]=status&filter[0][value]=301&filter[1][param]=status&filter[1][value]=302&filter[1][type]=or' \\\n--header 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/project-management/audits/issue-pages?audit_id=123&page_type=internal&limit=10&filter[0][param]=status&filter[0][value]=404&filter[1][param]=anchor_type&filter[1][value]=image&filter[1][type]=and' \\\n--header 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "Example without filters", + "source": "curl --location 'https://api.seranking.com/v1/project-management/audits/issue-pages?audit_id=123&page_type=all&limit=4&offset=0' \\\n--header 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "Example with filters", + "source": "curl --location 'https://api.seranking.com/v1/project-management/audits/issue-pages?audit_id=123&page_type=internal&limit=10&filter[0][param]=status&filter[0][value]=404&filter[1][param]=anchor_type&filter[1][value]=image&filter[1][type]=and' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/audits/history": { + "get": { + "operationId": "getAuditHistory", + "tags": [ + "Website Audit" + ], + "summary": "Get audit history", + "description": "Retrieves historical data for a specific audit run, including audit settings, domain metrics, and issue summaries.\n\nIf successful, the server returns the `200` HTTP status code and an object containing historical audit data. Returns HTTP `404` if the audit or specified date is not found (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/audit/#get-audit-history" + }, + "parameters": [ + { + "name": "audit_id", + "in": "query", + "required": true, + "description": "Unique audit ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "date", + "in": "query", + "required": true, + "description": "The specific date of the historical audit to retrieve (YYYY-MM-DD).", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "audit_time": { + "type": "string", + "description": "Date and time when the audit was completed." + }, + "domain_data": { + "type": "object", + "properties": { + "dt": { + "type": "integer", + "description": "Domain trust score." + }, + "domain": { + "type": "string", + "description": "Audited domain." + }, + "backlinks": { + "type": "string", + "description": "Number of backlinks." + }, + "index_google": { + "type": "string", + "description": "Number of pages indexed by Google." + } + }, + "description": "Domain metrics at the time of the audit." + }, + "settings": { + "type": "object", + "properties": { + "source_site": { + "type": "integer" + }, + "source_sitemap": { + "type": "integer" + }, + "max_pages": { + "type": "integer" + }, + "max_depth": { + "type": "integer" + } + }, + "description": "Audit configuration used for this historical run." + }, + "pages_data": { + "type": "object", + "properties": { + "css3xx": { + "type": "integer" + }, + "css_big": { + "type": "integer" + }, + "h1_long": { + "type": "integer" + }, + "http4xx": { + "type": "integer" + }, + "title_duplicate": { + "type": "integer" + }, + "description_duplicate": { + "type": "integer" + } + }, + "description": "Number of affected pages grouped by issue code." + }, + "totals": { + "type": "object", + "properties": { + "total_pages": { + "type": "integer", + "description": "Total number of audited pages." + }, + "total_warnings": { + "type": "integer", + "description": "Total number of warnings found." + }, + "total_errors": { + "type": "integer", + "description": "Total number of errors found." + }, + "total_passed": { + "type": "integer", + "description": "Total number of passed checks." + } + }, + "description": "Summary statistics of the audit results." + }, + "version": { + "type": "string", + "description": "Audit engine version." + } + } + }, + "example": { + "audit_time": "2025-07-29 11:19:33", + "domain_data": { + "dt": 44, + "domain": "www.vitality.co.uk", + "backlinks": "212249", + "index_google": "1380" + }, + "settings": { + "source_site": 1, + "source_sitemap": 1, + "max_pages": 1000, + "max_depth": 10 + }, + "pages_data": { + "css3xx": 1, + "css_big": 880, + "h1_long": 19, + "http4xx": 28, + "title_duplicate": 143, + "description_duplicate": 169 + }, + "totals": { + "total_pages": 1009, + "total_warnings": 979, + "total_errors": 346, + "total_passed": 77 + }, + "version": "2.0" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location 'https://api.seranking.com/v1/project-management/audits/history?audit_id=123&date=2025-07-29' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/audits/sitemaps": { + "get": { + "operationId": "listAuditSitemaps", + "tags": [ + "Website Audit" + ], + "summary": "List audit sitemaps", + "description": "Returns every sitemap configured as a crawl source for an audit, with per-sitemap page counts. Sitemaps are only used when `settings.source_sitemap` is `1`. The flag auto-enables when a sitemap is added.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/audit/#update-audit-title" + }, + "parameters": [ + { + "name": "audit_id", + "in": "query", + "required": true, + "description": "Unique audit ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "List identifier. Use in `deleteAuditSourcePages`." + }, + "url": { + "type": "string" + }, + "pages_count": { + "type": "integer", + "description": "URLs contained in the list." + } + }, + "description": "Source-pages list records." + }, + "description": "Source-pages list records." + } + } + }, + "example": { + "items": [ + { + "id": 8421, + "url": "https://example.com/sitemap.xml", + "pages_count": 1820 + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request GET 'https://api.seranking.com/v1/project-management/audits/sitemaps?audit_id=123' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "post": { + "operationId": "addAuditSitemap", + "tags": [ + "Website Audit" + ], + "summary": "Add audit sitemap", + "description": "Registers a sitemap URL as a crawl source. Auto-sets `settings.source_sitemap` to `1` so the next run uses it.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/audit/#update-audit-title" + }, + "parameters": [ + { + "name": "audit_id", + "in": "query", + "required": true, + "description": "Unique audit ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Absolute sitemap URL (e.g., `https://example.com/sitemap.xml`)." + } + }, + "required": [ + "url" + ] + }, + "example": { + "url": "https://example.com/sitemap.xml" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "New sitemap identifier." + } + } + }, + "example": { + "id": 8421 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request POST 'https://api.seranking.com/v1/project-management/audits/sitemaps?audit_id=123' \\\n--header 'Authorization: Token YOUR_API_KEY' \\\n--data '{\n \"url\": \"https://example.com/sitemap.xml\"\n}'" + } + ] + }, + "delete": { + "operationId": "deleteAuditSourcePages", + "tags": [ + "Website Audit" + ], + "summary": "Delete audit source pages", + "description": "Removes a sitemap from an audit’s crawl sources. Does not toggle `settings.source_sitemap` off. Use `updateAuditSettings` if you want to disable sitemap crawling entirely.\n\nHTTP `204 No Content` on success.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/audit/#update-audit-title" + }, + "parameters": [ + { + "name": "audit_id", + "in": "query", + "required": true, + "description": "Unique audit ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "sitemap_id", + "in": "query", + "required": true, + "description": "Sitemap identified from List Audit Sitemaps.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request DELETE 'https://api.seranking.com/v1/project-management/audits/sitemaps?audit_id=123&sitemap_id=456' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/audits/source-pages": { + "get": { + "operationId": "listAuditSourcePages", + "tags": [ + "Website Audit" + ], + "summary": "List audit source pages", + "description": "Returns every uploaded custom page list used as a crawl source. Source-pages lists are only used when `settings.source_file` is `1`. The flag auto-enables when a list is added.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/audit/#update-audit-title" + }, + "parameters": [ + { + "name": "audit_id", + "in": "query", + "required": true, + "description": "Unique audit ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "List identifier. Use in `deleteAuditSourcePages`." + }, + "name": { + "type": "string", + "description": "Uploaded filename." + }, + "pages_count": { + "type": "integer", + "description": "URLs contained in the list." + } + }, + "description": "Source-pages list records." + }, + "description": "Source-pages list records." + } + } + }, + "example": { + "items": [ + { + "id": 1732, + "name": "priority-pages.txt", + "pages_count": 240 + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request GET 'https://api.seranking.com/v1/project-management/audits/source-pages?audit_id=123' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/backlinks": { + "get": { + "operationId": "listBacklinks", + "tags": [ + "Backlink Checker" + ], + "summary": "List backlinks", + "description": "Retrieves a paginated list of backlinks for the specified website.\n\nIf successful, the server returns the `200` HTTP status code and an array of `backlink` objects. Returns HTTP `403` if `site_id` is wrong (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/backlink-checker/#list-backlinks" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Website ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of backlinks to return (max 1000).", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "Number of backlinks to skip before starting to collect the result set.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "anchor": { + "type": "string", + "description": "Backlink anchor text." + }, + "category": { + "type": "string", + "description": "Target backlink category." + }, + "charge_period": { + "nullable": true, + "description": "Charging period (`onetime`, `monthly`, `quarterly`, `6months`, `year`).", + "type": "string" + }, + "charge_start": { + "nullable": true, + "description": "Payment start date.", + "type": "string" + }, + "date_added": { + "type": "string", + "description": "Date when the backlink was added." + }, + "date_lost": { + "type": "string", + "description": "Date when the backlink was lost." + }, + "date_placement": { + "type": "string", + "description": "Date when the backlink was placed." + }, + "domain": { + "type": "string", + "description": "Domain of the referring page." + }, + "duration": { + "type": "string", + "description": "Backlink placement duration." + }, + "fb_likes": { + "type": "string", + "description": "Number of Facebook shares." + }, + "from_domainid": { + "type": "string", + "description": "Referring domain ID." + }, + "from_url": { + "type": "string", + "description": "Referring page URL." + }, + "gin_index": { + "type": "string", + "description": "Indicates whether the page is indexed by Google." + }, + "gin_index_check_date": { + "type": "string", + "description": "Date when the indexing status was checked." + }, + "http_status": { + "type": "string", + "description": "HTTP status code of the referring page." + }, + "id": { + "type": "string", + "description": "Unique backlink identifier." + }, + "is_blocked_meta": { + "type": "string", + "description": "Indicates whether the page is blocked via meta directives (`1` – yes, `0` – no)." + }, + "is_blocked_robotstxt": { + "type": "string", + "description": "Indicates whether the page is blocked via `robots.txt` (`1` – yes, `0` – no)." + }, + "is_disavow": { + "type": "string", + "description": "Indicates whether the backlink is disavowed (`1` – yes, `0` – no)." + }, + "is_forced_status": { + "type": "string", + "description": "Indicates whether the backlink status was changed manually." + }, + "is_image": { + "type": "string", + "description": "Indicates whether the backlink is an image link." + }, + "is_link_not_found": { + "type": "string", + "description": "Indicates whether the backlink was not found." + }, + "is_nofollow": { + "type": "string", + "description": "Indicates whether the backlink has a nofollow attribute." + }, + "is_redir": { + "type": "string", + "description": "Indicates whether the referring page redirects." + }, + "is_sponsored": { + "type": "string", + "description": "Indicates whether the backlink is sponsored." + }, + "last_crawler_visit": { + "type": "string", + "description": "Last crawl date." + }, + "link_manager": { + "type": "string", + "description": "Responsible manager." + }, + "link_type": { + "type": "string", + "description": "Type of backlink anchor text." + }, + "mozda": { + "nullable": true, + "description": "Moz Domain Authority score.", + "type": "integer" + }, + "notes": { + "type": "string", + "description": "Backlink notes." + }, + "num_links": { + "type": "integer", + "description": "Number of backlinks from the referring page." + }, + "price": { + "nullable": true, + "description": "Backlink placement cost.", + "type": "number" + }, + "source": { + "nullable": true, + "description": "Backlink source.", + "type": "string" + }, + "src_domain_country": { + "type": "string", + "description": "Country of the referring domain." + }, + "src_domain_inlink_rank": { + "nullable": true, + "description": "Referring domain rank.", + "type": "integer" + }, + "src_domain_ip": { + "type": "string", + "description": "Referring domain IP address." + }, + "src_domain_mozda_date": { + "nullable": true, + "description": "Moz Domain Authority check date.", + "type": "string" + }, + "src_domain_region_id": { + "nullable": true, + "description": "Referring domain region ID.", + "type": "integer" + }, + "title": { + "type": "string", + "description": "Referring page title." + }, + "to_url": { + "type": "string", + "description": "Target URL." + }, + "total_ext_links": { + "type": "string", + "description": "Number of external links on the referring page." + }, + "ugc": { + "nullable": true, + "description": "Indicates whether the backlink is user-generated content.", + "type": "integer" + } + } + } + }, + "example": [ + { + "anchor": "SE Ranking", + "category": "", + "charge_period": null, + "charge_start": null, + "date_added": "2018-06-11", + "date_lost": "2021-10-10", + "date_placement": "2018-10-11", + "domain": "highpoweredseo.com", + "duration": "", + "fb_likes": "2", + "from_domainid": "4630", + "from_url": "http://highpoweredseo.com/how-to-become-a-better", + "gin_index": "11", + "gin_index_check_date": "2018-10-05", + "http_status": "1", + "id": "53", + "is_blocked_meta": "1", + "is_blocked_robotstxt": "1", + "is_disavow": "0", + "is_forced_status": "0", + "is_image": "1", + "is_link_not_found": "1", + "is_nofollow": "1", + "is_redir": "1", + "is_sponsored": "0", + "last_crawler_visit": "2018-10-05", + "link_manager": "", + "link_type": "", + "mozda": null, + "notes": "ghjg", + "num_links": 10, + "price": null, + "source": null, + "src_domain_country": "USA", + "src_domain_inlink_rank": null, + "src_domain_ip": "184.168.221.40", + "src_domain_mozda_date": null, + "src_domain_region_id": null, + "title": "Title", + "to_url": "http://tourl.ru/", + "total_ext_links": "2", + "ugc": null + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request GET 'https://api.seranking.com/v1/project-management/backlinks?site_id=123&limit=100&offset=100' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "post": { + "operationId": "addBacklink", + "tags": [ + "Backlink Checker" + ], + "summary": "Add backlink", + "description": "Adds a new backlink to the specified website.\n\nIf successful, the server returns the `200` HTTP status code and an object containing the backlink ID. Returns HTTP `400` for invalid input or duplicate backlinks. Returns HTTP `403` if access is denied (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/backlink-checker/#add-backlink" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Website ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Backlink URL." + }, + "price": { + "type": "integer", + "description": "Backlink price." + }, + "currency": { + "type": "string", + "description": "Currency code in ISO 4217 format (for example, `USD`, `EUR`)." + }, + "charge_period": { + "type": "string", + "description": "Charging period (`onetime`, `monthly`, `quarterly`, `6months`, `year`)." + }, + "charge_start": { + "type": "string", + "description": "Payment start date (in `YYYY-MM-DD`)." + } + }, + "required": [ + "url" + ] + }, + "example": { + "url": "http://backlink.test/", + "price": 1, + "charge_period": "onetime", + "charge_start": "2018-01-01" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Unique identifier of the added backlink." + } + } + }, + "example": { + "id": 1 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request POST 'https://api.seranking.com/v1/project-management/backlinks?site_id=123' \\\n--header 'Authorization: Token YOUR_API_KEY' \\\n--data '{\n \"url\": \"http://backlink.test/\",\n \"price\": 1,\n \"charge_period\": \"onetime\",\n \"charge_start\": \"2018-01-01\"\n}'" + } + ] + } + }, + "/v1/project-management/backlinks/import": { + "post": { + "operationId": "importBacklinksList", + "tags": [ + "Backlink Checker" + ], + "summary": "Import backlinks list", + "description": "Imports a list of backlinks for the specified website.\n\nIf successful, the server returns the `200` HTTP status code and an object containing import results. Returns HTTP `400` for invalid input and HTTP `403` if access is denied (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/backlink-checker/#import-backlinks-list" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Project ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of backlink URLs to import." + }, + "price": { + "type": "integer", + "description": "Backlink price." + }, + "currency": { + "type": "string", + "description": "Currency code in ISO 4217 format (for example, `USD`, `EUR`)." + }, + "charge_period": { + "type": "string", + "description": "Charging period (`onetime`, `monthly`, `quarterly`, `6months`, `year`)." + }, + "charge_start": { + "type": "string", + "description": "Payment start date (in `YYYY-MM-DD`)." + }, + "group_id": { + "type": "integer", + "description": "Backlink group ID." + }, + "manager": { + "type": "string", + "description": "Manager name associated with the backlinks." + } + }, + "required": [ + "list" + ] + }, + "example": { + "group_id": 1, + "price": 100, + "currency": "USD", + "manager": "manager", + "charge_period": "onetime", + "charge_start": "2021-10-10", + "list": [ + "https://google.com" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "added": { + "type": "integer", + "description": "Number of backlinks added." + }, + "duplicates": { + "type": "integer", + "description": "Number of duplicate backlinks." + }, + "total": { + "type": "integer", + "description": "Total number of backlinks processed." + } + } + }, + "example": { + "added": 1, + "duplicates": 0, + "total": 1 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request POST 'https://api.seranking.com/v1/project-management/backlinks/import?site_id=123' \\\n--header 'Authorization: Token YOUR_API_KEY' \\\n--data '{\n \"group_id\": 1,\n \"price\": 100,\n \"currency\": \"USD\",\n \"manager\": \"manager\",\n \"charge_period\": \"onetime\",\n \"charge_start\": \"2021-10-10\",\n \"list\": [\"https://google.com\"]\n}'" + } + ] + } + }, + "/v1/project-management/backlinks/gsc/settings": { + "patch": { + "operationId": "updateBacklinkImportSettings", + "tags": [ + "Backlink Checker" + ], + "summary": "Update backlink import settings", + "description": "Updates automatic backlink import settings from Google Search Console.\n\nIf successful, the server returns the `204` HTTP status code with no response body. Returns HTTP `403` if access is denied (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/backlink-checker/#update-backlink-import-settings" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Website ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "gsc_autoimport": { + "type": "boolean", + "description": "Enable or disable automatic import from Google Search Console." + } + }, + "required": [ + "gsc_autoimport" + ] + }, + "example": { + "gsc_autoimport": true + } + } + } + }, + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request PATCH 'https://api.seranking.com/v1/project-management/backlinks/gsc/settings?site_id=123' \\\n--header 'Authorization: Token YOUR_API_KEY' \\\n--data '{\n \"gsc_autoimport\": true\n}'" + } + ] + } + }, + "/v1/project-management/backlinks/gsc/import": { + "post": { + "operationId": "startBacklinkImportFromGoogleSearchConsole", + "tags": [ + "Backlink Checker" + ], + "summary": "Start backlink import from Google Search Console", + "description": "Starts importing backlinks from Google Search Console.\n\nIf successful, the server returns the `200` HTTP status code and an import task object. Returns HTTP `403` if access is denied (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/backlink-checker/#start-backlink-import-from-google-search-console" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Website ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Import task status (`queued`, `processing`, `completed`, `failed`)." + }, + "token": { + "type": "string", + "description": "Import task token used to check import status." + } + } + }, + "example": { + "status": "queued", + "token": "1c84d0375d44725521647919c17f1cb9" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request POST 'https://api.seranking.com/v1/project-management/backlinks/gsc/import?site_id=123' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "get": { + "operationId": "getBacklinkImportStatusFromGoogleSearchConsole", + "tags": [ + "Backlink Checker" + ], + "summary": "Get backlink import status from Google Search Console", + "description": "Returns the status of a Google Search Console backlink import task.\n\nIf successful, the server returns the `200` HTTP status code and import task status. Returns HTTP `403` if access is denied (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/backlink-checker/#get-backlink-import-status-from-google-search-console" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Website ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "integer", + "description": "Timestamp of the latest status update (milliseconds)." + }, + "status": { + "type": "string", + "description": "Import task status." + } + } + }, + "example": { + "time": 1635417036150, + "status": "queued" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request GET 'https://api.seranking.com/v1/project-management/backlinks/gsc/import?site_id=123' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/backlinks/delete": { + "post": { + "operationId": "deleteBacklinks", + "tags": [ + "Backlink Checker" + ], + "summary": "Delete backlinks", + "description": "Deletes backlinks for the specified website.\n\nIf successful, the server returns the `204` HTTP status code with no response body. Returns HTTP `400` for invalid input and HTTP `403` if access is denied (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/backlink-checker/#delete-backlinks" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Website ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "backlink_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Array of backlink IDs to delete." + } + }, + "required": [ + "backlink_ids" + ] + }, + "example": { + "backlink_ids": [ + 1, + 2, + 3 + ] + } + } + } + }, + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request POST 'https://api.seranking.com/v1/project-management/backlinks/delete?site_id=123' \\\n--header 'Authorization: Token YOUR_API_KEY' \\\n--data '{\n \"backlink_ids\": [1, 2, 3]\n}'" + } + ] + } + }, + "/v1/project-management/backlinks/recheck": { + "post": { + "operationId": "recheckBacklinks", + "tags": [ + "Backlink Checker" + ], + "summary": "Recheck backlinks", + "description": "Runs an index or HTTP status check for the specified backlinks.\n\nIf successful, the server returns the `204` HTTP status code with no response body. Returns HTTP `400` for invalid input and HTTP `403` if access is denied (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/backlink-checker/#recheck-backlinks" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Website ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "backlink_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Array of backlink IDs to check." + }, + "recheck_type": { + "type": "string", + "description": "Type of check: `status`, `index`. Defaults to `status`." + } + }, + "required": [ + "backlink_ids" + ] + }, + "example": { + "backlink_ids": [ + 1, + 2 + ], + "recheck_type": "index" + } + } + } + }, + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request POST 'https://api.seranking.com/v1/project-management/backlinks/recheck?site_id=123' \\\n--header 'Authorization: Token YOUR_API_KEY' \\\n--data '{\n \"backlink_ids\": [1, 2],\n \"recheck_type\": \"index\"\n}'" + } + ] + } + }, + "/v1/project-management/backlinks/stats": { + "get": { + "operationId": "getBacklinkStatistics", + "tags": [ + "Backlink Checker" + ], + "summary": "Get backlink statistics", + "description": "Returns backlink statistics for the specified website.\n\nIf successful, the server returns the `200` HTTP status code and backlink statistics. Returns HTTP `403` if `site_id` is wrong (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/backlink-checker/#get-backlink-statistics" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Website ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of backlinks." + }, + "anchors": { + "type": "integer", + "description": "Total number of unique anchor texts." + }, + "ip": { + "type": "integer", + "description": "Total number of unique IP addresses." + }, + "domains": { + "type": "integer", + "description": "Total number of unique domains." + }, + "dofollow": { + "type": "integer", + "description": "Total number of dofollow backlinks." + }, + "nofollow": { + "type": "integer", + "description": "Total number of nofollow backlinks." + }, + "limit": { + "type": "integer", + "description": "Number of backlinks that can still be added today." + } + } + }, + "example": { + "total": 9, + "anchors": 1, + "ip": 8, + "domains": 9, + "dofollow": 0, + "nofollow": 1, + "limit": 988 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request GET 'https://api.seranking.com/v1/project-management/backlinks/stats?site_id=123' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/backlinks/disavowed": { + "get": { + "operationId": "listDisavowedBacklinks", + "tags": [ + "Backlink Checker" + ], + "summary": "List disavowed backlinks", + "description": "Returns a list of disavowed backlinks.\n\nIf successful, the server returns the `200` HTTP status code and disavowed backlinks. Returns HTTP `403` if access is denied (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/backlink-checker/#list-disavowed-backlinks" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Website ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of disavowed backlinks to return.", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "Offset for pagination.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total_disavow_links": { + "type": "integer", + "description": "Total number of disavowed backlinks." + }, + "disavow_links": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Disavowed backlink ID." + }, + "url": { + "type": "string", + "description": "Disavowed backlink URL." + }, + "type": { + "type": "string", + "description": "Disavow type (url or domain)." + }, + "exported": { + "type": "integer", + "description": "Indicates whether the backlink has been exported (`0` or `1`)." + }, + "domain_inlink_rank": { + "type": "integer", + "description": "Domain rank." + } + }, + "description": "Array of disavowed backlink objects." + }, + "description": "Array of disavowed backlink objects." + } + } + }, + "example": { + "total_disavow_links": 2, + "disavow_links": [ + { + "id": 3, + "url": "https://google.com", + "type": "url", + "exported": 0, + "domain_inlink_rank": 96 + }, + { + "id": 4, + "url": "https://google.com", + "type": "url", + "exported": 0, + "domain_inlink_rank": 100 + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request GET 'https://api.seranking.com/v1/project-management/backlinks/disavowed?site_id=123&limit=100&offset=0' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "post": { + "operationId": "addDisavowedBacklinks", + "tags": [ + "Backlink Checker" + ], + "summary": "Add disavowed backlinks", + "description": "Adds a list of disavowed backlinks.\n\nIf successful, the server returns the `200` HTTP status code and the number of added disavowed backlinks. Returns HTTP `400` for invalid input and HTTP `403` if access is denied (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/backlink-checker/#add-disavowed-backlinks" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Website ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of backlink URLs to disavow." + } + }, + "required": [ + "list" + ] + }, + "example": { + "list": [ + "https://google.com", + "https://example.com" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "added": { + "type": "integer", + "description": "Number of disavowed backlinks added." + } + } + }, + "example": { + "added": 2 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request POST 'https://api.seranking.com/v1/project-management/backlinks/disavowed?site_id=123' \\\n--header 'Authorization: Token YOUR_API_KEY' \\\n--data '{\n \"list\": [\n \"https://google.com\",\n \"https://example.com\"\n ]\n}'" + } + ] + }, + "delete": { + "operationId": "deleteDisavowedBacklink", + "tags": [ + "Backlink Checker" + ], + "summary": "Delete disavowed backlink", + "description": "Deletes a backlink from the disavow list.\n\nIf successful, the server returns the `204` HTTP status code with no response body. Returns HTTP `400` for invalid input and HTTP `403` if access is denied (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/backlink-checker/#delete-disavowed-backlink" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Website ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "required": true, + "description": "Disavowed backlink ID (query parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request DELETE 'https://api.seranking.com/v1/project-management/backlinks/disavowed?site_id=123&id=789' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/backlinks/groups": { + "get": { + "operationId": "listBacklinkGroups", + "tags": [ + "Backlink Checker" + ], + "summary": "List backlink groups", + "description": "Returns all backlink groups for the specified website.\n\nIf successful, the server returns the `200` HTTP status code and a list of backlink groups. Returns HTTP `403` if access is denied (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/backlink-checker/#list-backlink-groups" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Website ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total_groups": { + "type": "integer", + "description": "Total number of backlink groups." + }, + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Backlink group ID." + }, + "name": { + "type": "string", + "description": "Backlink group name." + }, + "count": { + "type": "integer", + "description": "Number of backlinks in the group." + } + }, + "description": "Array of backlink group objects." + }, + "description": "Array of backlink group objects." + } + } + }, + "example": { + "total_groups": 2, + "groups": [ + { + "id": 1, + "name": "General", + "count": 5 + }, + { + "id": 2, + "name": "Second group", + "count": 1 + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request GET 'https://api.seranking.com/v1/project-management/backlinks/groups?site_id=123' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "post": { + "operationId": "createBacklinkGroup", + "tags": [ + "Backlink Checker" + ], + "summary": "Create backlink group", + "description": "Creates a new backlink group.\n\nIf successful, the server returns the `200` HTTP status code and the created group ID. Returns HTTP `400` for invalid input and HTTP `403` if access is denied (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/backlink-checker/#create-backlink-group" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Website ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the backlink group." + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "Outreach links" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "description": "ID of the created backlink group." + } + } + }, + "example": { + "group_id": 2 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request POST 'https://api.seranking.com/v1/project-management/backlinks/groups?site_id=123' \\\n--header 'Authorization: Token YOUR_API_KEY' \\\n--data '{\n \"name\": \"Outreach links\"\n}'" + } + ] + }, + "delete": { + "operationId": "deleteBacklinkGroup", + "tags": [ + "Backlink Checker" + ], + "summary": "Delete backlink group", + "description": "Deletes the specified backlink group.\n\nIf successful, the server returns the `204` HTTP status code. Returns HTTP `400` if the group ID is invalid or the group doesn’t exist. Returns HTTP `403` if access is denied (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/backlink-checker/#delete-backlink-group" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Website ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "required": true, + "description": "Backlink group ID (query parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request DELETE 'https://api.seranking.com/v1/project-management/backlinks/groups?site_id=123&id=147' \\\n--header 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "patch": { + "operationId": "renameBacklinkGroup", + "tags": [ + "Backlink Checker" + ], + "summary": "Rename backlink group", + "description": "Renames an existing backlink group.\n\nIf successful, the server returns the `204` HTTP status code with no response body. Returns HTTP `400` for invalid input and HTTP `403` if access is denied (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/backlink-checker/#rename-backlink-group" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Website ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Backlink group ID." + }, + "name": { + "type": "string", + "description": "New backlink group name." + } + }, + "required": [ + "id", + "name" + ] + }, + "example": { + "id": 2, + "name": "Guest posts" + } + } + } + }, + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + } + } + }, + "/v1/project-management/backlinks/groups/move": { + "post": { + "operationId": "moveBacklinksToGroup", + "tags": [ + "Backlink Checker" + ], + "summary": "Move backlinks to group", + "description": "Moves backlinks or backlink groups into the specified backlink group.\n\n**Note:** At least one of `backlink_ids` or `group_ids` must be provided.\n\nIf successful, the server returns the `204` HTTP status code with no response body. Returns HTTP `400` for invalid input and HTTP `403` if access is denied (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/backlink-checker/#move-backlinks-to-group" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Website ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Target backlink group ID." + }, + "backlink_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Array of backlink IDs to move." + }, + "group_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Array of backlink group IDs to move." + } + }, + "required": [ + "id" + ] + }, + "example": { + "id": 1, + "backlink_ids": [ + 10, + 11 + ], + "group_ids": [ + 2 + ] + } + } + } + }, + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl --location --request POST 'https://api.seranking.com/v1/project-management/backlinks/groups/move?site_id=123' \\\n--header 'Authorization: Token YOUR_API_KEY' \\\n--data '{\n \"id\": 1,\n \"backlink_ids\": [10, 11],\n \"group_ids\": [2]\n}'" + } + ] + } + }, + "/v1/project-management/airt/brand": { + "get": { + "operationId": "getSiteBrand", + "tags": [ + "AI Results Tracker" + ], + "summary": "Get site brand", + "description": "Returns the brand configured for the specified site.\n\nIf the site is not found, the API returns the `404` HTTP status code (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/ai-result-tracker/#get-brands" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "site_id": { + "type": "integer", + "description": "Site ID." + }, + "brand": { + "type": "string", + "description": "Configured brand. `null` if not set." + } + } + }, + "example": { + "site_id": 11270054, + "brand": "SE Ranking" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/airt/brand?site_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "post": { + "operationId": "saveSiteBrand", + "tags": [ + "AI Results Tracker" + ], + "summary": "Save site brand", + "description": "Configures or overwrites the brand for a site. The brand is shared across all AI search engines.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/ai-result-tracker/#save-brands" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "brand": { + "type": "string", + "description": "Brand name (non-empty, max 255 characters)." + } + }, + "required": [ + "brand" + ] + }, + "example": { + "brand": "SE Ranking" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "site_id": { + "type": "integer", + "description": "Site ID." + }, + "brand": { + "type": "string", + "description": "Configured brand." + } + } + }, + "example": { + "site_id": 11270054, + "brand": "SE Ranking" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/project-management/airt/brand?site_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"brand\": \"SE Ranking\"}'" + } + ] + } + }, + "/v1/project-management/airt/llm": { + "get": { + "operationId": "listLLMEngines", + "tags": [ + "AI Results Tracker" + ], + "summary": "List LLM engines / Get LLM engine", + "description": "### List LLM engines\n\nReturns all LLM engines configured for the specified site.\n\nReturns an array of LLM engine objects.\n\n### Get LLM engine\n\nReturns details of a specific LLM engine.\n\nIf the LLM engine is not found, the API returns the `404` HTTP status code (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/ai-result-tracker/#list-llm" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "llm_id", + "in": "query", + "description": "LLM engine ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "LLM engine ID." + }, + "site_id": { + "type": "integer", + "description": "Site ID." + }, + "base_name": { + "type": "string", + "description": "LLM engine base name (e.g., `chatgpt`, `google_ai_overview`)." + }, + "country_code": { + "type": "string", + "description": "ISO 3166-1 alpha-2 country code." + }, + "region_name": { + "type": "string", + "nullable": true, + "description": "Specific region or locality name." + }, + "lang_code": { + "type": "string", + "description": "ISO 639-1 language code." + }, + "region_settings": { + "anyOf": [ + { + "type": "object", + "properties": { + "lat": { + "type": "number" + }, + "lng": { + "type": "number" + }, + "uule": { + "type": "string" + }, + "radius": { + "type": "integer" + } + } + }, + { + "type": "array", + "maxItems": 0 + } + ], + "description": "Engine-specific region settings. Object with `lat`, `lng`, `uule`, `radius` for geo-targeted engines; empty array `[]` for engines without region settings." + } + } + }, + "title": "List LLM engines" + }, + { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "LLM engine ID." + }, + "site_id": { + "type": "integer", + "description": "Site ID." + }, + "base_name": { + "type": "string", + "description": "LLM engine base name (e.g., `chatgpt`, `google_ai_overview`)." + }, + "country_code": { + "type": "string", + "description": "ISO 3166-1 alpha-2 country code." + }, + "region_name": { + "type": "string", + "description": "Specific region or locality name." + }, + "lang_code": { + "type": "string", + "description": "ISO 639-1 language code." + }, + "region_settings": { + "type": "object", + "properties": { + "lat": { + "type": "number" + }, + "lng": { + "type": "number" + }, + "uule": { + "type": "string" + }, + "radius": { + "type": "integer" + } + }, + "description": "Engine-specific region settings. Object with `lat`, `lng`, `uule`, `radius` for geo-targeted engines; empty array `[]` for engines without region settings." + } + }, + "title": "Get LLM engine" + } + ] + }, + "examples": { + "listLLMEngines": { + "summary": "List LLM engines", + "value": [ + { + "id": 151216, + "site_id": 11270054, + "base_name": "google_ai_overview", + "country_code": "us", + "region_name": "Washburn County, Wisconsin, United States", + "lang_code": "en", + "region_settings": { + "lat": 45.965719, + "lng": -91.814895, + "uule": "", + "radius": 25000 + } + }, + { + "id": 151294, + "site_id": 11270054, + "base_name": "chatgpt", + "country_code": "us", + "region_name": null, + "lang_code": "en", + "region_settings": [] + } + ] + }, + "getLLMEngine": { + "summary": "Get LLM engine", + "value": { + "id": 151216, + "site_id": 11270054, + "base_name": "google_ai_overview", + "country_code": "us", + "region_name": "Washburn County, Wisconsin, United States", + "lang_code": "en", + "region_settings": { + "lat": 45.965719, + "lng": -91.814895, + "uule": "", + "radius": 25000 + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'api.seranking.com/v1/project-management/airt/llm?site_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/airt/llm?site_id=123&llm_id=456' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "post": { + "operationId": "createLLMEngine", + "tags": [ + "AI Results Tracker" + ], + "summary": "Create LLM engine", + "description": "Adds a new LLM engine to a site.\n\n**Prerequisite:** A brand must be configured for the site.\n\nReturns the created LLM engine object. If the site is not found, the API returns the `404` HTTP status code (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/ai-result-tracker/" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "base_name": { + "type": "string", + "description": "LLM engine base name. Must be one of: `chatgpt`, `google_ai_overview`, `google_ai_mode`, `gemini`." + }, + "country_code": { + "type": "string", + "description": "ISO 3166-1 alpha-2 country code (e.g., `us`)." + }, + "region_name": { + "type": "string", + "description": "Specific region or locality. For location-aware engines (google_ai_overview, google_ai_mode, gemini), must be a canonical SERP location name that matches the specified country_code. chatgpt ignores this field and always return region_name: null." + }, + "lang_code": { + "type": "string", + "description": "ISO 639-1 language code (e.g., `en`). Must be a valid language code supported by Google." + } + }, + "required": [ + "base_name", + "country_code" + ] + }, + "example": { + "base_name": "chatgpt", + "country_code": "us", + "lang_code": "en" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "LLM engine ID." + }, + "site_id": { + "type": "integer", + "description": "Site ID." + }, + "base_name": { + "type": "string", + "description": "LLM engine base name (e.g., `chatgpt`, `google_ai_overview`)." + }, + "country_code": { + "type": "string", + "description": "ISO 3166-1 alpha-2 country code." + }, + "region_name": { + "nullable": true, + "description": "Specific region or locality name.", + "type": "string" + }, + "lang_code": { + "type": "string", + "description": "ISO 639-1 language code." + }, + "region_settings": { + "type": "array", + "items": { + "description": "Engine-specific region settings. Object with `lat`, `lng`, `uule`, `radius` for geo-targeted engines; empty array `[]` for engines without region settings." + }, + "description": "Engine-specific region settings. Object with `lat`, `lng`, `uule`, `radius` for geo-targeted engines; empty array `[]` for engines without region settings." + } + } + }, + "example": { + "id": 160000, + "site_id": 11270054, + "base_name": "chatgpt", + "country_code": "us", + "region_name": null, + "lang_code": "en", + "region_settings": [] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/project-management/airt/llm?site_id=123' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"base_name\": \"chatgpt\",\n \"country_code\": \"us\",\n \"lang_code\": \"en\"\n }'" + } + ] + }, + "patch": { + "operationId": "updateLLMEngine", + "tags": [ + "AI Results Tracker" + ], + "summary": "Update LLM engine", + "description": "Partially updates the configuration of an LLM engine (`region_name` and/or `lang_code`).\n\nReturns the updated LLM engine object. If the LLM engine is not found, the API returns the `404` HTTP status code (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/ai-result-tracker/#update-llm" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "llm_id", + "in": "query", + "required": true, + "description": "LLM engine ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "region_name": { + "type": "string", + "description": "New region or locality name. Canonical form required. Set to null to clear. Only honored by google_ai_overview, google_ai_mode, and gemini. chatgpt silently ignores this field and always returns region_name: null." + }, + "lang_code": { + "type": "string", + "description": "New language code. Set to `null` to clear." + } + } + }, + "example": { + "region_name": "Los Angeles, California, United States", + "lang_code": "es" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "LLM engine ID." + }, + "site_id": { + "type": "integer", + "description": "Site ID." + }, + "base_name": { + "type": "string", + "description": "LLM engine base name (e.g., `chatgpt`, `google_ai_overview`)." + }, + "country_code": { + "type": "string", + "description": "ISO 3166-1 alpha-2 country code." + }, + "region_name": { + "type": "string", + "description": "Specific region or locality name." + }, + "lang_code": { + "type": "string", + "description": "ISO 639-1 language code." + }, + "region_settings": { + "type": "object", + "properties": { + "lat": { + "type": "number" + }, + "lng": { + "type": "number" + }, + "uule": { + "type": "string" + }, + "radius": { + "type": "integer" + } + }, + "description": "Engine-specific region settings. Object with `lat`, `lng`, `uule`, `radius` for geo-targeted engines; empty array `[]` for engines without region settings." + } + } + }, + "example": { + "id": 151216, + "site_id": 11270054, + "base_name": "google_ai_overview", + "country_code": "us", + "region_name": "Los Angeles, California, United States", + "lang_code": "es", + "region_settings": { + "lat": 34.052235, + "lng": -118.243683, + "uule": "", + "radius": 25000 + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X PATCH 'https://api.seranking.com/v1/project-management/airt/llm?site_id=123&llm_id=456' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"region_name\": \"Los Angeles, California, United States\",\n \"lang_code\": \"es\"\n }'" + } + ] + }, + "delete": { + "operationId": "deleteLLMEngine", + "tags": [ + "AI Results Tracker" + ], + "summary": "Delete LLM engine", + "description": "Removes the specified LLM engine from the site.\n\n`204` — No content. If the LLM engine is not found, the API returns the `404` HTTP status code (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/ai-result-tracker/#delete-llm" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "llm_id", + "in": "query", + "required": true, + "description": "LLM engine ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X DELETE 'https://api.seranking.com/v1/project-management/airt/llm?site_id=123&llm_id=456' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/airt/llm/status": { + "get": { + "operationId": "getLLMStatus", + "tags": [ + "AI Results Tracker" + ], + "summary": "Get LLM status", + "description": "Returns tracking status for the specified LLM engine, including progress and check statistics.\n\nIf the LLM engine is not found, the API returns the `404` HTTP status code (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/ai-result-tracker/" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "llm_id", + "in": "query", + "required": true, + "description": "LLM engine ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "llm_id": { + "type": "integer", + "description": "LLM engine ID." + }, + "site_id": { + "type": "integer", + "description": "Site ID." + }, + "progress": { + "type": "integer", + "description": "Percentage of prompts checked today (0–100)." + }, + "prompts_count": { + "type": "integer", + "description": "Total number of prompts for this LLM engine." + }, + "prompts_checked": { + "type": "integer", + "description": "Number of prompts checked on the site’s current date." + }, + "last_update_date": { + "type": "string", + "nullable": true, + "description": "Date of the last check. If progress is 100%, returns the current date. Otherwise, returns the latest historical check date. `null` if no checks have been performed yet." + } + } + }, + "examples": { + "allPromptsCheckedTodayGoogleAIOverview": { + "summary": "All prompts checked today (Google AI Overview)", + "value": { + "llm_id": 151216, + "site_id": 11270054, + "progress": 100, + "prompts_count": 5, + "prompts_checked": 5, + "last_update_date": "2026-02-19" + } + }, + "allPromptsCheckedTodayChatGPT": { + "summary": "All prompts checked today (ChatGPT)", + "value": { + "llm_id": 151294, + "site_id": 11270054, + "progress": 100, + "prompts_count": 5, + "prompts_checked": 5, + "last_update_date": "2026-02-19" + } + }, + "noPromptsConfigured": { + "summary": "No prompts configured", + "value": { + "llm_id": 160000, + "site_id": 11270054, + "progress": 0, + "prompts_count": 0, + "prompts_checked": 0, + "last_update_date": null + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/airt/llm/status?site_id=123&llm_id=456' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/airt/llm/statistics": { + "get": { + "operationId": "getLLMStatistics", + "tags": [ + "AI Results Tracker" + ], + "summary": "Get LLM statistics", + "description": "Returns statistics for the specified LLM engine, including presence stats, AIO presence, mentions/links, and organic overlap (AI Overview only).\n\n**Note:** When a date range is provided, only the **first** and **last** dates in the range are used. Values show data for the last date; diff values show the change from first to last date in percentage points.\n\nIf the LLM engine is not found, the API returns the `404` HTTP status code (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/ai-result-tracker/#llm-statistics" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "llm_id", + "in": "query", + "required": true, + "description": "LLM engine ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "from", + "in": "query", + "description": "Start date for date range (`YYYY-MM-DD` format). If not provided, defaults to the current date.\n\nDefault: Current date", + "schema": { + "type": "string" + } + }, + { + "name": "to", + "in": "query", + "description": "End date for date range (`YYYY-MM-DD` format). If not provided, defaults to the current date.\n\nDefault: Current date", + "schema": { + "type": "string" + } + }, + { + "name": "top", + "in": "query", + "description": "Top N positions to analyze (0–100):\n• `0` – all positions (default when omitted)\n• `3` – only the top 3 positions\n• `10` – only top 10 positions\n\nDefault: 0 (all positions)", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "llm_id": { + "type": "integer", + "description": "LLM engine ID." + }, + "site_id": { + "type": "integer", + "description": "Site ID." + }, + "top": { + "type": "integer", + "description": "`top` value used for this query (0 = all positions)." + }, + "stats": { + "type": "object", + "properties": { + "prompts_count": { + "type": "integer", + "description": "Total number of prompts." + }, + "last_update": { + "type": "string", + "description": "Date of the last check (`YYYY-MM-DD`)." + }, + "indexed_percent": { + "type": "integer", + "description": "Percentage of prompts that have been indexed (0–100)." + } + } + }, + "presence": { + "type": "object", + "properties": { + "link_percent_in_top": { + "type": "integer", + "description": "Percentage of prompts with site link in Top N (0–100)." + }, + "link_diff": { + "type": "integer", + "description": "Change in link percentage from first to last date (percentage points)." + }, + "mention_percent_in_top": { + "type": "integer", + "description": "Percentage of prompts with brand mention in Top N (0–100)." + }, + "mention_diff": { + "type": "integer", + "description": "Change in mention percentage from first to last date (percentage points)." + } + } + }, + "aio_presence": { + "type": "object", + "properties": { + "prompts_with_aio": { + "type": "integer", + "description": "Percentage of prompts that show AI Overview (0–100)." + }, + "prompts_with_aio_diff": { + "type": "integer", + "description": "Change in `prompts_with_aio` from first to last date (percentage points)." + } + } + }, + "organic_overlap": { + "type": "object", + "properties": { + "overlap_count": { + "type": "integer", + "description": "Number of overlapping URLs from the Top 20 organic and AIO." + }, + "overlap_count_diff": { + "type": "integer", + "description": "Change in overlap count from first to last date." + }, + "overlap_percent": { + "type": "integer", + "description": "Percentage of overlap (0–100)." + } + } + }, + "sources_presence": { + "type": "object", + "properties": { + "answers_with_sources": { + "type": "integer", + "description": "Percentage of answers that have source links (0–100)." + }, + "answers_with_sources_diff": { + "type": "integer", + "description": "Change in `answers_with_sources` from first to last date (percentage points)." + } + } + } + } + }, + "examples": { + "googleAIOverviewWithDateRangeAndTop3": { + "summary": "Google AI Overview with date range and top=3", + "value": { + "llm_id": 151216, + "site_id": 11270054, + "top": 3, + "stats": { + "prompts_count": 5, + "last_update": "2026-02-19", + "indexed_percent": 100 + }, + "presence": { + "link_percent_in_top": 0, + "link_diff": 0, + "mention_percent_in_top": 0, + "mention_diff": 0 + }, + "aio_presence": { + "prompts_with_aio": 80, + "prompts_with_aio_diff": 0 + }, + "organic_overlap": { + "overlap_count": 4, + "overlap_count_diff": 0, + "overlap_percent": 20 + } + } + }, + "chatgptWithDateRangeAllPositions": { + "summary": "ChatGPT with date range (all positions)", + "value": { + "llm_id": 151294, + "site_id": 11270054, + "top": 0, + "stats": { + "prompts_count": 5, + "last_update": "2026-02-19", + "indexed_percent": 100 + }, + "presence": { + "link_percent_in_top": 0, + "link_diff": 0, + "mention_percent_in_top": 20, + "mention_diff": 0 + }, + "sources_presence": { + "answers_with_sources": 60, + "answers_with_sources_diff": 0 + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "Current date only (default)", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/airt/llm/statistics?site_id=123&llm_id=456' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "With date range and top 3", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/airt/llm/statistics?site_id=123&llm_id=456&from=2026-02-01&to=2026-02-19&top=3' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/airt/prompts": { + "get": { + "operationId": "listPrompts", + "tags": [ + "AI Results Tracker" + ], + "summary": "List prompts", + "description": "Retrieves the list of prompts tracked by a specific LLM engine with pagination support.\n\nIf the site or LLM engine is not found, the API returns the `404` HTTP status code (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).\n\n**Warning:** Some numeric fields (`prompt_id`, `site_llm_id`, `prompt_llm_id`, `search_volume`) may be returned as JSON strings. Consumers should coerce them to integers.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/ai-result-tracker/#get-prompts" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "llm_id", + "in": "query", + "required": true, + "description": "LLM engine ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of items per page (1–1,000).", + "schema": { + "type": "integer", + "default": 100 + } + }, + { + "name": "offset", + "in": "query", + "description": "Offset from the beginning of the list.", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "group_ids[]", + "in": "query", + "description": "Filter by prompt group IDs (repeatable). See [AIRT Groups](https://seranking.com/api/project/airt-groups/).", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "site_llm_id": { + "type": "integer", + "description": "LLM engine ID." + }, + "site_id": { + "type": "integer", + "description": "Site ID." + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prompt_llm_id": { + "type": "string", + "description": "prompts-LLM link ID. Use for DELETE and as the path ID in Get prompt answer." + }, + "site_llm_id": { + "type": "string", + "description": "LLM engine ID." + }, + "prompt_id": { + "type": "string", + "description": "Prompt ID." + }, + "group_id": { + "type": "string", + "description": "Prompt group ID." + }, + "prompt": { + "type": "string", + "description": "Prompt text." + }, + "search_volume": { + "type": "string", + "description": "Search volume (if available)." + }, + "intent": { + "type": "string", + "description": "Prompt intent (if set)." + }, + "intent_meaning": { + "type": "array", + "items": { + "type": "string", + "description": "Intent letters: `I`, `N`, `L`, `C`, `T`. `null` when unset." + }, + "description": "Intent letters: `I`, `N`, `L`, `C`, `T`. `null` when unset." + } + }, + "description": "List of prompt objects (see below)." + }, + "description": "List of prompt objects (see below)." + }, + "total": { + "type": "integer", + "description": "Total number of prompts for this LLM." + }, + "limit": { + "type": "integer", + "description": "Number of items per page." + }, + "offset": { + "type": "integer", + "description": "Offset from the beginning." + } + } + }, + "example": { + "site_llm_id": 151294, + "site_id": 11270054, + "items": [ + { + "prompt_llm_id": "1411621", + "site_llm_id": "151294", + "prompt_id": "1021954", + "group_id": "26377", + "prompt": "best seo tool", + "search_volume": "0", + "intent": "1", + "intent_meaning": [ + "I" + ] + } + ], + "total": 5, + "limit": 5, + "offset": 0 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "List all prompts", + "source": "curl -X GET 'api.seranking.com/v1/project-management/airt/prompts?site_id=123&llm_id=456&limit=5&offset=0' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "Filter by prompt groups (repeat group_ids[])", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/airt/prompts?site_id=123&llm_id=456&group_ids[]=12&group_ids[]=18' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "post": { + "operationId": "addPrompts", + "tags": [ + "AI Results Tracker" + ], + "summary": "Add prompts", + "description": "Adds new prompts to the specified LLM engine. Duplicate prmpts for the same LLM engine are automatically skipped.\n\nReturns the count of actually added prompts (excluding duplicates) in the HTTP status `201`. If the site or LLM engine is not found, the API returns the `404` HTTP status code (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/ai-result-tracker/#add-prompts" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "llm_id", + "in": "query", + "required": true, + "description": "LLM engine ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "prompts": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Prompts to add. Minimum 1 item. Each item non-empty (whitespace-only rejected), max 255 characters." + }, + "group_id": { + "type": "integer", + "description": "Target prompt group ID. Defaults to the site’s default group." + } + }, + "required": [ + "prompts" + ] + }, + "example": { + "prompts": [ + "best seo tool", + "seo rank tracker", + "website audit tool" + ] + } + } + } + }, + "responses": { + "201": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "site_llm_id": { + "type": "integer", + "description": "LLM engine ID." + }, + "site_id": { + "type": "integer", + "description": "Site ID." + }, + "added": { + "type": "integer", + "description": "Number of prompts actually added (excluding duplicates)." + }, + "prompts": { + "type": "array", + "items": { + "type": "integer", + "description": "Array of `prompt_llm_id` values for added prompts." + }, + "description": "Array of `prompt_llm_id` values for added prompts." + } + } + }, + "example": { + "site_llm_id": 151294, + "site_id": 11270054, + "added": 3, + "prompts": [ + 1411621, + 1411624, + 1411627 + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "Add to the default group", + "source": "curl -X POST 'https://api.seranking.com/v1/project-management/airt/prompts?site_id=123&llm_id=456' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"prompts\": [\n \"best seo tool\",\n \"seo rank tracker\",\n \"website audit tool\"\n ]\n }'" + }, + { + "lang": "Shell", + "label": "Add to a specific prompt group", + "source": "curl -X POST 'https://api.seranking.com/v1/project-management/airt/prompts?site_id=123&llm_id=456' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"prompts\": [\"best seo tool\", \"seo rank tracker\"],\n \"group_id\": 12\n }'" + } + ] + } + }, + "/v1/project-management/airt/prompts/delete": { + "post": { + "operationId": "deletePrompts", + "tags": [ + "AI Results Tracker" + ], + "summary": "Delete prompts", + "description": "Deletes prompts from the specified LLM engine by their `prompt_llm_id`.\n\n**Note:** Use the List prompts endpoint first to retrieve `prompt_llm_id` values for prompt you want to delete.\n\n`204` No content — prompts deleted successfully. If the site or LLM engine is not found, the API returns the `404` HTTP status code (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/ai-result-tracker/#delete-prompts" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "llm_id", + "in": "query", + "required": true, + "description": "LLM engine ID (path parameter).", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "prompt_llm_ids": { + "type": "array", + "items": {}, + "description": "Array of prompt-LLM link IDs to delete (min 1 item)." + } + }, + "required": [ + "prompt_llm_ids" + ] + } + } + } + }, + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + } + } + }, + "/v1/project-management/airt/prompts/rankings": { + "get": { + "operationId": "getPromptRankings", + "tags": [ + "AI Results Tracker" + ], + "summary": "Get prompt rankings", + "description": "Retrieves ranking data for all prompts tracked by the specified LLM engine within a date range. Returns positions, URLs, search volume, search intent, and organic-AI overlap data for each prompt.\n\nIf the site or LLM engine is not found, the API returns the `404` HTTP status code (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)).\n\n**Note:** When position and count fields are `null`, it means there was no AI result block on that date — not that the brand wasn’t found.\n\n**Groups mode (mode=groups)**\n\nWhen called with `mode=groups`, the endpoint returns aggregated time-series presence metrics per prompt group instead of per-prompt rankings. The envelope is identical to the default mode (`site_llm_id`, `site_id`, `date_from`, `date_to`, `items`, `total`, `limit`, `offset`); each entry in `items` represents one group rather than one prompt.\n\n**Note:** In groups mode, `limit` and `offset` paginate over groups — not prompts — and `total` is the count of groups in the response. A single matching group returns `total: 1` regardless of how many prompts it contains.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/ai-result-tracker/#get-rankings" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "llm_id", + "in": "query", + "required": true, + "description": "LLM engine ID (path parameter).", + "schema": { + "type": "integer" + } + }, + { + "name": "date_from", + "in": "query", + "description": "Start date for rankings data (`YYYY-MM-DD` format).\n\nDefault: Current date", + "schema": { + "type": "string" + } + }, + { + "name": "date_to", + "in": "query", + "description": "End date for rankings data (`YYYY-MM-DD` format).\n\nDefault: Current date", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of items per page (1–1000).", + "schema": { + "type": "integer", + "default": 100 + } + }, + { + "name": "offset", + "in": "query", + "description": "Offset from the beginning of the list.", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "group_ids[]", + "in": "query", + "description": "Filter by prompt group IDs (repeatable).", + "schema": { + "type": "integer" + } + }, + { + "name": "mode", + "in": "query", + "description": "Response mode. Omit (default) for per-prompt rankings. Set to `groups` to receive aggregated time-series presence metrics per prompt group; see [Groups mode](#groups-mode) for the full response shape.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "site_llm_id": { + "type": "integer", + "description": "LLM engine ID." + }, + "site_id": { + "type": "integer", + "description": "Site ID." + }, + "date_from": { + "type": "string", + "description": "Start date of the data range." + }, + "date_to": { + "type": "string", + "description": "End date of the data range." + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prompt_id": { + "type": "integer", + "description": "Prompt ID (distinct from \n*prompt_llm_id*; this value is not accepted by Get prompt answer)." + }, + "prompt": { + "type": "string", + "description": "Prompt text." + }, + "search_volume": { + "type": "integer", + "nullable": true, + "description": "Monthly search volume for the prompt." + }, + "search_intent": { + "type": "array", + "items": { + "type": "string", + "description": "Search intent codes:\n• `I` – informational\n• `N` – navigational\n• `L` – local\n• `C` – commercial\n• `T` – transactional" + }, + "nullable": true, + "description": "Search intent codes:\n• `I` – informational\n• `N` – navigational\n• `L` – local\n• `C` – commercial\n• `T` – transactional" + }, + "positions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Check date." + }, + "url_position": { + "type": "integer", + "description": "Position of the site’s URL in AI results:\n• `null` – no AI result block on that date\n• `0` – URL not found in results\n• `1+` – position in results" + }, + "urls_count": { + "type": "integer", + "description": "Total number of URLs present in AI results. `null` when no AI result block." + }, + "mention_position": { + "type": "integer", + "description": "Position of brand mention in AI results:\n• `null` – no AI result block on that date\n• `0` – brand not mentioned\n• `1+` – position of mention" + }, + "mentions_count": { + "type": "integer", + "description": "Total number of brand mentions in AI results. `null` when no AI result block." + }, + "organic_overlap": { + "type": "integer", + "nullable": true, + "description": "Organic-AI overlap metric (0–100). `null` when no AI result block." + }, + "organic_overlap_percent": { + "type": "integer", + "nullable": true, + "description": "Organic overlap as percentage (0–100). `null` when no AI result block." + }, + "mention_presence": { + "type": "integer", + "description": "Percentage of prompts in the group with `mention_position > 0` on the date (0–100). For Google AI Overview engines, the denominator is “prompts where the AI Overview block was present”; for other engines, the denominator is “all prompts in the group”." + }, + "link_presence": { + "type": "integer", + "description": "Percentage of prompts in the group with `url_position > 0` on the date (0–100). Same denominator rule as `mention_presence`." + }, + "mention_presence_diff": { + "description": "Change vs the previous date in the response, in percentage points. `null` for the first date in the range. Positive values are returned as signed strings (e.g., `\"+25\"`); negative values and zero are returned as plain numbers (e.g., `-25`, `0`). Coerce with `Number()` before arithmetic." + }, + "link_presence_diff": { + "description": "Same encoding rule as `mention_presence_diff`." + } + }, + "description": "Daily position data (see below)." + }, + "description": "Daily position data (see below)." + }, + "group_id": { + "type": "integer", + "description": "Prompt group ID. Always returned. Without `group_ids[]` filter, the response includes one item per existing group on the site; with the filter, it includes only the matching groups." + }, + "group_name": { + "type": "string", + "description": "Group name (mirrors the name returned by [List prompt groups](https://seranking.com/api/project/airt-groups/))." + }, + "prompts_count": { + "type": "integer", + "description": "Number of prompts in the group at `date_to`. Counted per LLM engine, so the same group can show different `prompts_count` values on different engines." + }, + "organic_overlap": { + "type": "number", + "nullable": true, + "description": "Organic-AI overlap metric (0–100). `null` when no AI result block." + } + }, + "description": "Rankings data grouped by prompt (see below)." + }, + "description": "Rankings data grouped by prompt (see below)." + }, + "total": { + "type": "integer", + "description": "Total number of prompts." + }, + "limit": { + "type": "integer", + "description": "Number of items per page." + }, + "offset": { + "type": "integer", + "description": "Offset from the beginning." + } + } + }, + "examples": { + "googleAIOverviewRankings": { + "summary": "Google AI Overview rankings", + "value": { + "site_llm_id": 151216, + "site_id": 11270054, + "date_from": "2026-02-17", + "date_to": "2026-02-19", + "items": [ + { + "prompt_id": 1021696, + "prompt": "What are the best tools for monitoring backlinks currently on the market?", + "search_volume": 0, + "search_intent": [ + "I" + ], + "positions": [ + { + "date": "2026-02-19", + "url_position": 0, + "urls_count": 10, + "mention_position": 6, + "mentions_count": 8, + "organic_overlap": 3, + "organic_overlap_percent": 15 + } + ] + } + ], + "total": 5, + "limit": 2, + "offset": 0 + } + }, + "chatgptRankings": { + "summary": "ChatGPT rankings", + "value": { + "site_llm_id": 151294, + "site_id": 11270054, + "date_from": "2026-02-17", + "date_to": "2026-02-19", + "items": [ + { + "prompt_id": 1021954, + "prompt": "best seo tool", + "search_volume": null, + "search_intent": null, + "positions": [ + { + "date": "2026-02-19", + "url_position": 0, + "urls_count": 25, + "mention_position": 5, + "mentions_count": 10, + "organic_overlap": null, + "organic_overlap_percent": null + } + ] + } + ], + "total": 5, + "limit": 2, + "offset": 0 + } + }, + "example3": { + "summary": "Example 3", + "value": { + "site_llm_id": 151216, + "site_id": 11270054, + "date_from": "2026-04-01", + "date_to": "2026-04-30", + "limit": 100, + "offset": 0, + "items": [ + { + "group_id": 26377, + "group_name": "General", + "prompts_count": 5, + "search_volume": 0, + "search_intent": [ + "I" + ], + "organic_overlap": 2.2, + "positions": [ + { + "date": "2026-04-01", + "mention_presence": 75, + "link_presence": 0, + "mention_presence_diff": null, + "link_presence_diff": null + }, + { + "date": "2026-04-02", + "mention_presence": 75, + "link_presence": 0, + "mention_presence_diff": 0, + "link_presence_diff": 0 + }, + { + "date": "2026-04-03", + "mention_presence": 25, + "link_presence": 0, + "mention_presence_diff": -50, + "link_presence_diff": 0 + }, + { + "date": "2026-04-04", + "mention_presence": 75, + "link_presence": 0, + "mention_presence_diff": "+50", + "link_presence_diff": 0 + }, + { + "date": "2026-04-05", + "mention_presence": 75, + "link_presence": 25, + "mention_presence_diff": 0, + "link_presence_diff": "+25" + } + ] + } + ], + "total": 1 + } + }, + "example4": { + "summary": "Example 4", + "value": { + "site_llm_id": 151294, + "site_id": 11270054, + "date_from": "2026-04-01", + "date_to": "2026-04-30", + "limit": 100, + "offset": 0, + "items": [ + { + "group_id": 26377, + "group_name": "General", + "prompts_count": 20, + "search_volume": null, + "search_intent": null, + "organic_overlap": null, + "positions": [ + { + "date": "2026-04-01", + "mention_presence": 35, + "link_presence": 0, + "mention_presence_diff": null, + "link_presence_diff": null + }, + { + "date": "2026-04-02", + "mention_presence": 40, + "link_presence": 5, + "mention_presence_diff": "+5", + "link_presence_diff": "+5" + }, + { + "date": "2026-04-30", + "mention_presence": 55, + "link_presence": 5, + "mention_presence_diff": "+15", + "link_presence_diff": "+5" + } + ] + } + ], + "total": 1 + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "Rankings for a date range", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/airt/prompts/rankings?site_id=123&llm_id=456&date_from=2026-02-17&date_to=2026-02-19&limit=2&offset=0' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "Filter by prompt groups (repeat group_ids[])", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/airt/prompts/rankings?site_id=123&llm_id=456&date_from=2026-02-17&date_to=2026-02-19&group_ids[]=12&group_ids[]=18' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/project-management/airt/prompts/rankings?site_id=123&llm_id=456&mode=groups&date_from=2026-04-01&date_to=2026-04-30&group_ids[]=26377' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/airt/prompts/groups": { + "get": { + "operationId": "listPromptGroups", + "tags": [ + "AI Results Tracker – Prompt Groups" + ], + "summary": "List prompt groups", + "description": "**Quick start**\n\n```\ncurl 'https://api.seranking.com/v1/project-management/airt/prompts/groups?site_id=11270054&keys_count=1' \\\n -H 'Authorization: Token YOUR_API_KEY'\n```\n\nReturns every prompt group for project `11270054`, ordered by `position`, with a `keys_count` on each group.\n\nThe response is a **bare JSON array** (no `data` envelope).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/airt-groups/#list-prompt-groups" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Project ID. From `GET /sites`.", + "schema": { + "type": "integer" + } + }, + { + "name": "keys_count", + "in": "query", + "description": "`0` or `1`. When `1`, each group includes a `keys_count` field. Defaults to omitted (no `keys_count` in response).", + "schema": { + "type": "string" + } + }, + { + "name": "site_llm_ids[]", + "in": "query", + "description": "Filter to groups that contain at least one prompt on these LLM engines. **Repeat the parameter:** `site_llm_ids[]=1&site_llm_ids[]=2`. Combined as OR (union).", + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Numeric group ID, encoded as a string. Use as `group_id` in every other prompt-group / prompts endpoint." + }, + "name": { + "type": "string", + "description": "Group name. Unique within the project (case-sensitive). Max 255 chars." + }, + "position": { + "type": "string", + "description": "Sort order within the project, ascending. **Not guaranteed to start at 0**." + }, + "is_default": { + "type": "string", + "description": "`\"1\"` for the project’s undeleteable default group, `\"0\"` otherwise. Exactly one default per project once AIRT has been initialized." + }, + "creation_date": { + "type": "string", + "description": "`YYYY-MM-DD` (server timezone). The default group’s date equals the day AIRT was first opened on the project, not the project’s creation date." + }, + "keys_count": { + "type": "string", + "description": "Numeric prompt count, encoded as a string. **Present only when `keys_count=1` in the query.** When `site_llm_ids[]` is also set, this becomes **per-filtered-engine**." + } + } + } + }, + "examples": { + "example1": { + "summary": "Example 1", + "value": [ + { + "id": "string", + "name": "string", + "position": "string", + "is_default": "string", + "creation_date": "YYYY-MM-DD", + "keys_count": "string" + } + ] + }, + "project11270054AllThreeGroupsWithCountsRequested": { + "summary": "Project 11270054, all three groups, with counts requested", + "value": [ + { + "id": "26377", + "name": "General", + "position": "1", + "is_default": "1", + "creation_date": "2026-03-03", + "keys_count": "25" + }, + { + "id": "52273", + "name": "docs-test-alpha", + "position": "2", + "is_default": "0", + "creation_date": "2026-05-15", + "keys_count": "2" + }, + { + "id": "52276", + "name": "docs-test-beta", + "position": "3", + "is_default": "0", + "creation_date": "2026-05-15", + "keys_count": "3" + } + ] + } + } + } + } + }, + "400": { + "description": "Invalid query parameters." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "description": "Project doesn’t exist, or exists but isn’t owned by the API key (the gateway conflates the two)." + }, + "404": { + "description": "`site_id=0` only." + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + } + }, + "post": { + "operationId": "createPromptGroup", + "tags": [ + "AI Results Tracker – Prompt Groups" + ], + "summary": "Create prompt group", + "description": "Creates a new prompt group for a site. The new group is appended to the end of the group order. Returns `400` if a group with the same name already exists.\n\n**Cost:** 0. Managing prompt groups does not consume API credits or subscription quota.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/airt-groups/#create-prompt-group" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID. Path parameter.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Group name. Non-empty, maximum 255 characters, unique within the site. Body parameter." + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "Competitors" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the created group." + } + } + }, + "example": { + "id": 12 + } + } + } + }, + "400": { + "description": "Empty or missing `name`, name exceeds 255 characters, or name already exists on this site." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "description": "Access denied to the requested site." + }, + "404": { + "description": "Site not found." + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST \"https://api.seranking.com/v1/project-management/airt/prompts/groups?site_id=123\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"name\": \"Competitors\"}'\\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "patch": { + "operationId": "renamePromptGroup", + "tags": [ + "AI Results Tracker – Prompt Groups" + ], + "summary": "Rename prompt group", + "description": "Updates the name of a prompt group.\n\n**Cost:** 0. Managing prompt groups does not consume API credits or subscription quota.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/airt-groups/#rename-prompt-group" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID. Path parameter.", + "schema": { + "type": "integer" + } + }, + { + "name": "group_id", + "in": "query", + "required": true, + "description": "Group ID. Path parameter.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "New group name. Non-empty, maximum 255 characters. Body parameter." + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "Branded queries" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the renamed group." + } + } + }, + "example": { + "id": 12 + } + } + } + }, + "400": { + "description": "Empty or missing `name`, name exceeds 255 characters, or name already exists on this site." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "description": "Access denied to the requested site." + }, + "404": { + "description": "Site or group not found." + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X PATCH \"https://api.seranking.com/v1/project-management/airt/prompts/groups?site_id=123&group_id=147\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"name\": \"Branded queries\"}'\\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "delete": { + "operationId": "deletePromptGroup", + "tags": [ + "AI Results Tracker – Prompt Groups" + ], + "summary": "Delete prompt group", + "description": "Deletes a prompt group. All prompts currently in the group are moved to the default group. The default group itself cannot be deleted.\n\n**Cost:** 0. Managing prompt groups does not consume API credits or subscription quota.\n\nReturns `204 No Content` on success.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/airt-groups/#delete-prompt-group" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID. Path parameter.", + "schema": { + "type": "integer" + } + }, + { + "name": "group_id", + "in": "query", + "required": true, + "description": "Group ID. Path parameter.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No content." + }, + "400": { + "description": "Invalid request." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "description": "Access denied, or attempt to delete the default group." + }, + "404": { + "description": "Site or group not found." + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X DELETE \"https://api.seranking.com/v1/project-management/airt/prompts/groups?site_id=123&group_id=147\"\\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/airt/prompts/groups/order": { + "post": { + "operationId": "changeGroupOrder", + "tags": [ + "AI Results Tracker – Prompt Groups" + ], + "summary": "Change group order", + "description": "Moves a group to a new position in the site’s group order. Provide exactly one of `before_id` or `after_id` to anchor the new position.\n\n**Cost:** 0. Managing prompt groups does not consume API credits or subscription quota.\n\nReturns `204 No Content` on success.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/airt-groups/#change-group-order" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID. Path parameter.", + "schema": { + "type": "integer" + } + }, + { + "name": "group_id", + "in": "query", + "required": true, + "description": "ID of the group to move. Path parameter.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "before_id": { + "type": "integer", + "description": "Place the group immediately before this neighbour group ID. Required if `after_id` is omitted. Body parameter." + }, + "after_id": { + "type": "integer", + "description": "Place the group immediately after this neighbour group ID. Required if `before_id` is omitted. Body parameter." + } + } + }, + "example": { + "after_id": 18 + } + } + } + }, + "responses": { + "204": { + "description": "No content." + }, + "400": { + "description": "Both `before_id` and `after_id` are provided, or neither." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "description": "Access denied to the requested site." + }, + "404": { + "description": "Site, source group, or anchor group not found." + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "Move group 12 to right after group 18", + "source": "curl -X POST \"https://api.seranking.com/v1/project-management/airt/prompts/groups/order?site_id=123&group_id=147\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"after_id\": 18}'\\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/airt/prompts/groups/prompts": { + "delete": { + "operationId": "deleteAllPromptsInGroup", + "tags": [ + "AI Results Tracker – Prompt Groups" + ], + "summary": "Delete all prompts in group", + "description": "Removes every prompt currently assigned to the group. The group itself is not deleted.\n\n**Warning:**\n\n- This operation is destructive. Deleted prompts and their historical data cannot be recovered.\n\n- To keep the prompts but empty the group, use [Move all prompts from one group to another](#move-all-prompts-from-one-group-to-another) instead.\n\n**Cost:** 0. Managing prompt groups does not consume API credits or subscription quota.\n\nReturns `204 No Content` on success.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/airt-groups/#delete-all-prompts-in-group" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID. Path parameter.", + "schema": { + "type": "integer" + } + }, + { + "name": "group_id", + "in": "query", + "required": true, + "description": "Group ID. Path parameter.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No content." + }, + "400": { + "description": "Invalid request." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "description": "Access denied to the requested site." + }, + "404": { + "description": "Site or group not found." + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X DELETE \"https://api.seranking.com/v1/project-management/airt/prompts/groups/prompts?site_id=123&group_id=147\"\\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/airt/prompts/groups/move": { + "post": { + "operationId": "movePromptsToGroup", + "tags": [ + "AI Results Tracker – Prompt Groups" + ], + "summary": "Move prompts to group", + "description": "Moves a specific set of prompts into the target group. Prompts can come from any group on the same site.\n\n**Cost:** 0. Managing prompt groups does not consume API credits or subscription quota.\n\nReturns `204 No Content` on success.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/airt-groups/#move-prompts-to-group" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID. Path parameter.", + "schema": { + "type": "integer" + } + }, + { + "name": "group_id", + "in": "query", + "required": true, + "description": "Target group ID. Path parameter.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "k2site_llm_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Prompt-to-LLM link IDs to move, same IDs returned as `k2site_llm_id` by `GET /prompts`. Non-empty. Body parameter." + } + }, + "required": [ + "k2site_llm_ids" + ] + }, + "example": { + "k2site_llm_ids": [ + 101, + 102, + 103 + ] + } + } + } + }, + "responses": { + "204": { + "description": "No content." + }, + "400": { + "description": "Empty or missing `k2site_llm_ids`." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "description": "Access denied to the requested site." + }, + "404": { + "description": "Site, target group, or one or more prompts not found." + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST \"https://api.seranking.com/v1/project-management/airt/prompts/groups/move?site_id=123&group_id=147\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"k2site_llm_ids\": [101, 102, 103]}'\\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/airt/prompts/groups/transfer": { + "post": { + "operationId": "moveAllPromptsFromOneGroupToAnother", + "tags": [ + "AI Results Tracker – Prompt Groups" + ], + "summary": "Move all prompts from one group to another", + "description": "Moves every prompt from one group to another in a single call. Use this to merge a group into another group, then optionally delete the now-empty source group.\n\n**Cost:** 0. Managing prompt groups does not consume API credits or subscription quota.\n\nReturns `204 No Content` on success.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/airt-groups/#move-all-prompts-from-one-group-to-another" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID. Path parameter.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "from_group_id": { + "type": "integer", + "description": "Source group ID. Body parameter." + }, + "to_group_id": { + "type": "integer", + "description": "Target group ID. Body parameter." + } + }, + "required": [ + "from_group_id", + "to_group_id" + ] + }, + "example": { + "from_group_id": 18, + "to_group_id": 12 + } + } + } + }, + "responses": { + "204": { + "description": "No content." + }, + "400": { + "description": "Missing `from_group_id` or `to_group_id`, or both are equal." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "description": "Access denied to the requested site." + }, + "404": { + "description": "Site, source group, or target group not found." + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST \"https://api.seranking.com/v1/project-management/airt/prompts/groups/transfer?site_id=123\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"from_group_id\": 18, \"to_group_id\": 12}'\\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/airt/competitors": { + "get": { + "operationId": "getCompetitorsBreakdown", + "tags": [ + "AI Results Tracker – Competitors" + ], + "summary": "Get competitors breakdown", + "description": "For each requested prompt over a date range, returns one entry per check date with:\n\n- **Brands mentioned** in the AI answer, ordered as displayed\n\n- **Source URLs** cited in the answer, ordered as displayed\n\n- **Cached copy URL** for human verification (opt out via `include_cached_copy_url=0`)\n\nDates without a check are omitted from `results`. A check with no sources or brands is returned with empty `brands` and `sources` arrays.\n\n**Limits:**\n\n- Up to 50 `prompt_llm_ids[]` per request.\n\n- Date range up to 366 days.\n\n- Requested prompts multiplied by date range days must not exceed 3,660.\n\n- Default range: last 7 days.\n\n**Compact mode (`compact=1`):** adjacent calendar days with identical brands and sources (and, for Google AI Overview, identical `ai_overview_present` and `organic_urls`) are collapsed into a single entry with a `date_from`/`date_to` range instead of `date`. Entry fields (`cached_copy_url`, flags) are taken from the most recent day of the run. Days separated by a gap without checks are never merged.\n\n**Google AI Overview:** entries additionally contain `ai_overview_present` and `organic_urls` (top 20 organic results).\n\n**Warning:** `cached_copy_url` points at the `api4.seranking.com` surface, which is not part of the unified gateway. As of July 9, 2026 the gateway API key is rejected there (`403`) with both `Authorization: Token` header and `?token=` query authentication, so the cached copy cannot currently be fetched with the same credentials. Raised with the AIRT team.\n\n**Cost:** 0. Retrieving competitors data does not consume API credits or subscription quota.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/airt-competitors/#get-competitors-breakdown" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID.", + "schema": { + "type": "integer" + } + }, + { + "name": "llm_id", + "in": "query", + "required": true, + "description": "LLM engine ID.", + "schema": { + "type": "integer" + } + }, + { + "name": "prompt_llm_ids[]", + "in": "query", + "required": true, + "description": "Prompt-to-LLM link IDs from List prompts (repeatable). 1–50 IDs.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "date_from", + "in": "query", + "description": "Start date (`YYYY-MM-DD` format).", + "schema": { + "type": "string", + "default": "7 days before date_to" + } + }, + { + "name": "date_to", + "in": "query", + "description": "End date (`YYYY-MM-DD` format). Cannot exceed the current date.\n\nDefault: Current date", + "schema": { + "type": "string" + } + }, + { + "name": "include_cached_copy_url", + "in": "query", + "description": "Include the cached copy URL in every result entry.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "compact", + "in": "query", + "description": "Collapse consecutive days with identical brands and sources into date ranges.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "site_id": { + "type": "integer", + "description": "Site ID." + }, + "site_llm_id": { + "type": "integer", + "description": "LLM engine ID." + }, + "date_from": { + "type": "string", + "description": "Start date of the data range." + }, + "date_to": { + "type": "string", + "description": "End date of the data range." + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prompt_llm_id": { + "type": "integer", + "description": "Prompt-to-LLM link ID." + }, + "prompt": { + "type": "string", + "description": "Prompt text." + }, + "results": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Check date. Absent when `compact=1`." + }, + "brands": { + "type": "array", + "items": { + "type": "object", + "properties": { + "position": { + "type": "integer" + }, + "name": { + "type": "string" + } + }, + "description": "Brands mentioned in the AI answer, ordered as displayed. Each object: `position` (1-based), `name`." + }, + "description": "Brands mentioned in the AI answer, ordered as displayed. Each object: `position` (1-based), `name`." + }, + "sources": { + "type": "array", + "items": { + "type": "object", + "properties": { + "position": { + "type": "integer" + }, + "url": { + "type": "string" + }, + "domain": { + "type": "string" + } + }, + "description": "Source URLs cited in the AI answer, ordered as displayed. Each object: `position` (1-based), `url`, `domain`." + }, + "description": "Source URLs cited in the AI answer, ordered as displayed. Each object: `position` (1-based), `url`, `domain`." + }, + "has_cached_copy": { + "type": "boolean", + "description": "Whether the cached HTML copy is still available (stored for 30 days). Derived from the check date age, not from a per-day storage check; in rare cases the cached-copy endpoint can still respond with `404`." + }, + "has_answer_text": { + "type": "boolean", + "description": "Whether the answer text is still available (stored for 1 year). Fetch it via Get prompt answer." + }, + "cached_copy_url": { + "type": "string", + "description": "URL of the cached HTML copy endpoint. Only present when `include_cached_copy_url=1` (default). `null` when the copy is unavailable." + } + }, + "description": "One entry per check date (or per collapsed date range when `compact=1`), ordered by date ascending." + }, + "description": "One entry per check date (or per collapsed date range when `compact=1`), ordered by date ascending." + } + }, + "description": "One item per requested prompt, in the order of `prompt_llm_ids[]`." + }, + "description": "One item per requested prompt, in the order of `prompt_llm_ids[]`." + } + } + }, + "example": { + "site_id": 11270054, + "site_llm_id": 151294, + "date_from": "2026-07-01", + "date_to": "2026-07-08", + "items": [ + { + "prompt_llm_id": 1411621, + "prompt": "best seo tool", + "results": [ + { + "date": "2026-07-08", + "brands": [ + { + "position": 1, + "name": "Semrush" + }, + { + "position": 2, + "name": "SE Ranking" + } + ], + "sources": [ + { + "position": 1, + "url": "https://seranking.com/blog/best-seo-tools/", + "domain": "seranking.com" + } + ], + "has_cached_copy": true, + "has_answer_text": true, + "cached_copy_url": "https://api4.seranking.com/sites/11270054/airt/v2/llm/151294/prompts/1411621/cached-copy?date=2026-07-08" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "Missing or invalid `prompt_llm_ids[]`, invalid date format, `date_from` greater than `date_to`, or date range exceeds the limit." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "description": "Access denied to the requested site." + }, + "404": { + "description": "LLM engine not found for this site, or prompt not found or does not belong to this LLM engine." + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl 'https://api.seranking.com/v1/project-management/airt/competitors?site_id=11270054&llm_id=151294&prompt_llm_ids[]=1411621&prompt_llm_ids[]=1411624&date_from=2026-07-01&date_to=2026-07-08' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/airt/competitors/dates": { + "get": { + "operationId": "getCompetitorsCheckDates", + "tags": [ + "AI Results Tracker – Competitors" + ], + "summary": "Get competitors check dates", + "description": "Returns the list of dates within a range on which the prompt was checked and competitors data is available. Use it to avoid requesting empty periods.\n\n**Note:** Default range: last 30 days. Maximum range: 366 days.\n\n**Cost:** 0. Retrieving competitors data does not consume API credits or subscription quota.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/airt-competitors/#get-competitors-check-dates" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID.", + "schema": { + "type": "integer" + } + }, + { + "name": "llm_id", + "in": "query", + "required": true, + "description": "LLM engine ID.", + "schema": { + "type": "integer" + } + }, + { + "name": "prompt_llm_id", + "in": "query", + "required": true, + "description": "Prompt-to-LLM link ID from List prompts.", + "schema": { + "type": "integer" + } + }, + { + "name": "date_from", + "in": "query", + "description": "Start date (`YYYY-MM-DD` format).", + "schema": { + "type": "string", + "default": "30 days before date_to" + } + }, + { + "name": "date_to", + "in": "query", + "description": "End date (`YYYY-MM-DD` format). Cannot exceed the current date.\n\nDefault: Current date", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "site_id": { + "type": "integer", + "description": "Site ID." + }, + "site_llm_id": { + "type": "integer", + "description": "LLM engine ID." + }, + "prompt_llm_id": { + "type": "integer", + "description": "Prompt-to-LLM link ID." + }, + "date_from": { + "type": "string", + "description": "Start date of the data range." + }, + "date_to": { + "type": "string", + "description": "End date of the data range." + }, + "dates": { + "type": "array", + "items": { + "type": "string", + "description": "Dates with competitors data, ordered ascending." + }, + "description": "Dates with competitors data, ordered ascending." + } + } + }, + "example": { + "site_id": 11270054, + "site_llm_id": 151294, + "prompt_llm_id": 1411621, + "date_from": "2026-06-09", + "date_to": "2026-07-08", + "dates": [ + "2026-07-06", + "2026-07-07", + "2026-07-08" + ] + } + } + } + }, + "400": { + "description": "Invalid date parameters." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "description": "Access denied to the requested site." + }, + "404": { + "description": "LLM engine or prompt not found." + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl 'https://api.seranking.com/v1/project-management/airt/competitors/dates?site_id=11270054&llm_id=151294&prompt_llm_id=1411621&date_from=2026-06-09&date_to=2026-07-08' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/airt/competitors/source-metrics": { + "get": { + "operationId": "getSourceMetrics", + "tags": [ + "AI Results Tracker – Competitors" + ], + "summary": "Get source metrics", + "description": "Returns SEO metrics for the source URLs (or their domains) cited in the AI answer for a prompt on a given date:\n\n- **domain_trust** — Domain Trust score\n\n- **ref_domains** — number of referring domains\n\n- **organic_keywords** — number of organic keywords the URL or domain ranks for\n\nFor Google AI Overview engines the source list also includes organic results.\n\n**Cost:** 0. Retrieving competitors data does not consume API credits or subscription quota.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/airt-competitors/#get-source-metrics" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID.", + "schema": { + "type": "integer" + } + }, + { + "name": "llm_id", + "in": "query", + "required": true, + "description": "LLM engine ID.", + "schema": { + "type": "integer" + } + }, + { + "name": "prompt_llm_id", + "in": "query", + "required": true, + "description": "Prompt-to-LLM link ID from List prompts.", + "schema": { + "type": "integer" + } + }, + { + "name": "date", + "in": "query", + "required": true, + "description": "Check date (`YYYY-MM-DD` format). Available dates come from Get competitors check dates.", + "schema": { + "type": "string" + } + }, + { + "name": "mode", + "in": "query", + "description": "Metrics aggregation mode: `domain` (aggregated per source domain) or `url` (per exact source URL).", + "schema": { + "type": "string", + "default": "domain" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "site_id": { + "type": "integer", + "description": "Site ID." + }, + "site_llm_id": { + "type": "integer", + "description": "LLM engine ID." + }, + "prompt_llm_id": { + "type": "integer", + "description": "Prompt-to-LLM link ID." + }, + "date": { + "type": "string", + "description": "Check date." + }, + "mode": { + "type": "string", + "description": "Aggregation mode used: `url` or `domain`." + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "source": { + "type": "string", + "description": "Source URL (`mode=url`) or domain (`mode=domain`)." + }, + "domain": { + "type": "string", + "description": "Domain of the source." + }, + "domain_trust": { + "type": "integer", + "description": "Domain Trust score." + }, + "ref_domains": { + "type": "string", + "description": "Number of referring domains, encoded as a string. Coerce to an integer before arithmetic." + }, + "organic_keywords": { + "type": "integer", + "description": "Number of organic keywords the source ranks for." + } + }, + "description": "Metrics per source (see below)." + }, + "description": "Metrics per source (see below)." + } + } + }, + "example": { + "site_id": 11270054, + "site_llm_id": 151216, + "prompt_llm_id": 1411240, + "date": "2026-07-08", + "mode": "domain", + "items": [ + { + "source": "[www.reddit.com](https://www.reddit.com)", + "domain": "[www.reddit.com](https://www.reddit.com)", + "domain_trust": 98, + "ref_domains": "2532163", + "organic_keywords": 199918377 + }, + { + "source": "[www.semrush.com](https://www.semrush.com)", + "domain": "[www.semrush.com](https://www.semrush.com)", + "domain_trust": 96, + "ref_domains": "222992", + "organic_keywords": 494418 + } + ] + } + } + } + }, + "400": { + "description": "Missing or invalid `date`, or invalid `mode`." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "description": "Access denied to the requested site." + }, + "404": { + "description": "LLM engine or prompt not found." + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl 'https://api.seranking.com/v1/project-management/airt/competitors/source-metrics?site_id=11270054&llm_id=151216&prompt_llm_id=1411240&date=2026-07-08&mode=domain' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/airt/sources/summary": { + "get": { + "operationId": "getSourcesSummary", + "tags": [ + "AI Results Tracker – Sources" + ], + "summary": "Get sources summary", + "description": "Project-level AI-search visibility for a date range. Returns the four opportunity tiles plus the per-competitor bubble-chart data (two counts per brand: mentions in AI answers and mentions in cited source URLs).\n\n**Note:** Homepage and product pages are excluded from the tile counts, mirroring the UI.\n\n**Cost:** 0. Retrieving sources data does not consume API credits or subscription quota.\n\nThe [shared filters](#shared-filters): `site_id`, `date_from`, `date_to`, `site_llm_ids[]`, `prompt_ids[]`, `group_ids[]`.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/airt-sources/#get-sources-summary" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID.", + "schema": { + "type": "integer" + } + }, + { + "name": "date_from", + "in": "query", + "description": "Range start (`YYYY-MM-DD` format).", + "schema": { + "type": "string", + "default": "30 days before date_to" + } + }, + { + "name": "date_to", + "in": "query", + "description": "Range end (`YYYY-MM-DD` format). Cannot exceed the current date.\n\nDefault: Current date", + "schema": { + "type": "string" + } + }, + { + "name": "site_llm_ids[]", + "in": "query", + "description": "Narrow aggregation to specific LLM engines (repeatable).\n\nDefault: All the project’s engines", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "prompt_ids[]", + "in": "query", + "description": "Filter by tracked prompt IDs (repeatable).", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "group_ids[]", + "in": "query", + "description": "Filter by prompt group IDs (repeatable). See [AIRT Groups](AIRT Groups).", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "site_id": { + "type": "integer", + "description": "Site ID." + }, + "site_llm_ids": { + "type": "array", + "items": { + "type": "integer", + "description": "LLM engine IDs included in the aggregation." + }, + "description": "LLM engine IDs included in the aggregation." + }, + "date_from": { + "type": "string", + "description": "Start date of the data range." + }, + "date_to": { + "type": "string", + "description": "End date of the data range." + }, + "summary": { + "type": "object", + "properties": { + "mention_opportunities": { + "type": "integer", + "description": "Sources mentioning 2 or more brands but not the project (total opportunity)." + }, + "competitor_only_mentions": { + "type": "integer", + "description": "Opportunity sources that mention a competitor but not the project." + }, + "new_opportunities": { + "type": "integer", + "description": "Opportunity sources first seen within the last 30 days." + }, + "mentions_without_backlinks": { + "type": "integer", + "description": "Sources that mention the project but do not link to it." + } + }, + "description": "Opportunity tiles (see below)." + }, + "competitors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Competitor brand name." + }, + "count_in_ai_answers": { + "type": "integer", + "description": "Mentions of the brand in AI answers." + }, + "count_in_sources": { + "type": "integer", + "description": "Mentions of the brand in cited source URLs." + } + }, + "description": "Per-competitor mention counts (see below)." + }, + "description": "Per-competitor mention counts (see below)." + } + } + }, + "example": { + "site_id": 11270054, + "site_llm_ids": [ + 151216, + 151294 + ], + "date_from": "2026-06-09", + "date_to": "2026-07-08", + "summary": { + "mention_opportunities": 119, + "competitor_only_mentions": 99, + "new_opportunities": 23, + "mentions_without_backlinks": 168 + }, + "competitors": [ + { + "name": "Semrush", + "count_in_ai_answers": 653, + "count_in_sources": 564 + }, + { + "name": "Ahrefs", + "count_in_ai_answers": 641, + "count_in_sources": 364 + }, + { + "name": "SE Ranking", + "count_in_ai_answers": 489, + "count_in_sources": 290 + } + ] + } + } + } + }, + "400": { + "description": "Invalid query parameters." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "description": "Site not found." + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl 'https://api.seranking.com/v1/project-management/airt/sources/summary?site_id=11270054&date_from=2026-06-09&date_to=2026-07-08' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/airt/sources/domains": { + "get": { + "operationId": "listSourceDomains", + "tags": [ + "AI Results Tracker – Sources" + ], + "summary": "List source domains", + "description": "Outreach target list: domains cited as sources in LLM answers, default sort by AI answers descending. Each row carries the Domains-tab columns: status, pages/AI-answers/prompts counts, coverage %, brand mention rate %, mentioned brands, Domain Trust, backlinks, referring domains, and a per-engine usage breakdown (`usage_count_by_llm`).\n\n**Cost:** 0. Retrieving sources data does not consume API credits or subscription quota.\n\nEnvelope: `site_id`, `site_llm_ids`, `date_from`, `date_to`, `limit`, `offset`, `total`, `items`.\n\n**Warning:** `usage_count` values are returned as JSON strings. Coerce them to integers before arithmetic.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/airt-sources/#list-source-domains" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID.", + "schema": { + "type": "integer" + } + }, + { + "name": "date_from", + "in": "query", + "description": "Range start (`YYYY-MM-DD` format).", + "schema": { + "type": "string", + "default": "30 days before date_to" + } + }, + { + "name": "date_to", + "in": "query", + "description": "Range end (`YYYY-MM-DD` format). Cannot exceed the current date.\n\nDefault: Current date", + "schema": { + "type": "string" + } + }, + { + "name": "site_llm_ids[]", + "in": "query", + "description": "Narrow aggregation to specific LLM engines (repeatable).\n\nDefault: All the project’s engines", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "prompt_ids[]", + "in": "query", + "description": "Filter by tracked prompt IDs (repeatable).", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "group_ids[]", + "in": "query", + "description": "Filter by prompt group IDs (repeatable). See [AIRT Groups](AIRT Groups).", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "competitor_ids[]", + "in": "query", + "description": "Filter to sources where the given competitor brands appear (repeatable).", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "is_brand_mentioned", + "in": "query", + "description": "Restrict to sources where the project’s brand is (`1`) or is not (`0`) mentioned.", + "schema": { + "type": "integer" + } + }, + { + "name": "has_link", + "in": "query", + "description": "Restrict to sources that link (`1`) or do not link (`0`) to the project.", + "schema": { + "type": "integer" + } + }, + { + "name": "search", + "in": "query", + "description": "Substring match on the source domain.", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of items per page (1–100).", + "schema": { + "type": "integer", + "default": 100 + } + }, + { + "name": "offset", + "in": "query", + "description": "Offset from the beginning of the list.", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "sort", + "in": "query", + "description": "Sort field: `domain`, `pages_total`, `ai_answers_total`, `prompts_total`, `prompts`, `coverage_percent`, `brand_mentions_total`, `mention_rate_percent`, `dt`, `backlinks_total`, `referring_domains_total`.", + "schema": { + "type": "string", + "default": "ai_answers_total" + } + }, + { + "name": "sort_order", + "in": "query", + "description": "Sort direction: `asc` or `desc`.", + "schema": { + "type": "string", + "default": "desc" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "site_id": { + "type": "integer" + }, + "site_llm_ids": { + "type": "array", + "items": { + "type": "integer" + } + }, + "date_from": { + "type": "string" + }, + "date_to": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "offset": { + "type": "integer" + }, + "total": { + "type": "integer" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain_id": { + "type": "integer", + "description": "Domain ID. Use as `domain_id` in List source pages to restrict to this domain." + }, + "domain": { + "type": "string", + "description": "Domain name." + }, + "pages_total": { + "type": "integer", + "description": "Number of this domain’s pages cited as sources." + }, + "ai_answers_total": { + "type": "integer", + "description": "Number of AI answers citing the domain." + }, + "prompts": { + "type": "integer", + "description": "Number of prompts whose answers cite the domain." + }, + "brand_mentions_total": { + "type": "integer", + "description": "Mentions of the project’s brand on the domain’s cited pages." + }, + "first_seen": { + "type": "string", + "description": "First date the domain was seen as a source (`YYYY-MM-DD`)." + }, + "last_seen": { + "type": "string", + "description": "Most recent date the domain was seen as a source (`YYYY-MM-DD`)." + }, + "dt": { + "type": "integer", + "description": "Domain Trust." + }, + "backlinks_total": { + "type": "integer", + "description": "Total backlinks to the project from this domain." + }, + "referring_domains_total": { + "type": "integer", + "description": "Referring domains." + }, + "coverage_percent": { + "type": "number", + "description": "Share of tracked prompts whose answers cite the domain (0–100)." + }, + "mention_rate_percent": { + "type": "number", + "description": "Brand mention rate across the domain’s cited pages (0–100)." + }, + "is_project": { + "type": "integer", + "description": "`1` when the domain is the project’s own domain, `0` otherwise." + }, + "is_competitor": { + "type": "integer", + "description": "`1` when the domain belongs to a tracked competitor, `0` otherwise." + }, + "total_answers": { + "type": "integer", + "description": "Total AI answers in scope for the range." + }, + "prompts_total": { + "type": "integer", + "description": "Same value as `prompts`." + }, + "status": { + "type": "string", + "description": "Parsing status: `parsed`, `in_progress`, `not_parsed`, or `not_available`." + }, + "usage_count_by_llm": { + "type": "array", + "items": { + "type": "object", + "properties": { + "site_llm_id": { + "type": "integer" + }, + "usage_count": { + "type": "string" + } + }, + "description": "Per-engine usage breakdown. Each object: `site_llm_id` (integer), `usage_count` (numeric string)." + }, + "description": "Per-engine usage breakdown. Each object: `site_llm_id` (integer), `usage_count` (numeric string)." + }, + "mentions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "domain": { + "type": "string", + "description": "Domain name." + }, + "competitor_id": { + "type": "integer" + } + }, + "description": "Brands mentioned on the domain’s cited pages. Each object: `name`, `domain`, and `competitor_id` — `competitor_id` is present only for tracked competitors, omitted otherwise." + }, + "description": "Brands mentioned on the domain’s cited pages. Each object: `name`, `domain`, and `competitor_id` — `competitor_id` is present only for tracked competitors, omitted otherwise." + } + } + } + } + } + }, + "example": { + "site_id": 11270054, + "site_llm_ids": [ + 151216, + 151294 + ], + "date_from": "2026-06-09", + "date_to": "2026-07-08", + "limit": 1, + "offset": 0, + "total": 343, + "items": [ + { + "domain_id": 5008, + "domain": "techradar.com", + "pages_total": 16, + "ai_answers_total": 67, + "prompts": 19, + "brand_mentions_total": 3, + "first_seen": "2026-02-20", + "last_seen": "2026-07-09", + "dt": 61, + "backlinks_total": 17246330, + "referring_domains_total": 161528, + "coverage_percent": 8.9, + "mention_rate_percent": 18.8, + "is_project": 0, + "is_competitor": 0, + "total_answers": 750, + "prompts_total": 19, + "status": "parsed", + "usage_count_by_llm": [ + { + "site_llm_id": 151216, + "usage_count": "0" + }, + { + "site_llm_id": 151294, + "usage_count": "67" + } + ], + "mentions": [ + { + "name": "seranking.com", + "domain": "seranking.com" + }, + { + "name": "ahrefs.com", + "domain": "ahrefs.com", + "competitor_id": 1043944 + }, + { + "name": "moz.com", + "domain": "moz.com", + "competitor_id": 1043947 + } + ] + } + ] + } + } + } + }, + "400": { + "description": "Invalid query parameters." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "description": "Site not found." + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl 'https://api.seranking.com/v1/project-management/airt/sources/domains?site_id=11270054&date_from=2026-06-09&date_to=2026-07-08&is_brand_mentioned=0&limit=10' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/airt/sources/pages": { + "get": { + "operationId": "listSourcePages", + "tags": [ + "AI Results Tracker – Sources" + ], + "summary": "List source pages", + "description": "URL-level twin of List source domains: individual source URLs cited in LLM answers, with the parent domain, page type, and the same metric columns. Default sort by usage descending.\n\n**Cost:** 0. Retrieving sources data does not consume API credits or subscription quota.\n\nThe [shared filters](#shared-filters), plus the same `competitor_ids[]`, `is_brand_mentioned`, `has_link`, `search`, `limit`, `offset`, and `sort_order` parameters as List source domains, and:\n\nEnvelope: `site_id`, `site_llm_ids`, `date_from`, `date_to`, `limit`, `offset`, `total`, `items`.\n\n**Warning:** Several numeric fields (`count_usage`, `prompts`, `dt`, `mention`, `link`, `brands_num`, `competitors_num`, `usage_count`, `http_status`) are returned as JSON strings. Coerce them before arithmetic.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/airt-sources/#list-source-pages" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID.", + "schema": { + "type": "integer" + } + }, + { + "name": "date_from", + "in": "query", + "description": "Range start (`YYYY-MM-DD` format).", + "schema": { + "type": "string", + "default": "30 days before date_to" + } + }, + { + "name": "date_to", + "in": "query", + "description": "Range end (`YYYY-MM-DD` format). Cannot exceed the current date.\n\nDefault: Current date", + "schema": { + "type": "string" + } + }, + { + "name": "site_llm_ids[]", + "in": "query", + "description": "Narrow aggregation to specific LLM engines (repeatable).\n\nDefault: All the project’s engines", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "prompt_ids[]", + "in": "query", + "description": "Filter by tracked prompt IDs (repeatable).", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "group_ids[]", + "in": "query", + "description": "Filter by prompt group IDs (repeatable). See [AIRT Groups](AIRT Groups).", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "domain_id", + "in": "query", + "description": "Restrict to a single domain’s pages (`domain_id` from the List source domains response).", + "schema": { + "type": "integer" + } + }, + { + "name": "sort", + "in": "query", + "description": "Sort field: `url`, `dt`, `count_usage`, `prompts`, `mention`, `link`, `brands_num`, `competitors_num`, `prompt_coverage`, `answers_coverage`.", + "schema": { + "type": "string", + "default": "count_usage" + } + }, + { + "name": "competitor_ids[]", + "in": "query", + "description": "Filter to sources where the given competitor brands appear (repeatable).", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "is_brand_mentioned", + "in": "query", + "description": "Restrict to sources where the project’s brand is (`1`) or is not (`0`) mentioned.", + "schema": { + "type": "integer" + } + }, + { + "name": "has_link", + "in": "query", + "description": "Restrict to sources that link (`1`) or do not link (`0`) to the project.", + "schema": { + "type": "integer" + } + }, + { + "name": "search", + "in": "query", + "description": "Substring match on the source domain.", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of items per page (1–100).", + "schema": { + "type": "integer", + "default": 100 + } + }, + { + "name": "offset", + "in": "query", + "description": "Offset from the beginning of the list.", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "sort_order", + "in": "query", + "description": "Sort direction: `asc` or `desc`.", + "schema": { + "type": "string", + "default": "desc" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "site_id": { + "type": "integer" + }, + "site_llm_ids": { + "type": "array", + "items": { + "type": "integer" + } + }, + "date_from": { + "type": "string" + }, + "date_to": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "offset": { + "type": "integer" + }, + "total": { + "type": "integer" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Page ID." + }, + "url": { + "type": "string", + "description": "Source URL." + }, + "title": { + "type": "string", + "description": "Page title." + }, + "domain_id": { + "type": "integer", + "description": "Parent domain ID." + }, + "http_status": { + "type": "string", + "description": "HTTP status of the page, encoded as a string." + }, + "content_updated": { + "type": "string", + "description": "Timestamp of the last content parse (`YYYY-MM-DD HH:MM:SS`)." + }, + "page_type": { + "type": "string", + "description": "Page type (for example `forum`, `other`)." + }, + "dt": { + "type": "string", + "description": "Domain Trust of the parent domain. Numeric string." + }, + "mention": { + "type": "string", + "description": "`\"1\"` when the project’s brand is mentioned on the page, `\"0\"` otherwise." + }, + "link": { + "type": "string", + "description": "`\"1\"` when the page links to the project, `\"0\"` otherwise." + }, + "nofollow": { + "type": "integer", + "description": "Whether the link to the project is nofollow." + }, + "brands_num": { + "type": "string", + "description": "Number of brands mentioned on the page. Numeric string." + }, + "competitors_num": { + "type": "string", + "description": "Number of tracked competitors mentioned on the page. Numeric string." + }, + "mentions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "domain": { + "type": "string" + } + }, + "description": "Brands mentioned on the page. Each object: `name`, `domain`, and `competitor_id` — `competitor_id` is present only for tracked competitors, omitted otherwise." + }, + "description": "Brands mentioned on the page. Each object: `name`, `domain`, and `competitor_id` — `competitor_id` is present only for tracked competitors, omitted otherwise." + }, + "count_usage": { + "type": "string", + "description": "Times this URL was cited as a source. Numeric string." + }, + "prompts": { + "type": "string", + "description": "Number of prompts whose answers cite the URL. Numeric string." + }, + "first_seen": { + "type": "string", + "description": "First date the URL was seen as a source (`YYYY-MM-DD`)." + }, + "last_seen": { + "type": "string", + "description": "Most recent date the URL was seen as a source (`YYYY-MM-DD`)." + }, + "prompt_coverage": { + "type": "integer", + "description": "Share of tracked prompts whose answers cite the URL (0–100)." + }, + "answers_coverage": { + "type": "number", + "description": "Share of AI answers citing the URL (0–100)." + }, + "traffic": { + "type": "integer", + "description": "Traffic estimate for the page." + }, + "usage_count_by_llm": { + "type": "array", + "items": { + "type": "object", + "properties": { + "site_llm_id": { + "type": "integer" + }, + "usage_count": { + "type": "string" + } + }, + "description": "Per-engine usage breakdown. Each object: `site_llm_id` (integer), `usage_count` (numeric string)." + }, + "description": "Per-engine usage breakdown. Each object: `site_llm_id` (integer), `usage_count` (numeric string)." + }, + "is_project": { + "type": "integer", + "description": "`1` when the URL belongs to the project’s own domain, `0` otherwise." + }, + "is_competitor": { + "type": "integer", + "description": "`1` when the URL belongs to a tracked competitor, `0` otherwise." + }, + "total_answers": { + "type": "integer", + "description": "Total AI answers in scope." + }, + "total_prompts": { + "type": "integer", + "description": "Total prompts in scope." + } + } + } + } + } + }, + "example": { + "site_id": 11270054, + "site_llm_ids": [ + 151216, + 151294 + ], + "date_from": "2026-06-09", + "date_to": "2026-07-08", + "limit": 1, + "offset": 0, + "total": 560, + "items": [ + { + "id": 1542589, + "url": "https://www.techradar.com/pro/software-services/se-ranking", + "title": "SE Ranking review | TechRadar", + "domain_id": 5008, + "http_status": "200", + "content_updated": "2026-07-07 06:26:17", + "page_type": "other", + "dt": "61", + "mention": "1", + "link": "1", + "nofollow": 1, + "brands_num": "7", + "competitors_num": "0", + "mentions": [ + { + "name": "seranking.com", + "domain": "seranking.com" + } + ], + "count_usage": "54", + "prompts": "19", + "first_seen": "2026-02-23", + "last_seen": "2026-07-09", + "prompt_coverage": 76, + "answers_coverage": 7.2, + "traffic": 40, + "usage_count_by_llm": [ + { + "site_llm_id": 151216, + "usage_count": "0" + }, + { + "site_llm_id": 151294, + "usage_count": "54" + } + ], + "is_project": 0, + "is_competitor": 0, + "total_answers": 750, + "total_prompts": 25 + } + ] + } + } + } + }, + "400": { + "description": "Invalid query parameters." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "description": "Site not found." + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl 'https://api.seranking.com/v1/project-management/airt/sources/pages?site_id=11270054&date_from=2026-06-09&date_to=2026-07-08&domain_id=12345&limit=10' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/project-management/airt/sources/recommendations": { + "get": { + "operationId": "getSourcesRecommendations", + "tags": [ + "AI Results Tracker – Sources" + ], + "summary": "Get sources recommendations", + "description": "Ordered list from the Recommendations panel — for example “Secure Brand Mentions on High-Impact Sources” and per-domain outreach suggestions (Reddit, YouTube, Wikipedia, and others) where the project is cited but not yet mentioned.\n\n**Cost:** 0. Retrieving sources data does not consume API credits or subscription quota.\n\nThe [shared filters](#shared-filters): `site_id`, `date_from`, `date_to`, `site_llm_ids[]`, `prompt_ids[]`, `group_ids[]`.\n\nEnvelope: `site_id`, `site_llm_ids`, `date_from`, `date_to`, `items`.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/project/airt-sources/#get-sources-recommendations" + }, + "parameters": [ + { + "name": "site_id", + "in": "query", + "required": true, + "description": "Site ID.", + "schema": { + "type": "integer" + } + }, + { + "name": "date_from", + "in": "query", + "description": "Range start (`YYYY-MM-DD` format).", + "schema": { + "type": "string", + "default": "30 days before date_to" + } + }, + { + "name": "date_to", + "in": "query", + "description": "Range end (`YYYY-MM-DD` format). Cannot exceed the current date.\n\nDefault: Current date", + "schema": { + "type": "string" + } + }, + { + "name": "site_llm_ids[]", + "in": "query", + "description": "Narrow aggregation to specific LLM engines (repeatable).\n\nDefault: All the project’s engines", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "prompt_ids[]", + "in": "query", + "description": "Filter by tracked prompt IDs (repeatable).", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "group_ids[]", + "in": "query", + "description": "Filter by prompt group IDs (repeatable). See [AIRT Groups](AIRT Groups).", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "site_id": { + "type": "integer" + }, + "site_llm_ids": { + "type": "array", + "items": { + "type": "integer" + } + }, + "date_from": { + "type": "string" + }, + "date_to": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Recommendation type: `most_cited_sources` or `one_domain`." + }, + "code": { + "type": "string", + "description": "Recommendation code: `secure_mentions` for the most-cited-sources recommendation; the domain slug for `one_domain` (for example `reddit`, `youtube`, `quora`)." + }, + "data": { + "description": "Recommendation payload. For `one_domain`: `domain` and `count` (numeric string). Empty array for `most_cited_sources`." + } + } + } + } + } + }, + "example": { + "site_id": 11270054, + "site_llm_ids": [ + 151216, + 151294 + ], + "date_from": "2026-06-09", + "date_to": "2026-07-08", + "items": [ + { + "type": "most_cited_sources", + "code": "secure_mentions", + "data": [] + }, + { + "type": "one_domain", + "code": "reddit", + "data": { + "domain": "reddit.com", + "count": "45" + } + }, + { + "type": "one_domain", + "code": "youtube", + "data": { + "domain": "youtube.com", + "count": "20" + } + } + ] + } + } + } + }, + "400": { + "description": "Invalid query parameters." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "description": "Site not found." + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl 'https://api.seranking.com/v1/project-management/airt/sources/recommendations?site_id=11270054&date_from=2026-06-09&date_to=2026-07-08' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + } + }, + "components": { + "securitySchemes": { + "tokenAuth": { + "type": "apiKey", + "in": "header", + "name": "Authorization", + "description": "Recommended. Send the API key in the `Authorization` header with the `Token` scheme: `Authorization: Token YOUR_API_KEY`." + }, + "apikeyQuery": { + "type": "apiKey", + "in": "query", + "name": "apikey", + "description": "Alternative. Send the API key as the `apikey` query parameter. It must always be a query parameter, even when other data goes in the request body." + } + }, + "schemas": { + "GatewayError": { + "type": "object", + "description": "Error returned by the API gateway before the request reaches the API.", + "properties": { + "error_description": { + "type": "string", + "description": "Human-readable error message." + } + } + } + }, + "responses": { + "Unauthorized": { + "description": "The API key is missing, unknown or disabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + }, + "example": { + "error_description": "Authentication failed. Please ensure you have a valid, enabled API key. To get an API key, please contact us at api@seranking.com." + } + } + } + }, + "PaymentRequired": { + "description": "The account has no active subscription or not enough credits for this request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + }, + "example": { + "error_description": "Insufficient funds, API key is temporarily disabled. Please make a payment to enable you API key, or contact us at api@seranking.com." + } + } + } + }, + "Forbidden": { + "description": "The API key may not call this endpoint or use this HTTP method.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + }, + "example": { + "error_description": "Authentication failed. Please ensure you have a valid, enabled API key. To get an API key, please contact us at api@seranking.com." + } + } + } + }, + "TooManyRequests": { + "description": "The request rate limit of the API key was exceeded. See [API rate limits](https://seranking.com/api/rate-limits/).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + }, + "example": { + "error_description": "You made 11 requests, which is over the allowed limit of 10 requests per second. Please try again later." + } + } + } + } + } + } +} diff --git a/openapi/project-api.yaml b/openapi/project-api.yaml new file mode 100644 index 0000000..0b532ba --- /dev/null +++ b/openapi/project-api.yaml @@ -0,0 +1,12416 @@ +openapi: 3.0.3 +info: + title: SE Ranking Project API + version: 1.0.0 + description: >- + The Project API manages the SE Ranking projects in your account: projects and project groups, tracked keywords and + rankings, search engines, competitors, URL tags, Google Search Console data, the marketing plan, website audits, + Backlink Checker and AI Results Tracker. + + + ## Authentication + + + All endpoints are served from `https://api.seranking.com` and use one SE Ranking API key, the same key for the Data + API, the Project API, the Local Marketing API and the SE Visible API. Send it in the `Authorization: Token + YOUR_API_KEY` header (recommended) or as the `apikey` query parameter. See [Getting API + access](https://seranking.com/api/how-to-get-api/). + + + Rate limits: [API rate limits](https://seranking.com/api/rate-limits/). Credits: [API credit + system](https://seranking.com/api/api-credits-system/). + contact: + name: SE Ranking API Support + url: https://seranking.com/api/ + email: api@seranking.com + license: + name: MIT + url: https://github.com/seranking/openapi/blob/main/LICENSE +externalDocs: + description: SE Ranking Project API documentation + url: https://seranking.com/api/project/ +servers: + - url: https://api.seranking.com + description: Production +security: + - tokenAuth: [] + - apikeyQuery: [] +tags: + - name: Account Management + description: >- + **Account Management API** provides endpoints to manage user account and sub-accounts, including creation, + modification, deletion, access configuration, limits management, and project sharing. + + + Documentation: [Account Management](https://seranking.com/api/project/account-management/) + - name: Project Management + description: |- + **Project Management API** provides endpoints to manage projects and retrieve ranking-related data. + + It allows you to: + + - create, update, and delete projects + + - configure search engines for a project + + - add, update, and delete project keywords + + - retrieve keyword rankings and historical data + + - access project-level summary statistics + + - trigger manual ranking checks + + - manage manual ranking positions + + - retrieve advertising and SERP feature statistics + + Documentation: [Project Management](https://seranking.com/api/project/project-management/) + - name: Project Groups + description: |- + **Project Groups API** provides endpoints to manage project groups within a user account. + + Documentation: [Project Groups](https://seranking.com/api/project/project-groups/) + - name: Search Engine Setup + description: >- + This page documents the lookup data you need to attach and configure a Google search engine on a project: the + engine catalogue, the city catalogue used for sub-country targeting, and the language catalogue. + + + All three endpoints take no parameters, return data that changes rarely, and should be cached client-side. + + + Documentation: [Search Engine Setup](https://seranking.com/api/project/general-data/) + - name: Keyword Groups + description: |- + **Keyword Groups API** provides endpoints to manage keyword groups within a project. + + Documentation: [Keyword Groups](https://seranking.com/api/project/keyword-groups/) + - name: Competitors + description: >- + **Competitors API** provides endpoints to manage competitors and retrieve competitor ranking data within a + project. + + + Documentation: [Competitors](https://seranking.com/api/project/competitors/) + - name: URL Tags + description: |- + **URL Tags API** provides endpoints to manage landing page tags within a site. + + Documentation: [URL Tags](https://seranking.com/api/project/url-tags/) + - name: Analytics Traffic + description: >- + **Analytics Traffic API** provides endpoints to retrieve analytics and traffic data for a project, including + Google Search Console metrics, keyword traffic potential, and estimated SEO performance. + + + Documentation: [Analytics Traffic](https://seranking.com/api/project/analytics-traffic/) + - name: Marketing Plan + description: >- + **Marketing Plan API** provides endpoints to retrieve and manage marketing plan checklists for a site. These + endpoints allow you to view marketing plan sections and tasks, create custom tasks, update task details, delete + tasks, and change task completion status. + + + Documentation: [Marketing Plan](https://seranking.com/api/project/marketing-plan/) + - name: Website Audit + description: >- + The **Website Audit API** crawls sites on demand and surfaces technical SEO issues: broken links, missing tags, + slow pages, indexability problems, and more. Results are retrieved on demand. + + + Plan limits apply to the total number of pages crawled. Creating an audit and rechecking an audit both count + crawled pages against that plan limit. All other operations (reads and configuration updates) are free. + + + Documentation: [Website Audit](https://seranking.com/api/project/audit/) + - name: Backlink Checker + description: >- + **Backlink Checker API** provides endpoints to retrieve, manage, import, group, and disavow backlinks, as well as + monitor backlink import status and statistics. + + + Documentation: [Backlink Checker](https://seranking.com/api/project/backlink-checker/) + - name: AI Results Tracker + description: >- + **AI Results Tracker API** (AIRT) enables tracking of brand visibility across AI search engines. It covers three + resource groups: + + + - **Brands** — Configure which brand name to track for a site + + + - **LLM engines** — Add and manage which AI engines to track (ChatGPT, Gemini, Google AI Overview, Google AI Mode) + + + - **Prompts** — Manage prompts per engine and retrieve rankings data + + + Documentation: [AI Results Tracker](https://seranking.com/api/project/ai-result-tracker/) + - name: AI Results Tracker – Prompt Groups + description: >- + Organize tracked prompts into groups for cleaner reporting and bulk operations. Groups live at the site level and + are shared across every LLM engine configured for that site; prompts are assigned to groups per engine. Data in + the AI Result Tracker is refreshed daily. + + + **Note:** + + + - Each site has one non-deletable default group. New prompts land in the default group unless a `group_id` is + specified at creation. + + + - Deleting a non-default group moves its prompts to the default group. + + + - Group names must be non-empty and unique within a site, maximum 255 characters. + + + - Aggregated per-group metrics are not yet available in the public API; tracked in a follow-up task. + + + Documentation: [AI Result Tracker – Prompt Groups](https://seranking.com/api/project/airt-groups/) + - name: AI Results Tracker – Competitors + description: >- + AIRT Competitors API, part of the AI Results Tracker (AIRT), provides programmatic access to the per-prompt, + per-day Competitors view: which brands and source URLs appear in AI answers for a tracked prompt over time, with a + cached HTML copy of the answer page for human verification. + + + All endpoints are engine-scoped (`llm_id`). To inspect a prompt across several engines, list the engines via [List + LLM engines](https://seranking.com/api/project/ai-result-tracker/#list-llm-engines) and iterate. + + + Using the API, you can: + + + - retrieve the brands and source URLs cited in an AI answer for a prompt across a date range + + + - list the dates on which a prompt was checked, so you can skip empty periods + + + - get SEO metrics (Domain Trust, referring domains, organic keywords) for the cited sources + + + **Note:** + + + - `prompt_llm_id` values come from the `prompt_llm_id` field of [List + prompts](https://seranking.com/api/project/ai-result-tracker/#list-prompts). The `prompt_id` field is a different + value and is not accepted. + + + - The full answer text is not returned by these endpoints. Fetch it per (prompt, date) via [Get prompt + answer](https://seranking.com/api/project/ai-result-tracker/#get-prompt-answer); the `has_answer_text` flag tells + you whether it is still available. + + + **Data retention:** + + + - Cached HTML copy: 30 days (`has_cached_copy`). + + + - Answer text: 1 year (`has_answer_text`). + + + Documentation: [AI Results Tracker – Competitors](https://seranking.com/api/project/airt-competitors/) + - name: AI Results Tracker – Sources + description: >- + **AIRTSources API**, part of the AI Results Tracker (AIRT), provides programmatic access to project-level + AI-search visibility across a date range. This includes domains and pages are cited as sources in AI answers, how + often the project’s brand and its competitors are mentioned, and where mention opportunities exist. + + + Unlike the [Competitors endpoints](https://seranking.com/api/project/airt-competitors/) (which are scoped to a + single LLM engine), Sources data is **aggregated across all the project’s LLM engines** by default. Use + `site_llm_ids[]` to narrow the scope to specific engines. + + + Using the API, you can: + + + - get a project-level summary of mention opportunities and per-competitor mention counts + + + - list the source domains cited across your tracked prompts, with authority and mention metrics + + + - list the individual source pages (URLs) cited, with per-page metrics + + + - get outreach recommendations — high-impact sources and per-domain suggestions where your project is cited but + not yet mentioned + + + Documentation: [AI Results Tracker – Sources](https://seranking.com/api/project/airt-sources/) +paths: + /v1/project-management/users/me: + get: + operationId: getUserProfile + tags: + - Account Management + summary: Get user profile + description: |- + Returns profile information of the authenticated user account. + + No parameters. + + If successful, the server returns the `200` HTTP status code and the user profile data. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/account-management/#get-user-profile + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + email: + type: string + description: Account email. + email_verified: + type: boolean + description: Email confirmation status (`true` – verified, `false` – not verified). + first_name: + type: string + description: User’s first name. + last_name: + type: string + description: User’s last name. + lang: + type: string + description: Account language (ISO 639-1 alpha-2). + picture: + type: string + description: Link to the user’s avatar (can be `null`). + example: + email: john.doe@example.com + email_verified: true + first_name: John + last_name: Doe + lang: en + picture: https://online.seranking.com/files/public/avatar/se.png + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/users/me' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/users: + get: + operationId: listSubAccounts + tags: + - Account Management + summary: List sub-accounts / Get sub-account details + description: >- + ### List sub-accounts + + + Returns a list of all sub-accounts associated with the authenticated user. + + + If successful, the server returns the `200` HTTP status code and a list of sub-accounts. + + + ### Get sub-account details + + + Returns extended information about the specified sub-account, including settings, access permissions, and + limits. + + + If successful, the server returns the `200` HTTP status code and sub-account details. Returns HTTP `404` if the + sub-account is not found (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/account-management/#list-sub-accounts + parameters: + - name: limit + in: query + description: Number of records per page. Defaults to `100`. + schema: + type: integer + - name: offset + in: query + description: Number of records to skip for pagination. + schema: + type: integer + - name: user_id + in: query + description: Unique sub-account ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + list: + type: array + items: + type: object + properties: + account_id: + type: integer + description: Unique sub-account ID. + account_email: + type: string + description: Sub-account email. + account_first_name: + type: string + description: Sub-account first name. + account_last_name: + type: string + description: Sub-account last name. + account_type: + type: string + description: "Account type: `user` or `client`." + account_lang: + type: string + description: Account language (ISO 639-1 alpha-2). + account_sites_count: + type: integer + description: Number of websites available to the sub-account. + is_blocked_by_limits: + type: boolean + description: Indicates whether limits are exceeded. + description: Array of sub-account objects. + description: Array of sub-account objects. + all_count: + type: string + description: Total number of sub-accounts. + settings: + type: object + properties: + account_id: + type: integer + description: Unique sub-account ID. + account_email: + type: string + description: Sub-account email. + account_first_name: + type: string + description: Sub-account first name. + account_last_name: + type: string + description: Sub-account last name. + account_type: + type: string + description: "Account type: `user` or `client`." + account_lang: + type: string + description: Account language (ISO 639-1 alpha-2). + description: Sub-account profile information. + access: + type: array + items: + type: string + description: >- + List of enabled + [permissions](https://seranking.com/api/project/sub-account-management/#permissions). + description: >- + List of enabled + [permissions](https://seranking.com/api/project/sub-account-management/#permissions). + limit: + type: object + properties: + site: + type: integer + description: Website limit. + keyword: + type: integer + description: Keyword limit. + backlink: + type: integer + description: Backlink check limit. + audit_account: + type: integer + description: Website verification limit per account. + audit_site: + type: integer + description: Website check limit per site per month. + balance: + type: object + properties: + amount: + type: integer + description: Monetary limit value. + period: + type: string + description: "Limit period: `day`, `week`, or `month`." + description: Payment limit configuration. + description: Sub-account limits configuration. + examples: + listSubAccounts: + summary: List sub-accounts + value: + list: + - account_id: 36865 + account_email: user1@gmail.com + account_first_name: John + account_last_name: Doe + account_type: user + account_lang: ru + account_sites_count: 2 + is_blocked_by_limits: false + - account_id: 36828 + account_email: user2@gmail.com + account_first_name: Jane + account_last_name: Doe + account_type: client + account_lang: ru + account_sites_count: 1 + is_blocked_by_limits: false + all_count: "2" + getSubAccountDetails: + summary: Get sub-account details + value: + settings: + account_id: 36828 + account_email: test@gmail.com + account_first_name: Test + account_last_name: Test + account_type: user + account_lang: ru + access: + - add_website + - audit_settings + - report_manual + - report_scheduled + - report_template + limit: + site: 10 + keyword: 5 + backlink: 10 + audit_account: 4 + audit_site: 3 + balance: + amount: 5 + period: day + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/users?limit=100&offset=0' \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/users?user_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' + post: + operationId: createSubAccount + tags: + - Account Management + summary: Create sub-account + description: |- + Creates a new sub-account and sends a notification email to the specified sub-account address. + + The request body must contain a `data` object with sub-account configuration. + + If successful, the server returns the `201` HTTP status code and the created sub-account identifier. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/account-management/#create-sub-account + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + type: object + properties: + setting: + type: object + properties: + account_email: + type: string + description: Sub-account email. + account_first_name: + type: string + description: Sub-account first name. + account_last_name: + type: string + description: Sub-account last name. + account_password: + type: string + description: Sub-account password. + account_lang: + type: string + description: Sub-account language (ISO 639-1 alpha-2). + account_type: + type: string + description: "Account type: `user` or `client`." + limit: + type: object + properties: + balance: + type: object + properties: + period: + type: string + description: "Limit period: `day`, `week`, `month`." + amount: + type: integer + description: Monetary limit value. + access: + type: array + items: {} + description: List of [permission codes](https://seranking.com/api/project/sub-account-management/#permissions). + key: + type: string + value: + type: array + items: + type: object + properties: + setting.account_email: + type: string + setting.account_first_name: + type: string + setting.account_last_name: + type: string + setting.account_password: + type: string + setting.account_type: + type: string + limit.balance.period: + type: string + limit.balance.amount: + type: integer + access: + type: array + items: + type: string + example: + - key: data + value: + - setting.account_email: test10@gmail.com + - setting.account_first_name: Test + - setting.account_last_name: Test + - setting.account_password: TestPassword + - setting.account_type: user + - limit.balance.period: day + - limit.balance.amount: 10 + - access: + - add_website + - audit_settings + - report_manual + - report_scheduled + - report_template + responses: + "201": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: integer + description: Unique sub-account ID. + example: + id: 36872 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST 'https://api.seranking.com/v1/project-management/users' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '[ + { + "key": "data", + "value": [ + {"setting.account_email": "test10@gmail.com"}, + {"setting.account_first_name": "Test"}, + {"setting.account_last_name": "Test"}, + {"setting.account_password": "TestPassword"}, + {"setting.account_type": "user"}, + {"limit.balance.period": "day"}, + {"limit.balance.amount": 10}, + {"access": [ + "add_website", + "audit_settings", + "report_manual", + "report_scheduled", + "report_template" + ]} + ] + } + ]' + delete: + operationId: deleteSubAccount + tags: + - Account Management + summary: Delete sub-account + description: >- + Deletes a sub-account. + + + If successful, the server returns an empty array. Returns HTTP `404` if the sub-account is not found (for more + information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/account-management/#delete-sub-account + parameters: + - name: user_id + in: query + required: true + description: Unique sub-account ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: {} + example: [] + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X DELETE 'https://api.seranking.com/v1/project-management/users?user_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' + patch: + operationId: updateSubAccount + tags: + - Account Management + summary: Update sub-account + description: >- + Updates an existing sub-account. + + + The request body must contain a `data` object with sub-account configuration. + + + If successful, the server returns an empty array. Returns HTTP `404` if the sub-account is not found (for more + information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/account-management/#update-sub-account + parameters: + - name: user_id + in: query + required: true + description: Unique sub-account ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + type: object + properties: + setting: + type: object + properties: + account_email: + type: string + description: Sub-account email. + account_first_name: + type: string + description: Sub-account first name. + account_last_name: + type: string + description: Sub-account last name. + account_password: + type: string + description: Sub-account password. + account_lang: + type: string + description: Sub-account language (ISO 639-1 alpha-2). + account_type: + type: string + description: "Account type: `user` or `client`." + limit: + type: object + properties: + balance: + type: object + properties: + period: + type: string + description: "Limit period: `day`, `week`, `month`." + amount: + type: integer + description: Monetary limit value. + access: + type: array + items: {} + description: List of [permission codes](https://seranking.com/api/project/sub-account-management/#permissions). + key: + type: string + value: + type: array + items: + type: object + properties: + setting.account_email: + type: string + setting.account_first_name: + type: string + setting.account_last_name: + type: string + setting.account_password: + type: string + setting.account_type: + type: string + limit.balance.period: + type: string + limit.balance.amount: + type: integer + access: + type: array + items: + type: string + example: + - key: data + value: + - setting.account_email: test@gmail.com + - setting.account_first_name: Test + - setting.account_last_name: Test + - setting.account_password: TestPassword + - setting.account_type: user + - limit.balance.period: day + - limit.balance.amount: 10 + - access: + - add_website + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: {} + example: [] + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X PATCH 'https://api.seranking.com/v1/project-management/users?user_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '[ + { + "key":"data", + "value": [ + {"setting.account_email":"test@gmail.com"}, + {"setting.account_first_name":"Test"}, + {"setting.account_last_name":"Test"}, + {"setting.account_password":"TestPassword"}, + {"setting.account_type":"user"}, + {"limit.balance.period":"day"}, + {"limit.balance.amount":10}, + {"access":["add_website"]} + ] + } + ]' + /v1/project-management/users/shared-sites: + get: + operationId: listSharedProjects + tags: + - Account Management + summary: List shared projects + description: |- + Returns website IDs shared with the sub-account. + + If successful, the server returns the `200` HTTP status code and an array of website IDs. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/account-management/#list-shared-projects + parameters: + - name: user_id + in: query + required: true + description: Unique sub-account ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: integer + example: + - 39 + - 44 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/users/shared-sites?user_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' + post: + operationId: shareProjectWithSubAccount + tags: + - Account Management + summary: Share project with sub-account + description: |- + Shares websites with a sub-account. + + If successful, the server returns an empty array. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/account-management/#share-projects-with-sub-account + parameters: + - name: user_id + in: query + required: true + description: Unique sub-account ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + type: integer + example: + - 39 + - 42 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: {} + example: [] + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST 'https://api.seranking.com/v1/project-management/users/shared-sites?user_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '[39, 42]' + /v1/project-management/users/owned-sites: + get: + operationId: listOwnedProjects + tags: + - Account Management + summary: List owned projects + description: |- + Returns a list of website IDs owned by the specified sub-account. + + If successful, the server returns an array of unique website IDs. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/account-management/#list-owned-projects + parameters: + - name: user_id + in: query + required: true + description: Unique sub-account ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: integer + example: + - 39 + - 40 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/users/owned-sites?user_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/sites: + get: + operationId: listProjects + tags: + - Project Management + summary: List projects + description: Returns a list of all projects available in the user account. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-management/#list-projects + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: integer + description: Unique project (site) ID. + title: + type: string + description: Project name. + name: + type: string + description: Website URL associated with the project. + group_id: + type: integer + description: Project group ID. + is_active: + type: integer + description: |- + Project status: + • `1` – active + • `0` – delayed + exact_url: + type: integer + description: >- + If `1`, ranking positions are checked only for the specified URL, excluding subfolders and + subdomains. + subdomain_match: + type: integer + description: If `1`, SERP subdomains are taken into account. + depth: + type: integer + description: Ranking position collection depth. + check_freq: + type: string + description: Frequency of ranking checks. + check_day: + nullable: true + description: |- + • If `check_freq` is `check_weekly`, represents the day of the week (1 – Monday to 7 – Sunday). + • If `check_freq` is `check_monthly`, represents the day of the month (1 – 31). + type: integer + guest_link: + type: string + description: Guest link to view project statistics without authorization. + example: + - id: 1 + title: zniqpf tfallp mykqeg + name: Cronin.info + group_id: 0 + is_active: 1 + exact_url: 0 + subdomain_match: 0 + depth: 100 + check_freq: check_daily + check_day: null + guest_link: https://seranking.com/guest.html?site_id=1&hv=0&hash=432&tab=detailed + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/sites' \ + -H 'Authorization: Token YOUR_API_KEY' + post: + operationId: addProject + tags: + - Project Management + summary: Add project + description: |- + Creates a new project in the user account. + + If successful, the server returns the `201` HTTP code and the ID of the project added to the account. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-management/#adding-a-project + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + url: + type: string + description: Website URL. + title: + type: string + description: Project name. + depth: + type: integer + description: Ranking collection depth (100, 200). Defaults to 100. + subdomain_match: + type: integer + description: Include subdomains in SERPs (`1` – yes, `0` – no). Defaults to `0`. + exact_url: + type: integer + description: Track only the specified URL (`1` – yes, `0` – no). Defaults to `0`. + check_freq: + type: string + description: >- + Check frequency (`check_daily`, `check_1in3`, `check_weekly`, `check_monthly`, `manual`). Defaults + to `check_daily`. + auto_reports: + type: integer + description: Enable weekly reports (`1` – yes, `0` – no). Defaults to `1`. + disable_audit: + type: integer + description: Disable website audit (`1` – yes, `0` – no). Defaults to `0`. + site_group_id: + type: integer + description: Project group ID. + check_day: + type: integer + description: Day of week (1–7) for weekly checks or day of month (1–31) for monthly checks. + is_active: + type: integer + description: Project status (`1` – active, `0` – delayed). + required: + - url + - title + example: + url: http://test.site/ + title: seo site + responses: + "201": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + site_id: + type: integer + description: ID of the created project. + example: + site_id: 507052 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST 'https://api.seranking.com/v1/project-management/sites' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '[{"url": "http://test.site/","title": "seo site"}]' + patch: + operationId: changeProjectSettings + tags: + - Project Management + summary: Change project settings + description: |- + Updates the settings of the specified project. + + If successful, the server returns the `200` HTTP code. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-management/#change-project-settings + parameters: + - name: site_id + in: query + description: Shown in the documented request example. + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + url: + type: string + description: Website URL. + title: + type: string + description: Project name. + depth: + type: integer + description: Ranking collection depth (100, 200). Defaults to 100. + subdomain_match: + type: integer + description: Include subdomains in SERPs (`1` – yes, `0` – no). Defaults to `0`. + exact_url: + type: integer + description: Track only the specified URL (`1` – yes, `0` – no). Defaults to `0`. + check_freq: + type: string + description: >- + Check frequency (`check_daily`, `check_1in3`, `check_weekly`, `check_monthly`, `manual`). Defaults + to `check_daily`. + site_group_id: + type: integer + description: Project group ID. + check_day: + type: integer + description: Day of week (1–7) for weekly checks or day of month (1–31) for monthly checks. + is_active: + type: integer + description: Project status (`1` – active, `0` – delayed). + example: + title: new site title + responses: + "200": + description: Successful response. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + delete: + operationId: deleteProject + tags: + - Project Management + summary: Delete project + description: |- + Deletes the specified project from the user account. + + If successful, the server returns the `204` HTTP code. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-management/#delete-project + parameters: + - name: site_id + in: query + required: true + description: Unique project (site) ID. + schema: + type: integer + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X DELETE 'https://api.seranking.com/v1/project-management/sites?site_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/sites/search-engines: + get: + operationId: listProjectSearchEngines + tags: + - Project Management + summary: List project search engines + description: >- + Returns a list of search engines configured for the specified project. + + + If successful, the server returns the `200` HTTP code and a JSON array of search engines associated with the + project. If an error occurs (e.g., unknown `search_engine_id` or `site_engine_id`), the API returns the + corresponding HTTP status code and error message. See [Error + handling](https://seranking.com/api/project/getting-started/#error-handling) for possible error codes. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-management/#list-project-search-engines + parameters: + - name: site_id + in: query + description: Shown in the documented request example. + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + site_engine_id: + type: integer + description: Unique ID of the search engine configuration within the project. + search_engine_id: + type: integer + description: Search engine ID (refer to `/system/search-engines`). + region_id: + type: integer + description: Region ID. + region_name: + nullable: true + description: Region name. Only applicable to Google. + type: string + lang_code: + type: string + description: Language code (refer to `/system/google-langs`). + merge_map: + type: integer + description: |- + Google Maps SERPs handling mode: + • 0 – don’t include + • 1 – include + • 2 – include and display separately + business_name: + nullable: true + description: Business name used for Google Maps SERPs. + type: string + phone: + nullable: true + description: Company phone number used for Google Maps SERPs. + type: string + paid_results: + type: integer + description: "Track rankings in Google Ads: `1` – yes, `0` – no." + featured_snippet: + type: integer + description: |- + Track Featured Snippet results: + • 1 – include + • 0 – exclude + keyword_count: + type: integer + description: Number of keywords assigned to this search engine configuration. + example: + - site_engine_id: 1 + search_engine_id: 339 + region_id: 0 + region_name: null + lang_code: ru + merge_map: 0 + business_name: null + phone: null + paid_results: 0 + featured_snippet: 0 + keyword_count: 10 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/sites/search-engines?site_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' + post: + operationId: addSearchEngineToProject + tags: + - Project Management + summary: Add search engine to project + description: >- + Adds a new search engine configuration to the specified project. + + + If successful, the server returns the `201` HTTP code and the `site_engine_id` of the newly added search engine + configuration. If an error occurs (e.g., unknown `search_engine_id`), the API returns the corresponding HTTP + status code and error message (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-management/#add-search-engine-to-project + parameters: + - name: site_id + in: query + required: true + description: Unique project (site) ID. + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + search_engine_id: + type: integer + description: Search engine ID (refer to `/system/search-engines`). + region_id: + type: integer + description: Region ID. + region_name: + type: string + description: Geographical name (region or city) in English. Only applicable to Google. + nullable: true + lang_code: + type: string + description: Language code (refer to `/system/google-langs`). + merge_map: + type: integer + description: |- + Google Maps SERPs handling mode: + • 0 – don’t include + • 1 – include + • 2 – include and display separately + business_name: + type: string + description: Business name for Google Maps SERPs. + nullable: true + phone: + type: string + description: Company phone number for Google Maps SERPs. + nullable: true + paid_results: + type: integer + description: "Track rankings in Google Ads: `1` – yes, `0` – no." + featured_snippet: + type: integer + description: |- + Track Featured Snippet results: + • 1 – include + • 0 – exclude + required: + - search_engine_id + example: + search_engine_id: 339 + region_id: 0 + region_name: null + lang_code: ru + merge_map: 0 + business_name: null + phone: null + paid_results: 0 + featured_snippet: 0 + responses: + "201": + description: Successful response. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST 'https://api.seranking.com/v1/project-management/sites/search-engines?site_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "search_engine_id": 339, + "region_id": 0, + "region_name": null, + "lang_code": "ru", + "merge_map": 0, + "business_name": null, + "phone": null, + "paid_results": 0, + "featured_snippet": 0 + }' + patch: + operationId: changeSearchEngineInProject + tags: + - Project Management + summary: Change search engine in project + description: >- + Updates an existing search engine configuration for the specified project. + + + If successful, the server returns the `200` HTTP code. If an error occurs (e.g., unknown `site_engine_id`), the + API returns the corresponding HTTP status code and error message (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-management/#change-search-engine-in-project + parameters: + - name: site_id + in: query + required: true + description: Unique project (site) ID. + schema: + type: integer + - name: site_engine_id + in: query + required: true + description: Unique ID of the search engine configuration within the project. + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + region_id: + type: integer + description: Region ID. + region_name: + type: string + description: Geographical name (region or city) in English. Only applicable to Google. + nullable: true + lang_code: + type: string + description: Language code (refer to `/system/google-langs`). + merge_map: + type: integer + description: |- + Google Maps SERPs handling mode: + • 0 – don’t include + • 1 – include + • 2 – include and display separately + business_name: + type: string + description: Business name for Google Maps SERPs. + nullable: true + phone: + type: string + description: Company phone number for Google Maps SERPs. + nullable: true + paid_results: + type: integer + description: "Track rankings in Google Ads: `1` – yes, `0` – no." + featured_snippet: + type: integer + description: |- + Track Featured Snippet results: + • 1 – include + • 0 – exclude + example: + region_id: 0 + region_name: null + lang_code: ru + merge_map: 0 + business_name: null + phone: null + paid_results: 0 + featured_snippet: 0 + responses: + "200": + description: Successful response. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + delete: + operationId: deleteSearchEngineFromProject + tags: + - Project Management + summary: Delete search engine from project + description: >- + Removes a search engine configuration from the specified project. + + + If successful, the server returns the `204` HTTP code. If an error occurs, the API returns the corresponding + HTTP status code and error message (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-management/#delete-search-engine-from-project + parameters: + - name: site_id + in: query + required: true + description: Unique project (site) ID. + schema: + type: integer + - name: site_engine_id + in: query + required: true + description: Unique ID of the search engine configuration within the project. + schema: + type: integer + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X DELETE + 'https://api.seranking.com/v1/project-management/sites/search-engines?site_id=123&site_engine_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/keywords: + get: + operationId: listWebsiteKeywords + tags: + - Project Management + summary: List website keywords + description: >- + Returns a list of keywords for the specified project, including their assigned target URLs and basic statistics. + + + If successful, the server returns the `200` HTTP code and a JSON array of project keywords. If an error occurs, + the API returns the corresponding HTTP status code and error message (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-management/#website-keyword-list + parameters: + - name: site_id + in: query + required: true + description: Unique project (site) ID. + schema: + type: integer + - name: site_engine_id + in: query + description: >- + Unique ID of the search engine configuration within the project. If provided, `first_check_date` is + returned. + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: string + description: Unique keyword ID. + name: + type: string + description: Keyword text. + group_id: + type: string + description: Keyword group ID. + link: + type: string + nullable: true + description: Target URL assigned to the keyword. + first_check_date: + type: string + nullable: true + description: Date of the first ranking check (`YYYY-MM-DD`). + tags: + type: array + items: + description: List of tag IDs assigned to the keyword. + description: List of tag IDs assigned to the keyword. + example: + - id: "1" + name: key1 + group_id: "2" + link: null + first_check_date: "2015-02-17" + - id: "2" + name: key2 + group_id: "2" + link: http://mysite.com/ + first_check_date: null + tags: [] + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/keywords?site_id=123&site_engine_id=NNN' \ + -H 'Authorization: Token YOUR_API_KEY' + post: + operationId: addKeywordsToProject + tags: + - Project Management + summary: Add keywords to project + description: >- + Adds new keywords to the specified project. + + + If successful, the server returns an object containing the number of added keywords. Returns HTTP `400` if no + keywords are specified (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-management/#add-queries-to-project + parameters: + - name: site_id + in: query + description: Shown in the documented request example. + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + type: object + properties: + keyword: + type: string + description: Keyword text. + group_id: + type: integer + description: Keyword group ID. If omitted, the default group is used. + target_url: + type: string + description: Target URL assigned to the keyword. + is_strict: + type: integer + description: Check positions only for the specified target URL (`1` – yes, `0` – no). Defaults to `0`. + comment: + type: string + description: Comment for the keyword. + site_engine_ids: + type: array + items: + type: integer + description: Array of search engine IDs where the keyword should be tracked. + required: + - keyword + example: + - keyword: text + group_id: 1 + target_url: http://site.com/ + is_strict: 0 + comment: text + site_engine_ids: + - 20 + - 21 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + added: + type: integer + description: Number of successfully added queries to the project. + ids: + type: array + items: + type: integer + description: Array of IDs of added keywords. + description: Array of IDs of added keywords. + example: + added: 3 + ids: + - 123 + - 456 + - 789 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST 'https://api.seranking.com/v1/project-management/keywords?site_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '[ + { + "keyword":"text", + "group_id":1, + "target_url": "http://site.com/", + "is_strict": 0, + "comment":"text", + "site_engine_ids": [20,21] + } + ]' + patch: + operationId: updateKeywordFromProject + tags: + - Project Management + summary: Update keyword from project + description: >- + Adds new keywords to the specified project. + + + If successful, the server returns an object containing the number of added keywords. Returns HTTP `400` if no + keywords are specified (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-management/#add-queries-to-project + parameters: + - name: site_id + in: query + description: Shown in the documented request example. + schema: + type: integer + - name: keyword_id + in: query + description: Shown in the documented request example. + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + keyword: + type: string + description: Keyword text. + group_id: + type: integer + description: Keyword group ID. If omitted, the default group is used. + target_url: + type: string + description: Target URL assigned to the keyword. + is_strict: + type: integer + description: Check positions only for the specified target URL (`1` – yes, `0` – no). Defaults to `0`. + comment: + type: string + description: Comment for the keyword. + site_engine_ids: + type: array + items: {} + description: Array of search engine IDs where the keyword should be tracked. + required: + - keyword + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + added: + type: integer + description: Number of successfully added queries to the project. + ids: + type: array + items: + type: integer + description: Array of IDs of added keywords. + description: Array of IDs of added keywords. + example: + added: 3 + ids: + - 123 + - 456 + - 789 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + delete: + operationId: deleteKeywords + tags: + - Project Management + summary: Delete keywords + description: >- + Deletes keywords from the specified project. + + + If successful, the server returns the `204` HTTP code. Returns HTTP `400` if no keyword IDs are specified (for + more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-management/#delete-keywords + parameters: + - name: keywords_ids + in: query + required: true + description: Array of keyword IDs to delete. + schema: + type: array + items: + type: string + - name: site_id + in: query + description: Shown in the documented request example. + schema: + type: integer + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X DELETE + 'https://api.seranking.com/v1/project-management/keywords?site_id=123&keywords_ids[]=123&keywords_ids[]=123&123' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/sites/summary: + get: + operationId: getProjectSummary + tags: + - Project Management + summary: Get project summary + description: |- + Returns summary statistics for the specified project. + + If successful, the server returns HTTP `200` and a JSON object containing summary metrics. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-management/#summary-statistics + parameters: + - name: site_id + in: query + required: true + description: Unique project (site) ID. + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + site_id: + type: integer + description: Unique website ID. + name: + type: string + description: Website domain. + group_id: + nullable: true + description: Project group ID. + type: integer + title: + type: string + description: Project title. + today_avg: + type: integer + description: Average position for the latest ranking check date. + yesterday_avg: + type: integer + description: Average position for the previous ranking check date. + total_up: + type: integer + description: Total number of positions that improved in SERPs. + total_down: + type: integer + description: Total number of positions that declined in SERPs. + process: + type: string + description: Percentage of processed website positions. + top5: + type: integer + description: Number of keywords ranking in the top 5. + top10: + type: integer + description: Number of keywords ranking in the top 10. + top30: + type: integer + description: Number of keywords ranking in the top 30. + visibility: + type: integer + description: Traffic forecast value. + visibility_percent: + type: number + description: Visibility percentage. + da: + type: integer + description: Moz Domain Authority. + index_google: + type: integer + description: Number of pages indexed in Google. + index_x: {} + example: + site_id: 123 + name: site1.com + group_id: null + title: my site + today_avg: 123 + yesterday_avg: 111 + total_up: 0 + total_down: 5 + process: "99.9" + top5: 1 + top10: 2 + top30: 3 + visibility: 2 + visibility_percent: 30 + da: 4 + index_google: 200 + index_x: null + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/sites/summary?site_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/sites/positions: + get: + operationId: getKeywordStatistics + tags: + - Project Management + summary: Get keyword statistics + description: >- + Returns keyword ranking statistics for the specified project within a selected time period. + + + If successful, the server returns a JSON array grouped by `site_engine_id`, containing keyword statistics for + the specified period. If an error occurs (e.g., invalid `site_engine_id`), the API returns the corresponding + HTTP status code and error message (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-management/#keyword-statistics + parameters: + - name: site_id + in: query + required: true + description: Unique project (site) ID. + schema: + type: integer + - name: date_from + in: query + description: Start date of the time period (`YYYY-MM-DD`). The default is today minus one week. + schema: + type: string + - name: date_to + in: query + description: End date of the time period (`YYYY-MM-DD`). The default is today. + schema: + type: string + - name: site_engine_id + in: query + description: Search engine configuration ID. If not specified, data for all search engines is returned. + schema: + type: integer + - name: in_top + in: query + description: >- + Filter by ranking position. Example: `in_top=10` returns keywords ranking in the TOP 10 at the last check + date within the selected period. + schema: + type: integer + - name: with_landing_pages + in: query + description: Landing page URLs found in SERPs (`1` – include). + schema: + type: integer + - name: with_serp_features + in: query + description: Detected Google SERP features (`1` – include). + schema: + type: integer + - name: with_content_score + in: query + description: Per-keyword Content Score (`1` – include). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + site_engine_id: + type: integer + description: Search engine configuration ID. + keywords: + type: array + items: + type: object + properties: + id: + type: string + description: Unique keyword ID. + positions: + type: array + items: + type: object + properties: + date: + type: string + description: Date (`YYYY-MM-DD`). + pos: + type: integer + description: Current ranking position. + change: + type: integer + description: Change in position compared to the previous date (could be negative). + price: + type: integer + description: Price calculated from financial report settings. + is_map: + type: integer + description: |- + Results where the position was found: + • `0` – organic search results + • `1` – maps block + map_position: + type: integer + description: >- + Position in the maps block when `merge_map` is `2` (i.e., “Display organic and maps + results separately” is enabled). + paid_position: + type: integer + description: Position in paid Google SERPs. + description: Ranking positions by date. + description: Ranking positions by date. + volume: + type: integer + description: Search volume. + competition: + type: integer + description: Competition level. + suggested_bid: + type: integer + description: Estimated cost per click. + kei: + type: integer + description: Keyword Efficiency Index. + results: + type: integer + description: Number of search results in Google. + content_score: + type: integer + description: >- + Content Score for the keyword (`0–100`), based on Top-10 competitors. `null` when no score + is available. + content_score_change: + type: integer + description: >- + Content Score change versus the previous check. `null` when there is no previous score to + compare. + total_sum: + type: integer + description: Price per keyword (based on financial report settings). + landing_pages: + type: array + items: + type: object + properties: + url: + type: string + date: + type: string + description: Date (`YYYY-MM-DD`). + description: |- + Landing page data: + `date` – ranking check date (`YYYY-MM-DD`) + `url` – page URL in SERPs for the keyword + description: |- + Landing page data: + `date` – ranking check date (`YYYY-MM-DD`) + `url` – page URL in SERPs for the keyword + features: + type: object + properties: + tads: + type: boolean + knowledge_graph: + type: boolean + images: + type: boolean + sitelinks: + type: boolean + reviews: + type: boolean + description: >- + Detected SERP features. Each field is `true` if the feature links to the project’s + website; otherwise `false`. + description: List of keywords with statistics. + description: List of keywords with statistics. + example: + - site_engine_id: 1 + keywords: + - id: "12" + positions: + - date: "2017-12-19" + pos: 18 + change: 0 + price: 0 + is_map: 0 + map_position: 0 + paid_position: 0 + volume: 390 + competition: 3 + suggested_bid: 1 + kei: 1 + results: 100 + content_score: 66 + content_score_change: -2 + total_sum: 0 + landing_pages: + - url: https://domain.com/page.html + date: "2017-12-14" + features: + tads: true + knowledge_graph: true + images: true + sitelinks: true + reviews: false + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/project-management/sites/positions?site_id=123&date_from=2018-01-01&date_to=2018-01-07&site_engine_id=1&with_landing_pages=1&with_serp_features=1&with_content_score=1' + \ + -H 'Authorization: Token YOUR_API_KEY' + patch: + operationId: setManualKeywordPosition + tags: + - Project Management + summary: Set manual keyword position + description: |- + Sets a ranking position for a project keyword on a specified date. + + If successful, the server returns the `200` HTTP code. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-management/#set-manual-position + parameters: + - name: site_id + in: query + description: Shown in the documented request example. + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + keyword_id: + type: integer + description: Unique keyword ID (refer to `https://api4.seranking.com/sites/{site_id}/keywords`). + date: + type: string + description: Date of the ranking record. + site_engine_id: + type: integer + description: >- + Search engine configuration ID (refer to + `https://api4.seranking.com/sites/{site_id}/search-engines`). + position: + type: integer + description: Position (0 – 200). `0` – means “not found”. + required: + - keyword_id + - date + - site_engine_id + - position + example: + keyword_id: 1 + date: "2018-01-01" + position: 100 + site_engine_id: 1 + responses: + "200": + description: Successful response. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X PATCH 'https://api.seranking.com/v1/project-management/sites/positions?site_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{"keyword_id": 1,"date": "2018-01-01","position":100,"site_engine_id": 1}' + /v1/project-management/sites/ads-stats: + get: + operationId: getTotalNumberOfAdsChart + tags: + - Project Management + summary: Get total number of ads chart + description: >- + Returns the total number of top and bottom advertisements in search results by date for the specified project. + Data can be filtered by search engines, keywords, and date range. + + + All parameters are query parameters. + + + If successful, the server returns the HTTP `200` code and an array grouped by `site_engine_id`. A maximum of + 100,000 records is returned. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-management/#total-number-of-ads-chart + parameters: + - name: date_from + in: query + description: Start date of the period (`YYYY-MM-DD` format). Defaults to today minus one week. + schema: + type: string + - name: date_to + in: query + description: End date of the period (`YYYY-MM-DD` format). Defaults to today. + schema: + type: string + - name: site_engine_ids + in: query + description: Search engine ID filter. If not specified, data for all search engines is returned. + schema: + type: array + items: + type: string + - name: keywords_ids + in: query + description: Keyword ID filter. If not specified, data for all keywords is returned. + schema: + type: array + items: + type: string + - name: site_id + in: query + description: Shown in the documented request example. + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + site_engine_id: + type: integer + description: Search engine configuration ID. + keywords: + type: array + items: + type: object + properties: + id: + type: integer + description: Keyword ID. + ads: + type: array + items: + type: object + properties: + date: + type: string + description: Date (in `YYYY-MM-DD`). + tads: + type: integer + description: Total number of top ads. + bads: + type: integer + description: Total number of bottom ads. + description: Daily advertisement statistics. + description: Daily advertisement statistics. + description: Array of keywords with advertisement statistics. + description: Array of keywords with advertisement statistics. + example: + - site_engine_id: 1 + keywords: + - id: 1 + ads: + - date: "2020-05-20" + tads: 2 + bads: 3 + - date: "2020-05-21" + tads: 3 + bads: 2 + - id: 2 + ads: + - date: "2020-05-20" + tads: 0 + bads: 0 + - date: "2020-05-21" + tads: 0 + bads: 1 + - site_engine_id: 2 + keywords: + - id: 1 + ads: + - date: "2020-05-20" + tads: 1 + bads: 1 + - date: "2020-05-21" + tads: 2 + bads: 2 + - id: 2 + ads: + - date: "2020-05-20" + tads: 0 + bads: 2 + - date: "2020-05-21" + tads: 5 + bads: 1 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/project-management/sites/ads-stats?site_id=123&date_from=2020-05-20&date_to=2020-05-21&site_engine_ids[]=1&site_engine_ids[]=2&keywords_ids[]=1&keywords_ids[]=1' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/sites/positions/checkpoints: + get: + operationId: getHistoricalDates + tags: + - Project Management + summary: Get historical dates + description: |- + Returns a list of historical dates used to build ranking position comparison charts for the specified project. + + The following logical periods are supported: + + - current + + - day_ago + + - 7days + + - 30days + + - 90days + + - 180days + + - first + + If no ranking check occurred on a specific date, the closest available check date is returned. + + If successful, the server returns the HTTP `200` code and an object containing date mappings. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-management/#historical-dates + parameters: + - name: site_engine_id + in: query + description: Search engine configuration ID. If omitted, dates are returned for all search engines. + schema: + type: integer + - name: site_id + in: query + description: Shown in the documented request example. + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + current: + type: string + description: Current check date (in `YYYY-MM-DD`). + day_ago: + type: string + description: Closest date to one day ago. + 7days: + type: string + description: Closest date to seven days ago. + example: + current: "2019-02-20" + day_ago: "2019-02-19" + 7days: "2019-02-14" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/sites/positions/checkpoints?site_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/sites/positions/recheck: + post: + operationId: runPositionCheck + tags: + - Project Management + summary: Run position check + description: >- + Triggers a ranking position check for selected keywords or for an entire project. + + + * Required unless `site_engine_id` alone is used to recheck all keywords for that search engine. + + + If successful, the server returns the number of keywords scheduled for recheck. Returns HTTP `400` if an unknown + `site_engine_id` is provided (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-management/#run-position-check + parameters: + - name: site_id + in: query + description: Shown in the documented request example. + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + site_engine_id: + type: integer + description: Search engine configuration ID. + keywords: + type: array + items: + type: object + properties: + site_engine_id: + type: integer + keyword_id: + type: integer + description: List of keyword objects to recheck. If provided, `site_engine_id` is ignored. + keyword_id: + type: integer + description: Keyword ID. + required: + - keywords + example: + keywords: + - site_engine_id: 1 + keyword_id: 2 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + total: + type: integer + description: Number of keywords for which the position check was launched. + example: + total: 5 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST 'https://api.seranking.com/v1/project-management/sites/positions/recheck?site_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ "keywords":[ {"site_engine_id":1, "keyword_id":2} ]}' + /v1/project-management/sites/check-dates: + get: + operationId: listCheckDates + tags: + - Project Management + summary: List check dates + description: >- + Returns the list of dates on which ranking positions were actually checked for the given project. Each returned + date is a real check — pass these values directly as date bounds to other rank-tracking endpoints (e.g. `GET + /sites/positions`, `GET /sites/positions/history`) when you need to anchor on a known check. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-management/#run-position-check + parameters: + - name: site_id + in: query + required: true + description: Project ID (returned by `GET /sites`). + schema: + type: integer + - name: site_engine_id + in: query + description: >- + Limit to a single project search engine. **Project engine ID** (returned by `GET /sites/search-engines` as + `site_engine_id`) — *not* the global `search_engine_id`. + schema: + type: integer + - name: date_from + in: query + description: >- + Start date `YYYY-MM-DD`, inclusive. Defaults to `today − 7 days`, clamped to the project’s first check date + for younger projects. + schema: + type: string + - name: date_to + in: query + description: End date `YYYY-MM-DD`, inclusive. Defaults to today. + schema: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + type: string + description: >- + Check dates, ascending. Each entry is a day on which a position check actually ran for the + project (or the single engine if filtered). + description: >- + Check dates, ascending. Each entry is a day on which a position check actually ran for the project + (or the single engine if filtered). + example: + data: + - "2026-05-10" + - "2026-05-11" + - "2026-05-12" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/project-management/sites/check-dates?site_id=11991701&date_from=2026-05-10&date_to=2026-05-12' + \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d 'Authorization: Token' + /v1/project-management/sites/positions/history: + get: + operationId: getRankingTrendsOverTime + tags: + - Project Management + summary: Get ranking trends over time + description: >- + Returns per-engine and cross-engine **time series** for a project’s rank-tracking metrics. This is the single + endpoint behind trend analysis, regression detection, weekly/monthly performance reports, and the in-app + position-history chart. By default the response contains: + + + - **One series per project search engine** (`type: "search_engine"`), labelled with the engine’s name. + + + - **One cross-engine aggregate** (`type: "avg"`, `name: "Average for all"`). + + + The `type` request parameter selects which metric the series carries — see [Metric + semantics](#metric-semantics). The aggregation rule the `avg` row uses depends on `type` — see [Cross-engine + aggregation](#cross-engine-aggregation). + + + Filter parameters (`group_id`, `keywords_ids[]`, `tags_ids[]`) **intersect** — a keyword must satisfy every + supplied filter to count toward the aggregate. `site_engine_id` is orthogonal: it narrows which engines’ series + come back, not which keywords participate. + + + **Cross-engine aggregation** + + + For multi-engine projects, the `avg` row aggregates **differently per `type`**. This is the single biggest thing + to keep in mind on this endpoint. + + + ⚠️ **The `Average for all` row is a marketing-grade aggregate, not analytics-grade.** Engine weights are equal + regardless of how many keywords each engine tracks, except for `top10` (sum) and `top10_percent` (project-total + denominator). On any project with imbalanced engine keyword counts, the `avg` row will misrepresent the + project’s true picture. For analytics, ignore `avg`, fetch per-engine series, and recompute with the weighting + that matches your question. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-management/#get-ranking-trends-over-time + parameters: + - name: site_id + in: query + required: true + description: Project ID (returned by `GET /sites`). + schema: + type: integer + - name: site_engine_id + in: query + description: >- + Limit to a single project search engine. **Project-local engine ID** (from `GET /sites/search-engines`). + **Setting this also drops the `avg` row from the response** — see [`avg` row presence](#avg-row-presence). + schema: + type: integer + - name: date_from + in: query + description: >- + Start date `YYYY-MM-DD`, inclusive. Defaults to `today − 7 days`, clamped to the project’s first check date + for younger projects. + schema: + type: string + - name: date_to + in: query + description: End date `YYYY-MM-DD`, inclusive. Defaults to today. + schema: + type: string + - name: type + in: query + description: >- + Chart metric. One of `avg_pos`, `visibility`, `visibility_percent`, `top10`, `top10_percent`. Defaults to + `avg_pos`. + schema: + type: string + - name: group_id + in: query + description: Filter to a keyword group ID (from `GET /keywords/groups`). + schema: + type: integer + - name: keywords_ids[] + in: query + description: >- + Filter to specific keyword IDs (from `GET /keywords`). Repeat the param for each ID — e.g. + `keywords_ids[]=42&keywords_ids[]=99`. + schema: + type: array + items: + type: integer + - name: tags_ids[] + in: query + description: >- + Filter to keywords associated with the given landing-page tag IDs (from `GET /sites/url-tags`). Repeat the + param for each ID. + schema: + type: array + items: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + type: object + properties: + name: + type: string + description: >- + Human label. For `type: search_engine`, the **global** engine’s name (e.g. `Google USA`). + For `type: avg`, the literal `Average for all`. **May be non-unique** — see [Engine `name` + can be non-unique](#engine-name-can-be-non-unique). + type: + type: string + description: "`search_engine` for a per-engine series, `avg` for the cross-engine aggregate." + search_engine_id: + type: integer + nullable: true + description: >- + **Project-local site_engine_id** — matches the `site_engine_id` value returned by `GET + /sites/search-engines`, *not* the global engine catalogue ID. The response field is named + `search_engine_id` for legacy reasons. `null` on the `avg` row. + data: + type: array + items: + type: object + properties: + date: + type: string + description: Check date `YYYY-MM-DD`. + value: + description: >- + Metric value for `type`. **Heterogeneous** — sometimes string, sometimes number. + Always coerce with `Number(point.value)` — see [`value` type + heterogeneity](#value-type-heterogeneity). + description: >- + Time series points, ascending by date. One entry per check date in the requested range. + May be **empty** for valid reasons (see [Empty per-engine + series](#empty-per-engine-series)). + description: >- + Time series points, ascending by date. One entry per check date in the requested range. May + be **empty** for valid reasons (see [Empty per-engine series](#empty-per-engine-series)). + description: >- + Time series points, ascending by date. One entry per check date in the requested range. May be + **empty** for valid reasons (see [Empty per-engine series](#empty-per-engine-series)). + description: >- + Time series points, ascending by date. One entry per check date in the requested range. May be + **empty** for valid reasons (see [Empty per-engine series](#empty-per-engine-series)). + example: + data: + - name: Google USA + type: search_engine + search_engine_id: 1167043 + data: + - date: "2026-05-10" + value: "94" + - date: "2026-05-11" + value: "88" + - date: "2026-05-12" + value: "88" + - date: "2026-05-13" + value: "88" + - date: "2026-05-14" + value: "88" + - name: Average for all + type: avg + search_engine_id: null + data: + - date: "2026-05-10" + value: 94 + - date: "2026-05-11" + value: 88 + - date: "2026-05-12" + value: 88 + - date: "2026-05-13" + value: 88 + - date: "2026-05-14" + value: 88 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/project-management/sites/positions/history?site_id=11991701&type=visibility_percent&date_from=2026-05-10&date_to=2026-05-14' + \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d 'Authorization: Token' + /v1/project-management/sites/groups: + post: + operationId: addProjectGroup + tags: + - Project Groups + summary: Add project group + description: Adds a new project group to the user account. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-groups/#add-project-group + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: Name of the project group to add. + required: + - name + example: + name: New Project Group + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + group_id: + type: integer + description: ID of the added project group. + example: + group_id: 9545 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST 'https://api.seranking.com/v1/project-management/sites/groups' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ "name" : "New Project Group" }' + patch: + operationId: renameProjectGroup + tags: + - Project Groups + summary: Rename project group + description: >- + Renames an existing project group. + + + If successful, the server returns the `200` HTTP code. Returns HTTP `400` if no name is specified and HTTP `404` + if the group is not found (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-groups/#rename-project-group + parameters: + - name: group_id + in: query + description: Shown in the documented request example. + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: New name for the group. + required: + - name + example: + name: New Group Name + responses: + "200": + description: Successful response. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + delete: + operationId: deleteProjectGroup + tags: + - Project Groups + summary: Delete project group + description: >- + Deletes a project group from the user account. + + + If successful, the server returns the `204` HTTP code. Returns HTTP `404` if the group is not found (for more + information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-groups/#delete-project-group + parameters: + - name: group_id + in: query + required: true + description: ID of the group to delete. + schema: + type: integer + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X DELETE 'https://api.seranking.com/v1/project-management/sites/groups?group_id=147' \ + -H 'Authorization: Token YOUR_API_KEY' + get: + operationId: listProjectGroups + tags: + - Project Groups + summary: List project groups + description: Retrieves all project groups for the user account. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-groups/#project-group-list + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: string + description: Project group ID. + name: + type: string + description: Project group name. + example: + - id: "123" + name: Group1 + - id: "456" + name: Group2 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/sites/groups' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/sites/groups/move: + post: + operationId: moveProjectsToProjectGroup + tags: + - Project Groups + summary: Move projects to project group + description: >- + Transfers projects from one group to another. + + + If successful, the server returns the `204` HTTP code. Returns HTTP `404` if the group is not found (for more + information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/project-groups/#move-projects-to-project-group + parameters: + - name: group_id + in: query + description: Shown in the documented request example. + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + site_ids: + type: array + items: + type: integer + description: Array of project (site) IDs to move. + required: + - site_ids + example: + site_ids: + - 1 + - 2 + - 3 + - 4 + - 5 + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST 'https://api.seranking.com/v1/project-management/sites/groups/move?group_id=147' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{"site_ids" : [1,2,3,4,5]}' + /v1/project-management/system/search-engines: + get: + operationId: listCountrySearchEngines + tags: + - Search Engine Setup + summary: List country search engines + description: >- + Returns a list of available search engines along with their regions, which can be added to projects for position + tracking. + + + No parameters. + + + If successful, the server returns the `200` HTTP status code and an array of search engines. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/general-data/#list-search-engines + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: string + description: Unique search engine ID. + name: + type: string + description: Search engine name. + regionid: + type: string + description: Associated region ID. + example: + - id: "200" + name: Google USA + regionid: "182" + - id: "201" + name: Google Andorra + regionid: "4" + - id: "202" + name: Google United Arab Emirates + regionid: "178" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/system/search-engines' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/system/google/regions: + get: + operationId: listCitiesForSearchEnginesTargeting + tags: + - Search Engine Setup + summary: List cities for search engines targeting + description: >- + Returns every city and sub-region that search engines tracking can target, grouped by country. The `name` + returned here is the value you pass as `region_name` to Add Search Engine / Update Search Engine when you want + sub-country targeting (e.g. tracking USA specifically for New York). + + + No parameters. + + + If successful, the server returns the `200` HTTP status code and an array of regions. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/general-data/#list-regions-to-get-search-volume + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + name: + type: string + description: Full canonical location string in English, formatted `{city}, {region}, {country}` + region_id: + type: integer + description: "**Country** ID (not city ID)." + example: + - name: New York, New York, United States + region_id: 182 + - name: San Francisco, California, United States + region_id: 182 + - name: Berlin, Berlin, Germany + region_id: 61 + - name: Tokyo, Tokyo, Japan + region_id: 83 + - name: Kabul, Kabul, Afghanistan + region_id: 1 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/system/google/regions' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/system/google/languages: + get: + operationId: listLanguages + tags: + - Search Engine Setup + summary: List languages + description: |- + Returns a complete list of supported languages for the Google search engine. + + No parameters. + + If successful, the server returns the `200` HTTP status code and an array of language codes and names. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/general-data/#list-languages-for-google + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + lang_code: + type: string + description: Language code (ISO 639-1). + name: + type: string + description: Language name. + example: + - lang_code: de + name: Deutsch + - lang_code: en + name: English + - lang_code: es + name: Español + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/system/google/languages' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/keywords/groups: + post: + operationId: addKeywordGroup + tags: + - Keyword Groups + summary: Add keyword group + description: >- + Creates a new keyword group for the specified project. + + + If successful, the server returns the `201` HTTP status code. Returns HTTP `400` if no name or site ID is + specified and HTTP `404` if the site is not found (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/keyword-groups/#add-keyword-group + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: Name of the keyword group to create. + site_id: + type: integer + description: Project (site) ID to which the group will be added. + required: + - name + - site_id + example: + name: groupname + site_id: 1 + responses: + "201": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + group_id: + type: integer + description: ID of the created keyword group. + example: + group_id: 123456 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST 'https://api.seranking.com/v1/project-management/keywords/groups' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{"name": "groupname","site_id": 1}' + patch: + operationId: renameKeywordGroup + tags: + - Keyword Groups + summary: Rename keyword group + description: >- + Renames the specified keyword group. + + + If successful, the server returns the `204` HTTP status code. Returns HTTP `400` if no name is specified and + HTTP `404` if the group is not found (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/keyword-groups/#rename-keyword-group + parameters: + - name: group_id + in: query + required: true + description: Keyword group ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: New keyword group name. + required: + - name + example: + name: Updated Group Name + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + delete: + operationId: deleteKeywordGroup + tags: + - Keyword Groups + summary: Delete keyword group + description: >- + Deletes the specified keyword group. + + + If successful, the server returns the `204` HTTP status code. Returns HTTP `404` if the group is not found (for + more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/keyword-groups/#delete-keyword-group + parameters: + - name: group_id + in: query + required: true + description: Keyword group ID (path parameter). + schema: + type: integer + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X DELETE 'https://api.seranking.com/v1/project-management/keywords/groups?group_id=147' \ + -H 'Authorization: Token YOUR_API_KEY' + get: + operationId: listKeywordGroups + tags: + - Keyword Groups + summary: List keyword groups + description: >- + Returns a list of keyword groups for the specified project. + + + If successful, the server returns the `200` HTTP status code and an array of keyword groups. Returns HTTP `404` + if the site is not found (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/keyword-groups/#list-keyword-groups + parameters: + - name: site_id + in: query + required: true + description: Project (site) ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: string + description: Keyword group ID. + name: + type: string + description: Keyword group name. + creation_date: + type: string + description: Date the keyword group was created (in `YYYY-MM-DD`). + example: + - id: "123" + name: NewKeyGroup + creation_date: "2018-08-27" + - id: "456" + name: NewKeyGroup1 + creation_date: "2018-08-27" + - id: "789" + name: NewKeyGroup2 + creation_date: "2018-08-27" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/keywords/groups?site_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/keywords/groups/move: + post: + operationId: moveKeywordsToAnotherGroup + tags: + - Keyword Groups + summary: Move keywords to another group + description: >- + Moves the specified keywords to the target keyword group. + + + If successful, the server returns the `204` HTTP status code. Returns HTTP `404` if the group is not found (for + more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/keyword-groups/#move-keywords-to-another-group + parameters: + - name: group_id + in: query + required: true + description: Target keyword group ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + keyword_ids: + type: array + items: + type: integer + description: Array of keyword IDs to move. + required: + - keyword_ids + example: + keyword_ids: + - 1 + - 2 + - 3 + - 4 + - 5 + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST 'https://api.seranking.com/v1/project-management/keywords/groups/move?group_id=147' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ "keyword_ids": [1,2,3,4,5] }' + /v1/project-management/competitors: + post: + operationId: addCompetitor + tags: + - Competitors + summary: Add competitor + description: |- + Adds a competitor’s website to a project for position tracking. + + If successful, the server returns the `201` HTTP status code. Returns HTTP `400` if the URL is invalid. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/competitors/#add-competitor + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + site_id: + type: integer + description: Unique project (site) ID. + url: + type: string + description: Competitor website URL. + name: + type: string + description: Competitor website name. If not specified, the URL is used. + subdomain_match: + type: integer + description: Include subdomains (`1` – yes, `0` – no). + required: + - site_id + - url + responses: + "201": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: integer + description: Competitor ID. + example: + id: 123456 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST 'https://api.seranking.com/v1/project-management/competitors' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + site_id : 1, + name : "name", + url : "http://site.test.com/" + }' + get: + operationId: listCompetitors + tags: + - Competitors + summary: List competitors + description: |- + Returns a list of competitors added to the specified project. + + If successful, the server returns the `200` HTTP status code and an array of competitors. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/competitors/#list-competitors + parameters: + - name: site_id + in: query + required: true + description: Unique project (site) ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: integer + description: Competitor ID. + name: + type: string + description: Competitor name. + url: + type: string + description: Competitor URL. + domain_trust: + type: integer + description: Competitor Domain Trust. + example: + - id: 1 + name: competitor1.com + url: competitor1.com + domain_trust: 2 + - id: 2 + name: competitor2.com + url: http://competitor2.com/ + domain_trust: 4 + - id: 3 + name: competitor3.com + url: http://competitor3.com + domain_trust: 6 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/competitors?site_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' + delete: + operationId: deleteCompetitor + tags: + - Competitors + summary: Delete competitor + description: >- + Removes a competitor from the specified project. + + + If successful, the server returns the `204` HTTP status code. Returns HTTP `404` if the competitor is not found + (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/competitors/#delete-competitor + parameters: + - name: competitor_id + in: query + required: true + description: Competitor ID (path parameter). + schema: + type: integer + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X DELETE 'https://api.seranking.com/v1/project-management/competitors?competitor_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/competitors/positions: + get: + operationId: getCompetitorKeywordPositions + tags: + - Competitors + summary: Get competitor keyword positions + description: >- + Returns ranking statistics for competitor keywords added to the project. + + + If successful, the server returns the `200` HTTP status code and ranking data grouped by search engine. Returns + HTTP `400` if the `site_engine_id` is invalid and HTTP `404` if the competitor is not found (for more + information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/competitors/#get-competitor-keyword-positions + parameters: + - name: competitor_id + in: query + required: true + description: Competitor ID (path parameter). + schema: + type: integer + - name: date_from + in: query + description: Start date (in `YYYY-MM-DD`). Defaults to one week before today. + schema: + type: string + - name: date_to + in: query + description: End date (in `YYYY-MM-DD`). Defaults to today. + schema: + type: string + - name: site_engine_id + in: query + description: Search engine configuration ID. If not specified, all search engines are included. + schema: + type: integer + - name: with_serp_features + in: query + description: Include SERP features (`1` – yes, `0` – no). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + site_engine_id: + type: integer + description: Search engine configuration ID. + keywords: + type: array + items: + type: object + properties: + id: + type: string + description: Keyword ID. + positions: + type: array + items: + type: object + properties: + date: + type: string + description: Check date (in `YYYY-MM-DD`). + pos: + type: integer + description: Current position. + change: + type: integer + description: Position change compared to previous check. + description: Array of positions containing statistics on competitor keyword rankings. + description: Array of positions containing statistics on competitor keyword rankings. + name: + nullable: true + description: Keyword name (can be `null`). + type: string + volume: + nullable: true + description: Search volume (can be `null`). + type: integer + description: List of keywords. + description: List of keywords. + example: + - site_engine_id: 123 + keywords: + - id: "123" + positions: + - date: "2018-07-25" + pos: 7 + change: 1 + name: null + volume: null + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/project-management/competitors/positions?competitor_id=123&date_from=2018-07-25&date_to=2018-07-25&site_engine_id=1' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/competitors/serp10: + get: + operationId: getTOP10Results + tags: + - Competitors + summary: Get TOP 10 results + description: |- + Returns the TOP 10 ranking results for a tracked keyword. + + If successful, the server returns the `200` HTTP status code and an array of results. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/competitors/#get-top-10-results + parameters: + - name: site_id + in: query + required: true + description: Project (site) ID (path parameter). + schema: + type: integer + - name: date + in: query + required: true + description: Date of getting a list of sites from the TOP 10 (in `YYYY-MM-DD`). + schema: + type: string + - name: site_engine_id + in: query + required: true + description: Search engine configuration ID (refer to `api.seranking.com/v1/project-management/keywords`). + schema: + type: integer + - name: keyword_id + in: query + required: true + description: Unique keyword ID (refer to `api.seranking.com/v1/project-management/keywords`). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + position: + type: integer + description: Position in SERP. + url: + type: string + description: Page URL. + keyword_id: + type: integer + description: Keyword ID. + backlinks: + type: string + description: Total backlinks. + domains: + type: string + description: Referring domains count. + example: + - position: 1 + url: https://anandaioga.com/ca/inici + keyword_id: 4843813 + backlinks: "216" + domains: "57" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/project-management/competitors/serp10?site_id=123&date=2018-01-01&site_engine_id=1&keyword_id=1' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/competitors/serp100: + get: + operationId: getTOP100Results + tags: + - Competitors + summary: Get TOP 100 results + description: |- + Returns a list of up to the TOP 100 results for keywords tracked in a project. + + If successful, the server returns the `200` HTTP status code and ranking results. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/competitors/#get-top-100-results + parameters: + - name: site_id + in: query + required: true + description: Project (site) ID (path parameter). + schema: + type: integer + - name: date + in: query + required: true + description: Date of getting a list of the TOP 100 results (in `YYYY-MM-DD`). + schema: + type: string + - name: site_engine_id + in: query + required: true + description: Search engine configuration ID (refer to `api.seranking.com/v1/project-management/keywords`). + schema: + type: integer + - name: keyword_id + in: query + required: true + description: Unique keyword ID (refer to `api.seranking.com/v1/project-management/keywords`). + schema: + type: integer + - name: top + in: query + description: Maximum position (0–100). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + url: + type: string + description: Page URL. + position: + type: integer + description: Position in SERP. + date: + type: string + description: Check date (in `YYYY-MM-DD`). + domain_trust: + type: integer + description: Domain Trust value. + example: + - url: https://www.tests.com/login + position: 1 + date: "2018-01-01" + domain_trust: 2 + - url: https://www.test2.com + position: 2 + domain_trust: 4 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/project-management/competitors/serp100?site_id=123&date=2018-01-01&site_engine_id=1&keyword_id=1&top=50' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/competitors/metrics: + get: + operationId: getAllCompetitors + tags: + - Competitors + summary: Get all competitors + description: |- + Returns domains ranked in the TOP 10 for tracked keywords. History is stored for 14 days. + + If successful, the server returns the `200` HTTP status code and an array of domains. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/competitors/#get-all-competitors + parameters: + - name: site_id + in: query + required: true + description: Project (site) ID (path parameter). + schema: + type: integer + - name: date + in: query + required: true + description: Date of getting domains ranked in the TOP 10 (in `YYYY-MM-DD`). + schema: + type: string + - name: site_engine_id + in: query + required: true + description: Search engine configuration ID. + schema: + type: integer + - name: group_id + in: query + description: Keyword group ID. + schema: + type: integer + - name: tags + in: query + description: Keyword tag IDs. + schema: + type: array + items: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + domain: + type: string + description: Domain name. + domain_id: + type: integer + description: Domain ID. + visibility: + type: integer + description: Visibility value. + backlinks: + type: string + description: Total backlinks. + domains: + type: string + description: Referring domains count. + example: + - domain: www.tests.com + domain_id: 10 + visibility: 0 + backlinks: "328" + domains: "32" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/project-management/competitors/metrics?site_id=123&date=2018-01-01&site_engine_id=1&group_id=1&tags[]=21' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/sites/url-tags: + get: + operationId: listTags + tags: + - URL Tags + summary: List tags + description: |- + Returns a list of landing page tags added to domains and/or links within the specified site. + + If successful, the server returns the `200` HTTP status code and an array of tags. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/url-tags/#list-tags + parameters: + - name: site_id + in: query + required: true + description: Website ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: string + description: Tag ID. + name: + type: string + description: Tag name. + url: + type: array + items: + type: string + description: List of links the tag is added to. + description: List of links the tag is added to. + domain: + type: array + items: + type: string + description: List of domains the tag is added to. + description: List of domains the tag is added to. + example: + - id: "51" + name: tag1 + url: + - https://test.com + domain: + - www.flotenk.com + - google.com + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/sites/url-tags?site_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' + post: + operationId: addTag + tags: + - URL Tags + summary: Add tag + description: >- + Creates a tag within the specified site and optionally attaches it to links and/or domains. You can add a + maximum of 20 tags to one site. + + + If successful, the server returns the `200` HTTP status code and the created tag ID. Returns HTTP `400` if the + maximum number of tags per site is exceeded (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/url-tags/#add-tag + parameters: + - name: site_id + in: query + required: true + description: Website ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: Tag name. + urls: + type: array + items: + type: string + description: List of links the tag is added to. + domains: + type: array + items: + type: string + description: List of domains the tag is added to. + required: + - name + example: + name: tag1 + urls: + - http://url.com/path + domains: + - test.com + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + tag_id: + type: integer + description: Created tag ID. + example: + tag_id: 1 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST 'https://api.seranking.com/v1/project-management/sites/url-tags?site_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "name": "tag1", + "urls": ["http://url.com/path"], + "domains": ["test.com"] + }' + patch: + operationId: updateTagAssignment + tags: + - URL Tags + summary: Update tag assignment + description: >- + Assigns tags to the specified links and/or domains. All previously assigned tags for the submitted links and + domains are removed and replaced with the provided tag IDs. + + + If successful, the server returns the `204` HTTP status code. Returns HTTP `404` if one or more tags are not + found (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/url-tags/#update-tag-assignment + parameters: + - name: site_id + in: query + required: true + description: Website ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + tag_ids: + type: array + items: + type: integer + description: List of tag IDs to assign. + urls: + type: array + items: + type: string + description: List of links to update. + domains: + type: array + items: + type: string + description: List of domains to update. + required: + - tag_ids + example: + tag_ids: + - 1 + - 2 + urls: + - http://url.com/path + domains: + - test.com + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + delete: + operationId: deleteTag + tags: + - URL Tags + summary: Delete tag + description: >- + Deletes a tag from the specified site. + + + If successful, the server returns the `204` HTTP status code. Returns HTTP `404` if the tag is not found (for + more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/url-tags/#delete-tag + parameters: + - name: site_id + in: query + required: true + description: Website ID (path parameter). + schema: + type: integer + - name: tag_id + in: query + required: true + description: Tag ID (path parameter). + schema: + type: integer + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X DELETE 'https://api.seranking.com/v1/project-management/sites/url-tags?site_id=123&tag_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/analytics/gsc/queries: + get: + operationId: getGoogleSearchConsoleData + tags: + - Analytics Traffic + summary: Get Google Search Console data + description: >- + Returns popular queries and performance metrics from Google Search Console for the specified site. + + + If successful, the server returns the `200` HTTP status code and an array of queries with performance metrics. + Returns HTTP `400` if the site is not shared with the account (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/analytics-traffic/#google-search-console-data + parameters: + - name: site_id + in: query + required: true + description: Project (site) ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + query: + type: string + description: Search query. + impressions: + type: integer + description: Number of impressions. + clicks: + type: integer + description: Number of clicks. + ctr: + type: integer + description: Click-through rate (%). + avg: + type: integer + description: Average position. + example: + - query: text + impressions: 100 + clicks: 10 + ctr: 10 + avg: 5 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/analytics/gsc/queries?site_id=123\' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '-H 'Authorization: Token YOUR_API_KEY'' + /v1/project-management/analytics/seo-potential: + get: + operationId: calculateSEOPotential + tags: + - Analytics Traffic + summary: Calculate SEO potential + description: >- + Estimates traffic, cost, and potential leads for the specified site. + + + If successful, the server returns the `200` HTTP status code and an array of traffic forecasts per search + engine. Returns HTTP `400` if `site_id` is not valid (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/analytics-traffic/#seo-potential + parameters: + - name: site_id + in: query + required: true + description: Project (site) ID (path parameter). + schema: + type: integer + - name: top_n + in: query + description: >- + If specified, calculates potential traffic assuming all queries reach the TOP. Otherwise, returns the + current traffic estimate for queries added to the system. + schema: + type: integer + - name: lead_price + in: query + description: Estimated income per client. + schema: + type: number + - name: conversion_rate + in: query + description: Conversion rate to sales (%). + schema: + type: number + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + site_engine_id: + type: integer + description: Unique ID of the search engine configuration within the project. + traffic: + type: integer + description: Estimated traffic. + traffic_value: + type: number + description: Estimated cost of traffic. + leads_qty: + type: integer + description: Estimated number of clients. + leads_price: + type: integer + description: Estimated profit from leads. + example: + - site_engine_id: 586 + traffic: 1 + traffic_value: 5.85 + leads_qty: 0 + leads_price: 0 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/project-management/analytics/seo-potential?site_id=123&top_n=10&lead_price=50&conversion_rate=100\' + \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '-H 'Authorization: Token YOUR_API_KEY'' + /v1/project-management/marketing-plan: + get: + operationId: listPlanItems + tags: + - Marketing Plan + summary: List plan items + description: |- + Returns a list of marketing plan sections, items, and notes. + + If successful, the server returns the `200` HTTP status code and an array of marketing plan sections. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/marketing-plan/#list-plan-items + parameters: + - name: site_id + in: query + required: true + description: Unique site ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + title: + type: string + description: Section name. + items: + type: array + items: + type: object + properties: + id: + type: string + description: Unique section ID. + title: + type: string + description: Section name. + checked: + type: boolean + description: Item completion status. + description: List of items in the section. + description: List of items in the section. + id: + type: string + description: Unique section ID. + items_count: + type: integer + description: Number of items in the section. + items_checked: + type: integer + description: Number of completed items in the section. + example: + - title: Step 1. Semantic core and keyword research + items: + - id: analyze_competitors + title: Analyze competitors’ keywords + checked: true + - id: makeup_final_list + title: Collect core keywords + checked: true + id: keywords_research + items_count: 3 + items_checked: 3 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/marketing-plan?site_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/marketing-plan/tasks: + post: + operationId: addTask + tags: + - Marketing Plan + summary: Add task + description: >- + Creates a new custom task in the marketing plan. + + + If successful, the server returns the `200` HTTP status code and an object containing the created task ID. + Returns HTTP `400` if the title or text is empty (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/marketing-plan/#add-task + parameters: + - name: site_id + in: query + required: true + description: Unique site ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + title: + type: string + description: Task name. + text: + type: string + description: Task description. + for_all: + type: boolean + description: Indicates whether the task applies to all projects. + required: + - title + - text + example: + title: Create landing page + text: Prepare and publish a new landing page for the campaign + for_all: false + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: integer + description: Unique ID of the created task. + example: + id: 1 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST 'https://api.seranking.com/v1/project-management/marketing-plan/tasks?site_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "title": "Create landing page", + "text": "Prepare and publish a new landing page for the campaign", + "for_all": false + }' + patch: + operationId: updateTask + tags: + - Marketing Plan + summary: Update task / Set task status + description: >- + ### Update task + + + Updates the name and description of an existing task. + + + If successful, the server returns the `200` HTTP status code. Returns HTTP `400` if the title or text is empty + (for more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)). + + + ### Set task status + + + Updates the completion status of a task. + + + If successful, the server returns the `200` HTTP status code. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/marketing-plan/#update-task + parameters: + - name: site_id + in: query + required: true + description: Unique site ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + task_id: + type: string + description: Unique task ID. + title: + type: string + description: Task name. + text: + type: string + description: Task description. + checked: + type: boolean + description: Task completion status. + required: + - task_id + examples: + updateTask: + summary: Update task + value: + task_id: makeup_final_list + title: Update keyword list + text: Add new high-priority keywords + setTaskStatus: + summary: Set task status + value: + task_id: makeup_final_list + checked: true + responses: + "200": + description: Successful response. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X PATCH 'https://api.seranking.com/v1/project-management/marketing-plan/tasks?site_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "task_id": "makeup_final_list", + "title": "Update keyword list", + "text": "Add new high-priority keywords" + }' + delete: + operationId: deleteTask + tags: + - Marketing Plan + summary: Delete task + description: >- + Deletes a custom task from the marketing plan. Only tasks created using the [Add task + endpoint](https://seranking.com/api/project/marketing-plan/#add-task) can be deleted. + + + If successful, the server returns the `204` HTTP status code. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/marketing-plan/#delete-task + parameters: + - name: site_id + in: query + required: true + description: Unique site ID (path parameter). + schema: + type: integer + - name: task_id + in: query + required: true + description: Unique task ID (path parameter). + schema: + type: integer + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X DELETE + 'https://api.seranking.com/v1/project-management/marketing-plan/tasks?site_id=123&task_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/audits: + post: + operationId: createAudit + tags: + - Website Audit + summary: Create audit / Add audit source pages + description: >- + ### Create audit + + + Creates a website audit that crawls the HTML of a target site. Suitable for static and server-side-rendered + sites. Enable `csr` in `settings` for JavaScript-rendered pages. + + + **Note:** Page crawl limit depends on your subscription plan. + + + If successful, the server returns a JSON object containing the unique ID for the newly created audit. + + + ### Add audit source pages + + + Uploads a custom list of URLs to crawl. The list is submitted as a multipart text file with one URL per line. + Auto-sets `settings.source_file` to `1`. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/audit/#create-audit + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + domain: + type: string + description: Domain to be audited (e.g., `domain.com`). + title: + type: string + description: Custom title of the audit report (max 300 characters). Defaults to `domain`. + settings: + type: object + description: >- + Audit configuration settings. Only include parameters you want to override (see [settings + object](https://seranking.com/api/project/audit/#settings-object) below). + properties: + source_site: + type: integer + source_sitemap: + type: integer + source_subdomain: + type: integer + source_file: + type: integer + check_robots: + type: integer + ignore_noindex: + type: integer + ignore_nofollow: + type: integer + ignore_params: + type: integer + custom_params: + type: string + csr: + type: integer + user_agent: + type: integer + login: + type: string + password: + type: string + max_pages: + type: integer + max_depth: + type: integer + max_req: + type: integer + max_redirects: + type: integer + max_size: + type: integer + min_title_len: + type: integer + max_title_len: + type: integer + min_description_len: + type: integer + max_description_len: + type: integer + min_words: + type: integer + max_h1_len: + type: integer + max_h2_len: + type: integer + allow: + type: string + disallow: + type: string + hide: + type: string + schedule_type: + type: string + schedule_wdays: + type: array + items: + type: integer + schedule_hour: + type: integer + schedule_day: + type: integer + schedule_repeat: + type: integer + schedule_repeat_interval: + type: integer + send_report: + type: integer + report_emails: + type: string + required: + - domain + example: + domain: example.com + title: Full Audit - example.com + settings: + source_site: 1 + source_sitemap: 1 + source_subdomain: 1 + source_file: 0 + check_robots: 1 + ignore_noindex: 1 + ignore_nofollow: 1 + ignore_params: 2 + custom_params: utm_source, utm_medium, utm_term, utm_content, utm_campaign, cid, PHPSESSID, fbclid, gclid + csr: 0 + user_agent: 0 + login: "" + password: "" + max_pages: 10000 + max_depth: 15 + max_req: 300 + max_redirects: 10 + max_size: 5000 + min_title_len: 30 + max_title_len: 60 + min_description_len: 50 + max_description_len: 160 + min_words: 300 + max_h1_len: 70 + max_h2_len: 80 + allow: |- + /blog + /products + disallow: |- + /admin + /staging + hide: |- + /cdn-cgi + /wp-json + schedule_type: week + schedule_wdays: + - 1 + - 2 + schedule_hour: 6 + schedule_day: 1 + schedule_repeat: 1 + schedule_repeat_interval: 1 + send_report: 1 + report_emails: seo-lead@example.com, devops@example.com + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: integer + description: Unique identifier of the audit report. + examples: + createAudit: + summary: Create audit + value: + id: 700237036 + addAuditSourcePages: + summary: Add audit source pages + value: + id: 1732 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl --location 'https://api.seranking.com/v1/project-management/audits' \ + --header 'Content-Type: application/json' \ + --header 'Authorization: Token YOUR_API_KEY' \ + --data '{ + "domain": "example.com", + "title": "Full Audit - example.com", + "settings": { + "source_site": 1, + "source_sitemap": 1, + "source_subdomain": 1, + "source_file": 0, + "check_robots": 1, + "ignore_noindex": 1, + "ignore_nofollow": 1, + "ignore_params": 2, + "custom_params": "utm_source, utm_medium, utm_term, utm_content, utm_campaign, cid, PHPSESSID, fbclid, gclid", + "csr": 0, + "user_agent": 0, + "login": "", + "password": "", + "max_pages": 10000, + "max_depth": 15, + "max_req": 300, + "max_redirects": 10, + "max_size": 5000, + "min_title_len": 30, + "max_title_len": 60, + "min_description_len": 50, + "max_description_len": 160, + "min_words": 300, + "max_h1_len": 70, + "max_h2_len": 80, + "allow": "/blog\n/products", + "disallow": "/admin\n/staging", + "hide": "/cdn-cgi\n/wp-json", + "schedule_type": "week", + "schedule_wdays": [1, 2], + "schedule_hour": 6, + "schedule_day": 1, + "schedule_repeat": 1, + "schedule_repeat_interval": 1, + "send_report": 1, + "report_emails": "seo-lead@example.com, devops@example.com" + } + }' + - lang: Shell + label: cURL + source: >- + curl --location --request POST + 'https://api.seranking.com/v1/project-management/audits/source-pages?audit_id=123' \ + + --header 'Authorization: Token YOUR_API_KEY' \ + + -F "file=@priority-pages.txt" + parameters: + - name: audit_id + in: query + description: Unique audit ID (path parameter). + schema: + type: integer + - name: file + in: query + description: UTF-8 text file with one URL per line. + schema: + type: string + get: + operationId: listAudits + tags: + - Website Audit + summary: List audits + description: >- + Returns all audits associated with the account, with pagination and filtering. + + + If successful, the server returns a JSON object containing the total number of audits and an array of audit + objects. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/audit/#list-audits + parameters: + - name: limit + in: query + description: Number of audits to return. Defaults to `100`. + schema: + type: integer + - name: offset + in: query + description: Number of audits to skip before starting to collect the result set. Defaults to `0`. + schema: + type: integer + - name: search + in: query + description: Filters audits by matching title or URL. + schema: + type: string + - name: date_start + in: query + description: Start date for filtering audits (in `YYYY-MM-DD`). + schema: + type: string + - name: date_end + in: query + description: End date for filtering audits (in `YYYY-MM-DD`). + schema: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + items: + type: array + items: + type: object + properties: + id: + type: integer + description: Unique identifier of the audit report. + group_id: + type: integer + description: Audit group identifier. + url: + type: string + description: URL of the audited website. + title: + type: string + description: Title of the audit report. + has_project: + type: boolean + description: Indicates whether the audit is linked to a project. + site_id: + type: integer + description: Internal site identifier. + last_update: + type: string + description: Date of last audit update ( in `YYYY-MM-DD`). + status: + type: string + description: Current audit status (for example, `finished`, `processing`). + error: + nullable: true + description: Error message if the audit failed, otherwise `null`. + type: string + error_params: + description: Error details if available. + stats: + type: object + properties: + score: + type: integer + errors: + type: integer + warnings: + type: integer + notices: + type: integer + crawled: + type: integer + description: Latest audit statistics. + prev_stats: + description: Statistics from the previous audit run (can be `null`). + version: + type: string + description: Audit engine version. + owner_account_id: + type: integer + description: Owner account identifier. + is_new: + type: integer + description: Indicates whether the audit is newly created (`1` – yes, `0` – no). + description: Array of audit objects. + description: Array of audit objects. + total: + type: integer + description: Number of audits matching the filter criteria. + example: + items: + - id: 700138456 + group_id: 0 + url: http://booking.com + title: booking.com + has_project: true + site_id: 10113599 + last_update: "2025-07-08" + status: finished + error: null + error_params: null + stats: + score: 69 + errors: 2303 + warnings: 3710 + notices: 10875 + crawled: 1830 + prev_stats: null + version: "2.0" + owner_account_id: 4242308 + is_new: 1 + total: 1 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location + 'https://api.seranking.com/v1/project-management/audits?limit=10&offset=0&search=booking.com&date_start=2025-07-01&date_end=2025-07-31' + \ + + --header 'Authorization: Token YOUR_API_KEY' + delete: + operationId: deleteAudit + tags: + - Website Audit + summary: Delete audit / Delete audit source pages + description: >- + ### Delete audit + + + Permanently deletes the specified website audit report and all associated data. This action can’t be undone. + + + If successful, the server returns the `200` HTTP status code and an empty response body. Returns HTTP `404` if + the audit is not found (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + + + ### Delete audit source pages + + + Removes an uploaded custom page list. Does not toggle `settings.source_file` off. Use `updateAuditSettings` to + disable custom-list crawling entirely. + + + HTTP `204 No Content` on success. + + + Used by `createAudit`, `updateAuditSettings`, `getAuditSettings`, and `getAuditHistory`. Every field is + optional. Send only the fields to change; other values stay untouched (exceptions are called out below). + + + **URL filtering** + + + **Note:** Multiple paths must be separated by newline. + + + **Reporting** + + + **Note:** Multiple emails must be comma-separated. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/audit/#delete-audit + parameters: + - name: audit_id + in: query + required: true + description: Unique audit ID (path parameter). + schema: + type: integer + - name: list_id + in: query + description: List identifier from `List Audit Source Pages`. + schema: + type: string + responses: + "200": + description: Successful response. + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl --location --request DELETE 'https://api.seranking.com/v1/project-management/audits?audit_id=123' \ + --header 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: >- + curl --location --request DELETE + 'https://api.seranking.com/v1/project-management/audits/source-pages?audit_id=123&list_id=789' \ + + --header 'Authorization: Token YOUR_API_KEY' + patch: + operationId: updateAuditTitle + tags: + - Website Audit + summary: Update audit title + description: >- + Updates the title of an existing website audit report. + + + If successful, the server returns the `200` HTTP status code with an empty response body. Returns HTTP `404` if + the audit is not found (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/audit/#update-audit-title + parameters: + - name: audit_id + in: query + required: true + description: Unique audit ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + title: + type: string + description: New title for the audit report. Maximum length is 300 characters. + required: + - title + example: + title: New Example Audit Title + responses: + "200": + description: Successful response. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl --location --request PATCH 'https://api.seranking.com/v1/project-management/audits?audit_id=123' \ + --header 'Content-Type: application/json' \ + --header 'Authorization: Token YOUR_API_KEY' \ + --data '{ + "title": "New Example Audit Title" + }' + /v1/project-management/audits/status: + get: + operationId: getAuditStatus + tags: + - Website Audit + summary: Get audit status + description: >- + Returns the real-time status of a specific audit. Useful for monitoring crawl progress before fetching the full + report. + + + If successful, the server returns a JSON object containing the current audit status and key metrics. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/audit/#get-audit-status + parameters: + - name: audit_id + in: query + required: true + description: Unique audit ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + total_pages: + type: integer + description: Number of pages crawled. + total_warnings: + type: integer + description: Number of warnings found. + total_errors: + type: integer + description: Number of errors found. + total_passed: + type: integer + description: Number of passed checks. + status: + type: string + description: "Current audit status. Possible values: `queued`, `processing`, `finished`, `cancelled`, `expired`." + start_time: + type: string + description: Audit start timestamp. + audit_time: + type: string + description: Audit completion timestamp. Present if the audit is finished. + example: + total_pages: 1009 + total_warnings: 979 + total_errors: 346 + total_passed: 77 + status: finished + start_time: "2025-07-29 11:06:23" + audit_time: "2025-07-29 11:19:33" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl --location 'https://api.seranking.com/v1/project-management/audits/status?audit_id=123' \ + --header 'Authorization: Token YOUR_API_KEY' + /v1/project-management/audits/report: + get: + operationId: getAuditReport + tags: + - Website Audit + summary: Get audit report + description: |- + Returns a complete audit report, including health score, domain properties, and issues. + + If successful, the server returns a JSON object containing the complete audit report. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/audit/#get-audit-report + parameters: + - name: audit_id + in: query + required: true + description: Unique audit ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + total_pages: + type: integer + description: Number of pages crawled. + total_warnings: + type: integer + description: Number of warnings found. + total_errors: + type: integer + description: Number of errors found. + total_passed: + type: integer + description: Number of passed checks. + total_notices: + type: integer + description: Number of notices found. + is_finished: + type: boolean + description: Indicates whether the audit is completed. + domain_props: + type: object + properties: + dt: + type: integer + description: Domain trust score. + domain: + type: string + description: Domain name. + domains: + type: string + description: Number of referring domains. + expdate: + type: string + description: Expiration date of domain registration. + updated: + type: string + description: Last update timestamp. + backlinks: + type: string + description: Number of backlinks pointing to the domain. + index_bing: + type: integer + all_checked: + type: boolean + description: Indicates whether all domain checks are completed. + index_yahoo: + type: integer + index_google: + type: string + description: Number of pages indexed in Google. + description: >- + Domain properties and metadata (see [domain_props + object](https://seranking.com/api/project/audit/#domain-props) below). + sections: + type: array + items: + type: object + properties: + uid: + type: string + description: Section identifier. + name: + type: string + description: Section name. + props: + type: object + properties: + no_https: + type: object + properties: + code: + type: string + description: Unique check identifier. + status: + type: string + description: "Check result. Possible values: `error`, `warning`, `notice`, `passed`." + name: + type: string + description: Section name. + value: + type: integer + description: Number of affected pages. + mixed_content: + type: object + properties: + code: + type: string + description: Unique check identifier. + status: + type: string + description: "Check result. Possible values: `error`, `warning`, `notice`, `passed`." + name: + type: string + description: Section name. + value: + type: integer + description: Number of affected pages. + http4xx: + type: object + properties: + code: + type: string + description: Unique check identifier. + status: + type: string + description: "Check result. Possible values: `error`, `warning`, `notice`, `passed`." + name: + type: string + description: Section name. + value: + type: integer + description: Number of affected pages. + blocked_by_noindex: + type: object + properties: + code: + type: string + description: Unique check identifier. + status: + type: string + description: "Check result. Possible values: `error`, `warning`, `notice`, `passed`." + name: + type: string + description: Section name. + value: + type: integer + description: Number of affected pages. + description: >- + Section checks and results. + + Object where each key is a check identifier and the value is a check result object (see + structure below). + description: >- + An array of objects, where each object represents a category of audit checks (see [sections + array](https://seranking.com/api/project/audit/#sections-array) below). + description: >- + An array of objects, where each object represents a category of audit checks (see [sections + array](https://seranking.com/api/project/audit/#sections-array) below). + score_percent: + type: integer + description: Overall website health score (0–100). + audit_time: + type: string + description: Audit completion timestamp. + version: + type: string + example: + total_pages: 1009 + total_warnings: 979 + total_errors: 346 + total_passed: 77 + total_notices: 3915 + is_finished: true + domain_props: + dt: 44 + domain: www.vitality.co.uk + domains: "3401" + expdate: "2025-08-30" + updated: "2025-07-29 12:07:28" + backlinks: "212249" + index_bing: 15500 + all_checked: true + index_yahoo: 15500 + index_google: "1380" + sections: + - uid: security_v2 + name: Security + props: + no_https: + code: no_https + status: error + name: No HTTPS encryption + value: 0 + mixed_content: + code: mixed_content + status: error + name: Mixed content + value: 0 + - uid: crawling_v2 + name: Crawling & Indexing + props: + http4xx: + code: http4xx + status: error + name: 4XX HTTP Status Codes + value: 28 + blocked_by_noindex: + code: blocked_by_noindex + status: notice + name: Blocked by noindex + value: 34 + score_percent: 80 + audit_time: "2025-07-29 11:19:33" + version: "2.0" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl --location 'https://api.seranking.com/v1/project-management/audits/report?audit_id=123' \ + --header 'Authorization: Token YOUR_API_KEY' + /v1/project-management/audits/recheck: + post: + operationId: recheckAudit + tags: + - Website Audit + summary: Recheck audit + description: >- + Re-runs the audit using the same settings. This allows you to track changes and verify that issues have been + resolved. + + + **Note:** Rechecking an audit consumes the same credits as creating a new audit. + + + If successful, the server returns the `200` HTTP status code with an empty response body. Returns HTTP `404` if + the audit is not found (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/audit/#recheck-audit + parameters: + - name: audit_id + in: query + required: true + description: Unique audit ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --request POST 'https://api.seranking.com/v1/project-management/audits/recheck?audit_id=123' + \ + + --header 'Authorization: Token YOUR_API_KEY' + /v1/project-management/audits/settings: + get: + operationId: getAuditSettings + tags: + - Website Audit + summary: Get audit settings + description: >- + Returns the full saved configuration for an audit: crawl sources, limits, thresholds, schedule, notification + recipients, disabled issue codes, external URL ignore list, and engine version. + + + Call this before `updateAuditSettings` for partial updates, especially when modifying `disabled_issues` or + `schedule_wdays` (both are replace operations). + + + Response fields match the [Audit settings object](#settings-object). The API returns every field with its + current value. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/audit/#recheck-audit + parameters: + - name: audit_id + in: query + required: true + description: Unique audit ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + source_site: + type: integer + source_sitemap: + type: integer + source_subdomain: + type: integer + source_file: + type: integer + check_robots: + type: integer + ignore_noindex: + type: integer + ignore_nofollow: + type: integer + ignore_params: + type: integer + user_agent: + type: integer + csr: + type: integer + max_pages: + type: integer + max_depth: + type: integer + max_req: + type: integer + max_redirects: + type: integer + max_size: + type: integer + min_title_len: + type: integer + max_title_len: + type: integer + min_description_len: + type: integer + max_description_len: + type: integer + min_words: + type: integer + max_h1_len: + type: integer + max_h2_len: + type: integer + schedule_type: + type: string + schedule_hour: + type: integer + schedule_repeat: + type: integer + send_report: + type: integer + disabled_issues: + type: array + items: + type: string + disallow_ext: + type: string + version: + type: string + example: + source_site: 1 + source_sitemap: 1 + source_subdomain: 0 + source_file: 0 + check_robots: 1 + ignore_noindex: 0 + ignore_nofollow: 0 + ignore_params: 0 + user_agent: 0 + csr: 0 + max_pages: 1000 + max_depth: 10 + max_req: 500 + max_redirects: 5 + max_size: 3000 + min_title_len: 20 + max_title_len: 65 + min_description_len: 1 + max_description_len: 158 + min_words: 250 + max_h1_len: 100 + max_h2_len: 100 + schedule_type: manual + schedule_hour: 0 + schedule_repeat: 0 + send_report: 1 + disabled_issues: + - slow_loading + - speed_index + disallow_ext: |- + cdn.example.com + https://tracking.example.com/pixel + version: "2.0" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + patch: + operationId: updateAuditSettings + tags: + - Website Audit + summary: Update audit settings + description: >- + Updates the configuration of an existing audit. Applies partial-update (merge) semantics: only the fields in the + request body change. + + + **Warning:** `disabled_issues` and `schedule_wdays` are REPLACE operations. The array you send replaces the full + saved list. Fetch the current values with `getAuditSettings` before modifying them. + + + Sitemaps and custom page lists have their own endpoints. See [`addAuditSitemap`](#add-audit-sitemap) and + [`addAuditSourcePages`](#add-audit-source-pages). Updating only the audit title has a dedicated endpoint. See + [`updateAuditTitle`](#update-audit-title). + + + HTTP `200 OK` with an empty body. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/audit/#recheck-audit + parameters: + - name: audit_id + in: query + required: true + description: Unique audit ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + settings: + type: object + properties: + max_pages: + type: integer + max_depth: + type: integer + schedule_type: + type: string + schedule_wdays: + type: array + items: + type: integer + disabled_issues: + type: array + items: + type: string + disallow_ext: + type: string + example: + settings: + max_pages: 50000 + max_depth: 20 + schedule_type: week + schedule_wdays: + - 1 + - 3 + - 5 + disabled_issues: + - slow_loading + disallow_ext: |- + cdn.example.com + https://tracking.example.com/pixel + responses: + "200": + description: Successful response. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --globoff --request PATCH + 'https://api.seranking.com/v1/project-management/audits/settings?audit_id={audit_id}' \ + + --header 'Content-Type: application/json' \ + + --header 'Authorization: Token YOUR_API_KEY' \ + + --data '{ + "settings": { + "max_pages": 50000, + "max_depth": 20, + "schedule_type": "week", + "schedule_wdays": [1, 3, 5], + "disabled_issues": ["slow_loading"], + "disallow_ext": "cdn.example.com\nhttps://tracking.example.com/pixel" + } + }' + /v1/project-management/audits/settings/reset: + post: + operationId: resetAuditSettings + tags: + - Website Audit + summary: Reset audit settings + description: >- + Restores every setting to its default value, including crawl sources, limits, thresholds, schedule, + notifications, `disabled_issues`, and `disallow_ext`. + + + **Note:** Sitemaps and source-pages lists are not removed by this call. Delete them through + [`deleteAuditSitemap`](#delete-audit-sitemap) or [`deleteAuditSourcePages`](#delete-audit-source-pages) if + needed. + + + HTTP `200 OK` with an empty body. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/audit/#recheck-audit + parameters: + - name: audit_id + in: query + required: true + description: Unique audit ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + /v1/project-management/audits/pages: + get: + operationId: getAllCrawledPages + tags: + - Website Audit + summary: Get all crawled pages + description: >- + Returns a paginated list of all URLs found during the audit. The response provides a complete sitemap as + identified by the crawler, including pages with and without detected issues. + + + If successful, the server returns a JSON object containing the total number of crawled pages and an array of + page objects. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/audit/#get-all-crawled-pages + parameters: + - name: audit_id + in: query + required: true + description: Unique audit ID (path parameter). + schema: + type: integer + - name: limit + in: query + description: Number of pages to return (query parameter). Defaults to `100`. + schema: + type: integer + - name: offset + in: query + description: Number of pages to skip before starting to collect the result set (query parameter). Defaults to `0`. + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + total: + type: integer + description: Total number of pages crawled during the audit. + items: + type: array + items: + type: object + properties: + id: + type: string + description: Unique internal identifier of the page. + url: + type: string + description: Full URL of the crawled page. + url_len: + type: string + type: + type: string + url_protocol: + type: string + sitemap: + type: string + status: + type: string + description: HTTP status code returned by the page. + size: + type: string + depth: + type: string + description: Crawl depth of the page (distance from the start page). + noindex: + type: string + first_ms: + type: string + load_ms: + type: string + description: Page load time in milliseconds. + robots: + type: string + nofollow: + type: string + xrobots: {} + title_len: + type: string + description_len: + type: string + chars: + type: string + h1_len: + type: string + h2_len: + type: string + html_ratio: + type: string + blocked_robots: + type: string + img: + type: string + hreflang: {} + hreflang_link: {} + refresh_time: {} + meta_refresh: + type: string + redirect_url: {} + canonical_url: + type: string + description: Canonical URL specified for the page. + single_h1: + type: string + single_h2: + type: string + h3_count: + type: string + h4_count: + type: string + h5_count: + type: string + h6_count: + type: string + words_count: + type: string + description: Number of words found on the page. + total_links: + type: string + mixed_count: {} + mixed: {} + last_modified: {} + content_hash: + type: string + title: + type: string + description: Content of the title tag. + description: + type: string + description: Content of the meta description tag. + h1: + type: string + description: Content of the first h1 tag. + h2: + type: string + issues: + type: string + description: Number of issues found on the page. + errors: + type: string + description: Number of errors found on the page. + warnings: + type: string + description: Number of warnings found on the page. + notices: + type: string + description: Number of notices found on the page. + refpages: + type: string + inlinks: + type: string + description: Number of internal links pointing to the page. + inlinks_nofollow: + type: string + inlinks_follow: + type: string + redirect_links: + type: string + redirect_count: + type: string + img_size: + type: string + css_size: + type: string + js_size: + type: string + outlinks_external: + type: string + description: Number of external links found on the page. + outlinks_internal: + type: string + description: Number of internal links found on the page. + title_duplicate: + type: string + description_duplicate: + type: string + h1_duplicate: + type: string + amp: + type: string + indexable: + type: string + indexable_status: + type: string + description: Indexability status of the page. + traffic_forecast: + type: string + num_keywords: + type: string + recheck_status: {} + time_check: + type: string + description: Array of objects representing individual crawled pages. + description: Array of objects representing individual crawled pages. + example: + total: 1009 + items: + - id: "50958380" + url: "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)" + url_len: "27" + type: doc + url_protocol: https + sitemap: "0" + status: "200" + size: "156676" + depth: "1" + noindex: "0" + first_ms: "35" + load_ms: "1373" + robots: index, follow + nofollow: "0" + xrobots: null + title_len: "53" + description_len: "139" + chars: "153843" + h1_len: "35" + h2_len: "16" + html_ratio: "40" + blocked_robots: "0" + img: "21" + hreflang: null + hreflang_link: null + refresh_time: null + meta_refresh: "0" + redirect_url: null + canonical_url: "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)" + single_h1: "1" + single_h2: "0" + h3_count: "9" + h4_count: "33" + h5_count: "0" + h6_count: "0" + words_count: "1621" + total_links: "230" + mixed_count: null + mixed: null + last_modified: null + content_hash: 9d657683ebd385ba700d4301f1ef854f + title: Vitality Insurance | Award-Winning Insurance Provider + description: >- + Vitality is a leading UK insurer offering health and life insurance. Get your quote today and + unlock discounts and rewards from top brands. + h1: Live longer with Vitality insurance + h2: Health insurance + issues: "2" + errors: "0" + warnings: "0" + notices: "2" + refpages: "921" + inlinks: "922" + inlinks_nofollow: "0" + inlinks_follow: "922" + redirect_links: "4" + redirect_count: "5" + img_size: "700322" + css_size: "443163" + js_size: "543728" + outlinks_external: "12" + outlinks_internal: "83" + title_duplicate: "0" + description_duplicate: "0" + h1_duplicate: "0" + amp: "0" + indexable: "1" + indexable_status: ok + traffic_forecast: "10716" + num_keywords: "48369" + recheck_status: null + time_check: "2025-07-29 11:06:30" + - id: "50958398" + url: "[https://www.vitality.co.uk/health-insurance/](https://www.vitality.co.uk/health-insurance/)" + url_len: "44" + type: doc + url_protocol: https + sitemap: "1" + status: "200" + size: "181179" + depth: "2" + noindex: "0" + first_ms: "0" + load_ms: "496" + robots: index, follow + nofollow: "0" + xrobots: null + title_len: "52" + description_len: "121" + chars: "178088" + h1_len: "26" + h2_len: "33" + html_ratio: "42" + blocked_robots: "0" + img: "27" + hreflang: null + hreflang_link: null + refresh_time: null + meta_refresh: "0" + redirect_url: null + canonical_url: "[https://www.vitality.co.uk/health-insurance/](https://www.vitality.co.uk/health-insurance/)" + single_h1: "1" + single_h2: "0" + h3_count: "20" + h4_count: "39" + h5_count: "0" + h6_count: "0" + words_count: "3032" + total_links: "239" + mixed_count: null + mixed: null + last_modified: null + content_hash: 5b6d17dbcb03b2405450db10f86dd43a + title: Health Insurance in the UK | Get Private Health Care + description: >- + Get top-rated health insurance in the UK, with real benefits and incentives from your healthcare + plan. Get a quote today. + h1: Health insurance in the UK + h2: What is private health insurance? + issues: "3" + errors: "0" + warnings: "1" + notices: "2" + refpages: "896" + inlinks: "898" + inlinks_nofollow: "0" + inlinks_follow: "898" + redirect_links: "0" + redirect_count: "4" + img_size: "2316745" + css_size: "443163" + js_size: "543728" + outlinks_external: "12" + outlinks_internal: "86" + title_duplicate: "0" + description_duplicate: "0" + h1_duplicate: "0" + amp: "0" + indexable: "1" + indexable_status: ok + traffic_forecast: "4928" + num_keywords: "13021" + recheck_status: null + time_check: "2025-07-29 11:06:45" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location + 'https://api.seranking.com/v1/project-management/audits/pages?audit_id=123&limit=10&offset=0' \ + + --header 'Authorization: Token YOUR_API_KEY' + /v1/project-management/audits/issue-pages: + get: + operationId: getAuditPagesByIssue + tags: + - Website Audit + summary: Get audit pages by issue + description: >- + Retrieves a paginated list of all URLs affected by a specific issue within the audit. The issue code can be + obtained from the audit report. + + + If successful, the server returns a JSON object containing the total number of affected URLs and the list of + URLs. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/audit/#get-audit-pages-by-issue + parameters: + - name: audit_id + in: query + required: true + description: Unique audit ID (path parameter). + schema: + type: integer + - name: code + in: query + required: true + description: Unique issue code (for example, `title_duplicate`). + schema: + type: string + - name: limit + in: query + description: Number of URLs to return. Defaults to `100`. + schema: + type: integer + - name: offset + in: query + description: Number of URLs to skip before starting to collect the result set. Defaults to `0`. + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + total_urls: + type: integer + description: Number of URLs affected by the issue. + urls: + type: array + items: + type: string + description: Array of URLs affected by the issue. + description: Array of URLs affected by the issue. + urls_type: + type: string + description: Format of the `urls` array. For this endpoint, it is typically `simple_urls_array`. + example: + total_urls: 143 + urls: + - https://www.vitality.co.uk/life-insurance/accident-and-fracture-cover/ + - https://www.vitality.co.uk/business/health-insurance/callback/ + - https://www.vitality.co.uk/media/vitality-employee-challenges-programme-goes-live/ + - https://www.vitality.co.uk/media/bbq-blunders-the-bbq-foods-fooling-brits/ + - >- + https://www.vitality.co.uk/media/vitality-launches-cpd-accredited-sustainability-webinar-series-for-advisers/ + - https://www.vitality.co.uk/media/vitality-welcomes-new-partners-to-the-programme/ + - https://www.vitality.co.uk/media/sneezing-season-slams-first-time-sufferers/ + - https://www.vitality.co.uk/media/vitality-calls-for-greater-focus-on-burnout/ + - >- + https://www.vitality.co.uk/media/vitality-research-reveals-gaps-in-employee-awareness-of-sick-leave-policies/ + - https://www.vitality.co.uk/media/vitality-parkrun-celebrate-record-breaking/ + urls_type: simple_urls_array + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location + 'https://api.seranking.com/v1/project-management/audits/issue-pages?audit_id=123&code=title_duplicate&limit=10&offset=0' + \ + + --header 'Authorization: Token YOUR_API_KEY' + /v1/project-management/audits/issues: + get: + operationId: getIssuesByURL + tags: + - Website Audit + summary: Get issues by URL + description: >- + Retrieves detailed information about all issues detected on a specific page, including errors, warnings, and + notices. The response also includes complete page metadata. + + + **Note:** Either `url_id` or `url` must be provided. + + + If successful, the server returns a JSON object containing page data and issues. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/audit/#get-all-issues-for-url + parameters: + - name: audit_id + in: query + required: true + description: Unique audit ID (path parameter). + schema: + type: integer + - name: url_id + in: query + description: Unique page ID. + schema: + type: integer + - name: url + in: query + description: Full page URL. + schema: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + url: + type: string + description: Full URL of the page. + page_data: + type: object + properties: + h1: + type: string + h2: + type: string + js: + type: integer + css: + type: integer + doc: + type: integer + img: + type: integer + lang: + type: string + cache: + type: string + chars: + type: integer + title: + type: string + words: + type: integer + ext_js: + type: integer + h1_len: + type: integer + h2_len: + type: integer + robots: + type: string + ext_doc: + type: integer + h1_hash: + type: string + inlinks: + type: integer + js_size: + type: integer + css_size: + type: integer + encoding: + type: string + h1_count: + type: integer + h2_count: + type: integer + h3_count: + type: integer + h4_count: + type: integer + img_size: + type: integer + refpages: + type: integer + canonical: + type: string + title_len: + type: integer + html_ratio: + type: integer + time_check: + type: string + title_hash: + type: string + description: + type: string + total_links: + type: integer + errors_count: + type: integer + issues_count: + type: integer + num_keywords: + type: integer + notices_count: + type: integer + redirect_count: + type: integer + redirect_links: + type: integer + warnings_count: + type: integer + description_len: + type: integer + description_hash: + type: string + traffic_forecast: + type: integer + description: Complete metadata and metrics for the page. + issues: + type: array + items: + type: object + properties: + code: + type: string + description: Unique identifier of the issue. + type: + type: string + description: "Issue severity. Possible values: `error`, `warning`, `notice`." + group: + type: string + description: Issue category. + snippet: + type: object + properties: + type: + type: string + description: "Issue severity. Possible values: `error`, `warning`, `notice`." + value: + type: array + items: + type: object + properties: + status: + type: string + url: + type: string + description: Full URL of the page. + size: + type: string + description: >- + Detailed information about the issue. For example, a list of redirecting URLs or an + oversized CSS file. + description: Array of issue objects detected on the page. + description: Array of issue objects detected on the page. + example: + url: https://www.vitality.co.uk/ + page_data: + h1: Live longer with Vitality insurance + h2: Health insurance + js: 6 + css: 1 + doc: 83 + img: 21 + lang: en + cache: no-cache, no-store + chars: 153843 + title: Vitality Insurance | Award-Winning Insurance Provider + words: 1621 + ext_js: 4 + h1_len: 35 + h2_len: 16 + robots: index, follow + ext_doc: 12 + h1_hash: 4c57f3fc38a26dcc202c11b8975f590e + inlinks: 922 + js_size: 543728 + css_size: 443163 + encoding: gzip + h1_count: 1 + h2_count: 14 + h3_count: 9 + h4_count: 33 + img_size: 700322 + refpages: 921 + canonical: https://www.vitality.co.uk/ + title_len: 53 + html_ratio: 40 + time_check: "2025-07-29 11:06:30" + title_hash: c33af508bc32002acac1e3a12606c626 + description: >- + Vitality is a leading UK insurer offering health and life insurance. Get your quote today and unlock + discounts and rewards from top brands. + total_links: 230 + errors_count: 0 + issues_count: 2 + num_keywords: 48369 + notices_count: 2 + redirect_count: 5 + redirect_links: 4 + warnings_count: 0 + description_len: 139 + description_hash: 3bb8e0f3905c4b7203a8b7cae91f890b + traffic_forecast: 10716 + issues: + - code: extlinks3xx + type: notice + group: links_v2 + snippet: + type: urls + value: + - status: "302" + url: https://members.vitality.co.uk/my-points/confirm-an-activity + - status: "302" + url: https://members.vitality.co.uk/ + - code: css_big + type: notice + group: css + snippet: + type: urls + value: + - status: "200" + url: https://www.vitality.co.uk/dist/vds/css/presales.css?v=2025.6.30121236 + size: "443163" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: Example with url_id + source: >- + curl --location 'https://api.seranking.com/v1/project-management/audits/issues?audit_id=123&url_id=50958380' + \ + + --header 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: Example with url + source: >- + curl --location + 'https://api.seranking.com/v1/project-management/audits/issues?audit_id=123&url=https://www.vitality.co.uk/' + \ + + --header 'Authorization: Token YOUR_API_KEY' + /v1/project-management/audits/found-links: + get: + operationId: getFoundLinks + tags: + - Website Audit + summary: Get found links + description: >- + Returns every hyperlink found across the site. Supports filter chains for advanced queries (e.g., all nofollow + external links returning `4xx`). + + + To build complex queries, add an array of `filter` parameters to the URL query string. This allows you to chain + multiple conditions together using logical operators. Each filter consists of three parts, formatted with an + index in brackets (e.g., `filter[0]`, `filter[1]`). + + + **Example 1: OR Logic** + + + - `filter[0]` sets the base condition (`status = 301`). + + + - `filter[1][type]=or` **explicitly connects** the next condition (`status = 302`) with an **OR**. + + + **Example 2: AND Logic** + + + To find all broken (`404`) image links (`anchor_type = image`). + + + - `filter[0]` sets the base condition (`status = 404`). + + + - `filter[1][type]=and` **must be included** to connect the second condition (`anchor_type = image`) with an + **AND**. Omitting it would result in an error. + + + If successful, the server returns the `200` HTTP status code and an object containing the total number of + matching links and a list of link objects. Returns HTTP `404` if the audit is not found (for more information, + see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/audit/#recheck-audit + parameters: + - name: audit_id + in: query + required: true + description: Unique audit ID (path parameter). + schema: + type: integer + - name: page_type + in: query + description: Fields to change. See [Audit settings object](#audit-settings-object). + style: deepObject + explode: true + schema: + type: object + - name: limit + in: query + description: Number of links to return. + schema: + type: integer + - name: offset + in: query + description: Starting position for pagination. + schema: + type: integer + - name: filter + in: query + description: Filter chain. Each entry is `{ param, value, type? }`. See below. + schema: + type: array + items: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + total: + type: integer + description: Total number of links matching the request criteria. + items: + type: array + items: + type: object + properties: + url: + type: string + description: Destination URL. + id: + type: string + description: Unique link identifier. + status: + type: string + description: HTTP status code of the destination URL. + type: + type: string + description: >- + Logical operator used to combine conditions. Possible values: `and`, `or`. Required starting + from the second filter condition. + source_url: + type: string + description: URL of the page where the link was found. + source_noindex: + type: string + description: Indicates whether the source page has a noindex directive (`1` –yes, `0` – no). + nofollow: + type: string + description: Indicates whether the link has a nofollow attribute (`1` –yes, `0` – no). + alt: + type: string + description: Alt attribute of the link, if available. + anchor_type: + type: string + description: Anchor type (for example, `text` or `image`). + anchor: + type: string + description: Visible anchor text of the link. + title: + type: string + description: Title attribute of the link, if available. + description: Array of link objects. + description: Array of link objects. + example: + total: 103624 + items: + - url: "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)" + id: "1153787496" + status: "200" + type: hyperlink + source_url: "[https://www.vitality.co.uk/advisers/](https://www.vitality.co.uk/advisers/)" + source_noindex: "1" + nofollow: "0" + alt: "" + anchor_type: text + anchor: Personal + title: "" + - url: "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)" + id: "1153787624" + status: "200" + type: hyperlink + source_url: "[https://www.vitality.co.uk/business/](https://www.vitality.co.uk/business/)" + source_noindex: "0" + nofollow: "0" + alt: "" + anchor_type: text + anchor: Personal + title: "" + - url: "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)" + id: "1153787774" + status: "200" + type: hyperlink + source_url: "[https://www.vitality.co.uk/community/](https://www.vitality.co.uk/community/)" + source_noindex: "0" + nofollow: "0" + alt: "" + anchor_type: text + anchor: Personal + title: "" + - url: "[https://www.vitality.co.uk/](https://www.vitality.co.uk/)" + id: "1153787908" + status: "200" + type: hyperlink + source_url: >- + [https://www.vitality.co.uk/healthcare-providers/](https://www.vitality.co.uk/healthcare-providers/) + source_noindex: "0" + nofollow: "0" + alt: "" + anchor_type: text + anchor: Personal + title: "" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: To find all internal links that have a status code of either 301 OR 302 + source: >- + curl --location + 'https://api.seranking.com/v1/project-management/audits/issue-pages?audit_id=123&page_type=internal&limit=10&filter[0][param]=status&filter[0][value]=301&filter[1][param]=status&filter[1][value]=302&filter[1][type]=or' + \ + + --header 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: >- + curl --location + 'https://api.seranking.com/v1/project-management/audits/issue-pages?audit_id=123&page_type=internal&limit=10&filter[0][param]=status&filter[0][value]=404&filter[1][param]=anchor_type&filter[1][value]=image&filter[1][type]=and' + \ + + --header 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: Example without filters + source: >- + curl --location + 'https://api.seranking.com/v1/project-management/audits/issue-pages?audit_id=123&page_type=all&limit=4&offset=0' + \ + + --header 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: Example with filters + source: >- + curl --location + 'https://api.seranking.com/v1/project-management/audits/issue-pages?audit_id=123&page_type=internal&limit=10&filter[0][param]=status&filter[0][value]=404&filter[1][param]=anchor_type&filter[1][value]=image&filter[1][type]=and' + \ + + --header 'Authorization: Token YOUR_API_KEY' + /v1/project-management/audits/history: + get: + operationId: getAuditHistory + tags: + - Website Audit + summary: Get audit history + description: >- + Retrieves historical data for a specific audit run, including audit settings, domain metrics, and issue + summaries. + + + If successful, the server returns the `200` HTTP status code and an object containing historical audit data. + Returns HTTP `404` if the audit or specified date is not found (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/audit/#get-audit-history + parameters: + - name: audit_id + in: query + required: true + description: Unique audit ID (path parameter). + schema: + type: integer + - name: date + in: query + required: true + description: The specific date of the historical audit to retrieve (YYYY-MM-DD). + schema: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + audit_time: + type: string + description: Date and time when the audit was completed. + domain_data: + type: object + properties: + dt: + type: integer + description: Domain trust score. + domain: + type: string + description: Audited domain. + backlinks: + type: string + description: Number of backlinks. + index_google: + type: string + description: Number of pages indexed by Google. + description: Domain metrics at the time of the audit. + settings: + type: object + properties: + source_site: + type: integer + source_sitemap: + type: integer + max_pages: + type: integer + max_depth: + type: integer + description: Audit configuration used for this historical run. + pages_data: + type: object + properties: + css3xx: + type: integer + css_big: + type: integer + h1_long: + type: integer + http4xx: + type: integer + title_duplicate: + type: integer + description_duplicate: + type: integer + description: Number of affected pages grouped by issue code. + totals: + type: object + properties: + total_pages: + type: integer + description: Total number of audited pages. + total_warnings: + type: integer + description: Total number of warnings found. + total_errors: + type: integer + description: Total number of errors found. + total_passed: + type: integer + description: Total number of passed checks. + description: Summary statistics of the audit results. + version: + type: string + description: Audit engine version. + example: + audit_time: "2025-07-29 11:19:33" + domain_data: + dt: 44 + domain: www.vitality.co.uk + backlinks: "212249" + index_google: "1380" + settings: + source_site: 1 + source_sitemap: 1 + max_pages: 1000 + max_depth: 10 + pages_data: + css3xx: 1 + css_big: 880 + h1_long: 19 + http4xx: 28 + title_duplicate: 143 + description_duplicate: 169 + totals: + total_pages: 1009 + total_warnings: 979 + total_errors: 346 + total_passed: 77 + version: "2.0" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location + 'https://api.seranking.com/v1/project-management/audits/history?audit_id=123&date=2025-07-29' \ + + --header 'Authorization: Token YOUR_API_KEY' + /v1/project-management/audits/sitemaps: + get: + operationId: listAuditSitemaps + tags: + - Website Audit + summary: List audit sitemaps + description: >- + Returns every sitemap configured as a crawl source for an audit, with per-sitemap page counts. Sitemaps are only + used when `settings.source_sitemap` is `1`. The flag auto-enables when a sitemap is added. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/audit/#update-audit-title + parameters: + - name: audit_id + in: query + required: true + description: Unique audit ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + items: + type: array + items: + type: object + properties: + id: + type: integer + description: List identifier. Use in `deleteAuditSourcePages`. + url: + type: string + pages_count: + type: integer + description: URLs contained in the list. + description: Source-pages list records. + description: Source-pages list records. + example: + items: + - id: 8421 + url: https://example.com/sitemap.xml + pages_count: 1820 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --request GET 'https://api.seranking.com/v1/project-management/audits/sitemaps?audit_id=123' + \ + + --header 'Authorization: Token YOUR_API_KEY' + post: + operationId: addAuditSitemap + tags: + - Website Audit + summary: Add audit sitemap + description: Registers a sitemap URL as a crawl source. Auto-sets `settings.source_sitemap` to `1` so the next run uses it. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/audit/#update-audit-title + parameters: + - name: audit_id + in: query + required: true + description: Unique audit ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + url: + type: string + description: Absolute sitemap URL (e.g., `https://example.com/sitemap.xml`). + required: + - url + example: + url: https://example.com/sitemap.xml + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: integer + description: New sitemap identifier. + example: + id: 8421 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --request POST + 'https://api.seranking.com/v1/project-management/audits/sitemaps?audit_id=123' \ + + --header 'Authorization: Token YOUR_API_KEY' \ + + --data '{ + "url": "https://example.com/sitemap.xml" + }' + delete: + operationId: deleteAuditSourcePages + tags: + - Website Audit + summary: Delete audit source pages + description: >- + Removes a sitemap from an audit’s crawl sources. Does not toggle `settings.source_sitemap` off. Use + `updateAuditSettings` if you want to disable sitemap crawling entirely. + + + HTTP `204 No Content` on success. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/audit/#update-audit-title + parameters: + - name: audit_id + in: query + required: true + description: Unique audit ID (path parameter). + schema: + type: integer + - name: sitemap_id + in: query + required: true + description: Sitemap identified from List Audit Sitemaps. + schema: + type: integer + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --request DELETE + 'https://api.seranking.com/v1/project-management/audits/sitemaps?audit_id=123&sitemap_id=456' \ + + --header 'Authorization: Token YOUR_API_KEY' + /v1/project-management/audits/source-pages: + get: + operationId: listAuditSourcePages + tags: + - Website Audit + summary: List audit source pages + description: >- + Returns every uploaded custom page list used as a crawl source. Source-pages lists are only used when + `settings.source_file` is `1`. The flag auto-enables when a list is added. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/audit/#update-audit-title + parameters: + - name: audit_id + in: query + required: true + description: Unique audit ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + items: + type: array + items: + type: object + properties: + id: + type: integer + description: List identifier. Use in `deleteAuditSourcePages`. + name: + type: string + description: Uploaded filename. + pages_count: + type: integer + description: URLs contained in the list. + description: Source-pages list records. + description: Source-pages list records. + example: + items: + - id: 1732 + name: priority-pages.txt + pages_count: 240 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --request GET + 'https://api.seranking.com/v1/project-management/audits/source-pages?audit_id=123' \ + + --header 'Authorization: Token YOUR_API_KEY' + /v1/project-management/backlinks: + get: + operationId: listBacklinks + tags: + - Backlink Checker + summary: List backlinks + description: >- + Retrieves a paginated list of backlinks for the specified website. + + + If successful, the server returns the `200` HTTP status code and an array of `backlink` objects. Returns HTTP + `403` if `site_id` is wrong (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/backlink-checker/#list-backlinks + parameters: + - name: site_id + in: query + required: true + description: Website ID (path parameter). + schema: + type: integer + - name: limit + in: query + description: Number of backlinks to return (max 1000). + schema: + type: integer + - name: offset + in: query + description: Number of backlinks to skip before starting to collect the result set. + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + anchor: + type: string + description: Backlink anchor text. + category: + type: string + description: Target backlink category. + charge_period: + nullable: true + description: Charging period (`onetime`, `monthly`, `quarterly`, `6months`, `year`). + type: string + charge_start: + nullable: true + description: Payment start date. + type: string + date_added: + type: string + description: Date when the backlink was added. + date_lost: + type: string + description: Date when the backlink was lost. + date_placement: + type: string + description: Date when the backlink was placed. + domain: + type: string + description: Domain of the referring page. + duration: + type: string + description: Backlink placement duration. + fb_likes: + type: string + description: Number of Facebook shares. + from_domainid: + type: string + description: Referring domain ID. + from_url: + type: string + description: Referring page URL. + gin_index: + type: string + description: Indicates whether the page is indexed by Google. + gin_index_check_date: + type: string + description: Date when the indexing status was checked. + http_status: + type: string + description: HTTP status code of the referring page. + id: + type: string + description: Unique backlink identifier. + is_blocked_meta: + type: string + description: Indicates whether the page is blocked via meta directives (`1` – yes, `0` – no). + is_blocked_robotstxt: + type: string + description: Indicates whether the page is blocked via `robots.txt` (`1` – yes, `0` – no). + is_disavow: + type: string + description: Indicates whether the backlink is disavowed (`1` – yes, `0` – no). + is_forced_status: + type: string + description: Indicates whether the backlink status was changed manually. + is_image: + type: string + description: Indicates whether the backlink is an image link. + is_link_not_found: + type: string + description: Indicates whether the backlink was not found. + is_nofollow: + type: string + description: Indicates whether the backlink has a nofollow attribute. + is_redir: + type: string + description: Indicates whether the referring page redirects. + is_sponsored: + type: string + description: Indicates whether the backlink is sponsored. + last_crawler_visit: + type: string + description: Last crawl date. + link_manager: + type: string + description: Responsible manager. + link_type: + type: string + description: Type of backlink anchor text. + mozda: + nullable: true + description: Moz Domain Authority score. + type: integer + notes: + type: string + description: Backlink notes. + num_links: + type: integer + description: Number of backlinks from the referring page. + price: + nullable: true + description: Backlink placement cost. + type: number + source: + nullable: true + description: Backlink source. + type: string + src_domain_country: + type: string + description: Country of the referring domain. + src_domain_inlink_rank: + nullable: true + description: Referring domain rank. + type: integer + src_domain_ip: + type: string + description: Referring domain IP address. + src_domain_mozda_date: + nullable: true + description: Moz Domain Authority check date. + type: string + src_domain_region_id: + nullable: true + description: Referring domain region ID. + type: integer + title: + type: string + description: Referring page title. + to_url: + type: string + description: Target URL. + total_ext_links: + type: string + description: Number of external links on the referring page. + ugc: + nullable: true + description: Indicates whether the backlink is user-generated content. + type: integer + example: + - anchor: SE Ranking + category: "" + charge_period: null + charge_start: null + date_added: "2018-06-11" + date_lost: "2021-10-10" + date_placement: "2018-10-11" + domain: highpoweredseo.com + duration: "" + fb_likes: "2" + from_domainid: "4630" + from_url: http://highpoweredseo.com/how-to-become-a-better + gin_index: "11" + gin_index_check_date: "2018-10-05" + http_status: "1" + id: "53" + is_blocked_meta: "1" + is_blocked_robotstxt: "1" + is_disavow: "0" + is_forced_status: "0" + is_image: "1" + is_link_not_found: "1" + is_nofollow: "1" + is_redir: "1" + is_sponsored: "0" + last_crawler_visit: "2018-10-05" + link_manager: "" + link_type: "" + mozda: null + notes: ghjg + num_links: 10 + price: null + source: null + src_domain_country: USA + src_domain_inlink_rank: null + src_domain_ip: 184.168.221.40 + src_domain_mozda_date: null + src_domain_region_id: null + title: Title + to_url: http://tourl.ru/ + total_ext_links: "2" + ugc: null + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --request GET + 'https://api.seranking.com/v1/project-management/backlinks?site_id=123&limit=100&offset=100' \ + + --header 'Authorization: Token YOUR_API_KEY' + post: + operationId: addBacklink + tags: + - Backlink Checker + summary: Add backlink + description: >- + Adds a new backlink to the specified website. + + + If successful, the server returns the `200` HTTP status code and an object containing the backlink ID. Returns + HTTP `400` for invalid input or duplicate backlinks. Returns HTTP `403` if access is denied (for more + information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/backlink-checker/#add-backlink + parameters: + - name: site_id + in: query + required: true + description: Website ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + url: + type: string + description: Backlink URL. + price: + type: integer + description: Backlink price. + currency: + type: string + description: Currency code in ISO 4217 format (for example, `USD`, `EUR`). + charge_period: + type: string + description: Charging period (`onetime`, `monthly`, `quarterly`, `6months`, `year`). + charge_start: + type: string + description: Payment start date (in `YYYY-MM-DD`). + required: + - url + example: + url: http://backlink.test/ + price: 1 + charge_period: onetime + charge_start: "2018-01-01" + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: integer + description: Unique identifier of the added backlink. + example: + id: 1 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl --location --request POST 'https://api.seranking.com/v1/project-management/backlinks?site_id=123' \ + --header 'Authorization: Token YOUR_API_KEY' \ + --data '{ + "url": "http://backlink.test/", + "price": 1, + "charge_period": "onetime", + "charge_start": "2018-01-01" + }' + /v1/project-management/backlinks/import: + post: + operationId: importBacklinksList + tags: + - Backlink Checker + summary: Import backlinks list + description: >- + Imports a list of backlinks for the specified website. + + + If successful, the server returns the `200` HTTP status code and an object containing import results. Returns + HTTP `400` for invalid input and HTTP `403` if access is denied (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/backlink-checker/#import-backlinks-list + parameters: + - name: site_id + in: query + required: true + description: Project ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + list: + type: array + items: + type: string + description: Array of backlink URLs to import. + price: + type: integer + description: Backlink price. + currency: + type: string + description: Currency code in ISO 4217 format (for example, `USD`, `EUR`). + charge_period: + type: string + description: Charging period (`onetime`, `monthly`, `quarterly`, `6months`, `year`). + charge_start: + type: string + description: Payment start date (in `YYYY-MM-DD`). + group_id: + type: integer + description: Backlink group ID. + manager: + type: string + description: Manager name associated with the backlinks. + required: + - list + example: + group_id: 1 + price: 100 + currency: USD + manager: manager + charge_period: onetime + charge_start: "2021-10-10" + list: + - https://google.com + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + added: + type: integer + description: Number of backlinks added. + duplicates: + type: integer + description: Number of duplicate backlinks. + total: + type: integer + description: Total number of backlinks processed. + example: + added: 1 + duplicates: 0 + total: 1 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --request POST + 'https://api.seranking.com/v1/project-management/backlinks/import?site_id=123' \ + + --header 'Authorization: Token YOUR_API_KEY' \ + + --data '{ + "group_id": 1, + "price": 100, + "currency": "USD", + "manager": "manager", + "charge_period": "onetime", + "charge_start": "2021-10-10", + "list": ["https://google.com"] + }' + /v1/project-management/backlinks/gsc/settings: + patch: + operationId: updateBacklinkImportSettings + tags: + - Backlink Checker + summary: Update backlink import settings + description: >- + Updates automatic backlink import settings from Google Search Console. + + + If successful, the server returns the `204` HTTP status code with no response body. Returns HTTP `403` if access + is denied (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/backlink-checker/#update-backlink-import-settings + parameters: + - name: site_id + in: query + required: true + description: Website ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + gsc_autoimport: + type: boolean + description: Enable or disable automatic import from Google Search Console. + required: + - gsc_autoimport + example: + gsc_autoimport: true + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --request PATCH + 'https://api.seranking.com/v1/project-management/backlinks/gsc/settings?site_id=123' \ + + --header 'Authorization: Token YOUR_API_KEY' \ + + --data '{ + "gsc_autoimport": true + }' + /v1/project-management/backlinks/gsc/import: + post: + operationId: startBacklinkImportFromGoogleSearchConsole + tags: + - Backlink Checker + summary: Start backlink import from Google Search Console + description: >- + Starts importing backlinks from Google Search Console. + + + If successful, the server returns the `200` HTTP status code and an import task object. Returns HTTP `403` if + access is denied (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/backlink-checker/#start-backlink-import-from-google-search-console + parameters: + - name: site_id + in: query + required: true + description: Website ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + status: + type: string + description: Import task status (`queued`, `processing`, `completed`, `failed`). + token: + type: string + description: Import task token used to check import status. + example: + status: queued + token: 1c84d0375d44725521647919c17f1cb9 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --request POST + 'https://api.seranking.com/v1/project-management/backlinks/gsc/import?site_id=123' \ + + --header 'Authorization: Token YOUR_API_KEY' + get: + operationId: getBacklinkImportStatusFromGoogleSearchConsole + tags: + - Backlink Checker + summary: Get backlink import status from Google Search Console + description: >- + Returns the status of a Google Search Console backlink import task. + + + If successful, the server returns the `200` HTTP status code and import task status. Returns HTTP `403` if + access is denied (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/backlink-checker/#get-backlink-import-status-from-google-search-console + parameters: + - name: site_id + in: query + required: true + description: Website ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + time: + type: integer + description: Timestamp of the latest status update (milliseconds). + status: + type: string + description: Import task status. + example: + time: 1635417036150 + status: queued + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --request GET + 'https://api.seranking.com/v1/project-management/backlinks/gsc/import?site_id=123' \ + + --header 'Authorization: Token YOUR_API_KEY' + /v1/project-management/backlinks/delete: + post: + operationId: deleteBacklinks + tags: + - Backlink Checker + summary: Delete backlinks + description: >- + Deletes backlinks for the specified website. + + + If successful, the server returns the `204` HTTP status code with no response body. Returns HTTP `400` for + invalid input and HTTP `403` if access is denied (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/backlink-checker/#delete-backlinks + parameters: + - name: site_id + in: query + required: true + description: Website ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + backlink_ids: + type: array + items: + type: integer + description: Array of backlink IDs to delete. + required: + - backlink_ids + example: + backlink_ids: + - 1 + - 2 + - 3 + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --request POST + 'https://api.seranking.com/v1/project-management/backlinks/delete?site_id=123' \ + + --header 'Authorization: Token YOUR_API_KEY' \ + + --data '{ + "backlink_ids": [1, 2, 3] + }' + /v1/project-management/backlinks/recheck: + post: + operationId: recheckBacklinks + tags: + - Backlink Checker + summary: Recheck backlinks + description: >- + Runs an index or HTTP status check for the specified backlinks. + + + If successful, the server returns the `204` HTTP status code with no response body. Returns HTTP `400` for + invalid input and HTTP `403` if access is denied (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/backlink-checker/#recheck-backlinks + parameters: + - name: site_id + in: query + required: true + description: Website ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + backlink_ids: + type: array + items: + type: integer + description: Array of backlink IDs to check. + recheck_type: + type: string + description: "Type of check: `status`, `index`. Defaults to `status`." + required: + - backlink_ids + example: + backlink_ids: + - 1 + - 2 + recheck_type: index + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --request POST + 'https://api.seranking.com/v1/project-management/backlinks/recheck?site_id=123' \ + + --header 'Authorization: Token YOUR_API_KEY' \ + + --data '{ + "backlink_ids": [1, 2], + "recheck_type": "index" + }' + /v1/project-management/backlinks/stats: + get: + operationId: getBacklinkStatistics + tags: + - Backlink Checker + summary: Get backlink statistics + description: >- + Returns backlink statistics for the specified website. + + + If successful, the server returns the `200` HTTP status code and backlink statistics. Returns HTTP `403` if + `site_id` is wrong (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/backlink-checker/#get-backlink-statistics + parameters: + - name: site_id + in: query + required: true + description: Website ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + total: + type: integer + description: Total number of backlinks. + anchors: + type: integer + description: Total number of unique anchor texts. + ip: + type: integer + description: Total number of unique IP addresses. + domains: + type: integer + description: Total number of unique domains. + dofollow: + type: integer + description: Total number of dofollow backlinks. + nofollow: + type: integer + description: Total number of nofollow backlinks. + limit: + type: integer + description: Number of backlinks that can still be added today. + example: + total: 9 + anchors: 1 + ip: 8 + domains: 9 + dofollow: 0 + nofollow: 1 + limit: 988 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --request GET 'https://api.seranking.com/v1/project-management/backlinks/stats?site_id=123' + \ + + --header 'Authorization: Token YOUR_API_KEY' + /v1/project-management/backlinks/disavowed: + get: + operationId: listDisavowedBacklinks + tags: + - Backlink Checker + summary: List disavowed backlinks + description: >- + Returns a list of disavowed backlinks. + + + If successful, the server returns the `200` HTTP status code and disavowed backlinks. Returns HTTP `403` if + access is denied (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/backlink-checker/#list-disavowed-backlinks + parameters: + - name: site_id + in: query + required: true + description: Website ID (path parameter). + schema: + type: integer + - name: limit + in: query + description: Number of disavowed backlinks to return. + schema: + type: integer + - name: offset + in: query + description: Offset for pagination. + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + total_disavow_links: + type: integer + description: Total number of disavowed backlinks. + disavow_links: + type: array + items: + type: object + properties: + id: + type: integer + description: Disavowed backlink ID. + url: + type: string + description: Disavowed backlink URL. + type: + type: string + description: Disavow type (url or domain). + exported: + type: integer + description: Indicates whether the backlink has been exported (`0` or `1`). + domain_inlink_rank: + type: integer + description: Domain rank. + description: Array of disavowed backlink objects. + description: Array of disavowed backlink objects. + example: + total_disavow_links: 2 + disavow_links: + - id: 3 + url: https://google.com + type: url + exported: 0 + domain_inlink_rank: 96 + - id: 4 + url: https://google.com + type: url + exported: 0 + domain_inlink_rank: 100 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --request GET + 'https://api.seranking.com/v1/project-management/backlinks/disavowed?site_id=123&limit=100&offset=0' \ + + --header 'Authorization: Token YOUR_API_KEY' + post: + operationId: addDisavowedBacklinks + tags: + - Backlink Checker + summary: Add disavowed backlinks + description: >- + Adds a list of disavowed backlinks. + + + If successful, the server returns the `200` HTTP status code and the number of added disavowed backlinks. + Returns HTTP `400` for invalid input and HTTP `403` if access is denied (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/backlink-checker/#add-disavowed-backlinks + parameters: + - name: site_id + in: query + required: true + description: Website ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + list: + type: array + items: + type: string + description: Array of backlink URLs to disavow. + required: + - list + example: + list: + - https://google.com + - https://example.com + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + added: + type: integer + description: Number of disavowed backlinks added. + example: + added: 2 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --request POST + 'https://api.seranking.com/v1/project-management/backlinks/disavowed?site_id=123' \ + + --header 'Authorization: Token YOUR_API_KEY' \ + + --data '{ + "list": [ + "https://google.com", + "https://example.com" + ] + }' + delete: + operationId: deleteDisavowedBacklink + tags: + - Backlink Checker + summary: Delete disavowed backlink + description: >- + Deletes a backlink from the disavow list. + + + If successful, the server returns the `204` HTTP status code with no response body. Returns HTTP `400` for + invalid input and HTTP `403` if access is denied (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/backlink-checker/#delete-disavowed-backlink + parameters: + - name: site_id + in: query + required: true + description: Website ID (path parameter). + schema: + type: integer + - name: id + in: query + required: true + description: Disavowed backlink ID (query parameter). + schema: + type: integer + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --request DELETE + 'https://api.seranking.com/v1/project-management/backlinks/disavowed?site_id=123&id=789' \ + + --header 'Authorization: Token YOUR_API_KEY' + /v1/project-management/backlinks/groups: + get: + operationId: listBacklinkGroups + tags: + - Backlink Checker + summary: List backlink groups + description: >- + Returns all backlink groups for the specified website. + + + If successful, the server returns the `200` HTTP status code and a list of backlink groups. Returns HTTP `403` + if access is denied (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/backlink-checker/#list-backlink-groups + parameters: + - name: site_id + in: query + required: true + description: Website ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + total_groups: + type: integer + description: Total number of backlink groups. + groups: + type: array + items: + type: object + properties: + id: + type: integer + description: Backlink group ID. + name: + type: string + description: Backlink group name. + count: + type: integer + description: Number of backlinks in the group. + description: Array of backlink group objects. + description: Array of backlink group objects. + example: + total_groups: 2 + groups: + - id: 1 + name: General + count: 5 + - id: 2 + name: Second group + count: 1 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --request GET 'https://api.seranking.com/v1/project-management/backlinks/groups?site_id=123' + \ + + --header 'Authorization: Token YOUR_API_KEY' + post: + operationId: createBacklinkGroup + tags: + - Backlink Checker + summary: Create backlink group + description: >- + Creates a new backlink group. + + + If successful, the server returns the `200` HTTP status code and the created group ID. Returns HTTP `400` for + invalid input and HTTP `403` if access is denied (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/backlink-checker/#create-backlink-group + parameters: + - name: site_id + in: query + required: true + description: Website ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: Name of the backlink group. + required: + - name + example: + name: Outreach links + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + group_id: + type: integer + description: ID of the created backlink group. + example: + group_id: 2 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --request POST + 'https://api.seranking.com/v1/project-management/backlinks/groups?site_id=123' \ + + --header 'Authorization: Token YOUR_API_KEY' \ + + --data '{ + "name": "Outreach links" + }' + delete: + operationId: deleteBacklinkGroup + tags: + - Backlink Checker + summary: Delete backlink group + description: >- + Deletes the specified backlink group. + + + If successful, the server returns the `204` HTTP status code. Returns HTTP `400` if the group ID is invalid or + the group doesn’t exist. Returns HTTP `403` if access is denied (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/backlink-checker/#delete-backlink-group + parameters: + - name: site_id + in: query + required: true + description: Website ID (path parameter). + schema: + type: integer + - name: id + in: query + required: true + description: Backlink group ID (query parameter). + schema: + type: integer + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --request DELETE + 'https://api.seranking.com/v1/project-management/backlinks/groups?site_id=123&id=147' \ + + --header 'Authorization: Token YOUR_API_KEY' + patch: + operationId: renameBacklinkGroup + tags: + - Backlink Checker + summary: Rename backlink group + description: >- + Renames an existing backlink group. + + + If successful, the server returns the `204` HTTP status code with no response body. Returns HTTP `400` for + invalid input and HTTP `403` if access is denied (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/backlink-checker/#rename-backlink-group + parameters: + - name: site_id + in: query + required: true + description: Website ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + id: + type: integer + description: Backlink group ID. + name: + type: string + description: New backlink group name. + required: + - id + - name + example: + id: 2 + name: Guest posts + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + /v1/project-management/backlinks/groups/move: + post: + operationId: moveBacklinksToGroup + tags: + - Backlink Checker + summary: Move backlinks to group + description: >- + Moves backlinks or backlink groups into the specified backlink group. + + + **Note:** At least one of `backlink_ids` or `group_ids` must be provided. + + + If successful, the server returns the `204` HTTP status code with no response body. Returns HTTP `400` for + invalid input and HTTP `403` if access is denied (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/backlink-checker/#move-backlinks-to-group + parameters: + - name: site_id + in: query + required: true + description: Website ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + id: + type: integer + description: Target backlink group ID. + backlink_ids: + type: array + items: + type: integer + description: Array of backlink IDs to move. + group_ids: + type: array + items: + type: integer + description: Array of backlink group IDs to move. + required: + - id + example: + id: 1 + backlink_ids: + - 10 + - 11 + group_ids: + - 2 + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl --location --request POST + 'https://api.seranking.com/v1/project-management/backlinks/groups/move?site_id=123' \ + + --header 'Authorization: Token YOUR_API_KEY' \ + + --data '{ + "id": 1, + "backlink_ids": [10, 11], + "group_ids": [2] + }' + /v1/project-management/airt/brand: + get: + operationId: getSiteBrand + tags: + - AI Results Tracker + summary: Get site brand + description: >- + Returns the brand configured for the specified site. + + + If the site is not found, the API returns the `404` HTTP status code (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/ai-result-tracker/#get-brands + parameters: + - name: site_id + in: query + required: true + description: Site ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + site_id: + type: integer + description: Site ID. + brand: + type: string + description: Configured brand. `null` if not set. + example: + site_id: 11270054 + brand: SE Ranking + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/airt/brand?site_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' + post: + operationId: saveSiteBrand + tags: + - AI Results Tracker + summary: Save site brand + description: Configures or overwrites the brand for a site. The brand is shared across all AI search engines. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/ai-result-tracker/#save-brands + parameters: + - name: site_id + in: query + required: true + description: Site ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + brand: + type: string + description: Brand name (non-empty, max 255 characters). + required: + - brand + example: + brand: SE Ranking + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + site_id: + type: integer + description: Site ID. + brand: + type: string + description: Configured brand. + example: + site_id: 11270054 + brand: SE Ranking + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST 'https://api.seranking.com/v1/project-management/airt/brand?site_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{"brand": "SE Ranking"}' + /v1/project-management/airt/llm: + get: + operationId: listLLMEngines + tags: + - AI Results Tracker + summary: List LLM engines / Get LLM engine + description: >- + ### List LLM engines + + + Returns all LLM engines configured for the specified site. + + + Returns an array of LLM engine objects. + + + ### Get LLM engine + + + Returns details of a specific LLM engine. + + + If the LLM engine is not found, the API returns the `404` HTTP status code (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/ai-result-tracker/#list-llm + parameters: + - name: site_id + in: query + required: true + description: Site ID (path parameter). + schema: + type: integer + - name: llm_id + in: query + description: LLM engine ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + anyOf: + - type: array + items: + type: object + properties: + id: + type: integer + description: LLM engine ID. + site_id: + type: integer + description: Site ID. + base_name: + type: string + description: LLM engine base name (e.g., `chatgpt`, `google_ai_overview`). + country_code: + type: string + description: ISO 3166-1 alpha-2 country code. + region_name: + type: string + nullable: true + description: Specific region or locality name. + lang_code: + type: string + description: ISO 639-1 language code. + region_settings: + anyOf: + - type: object + properties: + lat: + type: number + lng: + type: number + uule: + type: string + radius: + type: integer + - type: array + maxItems: 0 + description: >- + Engine-specific region settings. Object with `lat`, `lng`, `uule`, `radius` for geo-targeted + engines; empty array `[]` for engines without region settings. + title: List LLM engines + - type: object + properties: + id: + type: integer + description: LLM engine ID. + site_id: + type: integer + description: Site ID. + base_name: + type: string + description: LLM engine base name (e.g., `chatgpt`, `google_ai_overview`). + country_code: + type: string + description: ISO 3166-1 alpha-2 country code. + region_name: + type: string + description: Specific region or locality name. + lang_code: + type: string + description: ISO 639-1 language code. + region_settings: + type: object + properties: + lat: + type: number + lng: + type: number + uule: + type: string + radius: + type: integer + description: >- + Engine-specific region settings. Object with `lat`, `lng`, `uule`, `radius` for geo-targeted + engines; empty array `[]` for engines without region settings. + title: Get LLM engine + examples: + listLLMEngines: + summary: List LLM engines + value: + - id: 151216 + site_id: 11270054 + base_name: google_ai_overview + country_code: us + region_name: Washburn County, Wisconsin, United States + lang_code: en + region_settings: + lat: 45.965719 + lng: -91.814895 + uule: "" + radius: 25000 + - id: 151294 + site_id: 11270054 + base_name: chatgpt + country_code: us + region_name: null + lang_code: en + region_settings: [] + getLLMEngine: + summary: Get LLM engine + value: + id: 151216 + site_id: 11270054 + base_name: google_ai_overview + country_code: us + region_name: Washburn County, Wisconsin, United States + lang_code: en + region_settings: + lat: 45.965719 + lng: -91.814895 + uule: "" + radius: 25000 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'api.seranking.com/v1/project-management/airt/llm?site_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/airt/llm?site_id=123&llm_id=456' \ + -H 'Authorization: Token YOUR_API_KEY' + post: + operationId: createLLMEngine + tags: + - AI Results Tracker + summary: Create LLM engine + description: >- + Adds a new LLM engine to a site. + + + **Prerequisite:** A brand must be configured for the site. + + + Returns the created LLM engine object. If the site is not found, the API returns the `404` HTTP status code (for + more information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/ai-result-tracker/ + parameters: + - name: site_id + in: query + required: true + description: Site ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + base_name: + type: string + description: "LLM engine base name. Must be one of: `chatgpt`, `google_ai_overview`, `google_ai_mode`, `gemini`." + country_code: + type: string + description: ISO 3166-1 alpha-2 country code (e.g., `us`). + region_name: + type: string + description: >- + Specific region or locality. For location-aware engines (google_ai_overview, google_ai_mode, + gemini), must be a canonical SERP location name that matches the specified country_code. chatgpt + ignores this field and always return region_name: null. + lang_code: + type: string + description: ISO 639-1 language code (e.g., `en`). Must be a valid language code supported by Google. + required: + - base_name + - country_code + example: + base_name: chatgpt + country_code: us + lang_code: en + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: integer + description: LLM engine ID. + site_id: + type: integer + description: Site ID. + base_name: + type: string + description: LLM engine base name (e.g., `chatgpt`, `google_ai_overview`). + country_code: + type: string + description: ISO 3166-1 alpha-2 country code. + region_name: + nullable: true + description: Specific region or locality name. + type: string + lang_code: + type: string + description: ISO 639-1 language code. + region_settings: + type: array + items: + description: >- + Engine-specific region settings. Object with `lat`, `lng`, `uule`, `radius` for geo-targeted + engines; empty array `[]` for engines without region settings. + description: >- + Engine-specific region settings. Object with `lat`, `lng`, `uule`, `radius` for geo-targeted + engines; empty array `[]` for engines without region settings. + example: + id: 160000 + site_id: 11270054 + base_name: chatgpt + country_code: us + region_name: null + lang_code: en + region_settings: [] + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST 'https://api.seranking.com/v1/project-management/airt/llm?site_id=123' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "base_name": "chatgpt", + "country_code": "us", + "lang_code": "en" + }' + patch: + operationId: updateLLMEngine + tags: + - AI Results Tracker + summary: Update LLM engine + description: >- + Partially updates the configuration of an LLM engine (`region_name` and/or `lang_code`). + + + Returns the updated LLM engine object. If the LLM engine is not found, the API returns the `404` HTTP status + code (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/ai-result-tracker/#update-llm + parameters: + - name: site_id + in: query + required: true + description: Site ID (path parameter). + schema: + type: integer + - name: llm_id + in: query + required: true + description: LLM engine ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + region_name: + type: string + description: >- + New region or locality name. Canonical form required. Set to null to clear. Only honored by + google_ai_overview, google_ai_mode, and gemini. chatgpt silently ignores this field and always + returns region_name: null. + lang_code: + type: string + description: New language code. Set to `null` to clear. + example: + region_name: Los Angeles, California, United States + lang_code: es + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: integer + description: LLM engine ID. + site_id: + type: integer + description: Site ID. + base_name: + type: string + description: LLM engine base name (e.g., `chatgpt`, `google_ai_overview`). + country_code: + type: string + description: ISO 3166-1 alpha-2 country code. + region_name: + type: string + description: Specific region or locality name. + lang_code: + type: string + description: ISO 639-1 language code. + region_settings: + type: object + properties: + lat: + type: number + lng: + type: number + uule: + type: string + radius: + type: integer + description: >- + Engine-specific region settings. Object with `lat`, `lng`, `uule`, `radius` for geo-targeted + engines; empty array `[]` for engines without region settings. + example: + id: 151216 + site_id: 11270054 + base_name: google_ai_overview + country_code: us + region_name: Los Angeles, California, United States + lang_code: es + region_settings: + lat: 34.052235 + lng: -118.243683 + uule: "" + radius: 25000 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X PATCH 'https://api.seranking.com/v1/project-management/airt/llm?site_id=123&llm_id=456' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "region_name": "Los Angeles, California, United States", + "lang_code": "es" + }' + delete: + operationId: deleteLLMEngine + tags: + - AI Results Tracker + summary: Delete LLM engine + description: >- + Removes the specified LLM engine from the site. + + + `204` — No content. If the LLM engine is not found, the API returns the `404` HTTP status code (for more + information, see [Error handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/ai-result-tracker/#delete-llm + parameters: + - name: site_id + in: query + required: true + description: Site ID (path parameter). + schema: + type: integer + - name: llm_id + in: query + required: true + description: LLM engine ID (path parameter). + schema: + type: integer + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X DELETE 'https://api.seranking.com/v1/project-management/airt/llm?site_id=123&llm_id=456' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/airt/llm/status: + get: + operationId: getLLMStatus + tags: + - AI Results Tracker + summary: Get LLM status + description: >- + Returns tracking status for the specified LLM engine, including progress and check statistics. + + + If the LLM engine is not found, the API returns the `404` HTTP status code (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/ai-result-tracker/ + parameters: + - name: site_id + in: query + required: true + description: Site ID (path parameter). + schema: + type: integer + - name: llm_id + in: query + required: true + description: LLM engine ID (path parameter). + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + llm_id: + type: integer + description: LLM engine ID. + site_id: + type: integer + description: Site ID. + progress: + type: integer + description: Percentage of prompts checked today (0–100). + prompts_count: + type: integer + description: Total number of prompts for this LLM engine. + prompts_checked: + type: integer + description: Number of prompts checked on the site’s current date. + last_update_date: + type: string + nullable: true + description: >- + Date of the last check. If progress is 100%, returns the current date. Otherwise, returns the + latest historical check date. `null` if no checks have been performed yet. + examples: + allPromptsCheckedTodayGoogleAIOverview: + summary: All prompts checked today (Google AI Overview) + value: + llm_id: 151216 + site_id: 11270054 + progress: 100 + prompts_count: 5 + prompts_checked: 5 + last_update_date: "2026-02-19" + allPromptsCheckedTodayChatGPT: + summary: All prompts checked today (ChatGPT) + value: + llm_id: 151294 + site_id: 11270054 + progress: 100 + prompts_count: 5 + prompts_checked: 5 + last_update_date: "2026-02-19" + noPromptsConfigured: + summary: No prompts configured + value: + llm_id: 160000 + site_id: 11270054 + progress: 0 + prompts_count: 0 + prompts_checked: 0 + last_update_date: null + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/airt/llm/status?site_id=123&llm_id=456' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/airt/llm/statistics: + get: + operationId: getLLMStatistics + tags: + - AI Results Tracker + summary: Get LLM statistics + description: >- + Returns statistics for the specified LLM engine, including presence stats, AIO presence, mentions/links, and + organic overlap (AI Overview only). + + + **Note:** When a date range is provided, only the **first** and **last** dates in the range are used. Values + show data for the last date; diff values show the change from first to last date in percentage points. + + + If the LLM engine is not found, the API returns the `404` HTTP status code (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/ai-result-tracker/#llm-statistics + parameters: + - name: site_id + in: query + required: true + description: Site ID (path parameter). + schema: + type: integer + - name: llm_id + in: query + required: true + description: LLM engine ID (path parameter). + schema: + type: integer + - name: from + in: query + description: |- + Start date for date range (`YYYY-MM-DD` format). If not provided, defaults to the current date. + + Default: Current date + schema: + type: string + - name: to + in: query + description: |- + End date for date range (`YYYY-MM-DD` format). If not provided, defaults to the current date. + + Default: Current date + schema: + type: string + - name: top + in: query + description: |- + Top N positions to analyze (0–100): + • `0` – all positions (default when omitted) + • `3` – only the top 3 positions + • `10` – only top 10 positions + + Default: 0 (all positions) + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + llm_id: + type: integer + description: LLM engine ID. + site_id: + type: integer + description: Site ID. + top: + type: integer + description: "`top` value used for this query (0 = all positions)." + stats: + type: object + properties: + prompts_count: + type: integer + description: Total number of prompts. + last_update: + type: string + description: Date of the last check (`YYYY-MM-DD`). + indexed_percent: + type: integer + description: Percentage of prompts that have been indexed (0–100). + presence: + type: object + properties: + link_percent_in_top: + type: integer + description: Percentage of prompts with site link in Top N (0–100). + link_diff: + type: integer + description: Change in link percentage from first to last date (percentage points). + mention_percent_in_top: + type: integer + description: Percentage of prompts with brand mention in Top N (0–100). + mention_diff: + type: integer + description: Change in mention percentage from first to last date (percentage points). + aio_presence: + type: object + properties: + prompts_with_aio: + type: integer + description: Percentage of prompts that show AI Overview (0–100). + prompts_with_aio_diff: + type: integer + description: Change in `prompts_with_aio` from first to last date (percentage points). + organic_overlap: + type: object + properties: + overlap_count: + type: integer + description: Number of overlapping URLs from the Top 20 organic and AIO. + overlap_count_diff: + type: integer + description: Change in overlap count from first to last date. + overlap_percent: + type: integer + description: Percentage of overlap (0–100). + sources_presence: + type: object + properties: + answers_with_sources: + type: integer + description: Percentage of answers that have source links (0–100). + answers_with_sources_diff: + type: integer + description: Change in `answers_with_sources` from first to last date (percentage points). + examples: + googleAIOverviewWithDateRangeAndTop3: + summary: Google AI Overview with date range and top=3 + value: + llm_id: 151216 + site_id: 11270054 + top: 3 + stats: + prompts_count: 5 + last_update: "2026-02-19" + indexed_percent: 100 + presence: + link_percent_in_top: 0 + link_diff: 0 + mention_percent_in_top: 0 + mention_diff: 0 + aio_presence: + prompts_with_aio: 80 + prompts_with_aio_diff: 0 + organic_overlap: + overlap_count: 4 + overlap_count_diff: 0 + overlap_percent: 20 + chatgptWithDateRangeAllPositions: + summary: ChatGPT with date range (all positions) + value: + llm_id: 151294 + site_id: 11270054 + top: 0 + stats: + prompts_count: 5 + last_update: "2026-02-19" + indexed_percent: 100 + presence: + link_percent_in_top: 0 + link_diff: 0 + mention_percent_in_top: 20 + mention_diff: 0 + sources_presence: + answers_with_sources: 60 + answers_with_sources_diff: 0 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: Current date only (default) + source: |- + curl -X GET 'https://api.seranking.com/v1/project-management/airt/llm/statistics?site_id=123&llm_id=456' \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: With date range and top 3 + source: >- + curl -X GET + 'https://api.seranking.com/v1/project-management/airt/llm/statistics?site_id=123&llm_id=456&from=2026-02-01&to=2026-02-19&top=3' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/airt/prompts: + get: + operationId: listPrompts + tags: + - AI Results Tracker + summary: List prompts + description: >- + Retrieves the list of prompts tracked by a specific LLM engine with pagination support. + + + If the site or LLM engine is not found, the API returns the `404` HTTP status code (for more information, see + [Error handling](https://seranking.com/api/project/getting-started/#error-handling)). + + + **Warning:** Some numeric fields (`prompt_id`, `site_llm_id`, `prompt_llm_id`, `search_volume`) may be returned + as JSON strings. Consumers should coerce them to integers. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/ai-result-tracker/#get-prompts + parameters: + - name: site_id + in: query + required: true + description: Site ID (path parameter). + schema: + type: integer + - name: llm_id + in: query + required: true + description: LLM engine ID (path parameter). + schema: + type: integer + - name: limit + in: query + description: Number of items per page (1–1,000). + schema: + type: integer + default: 100 + - name: offset + in: query + description: Offset from the beginning of the list. + schema: + type: integer + default: 0 + - name: group_ids[] + in: query + description: Filter by prompt group IDs (repeatable). See [AIRT Groups](https://seranking.com/api/project/airt-groups/). + schema: + type: array + items: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + site_llm_id: + type: integer + description: LLM engine ID. + site_id: + type: integer + description: Site ID. + items: + type: array + items: + type: object + properties: + prompt_llm_id: + type: string + description: prompts-LLM link ID. Use for DELETE and as the path ID in Get prompt answer. + site_llm_id: + type: string + description: LLM engine ID. + prompt_id: + type: string + description: Prompt ID. + group_id: + type: string + description: Prompt group ID. + prompt: + type: string + description: Prompt text. + search_volume: + type: string + description: Search volume (if available). + intent: + type: string + description: Prompt intent (if set). + intent_meaning: + type: array + items: + type: string + description: "Intent letters: `I`, `N`, `L`, `C`, `T`. `null` when unset." + description: "Intent letters: `I`, `N`, `L`, `C`, `T`. `null` when unset." + description: List of prompt objects (see below). + description: List of prompt objects (see below). + total: + type: integer + description: Total number of prompts for this LLM. + limit: + type: integer + description: Number of items per page. + offset: + type: integer + description: Offset from the beginning. + example: + site_llm_id: 151294 + site_id: 11270054 + items: + - prompt_llm_id: "1411621" + site_llm_id: "151294" + prompt_id: "1021954" + group_id: "26377" + prompt: best seo tool + search_volume: "0" + intent: "1" + intent_meaning: + - I + total: 5 + limit: 5 + offset: 0 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: List all prompts + source: |- + curl -X GET 'api.seranking.com/v1/project-management/airt/prompts?site_id=123&llm_id=456&limit=5&offset=0' \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: Filter by prompt groups (repeat group_ids[]) + source: >- + curl -X GET + 'https://api.seranking.com/v1/project-management/airt/prompts?site_id=123&llm_id=456&group_ids[]=12&group_ids[]=18' + \ + -H 'Authorization: Token YOUR_API_KEY' + post: + operationId: addPrompts + tags: + - AI Results Tracker + summary: Add prompts + description: >- + Adds new prompts to the specified LLM engine. Duplicate prmpts for the same LLM engine are automatically + skipped. + + + Returns the count of actually added prompts (excluding duplicates) in the HTTP status `201`. If the site or LLM + engine is not found, the API returns the `404` HTTP status code (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/ai-result-tracker/#add-prompts + parameters: + - name: site_id + in: query + required: true + description: Site ID (path parameter). + schema: + type: integer + - name: llm_id + in: query + required: true + description: LLM engine ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + prompts: + type: array + items: + type: string + description: Prompts to add. Minimum 1 item. Each item non-empty (whitespace-only rejected), max 255 characters. + group_id: + type: integer + description: Target prompt group ID. Defaults to the site’s default group. + required: + - prompts + example: + prompts: + - best seo tool + - seo rank tracker + - website audit tool + responses: + "201": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + site_llm_id: + type: integer + description: LLM engine ID. + site_id: + type: integer + description: Site ID. + added: + type: integer + description: Number of prompts actually added (excluding duplicates). + prompts: + type: array + items: + type: integer + description: Array of `prompt_llm_id` values for added prompts. + description: Array of `prompt_llm_id` values for added prompts. + example: + site_llm_id: 151294 + site_id: 11270054 + added: 3 + prompts: + - 1411621 + - 1411624 + - 1411627 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: Add to the default group + source: |- + curl -X POST 'https://api.seranking.com/v1/project-management/airt/prompts?site_id=123&llm_id=456' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "prompts": [ + "best seo tool", + "seo rank tracker", + "website audit tool" + ] + }' + - lang: Shell + label: Add to a specific prompt group + source: |- + curl -X POST 'https://api.seranking.com/v1/project-management/airt/prompts?site_id=123&llm_id=456' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "prompts": ["best seo tool", "seo rank tracker"], + "group_id": 12 + }' + /v1/project-management/airt/prompts/delete: + post: + operationId: deletePrompts + tags: + - AI Results Tracker + summary: Delete prompts + description: >- + Deletes prompts from the specified LLM engine by their `prompt_llm_id`. + + + **Note:** Use the List prompts endpoint first to retrieve `prompt_llm_id` values for prompt you want to delete. + + + `204` No content — prompts deleted successfully. If the site or LLM engine is not found, the API returns the + `404` HTTP status code (for more information, see [Error + handling](https://seranking.com/api/project/getting-started/#error-handling)). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/ai-result-tracker/#delete-prompts + parameters: + - name: site_id + in: query + required: true + description: Site ID (path parameter). + schema: + type: integer + - name: llm_id + in: query + required: true + description: LLM engine ID (path parameter). + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + prompt_llm_ids: + type: array + items: {} + description: Array of prompt-LLM link IDs to delete (min 1 item). + required: + - prompt_llm_ids + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + /v1/project-management/airt/prompts/rankings: + get: + operationId: getPromptRankings + tags: + - AI Results Tracker + summary: Get prompt rankings + description: >- + Retrieves ranking data for all prompts tracked by the specified LLM engine within a date range. Returns + positions, URLs, search volume, search intent, and organic-AI overlap data for each prompt. + + + If the site or LLM engine is not found, the API returns the `404` HTTP status code (for more information, see + [Error handling](https://seranking.com/api/project/getting-started/#error-handling)). + + + **Note:** When position and count fields are `null`, it means there was no AI result block on that date — not + that the brand wasn’t found. + + + **Groups mode (mode=groups)** + + + When called with `mode=groups`, the endpoint returns aggregated time-series presence metrics per prompt group + instead of per-prompt rankings. The envelope is identical to the default mode (`site_llm_id`, `site_id`, + `date_from`, `date_to`, `items`, `total`, `limit`, `offset`); each entry in `items` represents one group rather + than one prompt. + + + **Note:** In groups mode, `limit` and `offset` paginate over groups — not prompts — and `total` is the count of + groups in the response. A single matching group returns `total: 1` regardless of how many prompts it contains. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/ai-result-tracker/#get-rankings + parameters: + - name: site_id + in: query + required: true + description: Site ID (path parameter). + schema: + type: integer + - name: llm_id + in: query + required: true + description: LLM engine ID (path parameter). + schema: + type: integer + - name: date_from + in: query + description: |- + Start date for rankings data (`YYYY-MM-DD` format). + + Default: Current date + schema: + type: string + - name: date_to + in: query + description: |- + End date for rankings data (`YYYY-MM-DD` format). + + Default: Current date + schema: + type: string + - name: limit + in: query + description: Number of items per page (1–1000). + schema: + type: integer + default: 100 + - name: offset + in: query + description: Offset from the beginning of the list. + schema: + type: integer + default: 0 + - name: group_ids[] + in: query + description: Filter by prompt group IDs (repeatable). + schema: + type: integer + - name: mode + in: query + description: >- + Response mode. Omit (default) for per-prompt rankings. Set to `groups` to receive aggregated time-series + presence metrics per prompt group; see [Groups mode](#groups-mode) for the full response shape. + schema: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + site_llm_id: + type: integer + description: LLM engine ID. + site_id: + type: integer + description: Site ID. + date_from: + type: string + description: Start date of the data range. + date_to: + type: string + description: End date of the data range. + items: + type: array + items: + type: object + properties: + prompt_id: + type: integer + description: |- + Prompt ID (distinct from + *prompt_llm_id*; this value is not accepted by Get prompt answer). + prompt: + type: string + description: Prompt text. + search_volume: + type: integer + nullable: true + description: Monthly search volume for the prompt. + search_intent: + type: array + items: + type: string + description: |- + Search intent codes: + • `I` – informational + • `N` – navigational + • `L` – local + • `C` – commercial + • `T` – transactional + nullable: true + description: |- + Search intent codes: + • `I` – informational + • `N` – navigational + • `L` – local + • `C` – commercial + • `T` – transactional + positions: + type: array + items: + type: object + properties: + date: + type: string + description: Check date. + url_position: + type: integer + description: |- + Position of the site’s URL in AI results: + • `null` – no AI result block on that date + • `0` – URL not found in results + • `1+` – position in results + urls_count: + type: integer + description: Total number of URLs present in AI results. `null` when no AI result block. + mention_position: + type: integer + description: |- + Position of brand mention in AI results: + • `null` – no AI result block on that date + • `0` – brand not mentioned + • `1+` – position of mention + mentions_count: + type: integer + description: Total number of brand mentions in AI results. `null` when no AI result block. + organic_overlap: + type: integer + nullable: true + description: Organic-AI overlap metric (0–100). `null` when no AI result block. + organic_overlap_percent: + type: integer + nullable: true + description: Organic overlap as percentage (0–100). `null` when no AI result block. + mention_presence: + type: integer + description: >- + Percentage of prompts in the group with `mention_position > 0` on the date (0–100). + For Google AI Overview engines, the denominator is “prompts where the AI Overview + block was present”; for other engines, the denominator is “all prompts in the group”. + link_presence: + type: integer + description: >- + Percentage of prompts in the group with `url_position > 0` on the date (0–100). Same + denominator rule as `mention_presence`. + mention_presence_diff: + description: >- + Change vs the previous date in the response, in percentage points. `null` for the + first date in the range. Positive values are returned as signed strings (e.g., + `"+25"`); negative values and zero are returned as plain numbers (e.g., `-25`, `0`). + Coerce with `Number()` before arithmetic. + link_presence_diff: + description: Same encoding rule as `mention_presence_diff`. + description: Daily position data (see below). + description: Daily position data (see below). + group_id: + type: integer + description: >- + Prompt group ID. Always returned. Without `group_ids[]` filter, the response includes one + item per existing group on the site; with the filter, it includes only the matching groups. + group_name: + type: string + description: >- + Group name (mirrors the name returned by [List prompt + groups](https://seranking.com/api/project/airt-groups/)). + prompts_count: + type: integer + description: >- + Number of prompts in the group at `date_to`. Counted per LLM engine, so the same group can + show different `prompts_count` values on different engines. + organic_overlap: + type: number + nullable: true + description: Organic-AI overlap metric (0–100). `null` when no AI result block. + description: Rankings data grouped by prompt (see below). + description: Rankings data grouped by prompt (see below). + total: + type: integer + description: Total number of prompts. + limit: + type: integer + description: Number of items per page. + offset: + type: integer + description: Offset from the beginning. + examples: + googleAIOverviewRankings: + summary: Google AI Overview rankings + value: + site_llm_id: 151216 + site_id: 11270054 + date_from: "2026-02-17" + date_to: "2026-02-19" + items: + - prompt_id: 1021696 + prompt: What are the best tools for monitoring backlinks currently on the market? + search_volume: 0 + search_intent: + - I + positions: + - date: "2026-02-19" + url_position: 0 + urls_count: 10 + mention_position: 6 + mentions_count: 8 + organic_overlap: 3 + organic_overlap_percent: 15 + total: 5 + limit: 2 + offset: 0 + chatgptRankings: + summary: ChatGPT rankings + value: + site_llm_id: 151294 + site_id: 11270054 + date_from: "2026-02-17" + date_to: "2026-02-19" + items: + - prompt_id: 1021954 + prompt: best seo tool + search_volume: null + search_intent: null + positions: + - date: "2026-02-19" + url_position: 0 + urls_count: 25 + mention_position: 5 + mentions_count: 10 + organic_overlap: null + organic_overlap_percent: null + total: 5 + limit: 2 + offset: 0 + example3: + summary: Example 3 + value: + site_llm_id: 151216 + site_id: 11270054 + date_from: "2026-04-01" + date_to: "2026-04-30" + limit: 100 + offset: 0 + items: + - group_id: 26377 + group_name: General + prompts_count: 5 + search_volume: 0 + search_intent: + - I + organic_overlap: 2.2 + positions: + - date: "2026-04-01" + mention_presence: 75 + link_presence: 0 + mention_presence_diff: null + link_presence_diff: null + - date: "2026-04-02" + mention_presence: 75 + link_presence: 0 + mention_presence_diff: 0 + link_presence_diff: 0 + - date: "2026-04-03" + mention_presence: 25 + link_presence: 0 + mention_presence_diff: -50 + link_presence_diff: 0 + - date: "2026-04-04" + mention_presence: 75 + link_presence: 0 + mention_presence_diff: "+50" + link_presence_diff: 0 + - date: "2026-04-05" + mention_presence: 75 + link_presence: 25 + mention_presence_diff: 0 + link_presence_diff: "+25" + total: 1 + example4: + summary: Example 4 + value: + site_llm_id: 151294 + site_id: 11270054 + date_from: "2026-04-01" + date_to: "2026-04-30" + limit: 100 + offset: 0 + items: + - group_id: 26377 + group_name: General + prompts_count: 20 + search_volume: null + search_intent: null + organic_overlap: null + positions: + - date: "2026-04-01" + mention_presence: 35 + link_presence: 0 + mention_presence_diff: null + link_presence_diff: null + - date: "2026-04-02" + mention_presence: 40 + link_presence: 5 + mention_presence_diff: "+5" + link_presence_diff: "+5" + - date: "2026-04-30" + mention_presence: 55 + link_presence: 5 + mention_presence_diff: "+15" + link_presence_diff: "+5" + total: 1 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: Rankings for a date range + source: >- + curl -X GET + 'https://api.seranking.com/v1/project-management/airt/prompts/rankings?site_id=123&llm_id=456&date_from=2026-02-17&date_to=2026-02-19&limit=2&offset=0' + \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: Filter by prompt groups (repeat group_ids[]) + source: >- + curl -X GET + 'https://api.seranking.com/v1/project-management/airt/prompts/rankings?site_id=123&llm_id=456&date_from=2026-02-17&date_to=2026-02-19&group_ids[]=12&group_ids[]=18' + \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/project-management/airt/prompts/rankings?site_id=123&llm_id=456&mode=groups&date_from=2026-04-01&date_to=2026-04-30&group_ids[]=26377' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/airt/prompts/groups: + get: + operationId: listPromptGroups + tags: + - AI Results Tracker – Prompt Groups + summary: List prompt groups + description: |- + **Quick start** + + ``` + curl 'https://api.seranking.com/v1/project-management/airt/prompts/groups?site_id=11270054&keys_count=1' \ + -H 'Authorization: Token YOUR_API_KEY' + ``` + + Returns every prompt group for project `11270054`, ordered by `position`, with a `keys_count` on each group. + + The response is a **bare JSON array** (no `data` envelope). + externalDocs: + description: Documentation + url: https://seranking.com/api/project/airt-groups/#list-prompt-groups + parameters: + - name: site_id + in: query + required: true + description: Project ID. From `GET /sites`. + schema: + type: integer + - name: keys_count + in: query + description: >- + `0` or `1`. When `1`, each group includes a `keys_count` field. Defaults to omitted (no `keys_count` in + response). + schema: + type: string + - name: site_llm_ids[] + in: query + description: >- + Filter to groups that contain at least one prompt on these LLM engines. **Repeat the parameter:** + `site_llm_ids[]=1&site_llm_ids[]=2`. Combined as OR (union). + schema: + type: array + items: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: string + description: >- + Numeric group ID, encoded as a string. Use as `group_id` in every other prompt-group / prompts + endpoint. + name: + type: string + description: Group name. Unique within the project (case-sensitive). Max 255 chars. + position: + type: string + description: Sort order within the project, ascending. **Not guaranteed to start at 0**. + is_default: + type: string + description: >- + `"1"` for the project’s undeleteable default group, `"0"` otherwise. Exactly one default per + project once AIRT has been initialized. + creation_date: + type: string + description: >- + `YYYY-MM-DD` (server timezone). The default group’s date equals the day AIRT was first opened on + the project, not the project’s creation date. + keys_count: + type: string + description: >- + Numeric prompt count, encoded as a string. **Present only when `keys_count=1` in the query.** + When `site_llm_ids[]` is also set, this becomes **per-filtered-engine**. + examples: + example1: + summary: Example 1 + value: + - id: string + name: string + position: string + is_default: string + creation_date: YYYY-MM-DD + keys_count: string + project11270054AllThreeGroupsWithCountsRequested: + summary: Project 11270054, all three groups, with counts requested + value: + - id: "26377" + name: General + position: "1" + is_default: "1" + creation_date: "2026-03-03" + keys_count: "25" + - id: "52273" + name: docs-test-alpha + position: "2" + is_default: "0" + creation_date: "2026-05-15" + keys_count: "2" + - id: "52276" + name: docs-test-beta + position: "3" + is_default: "0" + creation_date: "2026-05-15" + keys_count: "3" + "400": + description: Invalid query parameters. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + description: Project doesn’t exist, or exists but isn’t owned by the API key (the gateway conflates the two). + "404": + description: "`site_id=0` only." + "429": + $ref: "#/components/responses/TooManyRequests" + post: + operationId: createPromptGroup + tags: + - AI Results Tracker – Prompt Groups + summary: Create prompt group + description: >- + Creates a new prompt group for a site. The new group is appended to the end of the group order. Returns `400` if + a group with the same name already exists. + + + **Cost:** 0. Managing prompt groups does not consume API credits or subscription quota. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/airt-groups/#create-prompt-group + parameters: + - name: site_id + in: query + required: true + description: Site ID. Path parameter. + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: Group name. Non-empty, maximum 255 characters, unique within the site. Body parameter. + required: + - name + example: + name: Competitors + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: integer + description: ID of the created group. + example: + id: 12 + "400": + description: Empty or missing `name`, name exceeds 255 characters, or name already exists on this site. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + description: Access denied to the requested site. + "404": + description: Site not found. + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST "https://api.seranking.com/v1/project-management/airt/prompts/groups?site_id=123" \ + -H "Content-Type: application/json" \ + -d '{"name": "Competitors"}'\ + -H 'Authorization: Token YOUR_API_KEY' + patch: + operationId: renamePromptGroup + tags: + - AI Results Tracker – Prompt Groups + summary: Rename prompt group + description: |- + Updates the name of a prompt group. + + **Cost:** 0. Managing prompt groups does not consume API credits or subscription quota. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/airt-groups/#rename-prompt-group + parameters: + - name: site_id + in: query + required: true + description: Site ID. Path parameter. + schema: + type: integer + - name: group_id + in: query + required: true + description: Group ID. Path parameter. + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: New group name. Non-empty, maximum 255 characters. Body parameter. + required: + - name + example: + name: Branded queries + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: integer + description: ID of the renamed group. + example: + id: 12 + "400": + description: Empty or missing `name`, name exceeds 255 characters, or name already exists on this site. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + description: Access denied to the requested site. + "404": + description: Site or group not found. + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X PATCH "https://api.seranking.com/v1/project-management/airt/prompts/groups?site_id=123&group_id=147" + \ + -H "Content-Type: application/json" \ + -d '{"name": "Branded queries"}'\ + -H 'Authorization: Token YOUR_API_KEY' + delete: + operationId: deletePromptGroup + tags: + - AI Results Tracker – Prompt Groups + summary: Delete prompt group + description: >- + Deletes a prompt group. All prompts currently in the group are moved to the default group. The default group + itself cannot be deleted. + + + **Cost:** 0. Managing prompt groups does not consume API credits or subscription quota. + + + Returns `204 No Content` on success. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/airt-groups/#delete-prompt-group + parameters: + - name: site_id + in: query + required: true + description: Site ID. Path parameter. + schema: + type: integer + - name: group_id + in: query + required: true + description: Group ID. Path parameter. + schema: + type: integer + responses: + "204": + description: No content. + "400": + description: Invalid request. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + description: Access denied, or attempt to delete the default group. + "404": + description: Site or group not found. + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X DELETE + "https://api.seranking.com/v1/project-management/airt/prompts/groups?site_id=123&group_id=147"\ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/airt/prompts/groups/order: + post: + operationId: changeGroupOrder + tags: + - AI Results Tracker – Prompt Groups + summary: Change group order + description: >- + Moves a group to a new position in the site’s group order. Provide exactly one of `before_id` or `after_id` to + anchor the new position. + + + **Cost:** 0. Managing prompt groups does not consume API credits or subscription quota. + + + Returns `204 No Content` on success. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/airt-groups/#change-group-order + parameters: + - name: site_id + in: query + required: true + description: Site ID. Path parameter. + schema: + type: integer + - name: group_id + in: query + required: true + description: ID of the group to move. Path parameter. + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + before_id: + type: integer + description: >- + Place the group immediately before this neighbour group ID. Required if `after_id` is omitted. Body + parameter. + after_id: + type: integer + description: >- + Place the group immediately after this neighbour group ID. Required if `before_id` is omitted. Body + parameter. + example: + after_id: 18 + responses: + "204": + description: No content. + "400": + description: Both `before_id` and `after_id` are provided, or neither. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + description: Access denied to the requested site. + "404": + description: Site, source group, or anchor group not found. + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: Move group 12 to right after group 18 + source: >- + curl -X POST + "https://api.seranking.com/v1/project-management/airt/prompts/groups/order?site_id=123&group_id=147" \ + -H "Content-Type: application/json" \ + -d '{"after_id": 18}'\ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/airt/prompts/groups/prompts: + delete: + operationId: deleteAllPromptsInGroup + tags: + - AI Results Tracker – Prompt Groups + summary: Delete all prompts in group + description: >- + Removes every prompt currently assigned to the group. The group itself is not deleted. + + + **Warning:** + + + - This operation is destructive. Deleted prompts and their historical data cannot be recovered. + + + - To keep the prompts but empty the group, use [Move all prompts from one group to + another](#move-all-prompts-from-one-group-to-another) instead. + + + **Cost:** 0. Managing prompt groups does not consume API credits or subscription quota. + + + Returns `204 No Content` on success. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/airt-groups/#delete-all-prompts-in-group + parameters: + - name: site_id + in: query + required: true + description: Site ID. Path parameter. + schema: + type: integer + - name: group_id + in: query + required: true + description: Group ID. Path parameter. + schema: + type: integer + responses: + "204": + description: No content. + "400": + description: Invalid request. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + description: Access denied to the requested site. + "404": + description: Site or group not found. + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X DELETE + "https://api.seranking.com/v1/project-management/airt/prompts/groups/prompts?site_id=123&group_id=147"\ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/airt/prompts/groups/move: + post: + operationId: movePromptsToGroup + tags: + - AI Results Tracker – Prompt Groups + summary: Move prompts to group + description: |- + Moves a specific set of prompts into the target group. Prompts can come from any group on the same site. + + **Cost:** 0. Managing prompt groups does not consume API credits or subscription quota. + + Returns `204 No Content` on success. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/airt-groups/#move-prompts-to-group + parameters: + - name: site_id + in: query + required: true + description: Site ID. Path parameter. + schema: + type: integer + - name: group_id + in: query + required: true + description: Target group ID. Path parameter. + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + k2site_llm_ids: + type: array + items: + type: integer + description: >- + Prompt-to-LLM link IDs to move, same IDs returned as `k2site_llm_id` by `GET /prompts`. Non-empty. + Body parameter. + required: + - k2site_llm_ids + example: + k2site_llm_ids: + - 101 + - 102 + - 103 + responses: + "204": + description: No content. + "400": + description: Empty or missing `k2site_llm_ids`. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + description: Access denied to the requested site. + "404": + description: Site, target group, or one or more prompts not found. + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X POST + "https://api.seranking.com/v1/project-management/airt/prompts/groups/move?site_id=123&group_id=147" \ + -H "Content-Type: application/json" \ + -d '{"k2site_llm_ids": [101, 102, 103]}'\ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/airt/prompts/groups/transfer: + post: + operationId: moveAllPromptsFromOneGroupToAnother + tags: + - AI Results Tracker – Prompt Groups + summary: Move all prompts from one group to another + description: >- + Moves every prompt from one group to another in a single call. Use this to merge a group into another group, + then optionally delete the now-empty source group. + + + **Cost:** 0. Managing prompt groups does not consume API credits or subscription quota. + + + Returns `204 No Content` on success. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/airt-groups/#move-all-prompts-from-one-group-to-another + parameters: + - name: site_id + in: query + required: true + description: Site ID. Path parameter. + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + from_group_id: + type: integer + description: Source group ID. Body parameter. + to_group_id: + type: integer + description: Target group ID. Body parameter. + required: + - from_group_id + - to_group_id + example: + from_group_id: 18 + to_group_id: 12 + responses: + "204": + description: No content. + "400": + description: Missing `from_group_id` or `to_group_id`, or both are equal. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + description: Access denied to the requested site. + "404": + description: Site, source group, or target group not found. + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST "https://api.seranking.com/v1/project-management/airt/prompts/groups/transfer?site_id=123" \ + -H "Content-Type: application/json" \ + -d '{"from_group_id": 18, "to_group_id": 12}'\ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/airt/competitors: + get: + operationId: getCompetitorsBreakdown + tags: + - AI Results Tracker – Competitors + summary: Get competitors breakdown + description: >- + For each requested prompt over a date range, returns one entry per check date with: + + + - **Brands mentioned** in the AI answer, ordered as displayed + + + - **Source URLs** cited in the answer, ordered as displayed + + + - **Cached copy URL** for human verification (opt out via `include_cached_copy_url=0`) + + + Dates without a check are omitted from `results`. A check with no sources or brands is returned with empty + `brands` and `sources` arrays. + + + **Limits:** + + + - Up to 50 `prompt_llm_ids[]` per request. + + + - Date range up to 366 days. + + + - Requested prompts multiplied by date range days must not exceed 3,660. + + + - Default range: last 7 days. + + + **Compact mode (`compact=1`):** adjacent calendar days with identical brands and sources (and, for Google AI + Overview, identical `ai_overview_present` and `organic_urls`) are collapsed into a single entry with a + `date_from`/`date_to` range instead of `date`. Entry fields (`cached_copy_url`, flags) are taken from the most + recent day of the run. Days separated by a gap without checks are never merged. + + + **Google AI Overview:** entries additionally contain `ai_overview_present` and `organic_urls` (top 20 organic + results). + + + **Warning:** `cached_copy_url` points at the `api4.seranking.com` surface, which is not part of the unified + gateway. As of July 9, 2026 the gateway API key is rejected there (`403`) with both `Authorization: Token` + header and `?token=` query authentication, so the cached copy cannot currently be fetched with the same + credentials. Raised with the AIRT team. + + + **Cost:** 0. Retrieving competitors data does not consume API credits or subscription quota. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/airt-competitors/#get-competitors-breakdown + parameters: + - name: site_id + in: query + required: true + description: Site ID. + schema: + type: integer + - name: llm_id + in: query + required: true + description: LLM engine ID. + schema: + type: integer + - name: prompt_llm_ids[] + in: query + required: true + description: Prompt-to-LLM link IDs from List prompts (repeatable). 1–50 IDs. + schema: + type: array + items: + type: string + - name: date_from + in: query + description: Start date (`YYYY-MM-DD` format). + schema: + type: string + default: 7 days before date_to + - name: date_to + in: query + description: |- + End date (`YYYY-MM-DD` format). Cannot exceed the current date. + + Default: Current date + schema: + type: string + - name: include_cached_copy_url + in: query + description: Include the cached copy URL in every result entry. + schema: + type: boolean + default: true + - name: compact + in: query + description: Collapse consecutive days with identical brands and sources into date ranges. + schema: + type: boolean + default: false + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + site_id: + type: integer + description: Site ID. + site_llm_id: + type: integer + description: LLM engine ID. + date_from: + type: string + description: Start date of the data range. + date_to: + type: string + description: End date of the data range. + items: + type: array + items: + type: object + properties: + prompt_llm_id: + type: integer + description: Prompt-to-LLM link ID. + prompt: + type: string + description: Prompt text. + results: + type: array + items: + type: object + properties: + date: + type: string + description: Check date. Absent when `compact=1`. + brands: + type: array + items: + type: object + properties: + position: + type: integer + name: + type: string + description: >- + Brands mentioned in the AI answer, ordered as displayed. Each object: `position` + (1-based), `name`. + description: >- + Brands mentioned in the AI answer, ordered as displayed. Each object: `position` + (1-based), `name`. + sources: + type: array + items: + type: object + properties: + position: + type: integer + url: + type: string + domain: + type: string + description: >- + Source URLs cited in the AI answer, ordered as displayed. Each object: `position` + (1-based), `url`, `domain`. + description: >- + Source URLs cited in the AI answer, ordered as displayed. Each object: `position` + (1-based), `url`, `domain`. + has_cached_copy: + type: boolean + description: >- + Whether the cached HTML copy is still available (stored for 30 days). Derived from the + check date age, not from a per-day storage check; in rare cases the cached-copy + endpoint can still respond with `404`. + has_answer_text: + type: boolean + description: >- + Whether the answer text is still available (stored for 1 year). Fetch it via Get + prompt answer. + cached_copy_url: + type: string + description: >- + URL of the cached HTML copy endpoint. Only present when `include_cached_copy_url=1` + (default). `null` when the copy is unavailable. + description: >- + One entry per check date (or per collapsed date range when `compact=1`), ordered by date + ascending. + description: >- + One entry per check date (or per collapsed date range when `compact=1`), ordered by date + ascending. + description: One item per requested prompt, in the order of `prompt_llm_ids[]`. + description: One item per requested prompt, in the order of `prompt_llm_ids[]`. + example: + site_id: 11270054 + site_llm_id: 151294 + date_from: "2026-07-01" + date_to: "2026-07-08" + items: + - prompt_llm_id: 1411621 + prompt: best seo tool + results: + - date: "2026-07-08" + brands: + - position: 1 + name: Semrush + - position: 2 + name: SE Ranking + sources: + - position: 1 + url: https://seranking.com/blog/best-seo-tools/ + domain: seranking.com + has_cached_copy: true + has_answer_text: true + cached_copy_url: >- + https://api4.seranking.com/sites/11270054/airt/v2/llm/151294/prompts/1411621/cached-copy?date=2026-07-08 + "400": + description: >- + Missing or invalid `prompt_llm_ids[]`, invalid date format, `date_from` greater than `date_to`, or date + range exceeds the limit. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + description: Access denied to the requested site. + "404": + description: LLM engine not found for this site, or prompt not found or does not belong to this LLM engine. + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl + 'https://api.seranking.com/v1/project-management/airt/competitors?site_id=11270054&llm_id=151294&prompt_llm_ids[]=1411621&prompt_llm_ids[]=1411624&date_from=2026-07-01&date_to=2026-07-08' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/airt/competitors/dates: + get: + operationId: getCompetitorsCheckDates + tags: + - AI Results Tracker – Competitors + summary: Get competitors check dates + description: >- + Returns the list of dates within a range on which the prompt was checked and competitors data is available. Use + it to avoid requesting empty periods. + + + **Note:** Default range: last 30 days. Maximum range: 366 days. + + + **Cost:** 0. Retrieving competitors data does not consume API credits or subscription quota. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/airt-competitors/#get-competitors-check-dates + parameters: + - name: site_id + in: query + required: true + description: Site ID. + schema: + type: integer + - name: llm_id + in: query + required: true + description: LLM engine ID. + schema: + type: integer + - name: prompt_llm_id + in: query + required: true + description: Prompt-to-LLM link ID from List prompts. + schema: + type: integer + - name: date_from + in: query + description: Start date (`YYYY-MM-DD` format). + schema: + type: string + default: 30 days before date_to + - name: date_to + in: query + description: |- + End date (`YYYY-MM-DD` format). Cannot exceed the current date. + + Default: Current date + schema: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + site_id: + type: integer + description: Site ID. + site_llm_id: + type: integer + description: LLM engine ID. + prompt_llm_id: + type: integer + description: Prompt-to-LLM link ID. + date_from: + type: string + description: Start date of the data range. + date_to: + type: string + description: End date of the data range. + dates: + type: array + items: + type: string + description: Dates with competitors data, ordered ascending. + description: Dates with competitors data, ordered ascending. + example: + site_id: 11270054 + site_llm_id: 151294 + prompt_llm_id: 1411621 + date_from: "2026-06-09" + date_to: "2026-07-08" + dates: + - "2026-07-06" + - "2026-07-07" + - "2026-07-08" + "400": + description: Invalid date parameters. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + description: Access denied to the requested site. + "404": + description: LLM engine or prompt not found. + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl + 'https://api.seranking.com/v1/project-management/airt/competitors/dates?site_id=11270054&llm_id=151294&prompt_llm_id=1411621&date_from=2026-06-09&date_to=2026-07-08' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/airt/competitors/source-metrics: + get: + operationId: getSourceMetrics + tags: + - AI Results Tracker – Competitors + summary: Get source metrics + description: |- + Returns SEO metrics for the source URLs (or their domains) cited in the AI answer for a prompt on a given date: + + - **domain_trust** — Domain Trust score + + - **ref_domains** — number of referring domains + + - **organic_keywords** — number of organic keywords the URL or domain ranks for + + For Google AI Overview engines the source list also includes organic results. + + **Cost:** 0. Retrieving competitors data does not consume API credits or subscription quota. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/airt-competitors/#get-source-metrics + parameters: + - name: site_id + in: query + required: true + description: Site ID. + schema: + type: integer + - name: llm_id + in: query + required: true + description: LLM engine ID. + schema: + type: integer + - name: prompt_llm_id + in: query + required: true + description: Prompt-to-LLM link ID from List prompts. + schema: + type: integer + - name: date + in: query + required: true + description: Check date (`YYYY-MM-DD` format). Available dates come from Get competitors check dates. + schema: + type: string + - name: mode + in: query + description: "Metrics aggregation mode: `domain` (aggregated per source domain) or `url` (per exact source URL)." + schema: + type: string + default: domain + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + site_id: + type: integer + description: Site ID. + site_llm_id: + type: integer + description: LLM engine ID. + prompt_llm_id: + type: integer + description: Prompt-to-LLM link ID. + date: + type: string + description: Check date. + mode: + type: string + description: "Aggregation mode used: `url` or `domain`." + items: + type: array + items: + type: object + properties: + source: + type: string + description: Source URL (`mode=url`) or domain (`mode=domain`). + domain: + type: string + description: Domain of the source. + domain_trust: + type: integer + description: Domain Trust score. + ref_domains: + type: string + description: Number of referring domains, encoded as a string. Coerce to an integer before arithmetic. + organic_keywords: + type: integer + description: Number of organic keywords the source ranks for. + description: Metrics per source (see below). + description: Metrics per source (see below). + example: + site_id: 11270054 + site_llm_id: 151216 + prompt_llm_id: 1411240 + date: "2026-07-08" + mode: domain + items: + - source: "[www.reddit.com](https://www.reddit.com)" + domain: "[www.reddit.com](https://www.reddit.com)" + domain_trust: 98 + ref_domains: "2532163" + organic_keywords: 199918377 + - source: "[www.semrush.com](https://www.semrush.com)" + domain: "[www.semrush.com](https://www.semrush.com)" + domain_trust: 96 + ref_domains: "222992" + organic_keywords: 494418 + "400": + description: Missing or invalid `date`, or invalid `mode`. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + description: Access denied to the requested site. + "404": + description: LLM engine or prompt not found. + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl + 'https://api.seranking.com/v1/project-management/airt/competitors/source-metrics?site_id=11270054&llm_id=151216&prompt_llm_id=1411240&date=2026-07-08&mode=domain' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/airt/sources/summary: + get: + operationId: getSourcesSummary + tags: + - AI Results Tracker – Sources + summary: Get sources summary + description: >- + Project-level AI-search visibility for a date range. Returns the four opportunity tiles plus the per-competitor + bubble-chart data (two counts per brand: mentions in AI answers and mentions in cited source URLs). + + + **Note:** Homepage and product pages are excluded from the tile counts, mirroring the UI. + + + **Cost:** 0. Retrieving sources data does not consume API credits or subscription quota. + + + The [shared filters](#shared-filters): `site_id`, `date_from`, `date_to`, `site_llm_ids[]`, `prompt_ids[]`, + `group_ids[]`. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/airt-sources/#get-sources-summary + parameters: + - name: site_id + in: query + required: true + description: Site ID. + schema: + type: integer + - name: date_from + in: query + description: Range start (`YYYY-MM-DD` format). + schema: + type: string + default: 30 days before date_to + - name: date_to + in: query + description: |- + Range end (`YYYY-MM-DD` format). Cannot exceed the current date. + + Default: Current date + schema: + type: string + - name: site_llm_ids[] + in: query + description: |- + Narrow aggregation to specific LLM engines (repeatable). + + Default: All the project’s engines + schema: + type: array + items: + type: string + - name: prompt_ids[] + in: query + description: Filter by tracked prompt IDs (repeatable). + schema: + type: array + items: + type: string + - name: group_ids[] + in: query + description: Filter by prompt group IDs (repeatable). See [AIRT Groups](AIRT Groups). + schema: + type: array + items: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + site_id: + type: integer + description: Site ID. + site_llm_ids: + type: array + items: + type: integer + description: LLM engine IDs included in the aggregation. + description: LLM engine IDs included in the aggregation. + date_from: + type: string + description: Start date of the data range. + date_to: + type: string + description: End date of the data range. + summary: + type: object + properties: + mention_opportunities: + type: integer + description: Sources mentioning 2 or more brands but not the project (total opportunity). + competitor_only_mentions: + type: integer + description: Opportunity sources that mention a competitor but not the project. + new_opportunities: + type: integer + description: Opportunity sources first seen within the last 30 days. + mentions_without_backlinks: + type: integer + description: Sources that mention the project but do not link to it. + description: Opportunity tiles (see below). + competitors: + type: array + items: + type: object + properties: + name: + type: string + description: Competitor brand name. + count_in_ai_answers: + type: integer + description: Mentions of the brand in AI answers. + count_in_sources: + type: integer + description: Mentions of the brand in cited source URLs. + description: Per-competitor mention counts (see below). + description: Per-competitor mention counts (see below). + example: + site_id: 11270054 + site_llm_ids: + - 151216 + - 151294 + date_from: "2026-06-09" + date_to: "2026-07-08" + summary: + mention_opportunities: 119 + competitor_only_mentions: 99 + new_opportunities: 23 + mentions_without_backlinks: 168 + competitors: + - name: Semrush + count_in_ai_answers: 653 + count_in_sources: 564 + - name: Ahrefs + count_in_ai_answers: 641 + count_in_sources: 364 + - name: SE Ranking + count_in_ai_answers: 489 + count_in_sources: 290 + "400": + description: Invalid query parameters. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "404": + description: Site not found. + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl + 'https://api.seranking.com/v1/project-management/airt/sources/summary?site_id=11270054&date_from=2026-06-09&date_to=2026-07-08' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/airt/sources/domains: + get: + operationId: listSourceDomains + tags: + - AI Results Tracker – Sources + summary: List source domains + description: >- + Outreach target list: domains cited as sources in LLM answers, default sort by AI answers descending. Each row + carries the Domains-tab columns: status, pages/AI-answers/prompts counts, coverage %, brand mention rate %, + mentioned brands, Domain Trust, backlinks, referring domains, and a per-engine usage breakdown + (`usage_count_by_llm`). + + + **Cost:** 0. Retrieving sources data does not consume API credits or subscription quota. + + + Envelope: `site_id`, `site_llm_ids`, `date_from`, `date_to`, `limit`, `offset`, `total`, `items`. + + + **Warning:** `usage_count` values are returned as JSON strings. Coerce them to integers before arithmetic. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/airt-sources/#list-source-domains + parameters: + - name: site_id + in: query + required: true + description: Site ID. + schema: + type: integer + - name: date_from + in: query + description: Range start (`YYYY-MM-DD` format). + schema: + type: string + default: 30 days before date_to + - name: date_to + in: query + description: |- + Range end (`YYYY-MM-DD` format). Cannot exceed the current date. + + Default: Current date + schema: + type: string + - name: site_llm_ids[] + in: query + description: |- + Narrow aggregation to specific LLM engines (repeatable). + + Default: All the project’s engines + schema: + type: array + items: + type: string + - name: prompt_ids[] + in: query + description: Filter by tracked prompt IDs (repeatable). + schema: + type: array + items: + type: string + - name: group_ids[] + in: query + description: Filter by prompt group IDs (repeatable). See [AIRT Groups](AIRT Groups). + schema: + type: array + items: + type: string + - name: competitor_ids[] + in: query + description: Filter to sources where the given competitor brands appear (repeatable). + schema: + type: array + items: + type: string + - name: is_brand_mentioned + in: query + description: Restrict to sources where the project’s brand is (`1`) or is not (`0`) mentioned. + schema: + type: integer + - name: has_link + in: query + description: Restrict to sources that link (`1`) or do not link (`0`) to the project. + schema: + type: integer + - name: search + in: query + description: Substring match on the source domain. + schema: + type: string + - name: limit + in: query + description: Number of items per page (1–100). + schema: + type: integer + default: 100 + - name: offset + in: query + description: Offset from the beginning of the list. + schema: + type: integer + default: 0 + - name: sort + in: query + description: >- + Sort field: `domain`, `pages_total`, `ai_answers_total`, `prompts_total`, `prompts`, `coverage_percent`, + `brand_mentions_total`, `mention_rate_percent`, `dt`, `backlinks_total`, `referring_domains_total`. + schema: + type: string + default: ai_answers_total + - name: sort_order + in: query + description: "Sort direction: `asc` or `desc`." + schema: + type: string + default: desc + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + site_id: + type: integer + site_llm_ids: + type: array + items: + type: integer + date_from: + type: string + date_to: + type: string + limit: + type: integer + offset: + type: integer + total: + type: integer + items: + type: array + items: + type: object + properties: + domain_id: + type: integer + description: Domain ID. Use as `domain_id` in List source pages to restrict to this domain. + domain: + type: string + description: Domain name. + pages_total: + type: integer + description: Number of this domain’s pages cited as sources. + ai_answers_total: + type: integer + description: Number of AI answers citing the domain. + prompts: + type: integer + description: Number of prompts whose answers cite the domain. + brand_mentions_total: + type: integer + description: Mentions of the project’s brand on the domain’s cited pages. + first_seen: + type: string + description: First date the domain was seen as a source (`YYYY-MM-DD`). + last_seen: + type: string + description: Most recent date the domain was seen as a source (`YYYY-MM-DD`). + dt: + type: integer + description: Domain Trust. + backlinks_total: + type: integer + description: Total backlinks to the project from this domain. + referring_domains_total: + type: integer + description: Referring domains. + coverage_percent: + type: number + description: Share of tracked prompts whose answers cite the domain (0–100). + mention_rate_percent: + type: number + description: Brand mention rate across the domain’s cited pages (0–100). + is_project: + type: integer + description: "`1` when the domain is the project’s own domain, `0` otherwise." + is_competitor: + type: integer + description: "`1` when the domain belongs to a tracked competitor, `0` otherwise." + total_answers: + type: integer + description: Total AI answers in scope for the range. + prompts_total: + type: integer + description: Same value as `prompts`. + status: + type: string + description: "Parsing status: `parsed`, `in_progress`, `not_parsed`, or `not_available`." + usage_count_by_llm: + type: array + items: + type: object + properties: + site_llm_id: + type: integer + usage_count: + type: string + description: >- + Per-engine usage breakdown. Each object: `site_llm_id` (integer), `usage_count` (numeric + string). + description: >- + Per-engine usage breakdown. Each object: `site_llm_id` (integer), `usage_count` (numeric + string). + mentions: + type: array + items: + type: object + properties: + name: + type: string + domain: + type: string + description: Domain name. + competitor_id: + type: integer + description: >- + Brands mentioned on the domain’s cited pages. Each object: `name`, `domain`, and + `competitor_id` — `competitor_id` is present only for tracked competitors, omitted + otherwise. + description: >- + Brands mentioned on the domain’s cited pages. Each object: `name`, `domain`, and + `competitor_id` — `competitor_id` is present only for tracked competitors, omitted + otherwise. + example: + site_id: 11270054 + site_llm_ids: + - 151216 + - 151294 + date_from: "2026-06-09" + date_to: "2026-07-08" + limit: 1 + offset: 0 + total: 343 + items: + - domain_id: 5008 + domain: techradar.com + pages_total: 16 + ai_answers_total: 67 + prompts: 19 + brand_mentions_total: 3 + first_seen: "2026-02-20" + last_seen: "2026-07-09" + dt: 61 + backlinks_total: 17246330 + referring_domains_total: 161528 + coverage_percent: 8.9 + mention_rate_percent: 18.8 + is_project: 0 + is_competitor: 0 + total_answers: 750 + prompts_total: 19 + status: parsed + usage_count_by_llm: + - site_llm_id: 151216 + usage_count: "0" + - site_llm_id: 151294 + usage_count: "67" + mentions: + - name: seranking.com + domain: seranking.com + - name: ahrefs.com + domain: ahrefs.com + competitor_id: 1043944 + - name: moz.com + domain: moz.com + competitor_id: 1043947 + "400": + description: Invalid query parameters. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "404": + description: Site not found. + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl + 'https://api.seranking.com/v1/project-management/airt/sources/domains?site_id=11270054&date_from=2026-06-09&date_to=2026-07-08&is_brand_mentioned=0&limit=10' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/airt/sources/pages: + get: + operationId: listSourcePages + tags: + - AI Results Tracker – Sources + summary: List source pages + description: >- + URL-level twin of List source domains: individual source URLs cited in LLM answers, with the parent domain, page + type, and the same metric columns. Default sort by usage descending. + + + **Cost:** 0. Retrieving sources data does not consume API credits or subscription quota. + + + The [shared filters](#shared-filters), plus the same `competitor_ids[]`, `is_brand_mentioned`, `has_link`, + `search`, `limit`, `offset`, and `sort_order` parameters as List source domains, and: + + + Envelope: `site_id`, `site_llm_ids`, `date_from`, `date_to`, `limit`, `offset`, `total`, `items`. + + + **Warning:** Several numeric fields (`count_usage`, `prompts`, `dt`, `mention`, `link`, `brands_num`, + `competitors_num`, `usage_count`, `http_status`) are returned as JSON strings. Coerce them before arithmetic. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/airt-sources/#list-source-pages + parameters: + - name: site_id + in: query + required: true + description: Site ID. + schema: + type: integer + - name: date_from + in: query + description: Range start (`YYYY-MM-DD` format). + schema: + type: string + default: 30 days before date_to + - name: date_to + in: query + description: |- + Range end (`YYYY-MM-DD` format). Cannot exceed the current date. + + Default: Current date + schema: + type: string + - name: site_llm_ids[] + in: query + description: |- + Narrow aggregation to specific LLM engines (repeatable). + + Default: All the project’s engines + schema: + type: array + items: + type: string + - name: prompt_ids[] + in: query + description: Filter by tracked prompt IDs (repeatable). + schema: + type: array + items: + type: string + - name: group_ids[] + in: query + description: Filter by prompt group IDs (repeatable). See [AIRT Groups](AIRT Groups). + schema: + type: array + items: + type: string + - name: domain_id + in: query + description: Restrict to a single domain’s pages (`domain_id` from the List source domains response). + schema: + type: integer + - name: sort + in: query + description: >- + Sort field: `url`, `dt`, `count_usage`, `prompts`, `mention`, `link`, `brands_num`, `competitors_num`, + `prompt_coverage`, `answers_coverage`. + schema: + type: string + default: count_usage + - name: competitor_ids[] + in: query + description: Filter to sources where the given competitor brands appear (repeatable). + schema: + type: array + items: + type: string + - name: is_brand_mentioned + in: query + description: Restrict to sources where the project’s brand is (`1`) or is not (`0`) mentioned. + schema: + type: integer + - name: has_link + in: query + description: Restrict to sources that link (`1`) or do not link (`0`) to the project. + schema: + type: integer + - name: search + in: query + description: Substring match on the source domain. + schema: + type: string + - name: limit + in: query + description: Number of items per page (1–100). + schema: + type: integer + default: 100 + - name: offset + in: query + description: Offset from the beginning of the list. + schema: + type: integer + default: 0 + - name: sort_order + in: query + description: "Sort direction: `asc` or `desc`." + schema: + type: string + default: desc + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + site_id: + type: integer + site_llm_ids: + type: array + items: + type: integer + date_from: + type: string + date_to: + type: string + limit: + type: integer + offset: + type: integer + total: + type: integer + items: + type: array + items: + type: object + properties: + id: + type: integer + description: Page ID. + url: + type: string + description: Source URL. + title: + type: string + description: Page title. + domain_id: + type: integer + description: Parent domain ID. + http_status: + type: string + description: HTTP status of the page, encoded as a string. + content_updated: + type: string + description: Timestamp of the last content parse (`YYYY-MM-DD HH:MM:SS`). + page_type: + type: string + description: Page type (for example `forum`, `other`). + dt: + type: string + description: Domain Trust of the parent domain. Numeric string. + mention: + type: string + description: "`\"1\"` when the project’s brand is mentioned on the page, `\"0\"` otherwise." + link: + type: string + description: "`\"1\"` when the page links to the project, `\"0\"` otherwise." + nofollow: + type: integer + description: Whether the link to the project is nofollow. + brands_num: + type: string + description: Number of brands mentioned on the page. Numeric string. + competitors_num: + type: string + description: Number of tracked competitors mentioned on the page. Numeric string. + mentions: + type: array + items: + type: object + properties: + name: + type: string + domain: + type: string + description: >- + Brands mentioned on the page. Each object: `name`, `domain`, and `competitor_id` — + `competitor_id` is present only for tracked competitors, omitted otherwise. + description: >- + Brands mentioned on the page. Each object: `name`, `domain`, and `competitor_id` — + `competitor_id` is present only for tracked competitors, omitted otherwise. + count_usage: + type: string + description: Times this URL was cited as a source. Numeric string. + prompts: + type: string + description: Number of prompts whose answers cite the URL. Numeric string. + first_seen: + type: string + description: First date the URL was seen as a source (`YYYY-MM-DD`). + last_seen: + type: string + description: Most recent date the URL was seen as a source (`YYYY-MM-DD`). + prompt_coverage: + type: integer + description: Share of tracked prompts whose answers cite the URL (0–100). + answers_coverage: + type: number + description: Share of AI answers citing the URL (0–100). + traffic: + type: integer + description: Traffic estimate for the page. + usage_count_by_llm: + type: array + items: + type: object + properties: + site_llm_id: + type: integer + usage_count: + type: string + description: >- + Per-engine usage breakdown. Each object: `site_llm_id` (integer), `usage_count` (numeric + string). + description: >- + Per-engine usage breakdown. Each object: `site_llm_id` (integer), `usage_count` (numeric + string). + is_project: + type: integer + description: "`1` when the URL belongs to the project’s own domain, `0` otherwise." + is_competitor: + type: integer + description: "`1` when the URL belongs to a tracked competitor, `0` otherwise." + total_answers: + type: integer + description: Total AI answers in scope. + total_prompts: + type: integer + description: Total prompts in scope. + example: + site_id: 11270054 + site_llm_ids: + - 151216 + - 151294 + date_from: "2026-06-09" + date_to: "2026-07-08" + limit: 1 + offset: 0 + total: 560 + items: + - id: 1542589 + url: https://www.techradar.com/pro/software-services/se-ranking + title: SE Ranking review | TechRadar + domain_id: 5008 + http_status: "200" + content_updated: "2026-07-07 06:26:17" + page_type: other + dt: "61" + mention: "1" + link: "1" + nofollow: 1 + brands_num: "7" + competitors_num: "0" + mentions: + - name: seranking.com + domain: seranking.com + count_usage: "54" + prompts: "19" + first_seen: "2026-02-23" + last_seen: "2026-07-09" + prompt_coverage: 76 + answers_coverage: 7.2 + traffic: 40 + usage_count_by_llm: + - site_llm_id: 151216 + usage_count: "0" + - site_llm_id: 151294 + usage_count: "54" + is_project: 0 + is_competitor: 0 + total_answers: 750 + total_prompts: 25 + "400": + description: Invalid query parameters. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "404": + description: Site not found. + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl + 'https://api.seranking.com/v1/project-management/airt/sources/pages?site_id=11270054&date_from=2026-06-09&date_to=2026-07-08&domain_id=12345&limit=10' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/project-management/airt/sources/recommendations: + get: + operationId: getSourcesRecommendations + tags: + - AI Results Tracker – Sources + summary: Get sources recommendations + description: >- + Ordered list from the Recommendations panel — for example “Secure Brand Mentions on High-Impact Sources” and + per-domain outreach suggestions (Reddit, YouTube, Wikipedia, and others) where the project is cited but not yet + mentioned. + + + **Cost:** 0. Retrieving sources data does not consume API credits or subscription quota. + + + The [shared filters](#shared-filters): `site_id`, `date_from`, `date_to`, `site_llm_ids[]`, `prompt_ids[]`, + `group_ids[]`. + + + Envelope: `site_id`, `site_llm_ids`, `date_from`, `date_to`, `items`. + externalDocs: + description: Documentation + url: https://seranking.com/api/project/airt-sources/#get-sources-recommendations + parameters: + - name: site_id + in: query + required: true + description: Site ID. + schema: + type: integer + - name: date_from + in: query + description: Range start (`YYYY-MM-DD` format). + schema: + type: string + default: 30 days before date_to + - name: date_to + in: query + description: |- + Range end (`YYYY-MM-DD` format). Cannot exceed the current date. + + Default: Current date + schema: + type: string + - name: site_llm_ids[] + in: query + description: |- + Narrow aggregation to specific LLM engines (repeatable). + + Default: All the project’s engines + schema: + type: array + items: + type: string + - name: prompt_ids[] + in: query + description: Filter by tracked prompt IDs (repeatable). + schema: + type: array + items: + type: string + - name: group_ids[] + in: query + description: Filter by prompt group IDs (repeatable). See [AIRT Groups](AIRT Groups). + schema: + type: array + items: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + site_id: + type: integer + site_llm_ids: + type: array + items: + type: integer + date_from: + type: string + date_to: + type: string + items: + type: array + items: + type: object + properties: + type: + type: string + description: "Recommendation type: `most_cited_sources` or `one_domain`." + code: + type: string + description: >- + Recommendation code: `secure_mentions` for the most-cited-sources recommendation; the domain + slug for `one_domain` (for example `reddit`, `youtube`, `quora`). + data: + description: >- + Recommendation payload. For `one_domain`: `domain` and `count` (numeric string). Empty array + for `most_cited_sources`. + example: + site_id: 11270054 + site_llm_ids: + - 151216 + - 151294 + date_from: "2026-06-09" + date_to: "2026-07-08" + items: + - type: most_cited_sources + code: secure_mentions + data: [] + - type: one_domain + code: reddit + data: + domain: reddit.com + count: "45" + - type: one_domain + code: youtube + data: + domain: youtube.com + count: "20" + "400": + description: Invalid query parameters. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "404": + description: Site not found. + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl + 'https://api.seranking.com/v1/project-management/airt/sources/recommendations?site_id=11270054&date_from=2026-06-09&date_to=2026-07-08' + \ + -H 'Authorization: Token YOUR_API_KEY' +components: + securitySchemes: + tokenAuth: + type: apiKey + in: header + name: Authorization + description: >- + Recommended. Send the API key in the `Authorization` header with the `Token` scheme: `Authorization: Token + YOUR_API_KEY`. + apikeyQuery: + type: apiKey + in: query + name: apikey + description: >- + Alternative. Send the API key as the `apikey` query parameter. It must always be a query parameter, even when + other data goes in the request body. + schemas: + GatewayError: + type: object + description: Error returned by the API gateway before the request reaches the API. + properties: + error_description: + type: string + description: Human-readable error message. + responses: + Unauthorized: + description: The API key is missing, unknown or disabled. + content: + application/json: + schema: + $ref: "#/components/schemas/GatewayError" + example: + error_description: >- + Authentication failed. Please ensure you have a valid, enabled API key. To get an API key, please contact + us at api@seranking.com. + PaymentRequired: + description: The account has no active subscription or not enough credits for this request. + content: + application/json: + schema: + $ref: "#/components/schemas/GatewayError" + example: + error_description: >- + Insufficient funds, API key is temporarily disabled. Please make a payment to enable you API key, or + contact us at api@seranking.com. + Forbidden: + description: The API key may not call this endpoint or use this HTTP method. + content: + application/json: + schema: + $ref: "#/components/schemas/GatewayError" + example: + error_description: >- + Authentication failed. Please ensure you have a valid, enabled API key. To get an API key, please contact + us at api@seranking.com. + TooManyRequests: + description: >- + The request rate limit of the API key was exceeded. See [API rate + limits](https://seranking.com/api/rate-limits/). + content: + application/json: + schema: + $ref: "#/components/schemas/GatewayError" + example: + error_description: You made 11 requests, which is over the allowed limit of 10 requests per second. Please try again later. diff --git a/openapi/se-visible-api.json b/openapi/se-visible-api.json new file mode 100644 index 0000000..3422e4b --- /dev/null +++ b/openapi/se-visible-api.json @@ -0,0 +1,6896 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "SE Visible API", + "version": "1.0.0", + "description": "SE Visible tracks how brands appear across AI engines (ChatGPT, Google Gemini, Google AI Mode, and Google AI Overview). The SE Visible API lets you create and manage brand visibility projects and pull metrics, prompt results, and cited sources programmatically.\n\n- create projects and manage brand visibility\n\n- manage tracked brands, competitors, and brand aliases\n\n- organize prompts into topics\n\n- get AI prompt results with sentiment and brand mentions\n\n- pull aggregated visibility metrics (visibility score, share of voice, sentiment, average position)\n\n## Authentication\n\nAll endpoints are served from `https://api.seranking.com` and use one SE Ranking API key, the same key for the Data API, the Project API, the Local Marketing API and the SE Visible API. Send it in the `Authorization: Token YOUR_API_KEY` header (recommended) or as the `apikey` query parameter. See [Getting API access](https://seranking.com/api/how-to-get-api/).\n\nRate limits: [API rate limits](https://seranking.com/api/rate-limits/). Credits: [API credit system](https://seranking.com/api/api-credits-system/).", + "contact": { + "name": "SE Ranking API Support", + "url": "https://seranking.com/api/", + "email": "api@seranking.com" + }, + "license": { + "name": "MIT", + "url": "https://github.com/seranking/openapi/blob/main/LICENSE" + } + }, + "externalDocs": { + "description": "SE Visible API documentation", + "url": "https://seranking.com/api/se-visible/" + }, + "servers": [ + { + "url": "https://api.seranking.com", + "description": "Production" + } + ], + "security": [ + { + "tokenAuth": [] + }, + { + "apikeyQuery": [] + } + ], + "tags": [ + { + "name": "Projects", + "description": "The Projects API creates and manages SE Visible projects. A project tracks one primary brand with a domain across a set of locations and AI engines. Everything else in SE Visible (brands, topics, prompts, results, and sources) hangs off a project.\n\nUsing the SE Visible API, you can:\n\n- list every project in your organisation with its domain, brand names, and status\n\n- create a new project and have it processed asynchronously to generate prompts and collect data\n\n- read a project’s full details, including processing progress, topics, check dates, and tracked competitor brands\n\n- change how often a project is checked (daily or weekly)\n\n- delete a project (soft delete, can be restored)\n\nAll endpoints are relative to the base URL `https://api.seranking.com/v1/se-visible`.\n\nDocumentation: [Projects](https://seranking.com/api/se-visible/projects/)" + }, + { + "name": "Brands", + "description": "The Brands API manages the brands tracked inside a project: the primary brand and its competitors, along with their aliases. It also surfaces brands that AI models mentioned in your results and aggregated visibility metrics.\n\nUsing the SE Visible API, you can:\n\n- list a project’s tracked brands (primary brand and competitors) with their aliases\n\n- add competitor brands and manage their aliases\n\n- see which brands AI models mentioned in a project’s results\n\n- pull aggregated brand metrics such as visibility score, share of voice, sentiment, and brand’s average position in AI answers\n\nAll endpoints are relative to the base URL `https://api.seranking.com/v1/se-visible`.\n\nDocumentation: [Brands](https://seranking.com/api/se-visible/brands/)" + }, + { + "name": "Topics", + "description": "The Topics API manages the topics inside a project. Topics group related prompts so you can organise prompts you track and slice visibility metrics by topic. Each project has one default topic that is created automatically.\n\nUsing the SE Visible API, you can:\n\n- create one or more topics in a project at once\n\n- rename an existing topic\n\n- delete a topic and the prompts grouped under it\n\nAll endpoints are relative to the base URL `https://api.seranking.com/v1/se-visible`.\n\nDocumentation: [Topics](https://seranking.com/api/se-visible/topics/)" + }, + { + "name": "Prompts", + "description": "The Prompts API manages the prompts sent to AI models inside a project and exposes the results those models return. Prompts are grouped under topics. Each prompt is run against the project’s AI models, and every run produces a result containing the model’s text, the brands and URLs it mentioned, the sentiment, and an average position.\n\nUsing the SE Visible API, you can:\n\n- list project’s prompts with their visibility metrics, or list topics with aggregated metrics\n\n- create prompts under a topic and delete prompts in bulk\n\n- move prompts to another topic\n\n- change the locations of a prompt selection\n\n- read the details of a single prompt\n\n- list the results for a prompt and read a single result in detail\n\nAll endpoints are relative to the base URL `https://api.seranking.com/v1/se-visible`.\n\nDocumentation: [Prompts](https://seranking.com/api/se-visible/prompts/)" + }, + { + "name": "Sources", + "description": "The Sources API returns the AI-cited domains and URLs analyzed throughout a project. It is part of citation analysis of SE Visible where prompts and AI results tell you what AI engines said, and sources tell you which web pages they pulled the information from. Use it to identify the domains and pages that drive your AI visibility, see how often they appear in AI answers, and track whether they mention your brand or your competitors’ brands.\n\nUsing the SE Visible API, you can:\n\n- list the domains (or subdomains) AI models cite for a project, with appearance counts, coverage, prompt reach, and domain trust, backlink, and traffic data\n\n- drill into the individual URLs behind those domains, with page title, category, HTTP status, traffic, and backlink type\n\n- filter sources by model, location, topic, prompt, sentiment, brand mentions, competitor presence, backlink type, and domain type\n\n- compare a selected metric across two different date ranges to analyze performance changes\n\n- get aggregated source metrics grouped by domain, URL, page type, domain type, AI model, or check date for tables and charts\n\nAll endpoints are relative to the base URL `https://api.seranking.com/v1/se-visible`.\n\nDocumentation: [Sources](https://seranking.com/api/se-visible/sources/)" + }, + { + "name": "Engines", + "description": "The Engines API manages the AI engines a project tracks. An engine belongs to the whole project rather than to a single location: it is tracked in every location and language of the project. Where the project is tracked is managed with [Locations](https://seranking.com/api/se-visible/locations/).\n\nUsing the SE Visible API, you can:\n\n- list the engines a project tracks\n\n- add an engine to a project, or restore one removed earlier together with its collected data\n\n- replace the project’s whole engine set in one request\n\n- remove an engine from a project\n\nEngine types are listed in the [Reference](https://seranking.com/api/se-visible/reference/#ai-models).\n\nAll endpoints are relative to the base URL `https://api.seranking.com/v1/se-visible`.\n\nDocumentation: [Engines](https://seranking.com/api/se-visible/engines/)" + }, + { + "name": "Locations", + "description": "The Locations API manages the locations a project tracks. A location is a country, optionally narrowed down to a city or region inside it. Every location is checked with all of the project’s engines, and prompts are assigned to the locations they are tracked in.\n\nUsing the SE Visible API, you can:\n\n- list a project’s locations together with the plan’s location allowance\n\n- add a country-level or city-level location to a project\n\n- move a location to another country or city\n\n- delete a location from a project\n\nTo track a city or region, look up its `geo_location_id` with the [Geo autocomplete](https://seranking.com/api/se-visible/geo-autocomplete/) endpoints first.\n\nAll endpoints are relative to the base URL `https://api.seranking.com/v1/se-visible`.\n\nDocumentation: [Locations](https://seranking.com/api/se-visible/locations/)" + }, + { + "name": "Geo Autocomplete", + "description": "The Geo autocomplete API looks up the countries, cities and regions a project location can track. Use it to find the `geo_location_id` you need to track a city or region rather than a whole country. These endpoints are not tied to a project.\n\nUsing the SE Visible API, you can:\n\n- list the countries a project location can track\n\n- search cities and regions inside a country by name\n\nTo track a city or region:\n\n- Call [List countries](#list-countries) and find the entry whose `country_code` matches the location you want to track.\n\n- Pass that entry’s `id` as `country_id` to [Search cities and regions](#search-cities-and-regions).\n\n- Send the `id` of the suggestion you pick as `geo_location_id`, together with the same `country_code`, when you [add a location](https://seranking.com/api/se-visible/locations/#add-a-location) or [update a location](https://seranking.com/api/se-visible/locations/#update-a-location).\n\nAll endpoints are relative to the base URL `https://api.seranking.com/v1/se-visible`.\n\nDocumentation: [Geo autocomplete](https://seranking.com/api/se-visible/geo-autocomplete/)" + }, + { + "name": "Subscription", + "description": "The Subscription API returns SE Visible subscription plan and its current usage limits for your organisation. Use it to check your plan, billing period, and how many projects, prompts, and user seats you have left before you create new resources.\n\nUsing the SE Visible API, you can:\n\n- read your organisation’s subscription plan and status\n\n- check the billing period, renewal date, and auto-renew setting\n\n- see the `max`, `used`, and `available` counts for projects, prompts, and user seats\n\nAll endpoints are relative to the base URL `https://api.seranking.com/v1/se-visible`.\n\nDocumentation: [Subscription](https://seranking.com/api/se-visible/subscription/)" + } + ], + "paths": { + "/v1/se-visible/projects": { + "get": { + "operationId": "listProjects", + "tags": [ + "Projects" + ], + "summary": "List projects", + "description": "Returns all projects belonging to the authenticated user’s organisation. Each project includes its domain, tracked brand names, and status. To see the engines a project runs against, use [List project engines](https://seranking.com/api/se-visible/engines/#list-project-engines).\n\nThis endpoint takes no parameters.\n\nIf successful, the server returns a JSON array of project objects.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/projects/#list-projects" + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Project UUID." + }, + "domain": { + "type": "string", + "description": "Target domain URL, including protocol." + }, + "brand_names": { + "type": "array", + "items": { + "type": "string", + "description": "Brand names tracked in the project." + }, + "description": "Brand names tracked in the project." + }, + "created_at": { + "type": "string", + "description": "Project creation timestamp." + }, + "checked_at": { + "type": "string", + "description": "Most recent successful check completion timestamp. `null` if the project has not completed a check yet." + }, + "status": { + "type": "string", + "description": "Project status: `queued`, `processing`, `success`, or `error`." + } + } + } + }, + "example": [ + { + "id": "550e8400-e29b-41d4-a716-446655440000", + "domain": "https://lavazza.com", + "brand_names": [ + "Lavazza" + ], + "created_at": "2023-12-15 10:30:00", + "checked_at": "2023-12-15 11:45:00", + "status": "success" + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/se-visible/projects' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "post": { + "operationId": "createProject", + "tags": [ + "Projects" + ], + "summary": "Create project", + "description": "Creates a new project for tracking brand visibility across AI models.\n\n**Note:**\n\n- A new project is queued and processed asynchronously to generate prompts and collect data. The response returns the project `id` immediately, before processing finishes.\n\n- Poll [Get project details](#get-project-details) and read `check.processed_percent` (0 to 100) and `project.status` (`queued`, `processing`, `success`, `error`) to track progress.\n\nIf successful, the server returns the UUID of the newly created project.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/projects/#create-project" + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Target domain URL to analyze for brand visibility." + }, + "project_name": { + "type": "string", + "nullable": true, + "description": "Name for the project, up to 255 characters. Defaults to `domain` when omitted or `null`." + }, + "country_code": { + "type": "string", + "description": "ISO 3166-1 alpha-2 country code for project context. For example `US`, `UK`, `CA`, `FR`, `DE`. See the [Reference](https://seranking.com/api/se-visible/reference/) for the full list." + }, + "lang_code": { + "type": "string", + "description": "ISO 639-1 language code for project context. For example `en`, `fr`, `de`, `es`. See the [Reference](https://seranking.com/api/se-visible/reference/) for the full list." + }, + "brand_names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Brand names to track, including variations and aliases. At least one entry, each non-empty and up to 2000 characters." + }, + "topics": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Topics to track. 1 to 50 entries, each non-empty and up to 2000 characters." + }, + "competitors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "brand": { + "type": "string", + "description": "Competitor brand name, up to 255 characters. Must be sent together with `domain`." + }, + "domain": { + "type": "string", + "description": "Competitor hostname without protocol, up to 255 characters. Must contain a dot, for example `illy.com`. Must be sent together with `brand`." + } + } + }, + "description": "Competitor brands to track from the start. Up to 50 entries." + }, + "engines": { + "type": "array", + "items": { + "type": "string" + }, + "description": "AI engines to enable for the project: `chatgpt`, `google_gemini`, `perplexity`, `google_ai_mode`, `google_ai_overview`, `copilot`. At least one entry, values must be distinct. When omitted, all available engines are enabled. You can manage engines later with the [project engines endpoints](https://seranking.com/api/se-visible/engines/#list-project-engines). Takes precedence over `models`." + }, + "models": { + "type": "array", + "items": { + "type": "string" + }, + "description": "**Deprecated:** legacy alias for `engines`; use `engines` instead. At least one entry. When both are sent, `engines` wins. When both are omitted, all available engines are enabled." + }, + "tracking": { + "type": "object", + "description": "Tracking cadence for the new project. When omitted, the project is checked `daily` with 1 answer per prompt.", + "properties": { + "frequency": { + "type": "string", + "description": "Check period: `daily` or `weekly`. The number of answers analyzed per prompt follows from it (`daily` → 1, `weekly` → 3) and cannot be set directly. You can change it later with [Update tracking settings](#update-tracking-settings)." + } + } + } + }, + "required": [ + "domain", + "country_code", + "lang_code", + "brand_names", + "topics" + ] + }, + "example": { + "domain": "https://lavazza.com", + "project_name": "Lavazza", + "country_code": "US", + "lang_code": "en", + "brand_names": [ + "Lavazza" + ], + "topics": [ + "Ground Coffee", + "Whole Bean Coffee", + "Espresso Machines", + "Coffee Makers", + "Accessories" + ], + "competitors": [ + { + "brand": "Illy", + "domain": "illy.com" + } + ], + "engines": [ + "chatgpt" + ], + "tracking": { + "frequency": "weekly" + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "UUID of the newly created project." + } + } + }, + "example": { + "id": "550e8400-e29b-41d4-a716-446655440000" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/se-visible/projects' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"domain\": \"https://lavazza.com\",\n \"project_name\": \"Lavazza\",\n \"country_code\": \"US\",\n \"lang_code\": \"en\",\n \"brand_names\": [\"Lavazza\"],\n \"topics\": [\n \"Ground Coffee\",\n \"Whole Bean Coffee\",\n \"Espresso Machines\",\n \"Coffee Makers\",\n \"Accessories\"\n ],\n \"competitors\": [\n { \"brand\": \"Illy\", \"domain\": \"illy.com\" }\n ],\n \"engines\": [\"chatgpt\"],\n \"tracking\": { \"frequency\": \"weekly\" }\n }'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}": { + "get": { + "operationId": "getProjectDetails", + "tags": [ + "Projects" + ], + "summary": "Get project details", + "description": "Returns detailed information about a single project: its metadata, check processing progress, the topics being tracked, available historical check dates, the next scheduled check, the competitor brands attached to it, and its tracking settings.\n\nIf successful, the server returns a project details object.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/projects/#get-project-details" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "project": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Topic ID." + }, + "domain": { + "type": "string", + "description": "Brand domain URL, including protocol. `null` if no domain is set." + }, + "brand_names": { + "type": "array", + "items": { + "type": "string" + } + }, + "created_at": { + "type": "string" + }, + "checked_at": { + "type": "string" + }, + "status": { + "type": "string" + }, + "country_code": { + "type": "string", + "description": "Country code the project was created for (`UK` for Great Britain)." + } + }, + "description": "Project metadata. Same shape as a list item (`id`, `domain`, `brand_names`, `created_at`, `checked_at`, `status`), plus `country_code`." + }, + "country_code": { + "type": "string", + "description": "Country code the project was created for (`UK` for Great Britain)." + }, + "check": { + "type": "object", + "properties": { + "processed_percent": { + "type": "integer", + "description": "Percentage of check processing completion, 0 to 100." + } + } + }, + "topics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Topic ID." + }, + "title": { + "type": "string", + "description": "Topic title." + }, + "is_default": { + "type": "boolean", + "description": "`true` for the project’s default topic." + }, + "prompts_count": { + "type": "integer", + "description": "Number of prompts in this topic." + } + }, + "description": "Topics being tracked in this project." + }, + "description": "Topics being tracked in this project." + }, + "check_dates": { + "type": "array", + "items": { + "type": "string", + "description": "Start dates of successful and currently processing checks, sorted ascending, oldest first (`YYYY-MM-DD`)." + }, + "description": "Start dates of successful and currently processing checks, sorted ascending, oldest first (`YYYY-MM-DD`)." + }, + "next_check_date": { + "type": "string", + "description": "Next scheduled check date. `null` if no check is scheduled." + }, + "tracked_brands": { + "type": "array", + "items": { + "type": "object", + "properties": { + "brand_id": { + "type": "integer", + "description": "Brand ID." + }, + "brand_name": { + "type": "string", + "description": "Brand name." + }, + "domain": { + "type": "string", + "nullable": true, + "description": "Brand domain URL, including protocol. `null` if no domain is set." + } + }, + "description": "Non-primary brands explicitly attached to the project for competitor tracking." + }, + "description": "Non-primary brands explicitly attached to the project for competitor tracking." + }, + "has_unparsed_prompts": { + "type": "boolean", + "description": "Whether the project has prompts that have not yet been parsed." + }, + "tracking": { + "type": "object", + "properties": { + "frequency": { + "type": "string", + "description": "How often the project is checked: `daily` (every day) or `weekly` (once a week, on the weekday the project was created)." + }, + "answers_per_prompt": { + "type": "integer", + "description": "How many AI answers are analyzed per prompt on each run, 1 to 5. Follows from `frequency` (`daily` → 1, `weekly` → 3) and cannot be set directly." + } + }, + "description": "Tracking settings of the project." + } + } + }, + "example": { + "project": { + "id": "550e8400-e29b-41d4-a716-446655440000", + "domain": "https://lavazza.com", + "brand_names": [ + "Lavazza" + ], + "created_at": "2023-12-15 10:30:00", + "checked_at": "2023-12-15 11:45:00", + "status": "success", + "country_code": "US" + }, + "country_code": "US", + "check": { + "processed_percent": 75 + }, + "topics": [ + { + "id": 1, + "title": "Default", + "is_default": true, + "prompts_count": 0 + }, + { + "id": 2, + "title": "Ground Coffee", + "is_default": false, + "prompts_count": 10 + }, + { + "id": 3, + "title": "Whole Bean Coffee", + "is_default": false, + "prompts_count": 8 + } + ], + "check_dates": [ + "2023-12-13", + "2023-12-14", + "2023-12-15" + ], + "next_check_date": "2023-12-22 10:00:00", + "tracked_brands": [ + { + "brand_id": 10, + "brand_name": "Illy", + "domain": "https://illy.com" + }, + { + "brand_id": 11, + "brand_name": "Nespresso", + "domain": null + } + ], + "has_unparsed_prompts": false, + "tracking": { + "frequency": "weekly", + "answers_per_prompt": 3 + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "delete": { + "operationId": "deleteProject", + "tags": [ + "Projects" + ], + "summary": "Delete a project", + "description": "Soft-deletes a project from your organisation. The project is removed from active use but can be restored if needed.\n\nIf successful, the server returns `204 No Content` with an empty body.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/projects/#delete-a-project" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X DELETE 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/settings/tracking": { + "patch": { + "operationId": "updateTrackingSettings", + "tags": [ + "Projects" + ], + "summary": "Update tracking settings", + "description": "Changes how often a project is checked.\n\n**Note:**\n\n- The number of answers analyzed per prompt follows from the period and cannot be set: `daily` analyzes 1 answer per prompt on each run, `weekly` analyzes 3.\n\n- Weekly checks run on the weekday the project was created. You cannot pick a different weekday.\n\nIf successful, the server returns the updated tracking settings.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/projects/#update-tracking-settings" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "frequency": { + "type": "string", + "description": "Check period for the project: `daily` or `weekly`." + } + }, + "required": [ + "frequency" + ] + }, + "example": { + "frequency": "daily" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "frequency": { + "type": "string", + "description": "How often the project is checked: `daily` (every day) or `weekly` (once a week, on the weekday the project was created)." + }, + "answers_per_prompt": { + "type": "integer", + "description": "How many AI answers are analyzed per prompt on each run, 1 to 5. Follows from `frequency` (`daily` → 1, `weekly` → 3)." + } + } + }, + "example": { + "frequency": "daily", + "answers_per_prompt": 1 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X PATCH 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/settings/tracking' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"frequency\": \"daily\"\n }'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/brands": { + "get": { + "operationId": "listTrackedBrands", + "tags": [ + "Brands" + ], + "summary": "List tracked brands", + "description": "Returns all brands tracked in a project, including the primary brand and competitors. The primary brand has `is_primary: true` and is listed first. Each brand includes its domain and aliases.\n\nIf successful, the server returns a JSON array of tracked brands.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/brands/#list-tracked-brands" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Brand ID." + }, + "title": { + "type": "string", + "description": "Brand name." + }, + "domain": { + "type": "string", + "description": "Brand domain URL, including protocol." + }, + "is_primary": { + "type": "boolean", + "description": "`true` for the primary brand, `false` for a competitor." + }, + "aliases": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Alias ID." + }, + "title": { + "type": "string", + "description": "Alias name." + } + }, + "description": "Aliases (sub-brands) linked to this brand." + }, + "description": "Aliases (sub-brands) linked to this brand." + } + } + } + }, + "example": [ + { + "id": 1, + "title": "Nike", + "domain": "https://nike.com", + "is_primary": true, + "aliases": [ + { + "id": 2, + "title": "Nike Running" + }, + { + "id": 3, + "title": "Nike Basketball" + } + ] + }, + { + "id": 4, + "title": "Adidas", + "domain": "https://adidas.com", + "is_primary": false, + "aliases": [ + { + "id": 5, + "title": "Adidas Running" + } + ] + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/brands' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "post": { + "operationId": "createCompetitorBrand", + "tags": [ + "Brands" + ], + "summary": "Create competitor brand", + "description": "Creates a new competitor brand with a domain and optional aliases.\n\nIf successful, the server returns the created brand as a tracked brand object.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/brands/#create-competitor-brand" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Brand title. Maximum 500 characters. Must be unique within the project." + }, + "domain": { + "type": "string", + "description": "Brand domain URL. Maximum 500 characters." + }, + "aliases": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Alias title. Maximum 500 characters. Must be unique and not match any existing brand or alias in the project." + } + } + }, + "description": "Optional aliases for the brand." + } + }, + "required": [ + "title", + "domain" + ] + }, + "example": { + "title": "Adidas", + "domain": "https://adidas.com", + "aliases": [ + { + "title": "Adidas Running" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Brand ID." + }, + "title": { + "type": "string", + "description": "Brand name." + }, + "domain": { + "type": "string", + "description": "Brand domain URL, including protocol." + }, + "is_primary": { + "type": "boolean", + "description": "Always `false` for brands created through this endpoint." + }, + "aliases": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Brand ID." + }, + "title": { + "type": "string", + "description": "Brand name." + } + }, + "description": "Aliases linked to this brand (`id`, `title`)." + }, + "description": "Aliases linked to this brand (`id`, `title`)." + } + } + }, + "example": { + "id": 4, + "title": "Adidas", + "domain": "https://adidas.com", + "is_primary": false, + "aliases": [ + { + "id": 5, + "title": "Adidas Running" + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/brands' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"title\": \"Adidas\",\n \"domain\": \"https://adidas.com\",\n \"aliases\": [\n { \"title\": \"Adidas Running\" }\n ]\n }'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/brands/mentioned": { + "get": { + "operationId": "listMentionedBrands", + "tags": [ + "Brands" + ], + "summary": "List mentioned brands", + "description": "Returns all brands detected in the project’s AI check results. These are distinct from the brands you manually track, and are useful for discovering competitors to add. Without query parameters, the full list is returned.\n\n- Parameters are applied in this order: `search_query`, then `offset`, then `limit`.\n\n- The response is a flat array with no pagination envelope. The response to a request without parameters is unchanged.\n\n- An invalid `search_query`, `limit`, or `offset` returns `422`.\n\nIf successful, the server returns a JSON array of mentioned brands.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/brands/#list-mentioned-brands" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "search_query", + "in": "query", + "description": "Case-insensitive substring match on the brand title. Maximum 255 characters.", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of brands to return. Minimum `1`. Omit to return the full list.", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "Number of brands to skip. Minimum `0`.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "brand_id": { + "type": "integer", + "description": "Brand ID." + }, + "brand": { + "type": "string", + "description": "Brand name." + } + } + } + }, + "example": [ + { + "brand_id": 10, + "brand": "Nike" + }, + { + "brand_id": 11, + "brand": "Adidas" + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/brands/mentioned?search_query=nike&limit=100&offset=0' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/brands/metrics": { + "get": { + "operationId": "getAggregatedBrandMetrics", + "tags": [ + "Brands" + ], + "summary": "Get aggregated brand metrics", + "description": "Returns aggregated brand metrics for dynamic table rendering. You choose how the data is grouped (`dimensions[]`) and which metrics to return (`metrics[]`).\n\n**Note:**\n\n- You pass 1 to 3 dimensions. The **last** dimension is always the pivot (it becomes columns); all preceding dimensions define the row grouping.\n\n- Every metric value is an object, not a plain number: `{ \"values\": [v0] }` in single-period mode. Passing `date_range[1]` enables compare mode, which adds the second period and a `delta` object: `{ \"values\": [v0, v1], \"delta\": { \"absolute\": 12, \"percentage\": 40 } }`. Deltas are returned only in compare mode.\n\n- With **1 dimension**, each row holds the dimension key plus one key per metric. With **2 or 3 dimensions**, `meta.columns.dynamic` lists the pivot IDs, and each row gains one nested object per pivot ID — keyed by that ID — mapping each metric name to its value object. A pivot with no data for a metric is `null`.\n\n- `date_range[0]` is the base period. Add `date_range[1]` to compare against a second period.\n\n- `aio_overlap` and `aio_presence` are brand-agnostic: they are aggregated over all prompt results in the group, not only the responses that mention a tracked brand, so they stay constant across the brand pivot. Sorting by these metrics is not supported.\n\nIf successful, the server returns a metrics object with pagination, column layout, and the data rows.\n\n**Note:** what each metric value means. “Answers” are the answers in the row that name at least one brand.\n\n- `visibility_score`: share of the answers that mention the brand, weighted by its place among the brands an answer names (first place counts in full, later places less). `0`–`100`.\n\n- `avg_position`: the brand’s average place among the brands an answer names (`1` = first), over the answers that mention it, one decimal. `null` when the brand is not mentioned.\n\n- `sentiment_score`: (positive − negative mentions) / all the brand’s mentions × 100. `-100`–`100`; `null` when the brand is not mentioned.\n\n- `total_mentions`: answers that mention the brand, each answer counted once.\n\n- `rank`: the brand’s place by `visibility_score`, then `avg_position`. `null` when the brand is not mentioned.\n\n- `total_response_count`: the number of answers, the same for every brand in the row.\n\n- `positive_count`, `neutral_count`, `negative_count`: the brand’s mentions with that sentiment. One answer can hold several.\n\n- `positive_pct`, `neutral_pct`, `negative_pct`: that sentiment’s share of the brand’s mentions, two decimals, `0`–`100`. `null` when the brand is not mentioned.\n\n- `total_all_mentions`: `total_mentions` summed over every brand the answers name, tracked or not.\n\n- `unique_brands_count`: distinct brands the answers name, tracked or not.\n\n- `share_of_voice`: `total_mentions` / `total_all_mentions` × 100. `0`–`100`.\n\n- `aio_overlap` and `aio_presence`: `0`–`100`.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/brands/#get-aggregated-brand-metrics" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "dimensions[]", + "in": "query", + "required": true, + "description": "1 to 3 dimensions, no duplicates. Last is the pivot. Values: `topic_id`, `brand_id`, `prompt_id`, `model_type`, `location_id`, `check_id`, `check_date`, `check_week`, `check_month`. `check_week` and `check_month` group checks by calendar week (starting on `week_start`) or month, labelled by the period start (`YYYY-MM-DD`); neither can be combined with another date dimension.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "metrics[]", + "in": "query", + "required": true, + "description": "1 to 15 metrics per request. Values: `visibility_score`, `avg_position`, `sentiment_score`, `total_mentions`, `rank`, `total_response_count`, `positive_count`, `neutral_count`, `negative_count`, `positive_pct`, `neutral_pct`, `negative_pct`, `total_all_mentions`, `unique_brands_count`, `share_of_voice`, `aio_overlap`, `aio_presence`.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "date_range", + "in": "query", + "required": true, + "description": "Base period at index `0`, optional compare period at index `1`. Each has `from` and `to` in `YYYY-MM-DD`. At least one period, at most two. See [Date ranges and compare mode](https://seranking.com/api/se-visible/getting-started/#date-ranges-and-compare-mode).", + "schema": { + "type": "array", + "items": { + "type": "object" + } + } + }, + { + "name": "week_start", + "in": "query", + "description": "First weekday of the `check_week` buckets, between 0 and 6: `0` (Sunday) through `6` (Saturday). Only used with `check_week`.", + "schema": { + "type": "integer", + "nullable": true, + "default": 1 + } + }, + { + "name": "model_types", + "in": "query", + "description": "Filter by AI model types (e.g. `chatgpt`).", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "country_codes", + "in": "query", + "description": "**Deprecated** — use `location_ids`. Filter by ISO 3166-1 alpha-2 country codes. It keeps working for now, but it cannot tell two locations in one country apart.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "location_ids", + "in": "query", + "description": "Filter by the project’s tracked locations. Values are location IDs from [List project locations](https://seranking.com/api/se-visible/locations/#list-project-locations); an ID from another project or of a deleted location returns `422`. Multiple values combine as OR. Sent together with `country_codes`, only locations matching both are read.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "topic_ids", + "in": "query", + "description": "Filter by topic IDs.", + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + { + "name": "sentiments", + "in": "query", + "description": "Filter by sentiment: `positive`, `neutral`, `negative`.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "exclude_branded", + "in": "query", + "description": "When `true`, every number in the response is computed from non-branded prompts only. A prompt whose branded status is not detected yet counts as non-branded. Off when omitted.", + "schema": { + "type": "boolean" + } + }, + { + "name": "prompt_ids", + "in": "query", + "description": "Filter by prompt IDs.", + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + { + "name": "req_num", + "in": "query", + "description": "Filter by request number within a check.", + "schema": { + "type": "integer" + } + }, + { + "name": "tracked_brand_ids", + "in": "query", + "description": "Filter by tracked brand IDs.", + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + { + "name": "brand_ids", + "in": "query", + "description": "Filter returned metric rows by brand IDs. Metrics and rank are computed before this output filter is applied. When `tracked_brand_ids` is omitted and `brand_id` is the pivot dimension, these IDs also supply the pivot columns, in the order requested.", + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + { + "name": "search_query", + "in": "query", + "description": "Search query for filtering results.", + "schema": { + "type": "string" + } + }, + { + "name": "sort_field", + "in": "query", + "description": "Metric name or pivot expression `metric_name[dimension=value]` (e.g. `visibility_score[brand_id=12]`).", + "schema": { + "type": "string", + "default": "First metric, descending" + } + }, + { + "name": "sort_order", + "in": "query", + "description": "Sort direction: `asc` or `desc`.", + "schema": { + "type": "string", + "default": "desc" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum rows to return. `0` returns every row and makes `offset` a no-op, but is accepted only when the first dimension is date-based (`check_id`, `check_date`, `check_week`, or `check_month`). Minimum `0`.", + "schema": { + "type": "integer", + "default": 50 + } + }, + { + "name": "offset", + "in": "query", + "description": "Number of rows to skip. Minimum `0`.", + "schema": { + "type": "integer", + "default": 0 + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total rows for the primary dimension." + } + } + }, + "columns": { + "type": "object", + "properties": { + "primary": { + "type": "string", + "description": "First grouping dimension (rows): `topic_id`, `brand_id`, `prompt_id`, `model_type`, `location_id`, `check_id`, `check_date`, `check_week`, or `check_month`." + }, + "dynamic": { + "type": "array", + "items": { + "type": "integer", + "description": "Pivot dimension IDs that become column keys. Empty in 1D mode." + }, + "description": "Pivot dimension IDs that become column keys. Empty in 1D mode." + } + } + } + }, + "description": "Pagination and column layout." + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "8": { + "type": "object", + "properties": { + "visibility_score": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + "nullable": true + } + } + }, + "12": { + "type": "object", + "properties": { + "visibility_score": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer" + } + } + } + } + } + }, + "15": { + "type": "object", + "properties": { + "visibility_score": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer" + } + } + } + } + } + }, + "topic_id": { + "type": "integer" + }, + "visibility_score": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "brand_id": { + "type": "integer" + }, + "total_mentions": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer" + } + }, + "delta": { + "type": "object", + "properties": { + "absolute": { + "type": "integer" + }, + "percentage": { + "type": "number" + } + } + } + } + } + }, + "description": "Rows keyed by the grouping dimension IDs. Each metric value is an object with `values` and, in compare mode, `delta`. In 2D and 3D mode, each row also holds one nested object per pivot ID, mapping metric names to their value objects." + }, + "description": "Rows keyed by the grouping dimension IDs. Each metric value is an object with `values` and, in compare mode, `delta`. In 2D and 3D mode, each row also holds one nested object per pivot ID, mapping metric names to their value objects." + } + } + }, + "examples": { + "1dSingleDimension": { + "summary": "1D (single dimension)", + "value": { + "meta": { + "pagination": { + "total": 145 + }, + "columns": { + "primary": "topic_id", + "dynamic": [] + } + }, + "data": [ + { + "topic_id": 5, + "visibility_score": { + "values": [ + 95 + ] + } + }, + { + "topic_id": 7, + "visibility_score": { + "values": [ + 41 + ] + } + } + ] + } + }, + "1dInCompareModeTwoPeriods": { + "summary": "1D in compare mode (two periods)", + "value": { + "meta": { + "pagination": { + "total": 145 + }, + "columns": { + "primary": "brand_id", + "dynamic": [] + } + }, + "data": [ + { + "brand_id": 12, + "total_mentions": { + "values": [ + 42, + 30 + ], + "delta": { + "absolute": 12, + "percentage": 40 + } + } + }, + { + "brand_id": 15, + "total_mentions": { + "values": [ + 27, + 31 + ], + "delta": { + "absolute": -4, + "percentage": -12.9 + } + } + } + ] + } + }, + "2dSecondDimensionPivoted": { + "summary": "2D (second dimension pivoted)", + "value": { + "meta": { + "pagination": { + "total": 145 + }, + "columns": { + "primary": "topic_id", + "dynamic": [ + 12, + 15, + 8 + ] + } + }, + "data": [ + { + "8": { + "visibility_score": { + "values": [ + 15 + ] + } + }, + "12": { + "visibility_score": { + "values": [ + 95 + ] + } + }, + "15": { + "visibility_score": { + "values": [ + 82 + ] + } + }, + "topic_id": 5 + }, + { + "8": { + "visibility_score": null + }, + "12": { + "visibility_score": { + "values": [ + 41 + ] + } + }, + "15": { + "visibility_score": { + "values": [ + 98 + ] + } + }, + "topic_id": 7 + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET --globoff 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/brands/metrics?dimensions[]=topic_id&dimensions[]=brand_id&metrics[]=visibility_score&date_range[0][from]=2026-05-01&date_range[0][to]=2026-05-31' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/brands/{brand_id}": { + "patch": { + "operationId": "updateBrand", + "tags": [ + "Brands" + ], + "summary": "Update brand", + "description": "Updates a brand’s domain and/or syncs its aliases. When `aliases` is provided, it replaces all existing aliases (new ones are added, existing kept, absent ones removed). Pass an empty array to clear all aliases. Both body fields are optional.\n\nIf successful, the server returns the updated brand as a tracked brand object (`id`, `title`, `domain`, `is_primary`, `aliases`).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/brands/#update-brand" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "brand_id", + "in": "path", + "required": true, + "description": "Brand ID to update.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "New domain URL. Maximum 500 characters." + }, + "aliases": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Alias title. Maximum 500 characters. Must not match any other brand or alias in the project." + } + } + }, + "description": "Aliases to sync (replaces existing). Pass `[]` to clear all aliases." + } + } + }, + "example": { + "domain": "https://new-domain.com", + "aliases": [ + { + "title": "Brand Alias 1" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "is_primary": { + "type": "boolean" + }, + "aliases": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + } + } + } + } + } + }, + "example": { + "id": 4, + "title": "Adidas", + "domain": "https://new-domain.com", + "is_primary": false, + "aliases": [ + { + "id": 9, + "title": "Brand Alias 1" + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X PATCH 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/brands/4' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"domain\": \"https://new-domain.com\",\n \"aliases\": [\n { \"title\": \"Brand Alias 1\" }\n ]\n }'" + } + ] + }, + "delete": { + "operationId": "deleteBrand", + "tags": [ + "Brands" + ], + "summary": "Delete brand", + "description": "Deletes a brand and all its aliases.\n\n**Note:**\n\n- The primary brand cannot be deleted. Attempting to do so returns `422` with the message “Cannot delete the primary brand”.\n\nIf successful, the server returns `204 No Content` with an empty body.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/brands/#delete-brand" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "brand_id", + "in": "path", + "required": true, + "description": "Brand ID to delete.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X DELETE 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/brands/4' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/brands/{brand_id}/aliases": { + "post": { + "operationId": "addAliasesToBrand", + "tags": [ + "Brands" + ], + "summary": "Add aliases to brand", + "description": "Adds one or more aliases to an existing brand. Works for both the primary brand and competitors.\n\nThe body is a JSON array of alias objects.\n\nIf successful, the server returns the brand as a tracked brand object with the updated `aliases` array (`id`, `title`, `domain`, `is_primary`, `aliases`).", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/brands/#add-aliases-to-brand" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "brand_id", + "in": "path", + "required": true, + "description": "Brand ID to add aliases to.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Alias title. Maximum 500 characters. Must be unique and not match any existing brand or alias in the project." + } + }, + "required": [ + "title" + ] + } + }, + "example": [ + { + "title": "New Alias 1" + } + ] + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "is_primary": { + "type": "boolean" + }, + "aliases": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + } + } + } + } + } + }, + "example": { + "id": 4, + "title": "Adidas", + "domain": "https://adidas.com", + "is_primary": false, + "aliases": [ + { + "id": 5, + "title": "Adidas Running" + }, + { + "id": 12, + "title": "New Alias 1" + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/brands/4/aliases' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '[\n { \"title\": \"New Alias 1\" }\n ]'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/topics": { + "post": { + "operationId": "createTopics", + "tags": [ + "Topics" + ], + "summary": "Create topics", + "description": "Creates one or more topics in a project. Pass the titles you want to add and the server creates a topic for each one, returning the created topics.\n\nIf successful, the server returns a JSON array of the created topics.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/topics/#create-topics" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "titles": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Topic titles to create. At least one title, each non-empty and maximum 255 characters." + } + }, + "required": [ + "titles" + ] + }, + "example": { + "titles": [ + "Artificial Intelligence", + "Machine Learning" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Topic ID." + }, + "title": { + "type": "string", + "description": "Topic title." + }, + "created_at": { + "type": "string", + "description": "When the topic was created." + }, + "updated_at": { + "type": "string", + "description": "When the topic was last updated." + } + } + } + }, + "example": [ + { + "id": 123, + "title": "Artificial Intelligence", + "created_at": "2023-12-15T10:30:00.000000Z", + "updated_at": "2023-12-15T10:30:00.000000Z" + }, + { + "id": 124, + "title": "Machine Learning", + "created_at": "2023-12-15T10:30:00.000000Z", + "updated_at": "2023-12-15T10:30:00.000000Z" + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/topics' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"titles\": [\"Artificial Intelligence\", \"Machine Learning\"]\n }'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/topics/{topic_id}": { + "put": { + "operationId": "updateTopicTitle", + "tags": [ + "Topics" + ], + "summary": "Update a topic title", + "description": "Updates the title of a topic in a project.\n\n**Note:**\n\n- The default topic cannot be updated.\n\nIf successful, the server returns the updated topic.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/topics/#update-a-topic-title" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "topic_id", + "in": "path", + "required": true, + "description": "Topic ID to update.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "New title for the topic. Minimum 1 character, maximum 255 characters." + } + }, + "required": [ + "title" + ] + }, + "example": { + "title": "Artificial Intelligence" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Topic ID." + }, + "title": { + "type": "string", + "description": "Topic title." + }, + "is_default": { + "nullable": true, + "description": "`true` only for the project’s default topic, `null` for every other topic. Returned only for a topic that already existed.", + "type": "boolean" + }, + "created_at": { + "type": "string", + "description": "When the topic was created." + }, + "updated_at": { + "type": "string", + "description": "When the topic was last updated." + } + } + }, + "example": { + "id": 123, + "title": "Artificial Intelligence", + "is_default": null, + "created_at": "2023-12-15T10:30:00.000000Z", + "updated_at": "2023-12-15T11:05:00.000000Z" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X PUT 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/topics/123' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"title\": \"Artificial Intelligence\"\n }'" + } + ] + }, + "delete": { + "operationId": "deleteTopic", + "tags": [ + "Topics" + ], + "summary": "Delete a topic", + "description": "Deletes a topic and its associated prompts from a project.\n\nIf successful, the server returns `204 No Content` with an empty body.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/topics/#delete-a-topic" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "topic_id", + "in": "path", + "required": true, + "description": "Topic ID to delete.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X DELETE 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/topics/123' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/prompts": { + "get": { + "operationId": "listPromptsOrTopics", + "tags": [ + "Prompts" + ], + "summary": "List prompts or topics", + "description": "Returns a paginated list of the project’s prompts with their visibility metrics, or a list of topics with metrics aggregated across their prompts. The `group_mode` parameter controls which of the two shapes the response takes.\n\n**Note:**\n\n- `group_mode=prompt` (the default) returns individual prompts, one item per prompt.\n\n- `group_mode=topic` returns topics instead, with metrics aggregated across all prompts in each topic.\n\n- The response schema differs between the two modes. See both response examples below.\n\n**Note:** the `*_delta` sort variants sort by the absolute change between periods. They require `date_range[1]` to be present and to contain checks, otherwise the request is rejected with `422`. `id` sorts by prompt (or topic) ID. `rank` is accepted but currently falls back to the default `visibility` ordering. A prompt or topic without a `source_presence` or `organic_overlap` value in the period stays last in either direction, also under their `_delta` variants. `citations_count` and `citations_share` sort by the answers that cited the `cited_source` and require it, otherwise the request is rejected with `422`. `avg_position` and `avg_position_delta` run inverted: `desc` puts the best position, or the biggest improvement, first.\n\n**Note:** with `columns`, the response keeps the same shape but skips the work behind the columns you do not list: `competitors` (`tops` comes back empty), `organic_overlap` and `source_presence` (their metrics come back with a `null` value, unless you sort by that metric or its change). The `prompt` column and the base metrics (`mentions`, `avg_position`, `sentiments`, `visibility`, `sov`) are always computed. An unknown column ID is rejected with `422`.\n\nIf successful, the server returns a paginated object. The shape of each item in `items` depends on `group_mode`.\n\nEach visibility metric (`mentions`, `avg_position`, `sentiments`, `visibility`, `sov`, `organic_overlap`, `source_presence`) is returned as a `MetricValue` object rather than a plain number.\n\n**Note:** value ranges — `sentiments` is `-100`–`100`; `visibility`, `sov`, `organic_overlap`, and `source_presence` are `0`–`100`; `mentions` is a raw count; `avg_position` is a float.\n\n**Example — group_mode=prompt (default)**\n\nOne row per prompt. Row-specific fields: `id`, `topic_id`, `prompt`, `is_parsed`.\n\n**Example — group_mode=topic**\n\nOne row per topic, metrics aggregated across the topic’s prompts. Row-specific fields: `id`, `title`, `prompts_count`, `branded_prompts_count` (replacing `topic_id`, `prompt`, `is_parsed`). The metric objects are identical to prompt mode.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/prompts/#list-prompts-or-topics" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "group_mode", + "in": "query", + "description": "What to list: `prompt` for individual prompts, `topic` for topics with aggregated metrics.", + "schema": { + "type": "string", + "default": "prompt" + } + }, + { + "name": "date_range", + "in": "query", + "required": true, + "description": "1 to 2 entries: base period at index `0`, optional compare period at index `1`. Each has `from` and `to` in `YYYY-MM-DD`. See [Date ranges and compare mode](https://seranking.com/api/se-visible/getting-started/#date-ranges-and-compare-mode).", + "schema": { + "type": "array", + "items": { + "type": "object" + } + } + }, + { + "name": "model_types", + "in": "query", + "description": "Filter by AI model types (e.g. `chatgpt`). See the [Reference](https://seranking.com/api/se-visible/reference/) for the full list.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "country_codes", + "in": "query", + "description": "**Deprecated — use `location_ids`.** Filter by ISO 3166-1 alpha-2 country codes, resolved to the project’s live locations in those countries. It still works for now; migrate to `location_ids` before it is withdrawn. See the [Reference](https://seranking.com/api/se-visible/reference/) for the full list.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "location_ids", + "in": "query", + "description": "Filter by the project’s tracked locations, using location IDs from [List project locations](https://seranking.com/api/se-visible/locations/#list-project-locations). Multiple values combine as OR. An ID of another project or of a deleted location is rejected with `422`. Combined with `country_codes`, only locations matching both are read.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "topic_ids", + "in": "query", + "description": "Filter by topic IDs.", + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + { + "name": "search_query", + "in": "query", + "description": "Filter prompts by a search string.", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of items to return. Minimum 0; `0` returns an empty page.", + "schema": { + "type": "integer", + "default": 1000 + } + }, + { + "name": "offset", + "in": "query", + "description": "Number of items to skip from the start of the list. Minimum 0.", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "sort_field", + "in": "query", + "description": "Field to sort by: `id`, `visibility`, `avg_position`, `mentions`, `sentiments`, `sov`, `rank`, `visibility_delta`, `avg_position_delta`, `sentiments_delta`, `sov_delta`, `citations_count`, `citations_share`, `source_presence`, `source_presence_delta`, `organic_overlap`, `organic_overlap_delta`. See the note below.", + "schema": { + "type": "string", + "default": "visibility" + } + }, + { + "name": "sort_order", + "in": "query", + "description": "Sort direction: `asc` or `desc`.", + "schema": { + "type": "string", + "default": "asc" + } + }, + { + "name": "sentiments", + "in": "query", + "description": "Filter by sentiment: `positive`, `neutral`, `negative`.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "tracked_brand_ids", + "in": "query", + "description": "Filter by tracked brand IDs.", + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + { + "name": "exclude_branded", + "in": "query", + "description": "When `true`, every number in the response is computed from non-branded prompts only, and branded prompts drop out of the list. A prompt not classified yet counts as non-branded. Off when omitted.", + "schema": { + "type": "boolean" + } + }, + { + "name": "search_intents", + "in": "query", + "description": "Filter by search intent: `I` (informational), `L` (local), `N` (navigational), `C` (commercial), `T` (transactional). A prompt is returned when it carries any of the selected intents; prompts not classified yet are not returned while this filter is applied.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "funnel_stages", + "in": "query", + "description": "Filter by funnel stage: `awareness`, `consideration`, `decision`, `none`. A prompt is returned when it carries any of the selected stages. `none` matches only prompts explicitly marked as outside the funnel; prompts not classified yet are not returned while this filter is applied.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "lang_codes", + "in": "query", + "description": "Filter by the prompt’s language (ISO 639-1, e.g. `en`, `de`). See the [Reference](https://seranking.com/api/se-visible/reference/) for the full list. Prompts whose language is not detected yet are not returned while this filter is applied.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "columns", + "in": "query", + "description": "Columns to compute, for both `group_mode` values: `prompt`, `topic`, `visibility`, `sov`, `avg_position`, `competitors`, `sentiments`, `locations`, `source_presence`, `intent`, `funnel_stage`, `is_branded`, `organic_overlap`, `lang_code`. When omitted, every metric is computed. See the note below.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "cited_source[type]", + "in": "query", + "description": "Keep only the prompts whose answers cited one source row from [Get project sources](https://seranking.com/api/se-visible/sources/#get-project-sources) in the base period (`date_range[1]` is ignored for it): `url`, `domain`, or `subdomain`. `url` needs `cited_source[url_id]`; `domain` and `subdomain` need `cited_source[domain_id]`. Prompt list only: with `group_mode=topic` the request is rejected with `422`.", + "schema": { + "type": "string" + } + }, + { + "name": "cited_source[url_id]", + "in": "query", + "description": "The `url_id` of the cited URL row. Minimum 1. Required with `cited_source[type]=url`, rejected otherwise.", + "schema": { + "type": "integer" + } + }, + { + "name": "cited_source[domain_id]", + "in": "query", + "description": "Minimum 1. Required with `cited_source[type]=domain` or `subdomain`, rejected with `url`. For `subdomain` it is the row’s own `domain_id`; for `domain` it is the `domain_id` the domain row returns.", + "schema": { + "type": "integer" + } + }, + { + "name": "metrics", + "in": "query", + "description": "Facts about the `cited_source` to add to each prompt as extra fields: `citations_count`, `citations_share`, `first_seen`, `last_seen`. Requires `cited_source`, otherwise the request is rejected with `422`.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "prompt_ids", + "in": "query", + "description": "Compute the metrics from the answers of these prompts only; the listed rows are not narrowed. Ignored when `search_query`, `exclude_branded`, `funnel_stages`, `search_intents`, or `lang_codes` is set.", + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + { + "name": "req_num", + "in": "query", + "description": "Compute the metrics from the answers with this `request_number` only; the listed rows are not narrowed. Ignored when `search_query`, `exclude_branded`, `funnel_stages`, `search_intents`, or `lang_codes` is set.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of prompts available." + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Prompt ID." + }, + "topic_id": { + "type": "integer", + "description": "ID of the topic the prompt belongs to." + }, + "prompt": { + "type": "string", + "description": "Prompt text." + }, + "locations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Tracked location ID." + }, + "country_code": { + "type": "string", + "description": "Country code of the location (e.g. `US`)." + }, + "geo_location_id": { + "nullable": true, + "description": "Geo location ID of the city or region. `null` for country-level tracking.", + "type": "integer" + } + }, + "description": "Locations the prompt is currently tracked in, in creation order. Period and `model_types` filters do not narrow it." + }, + "description": "Locations the prompt is currently tracked in, in creation order. Period and `model_types` filters do not narrow it." + }, + "units": { + "type": "integer", + "description": "Number of current locations; equals the length of `locations`." + }, + "mentions": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer", + "description": "Metric values. One element per requested period: one value with no comparison, two values (base, compared) when a comparison period is supplied. Elements may be `null` when a period has no data." + }, + "description": "Metric values. One element per requested period: one value with no comparison, two values (base, compared) when a comparison period is supplied. Elements may be `null` when a period has no data." + }, + "delta": { + "type": "object", + "properties": { + "absolute": { + "type": "integer", + "description": "Absolute change. `null` when it cannot be computed." + }, + "percentage": { + "type": "number", + "description": "Percentage change. `null` when it cannot be computed." + } + }, + "description": "Change between periods. Present only when a comparison period is requested." + } + }, + "description": "Number of the prompt’s answers that mention the primary brand. See [MetricValue](#metricvalue-object)." + }, + "avg_position": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "number", + "description": "Metric values. One element per requested period: one value with no comparison, two values (base, compared) when a comparison period is supplied. Elements may be `null` when a period has no data." + }, + "description": "Metric values. One element per requested period: one value with no comparison, two values (base, compared) when a comparison period is supplied. Elements may be `null` when a period has no data." + }, + "delta": { + "type": "object", + "properties": { + "absolute": { + "type": "number", + "description": "Absolute change. `null` when it cannot be computed." + }, + "percentage": { + "type": "number", + "description": "Percentage change. `null` when it cannot be computed." + } + }, + "description": "Change between periods. Present only when a comparison period is requested." + } + }, + "description": "Primary brand’s average place among the brands an answer names (1 = first, lower is better), over the answers that mention it; `0` when none does. See [MetricValue](#metricvalue-object)." + }, + "sentiments": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer", + "description": "Metric values. One element per requested period: one value with no comparison, two values (base, compared) when a comparison period is supplied. Elements may be `null` when a period has no data." + }, + "description": "Metric values. One element per requested period: one value with no comparison, two values (base, compared) when a comparison period is supplied. Elements may be `null` when a period has no data." + }, + "delta": { + "type": "object", + "properties": { + "absolute": { + "type": "integer", + "description": "Absolute change. `null` when it cannot be computed." + }, + "percentage": { + "type": "number", + "description": "Percentage change. `null` when it cannot be computed." + } + }, + "description": "Change between periods. Present only when a comparison period is requested." + } + }, + "description": "Primary brand’s sentiment score, −100–100: (positive − negative mentions) / all its mentions × 100. See [MetricValue](#metricvalue-object)." + }, + "visibility": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer", + "description": "Metric values. One element per requested period: one value with no comparison, two values (base, compared) when a comparison period is supplied. Elements may be `null` when a period has no data." + }, + "description": "Metric values. One element per requested period: one value with no comparison, two values (base, compared) when a comparison period is supplied. Elements may be `null` when a period has no data." + }, + "delta": { + "type": "object", + "properties": { + "absolute": { + "type": "number", + "description": "Absolute change. `null` when it cannot be computed." + }, + "percentage": { + "type": "number", + "description": "Percentage change. `null` when it cannot be computed." + } + }, + "description": "Change between periods. Present only when a comparison period is requested." + } + }, + "description": "Primary brand’s visibility score, 0–100: the share of answers that mention it, weighted by its place (first place counts in full, later places less). See [MetricValue](#metricvalue-object)." + }, + "sov": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer", + "description": "Metric values. One element per requested period: one value with no comparison, two values (base, compared) when a comparison period is supplied. Elements may be `null` when a period has no data." + }, + "description": "Metric values. One element per requested period: one value with no comparison, two values (base, compared) when a comparison period is supplied. Elements may be `null` when a period has no data." + }, + "delta": { + "type": "object", + "properties": { + "absolute": { + "type": "number", + "description": "Absolute change. `null` when it cannot be computed." + }, + "percentage": { + "type": "number", + "description": "Percentage change. `null` when it cannot be computed." + } + }, + "description": "Change between periods. Present only when a comparison period is requested." + } + }, + "description": "Primary brand’s share of voice, 0–100: answers mentioning it as a percentage of all brands’ answer mentions. See [MetricValue](#metricvalue-object)." + }, + "organic_overlap": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer", + "nullable": true, + "description": "Metric values. One element per requested period: one value with no comparison, two values (base, compared) when a comparison period is supplied. Elements may be `null` when a period has no data." + }, + "description": "Metric values. One element per requested period: one value with no comparison, two values (base, compared) when a comparison period is supplied. Elements may be `null` when a period has no data." + }, + "delta": { + "type": "object", + "properties": { + "absolute": { + "type": "integer", + "description": "Absolute change. `null` when it cannot be computed." + }, + "percentage": { + "type": "number", + "description": "Percentage change. `null` when it cannot be computed." + } + }, + "description": "Change between periods. Present only when a comparison period is requested." + } + }, + "description": "Share of the organic top-20 links that also appear in the AI Overview block, as a percentage. Averaged only over queries where the AI Overview was shown; `values` is `null` when the block was never present. See [MetricValue](#metricvalue-object)." + }, + "source_presence": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer", + "description": "Metric values. One element per requested period: one value with no comparison, two values (base, compared) when a comparison period is supplied. Elements may be `null` when a period has no data." + }, + "description": "Metric values. One element per requested period: one value with no comparison, two values (base, compared) when a comparison period is supplied. Elements may be `null` when a period has no data." + }, + "delta": { + "type": "object", + "properties": { + "absolute": { + "type": "integer", + "description": "Absolute change. `null` when it cannot be computed." + }, + "percentage": { + "type": "number", + "description": "Percentage change. `null` when it cannot be computed." + } + }, + "description": "Change between periods. Present only when a comparison period is requested." + } + }, + "description": "Share of the prompt’s answers in the period that cite at least one source page, as a whole percentage. Pooled over every engine and location the filters leave. `values` is `null` when the period holds no answers, `0` when answers arrived but none cited a source. See [MetricValue](#metricvalue-object)." + }, + "tops": { + "type": "array", + "items": { + "type": "object", + "properties": { + "brand_id": { + "type": "integer" + }, + "brand_name": { + "type": "string" + } + }, + "description": "Brands with the best average position in the prompt’s answers, best first (`brand_id`, `brand_name`)." + }, + "description": "Brands with the best average position in the prompt’s answers, best first (`brand_id`, `brand_name`)." + }, + "is_parsed": { + "type": "boolean", + "description": "Whether the prompt has been parsed." + }, + "search_intent": { + "type": "array", + "items": { + "type": "string", + "description": "Search intent codes (e.g. `[\"I\"]`). `null` when not applicable." + }, + "description": "Search intent codes (e.g. `[\"I\"]`). `null` when not applicable." + }, + "funnel_stage": { + "type": "array", + "items": { + "type": "string", + "description": "Funnel stages the prompt belongs to: `awareness`, `consideration`, `decision`, `none` (outside the funnel). `null` when the prompt is not classified yet, and also when it is stored with an empty stage set (the prompt details endpoint returns `[\"none\"]` for it)." + }, + "description": "Funnel stages the prompt belongs to: `awareness`, `consideration`, `decision`, `none` (outside the funnel). `null` when the prompt is not classified yet, and also when it is stored with an empty stage set (the prompt details endpoint returns `[\"none\"]` for it)." + }, + "lang_code": { + "description": "ISO 639-1 code of the language the prompt is written in. `null` when the language is not detected yet." + }, + "is_branded": { + "type": "boolean", + "description": "Whether the prompt text names a brand (yours, a tracked competitor, or any other). `null` when the prompt is not classified yet." + }, + "citations_count": { + "type": "integer", + "description": "Answers of the prompt that cited the `cited_source`. Present only when `metrics[]=citations_count` is requested with a `cited_source`." + }, + "citations_share": { + "type": "number", + "description": "`citations_count` as a percentage of the prompt’s answers in the period that name one or more brands, one decimal. Present only when `metrics[]=citations_share` is requested with a `cited_source`." + }, + "first_seen": { + "type": "string", + "description": "First answer citing the `cited_source` (`YYYY-MM-DD HH:MM:SS`). Present only when `metrics[]=first_seen` is requested with a `cited_source`." + }, + "last_seen": { + "type": "string", + "description": "Last answer citing the `cited_source` (`YYYY-MM-DD HH:MM:SS`). Present only when `metrics[]=last_seen` is requested with a `cited_source`." + }, + "title": { + "type": "string", + "description": "Topic title." + }, + "prompts_count": { + "type": "integer", + "description": "Number of the topic’s prompts that the prompt-level filters leave." + }, + "branded_prompts_count": { + "type": "integer", + "description": "Number of the topic’s prompts whose text names a brand. Subtract it from `prompts_count` to get the non-branded population that `exclude_branded` keeps." + } + }, + "description": "Array of prompts." + }, + "description": "Array of prompts." + } + } + }, + "examples": { + "example1": { + "summary": "Example 1", + "value": { + "total": 194, + "items": [ + { + "id": 477111, + "topic_id": 112593, + "prompt": "What are the best document automation software solutions for small businesses?", + "locations": [ + { + "id": "9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59", + "country_code": "US", + "geo_location_id": null + } + ], + "units": 1, + "mentions": { + "values": [ + 187, + 87 + ], + "delta": { + "absolute": 100, + "percentage": 114.9 + } + }, + "avg_position": { + "values": [ + 1.4, + 1.7 + ], + "delta": { + "absolute": -0.3, + "percentage": -17.6 + } + }, + "sentiments": { + "values": [ + 77, + 65 + ], + "delta": { + "absolute": 12, + "percentage": 18.5 + } + }, + "visibility": { + "values": [ + 97, + 97 + ], + "delta": { + "absolute": 0.5, + "percentage": 0.5 + } + }, + "sov": { + "values": [ + 10, + 8 + ], + "delta": { + "absolute": 1.5, + "percentage": 17.8 + } + }, + "organic_overlap": { + "values": [ + 35, + 28 + ], + "delta": { + "absolute": 7, + "percentage": 25 + } + }, + "source_presence": { + "values": [ + 60, + 52 + ], + "delta": { + "absolute": 8, + "percentage": 15.4 + } + }, + "tops": [ + { + "brand_id": 6075, + "brand_name": "Adobe creative cloud" + } + ], + "is_parsed": true, + "search_intent": [ + "I" + ], + "funnel_stage": [ + "consideration" + ], + "lang_code": "en", + "is_branded": false, + "citations_count": 41, + "citations_share": 68.3, + "first_seen": "2026-08-04 09:12:00", + "last_seen": "2026-08-30 17:40:00" + } + ] + } + }, + "example2": { + "summary": "Example 2", + "value": { + "total": 18, + "items": [ + { + "id": 61, + "title": "On-Page SEO Checker", + "prompts_count": 1, + "branded_prompts_count": 0, + "mentions": { + "values": [ + 191, + 168 + ], + "delta": { + "absolute": 23, + "percentage": 13.7 + } + }, + "avg_position": { + "values": [ + 1, + 1 + ], + "delta": { + "absolute": 0, + "percentage": 0 + } + }, + "sentiments": { + "values": [ + 11, + 5 + ], + "delta": { + "absolute": 6, + "percentage": 120 + } + }, + "visibility": { + "values": [ + 100, + 92 + ], + "delta": { + "absolute": 7.6, + "percentage": 8.3 + } + }, + "sov": { + "values": [ + 11, + 9 + ], + "delta": { + "absolute": 1.9, + "percentage": 21.1 + } + }, + "organic_overlap": { + "values": [ + null, + null + ] + }, + "source_presence": { + "values": [ + 45, + 40 + ], + "delta": { + "absolute": 5, + "percentage": 12.5 + } + }, + "tops": [ + { + "brand_id": 1509, + "brand_name": "Se ranking" + } + ], + "search_intent": [ + "I" + ], + "funnel_stage": [ + "awareness", + "consideration" + ], + "lang_code": [ + "en" + ], + "locations": [ + { + "id": "9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59", + "country_code": "US", + "geo_location_id": null + } + ] + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET --globoff 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/prompts?group_mode=prompt&date_range[0][from]=2026-05-01&date_range[0][to]=2026-05-31' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "To include a comparison period (adds delta to each metric in the response), pass a second date_range entry", + "source": "curl -X GET --globoff 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/prompts?group_mode=prompt&date_range[0][from]=2026-05-23&date_range[0][to]=2026-08-20&date_range[1][from]=2026-02-22&date_range[1][to]=2026-05-22' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "The same comparison mode applies to group_mode=topic", + "source": "curl -X GET --globoff 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/prompts?group_mode=topic&date_range[0][from]=2026-05-23&date_range[0][to]=2026-08-20&date_range[1][from]=2026-02-22&date_range[1][to]=2026-05-22' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET --globoff 'https://api.seranking.com/v1/se-visible/projects/{project_id}/prompts?group_mode=prompt&date_range[0][from]=2026-05-23&date_range[0][to]=2026-08-20&date_range[1][from]=2026-02-22&date_range[1][to]=2026-05-22&cited_source[type]=domain&cited_source[domain_id]=123&metrics[]=citations_count&metrics[]=citations_share&metrics[]=first_seen&metrics[]=last_seen' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET --globoff 'https://api.seranking.com/v1/se-visible/projects/{project_id}/prompts?group_mode=topic&date_range[0][from]=2026-05-23&date_range[0][to]=2026-08-20&date_range[1][from]=2026-02-22&date_range[1][to]=2026-05-22' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "delete": { + "operationId": "deletePrompts", + "tags": [ + "Prompts" + ], + "summary": "Delete prompts", + "description": "Deletes one or more prompts from a project in a single request. Provide `prompt_ids` to delete individual prompts and/or `topic_ids` to delete all prompts of the given topics. At least one of the two must be supplied.\n\nIf successful, the server returns `204 No Content` with an empty body.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/prompts/#delete-prompts" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "prompt_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "IDs of the prompts to delete." + }, + "topic_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "IDs of topics whose prompts should all be deleted." + } + } + }, + "example": { + "prompt_ids": [ + 1, + 2 + ] + } + } + } + }, + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X DELETE 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/prompts' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"prompt_ids\": [1, 2]\n }'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/topics/{topic_id}/prompts": { + "post": { + "operationId": "createPromptsForTopic", + "tags": [ + "Prompts" + ], + "summary": "Create prompts for a topic", + "description": "Creates one or more prompts under a topic. The prompts are added to the topic identified by `topic_id` and start being processed against the project’s AI models in the selected locations.\n\n**Note:**\n\n- Omit `location_ids` to track the prompts in the project’s default location (its oldest location that still tracks an engine).\n\n- Each prompt costs one prompt per selected location: 3 prompts over 2 locations charge 6 against your plan’s prompt limit. If they do not fit, the request is rejected with `403` (`insufficient_limit`) and nothing is created. The prompt’s language and the number of tracked engines do not multiply the charge.\n\n- Repeated texts, and texts that already exist in the topic, are not created again, so the response may list fewer IDs than you sent, or be `[]`.\n\nIf successful, the server returns `201` with a JSON array of the created prompt IDs.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/prompts/#create-prompts-for-a-topic" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "topic_id", + "in": "path", + "required": true, + "description": "ID of the topic the prompts are created under.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "prompts": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Prompt texts to create: at least one text, each non-empty and at most 2000 characters." + }, + "location_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Project locations to track the prompts in, using location IDs from [List project locations](https://seranking.com/api/se-visible/locations/#list-project-locations). At least one ID; an empty array is rejected. An ID that is not the project’s own, or of a deleted location, is rejected with `422` (`location_invalid`)." + } + }, + "required": [ + "prompts" + ] + }, + "example": { + "prompts": [ + "What are the benefits of using artificial intelligence in healthcare?", + "How does AI improve patient diagnosis?" + ], + "location_ids": [ + "9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59", + "1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081" + ] + } + } + } + }, + "responses": { + "201": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer" + } + }, + "example": [ + 7, + 40 + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/topics/10/prompts' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"prompts\": [\n \"What are the benefits of using artificial intelligence in healthcare?\",\n \"How does AI improve patient diagnosis?\"\n ],\n \"location_ids\": [\n \"9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59\",\n \"1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081\"\n ]\n }'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/prompts/move/{topic_id}": { + "post": { + "operationId": "movePromptsToTopic", + "tags": [ + "Prompts" + ], + "summary": "Move prompts to a topic", + "description": "Moves prompts to the target topic identified by `topic_id`. Select the prompts to move by their IDs, by their source topics, or both.\n\n**Note:**\n\n- At least one of `prompt_ids` or `topic_ids` must be provided.\n\n- When `topic_ids` is supplied, **all** prompts belonging to those topics are moved.\n\n- Both fields can be combined; the resulting set is deduplicated.\n\n- The operation is atomic (all-or-nothing), and the target topic must belong to the same project.\n\nIf successful, the server returns `204 No Content` with an empty body.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/prompts/#move-prompts-to-a-topic" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "topic_id", + "in": "path", + "required": true, + "description": "ID of the target topic the prompts are moved to.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "prompt_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "IDs of individual prompts to move." + }, + "topic_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "IDs of source topics whose prompts should all be moved." + } + } + }, + "example": { + "prompt_ids": [ + 1, + 2 + ], + "topic_ids": [ + 10 + ] + } + } + } + }, + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/prompts/move/12' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"prompt_ids\": [1, 2],\n \"topic_ids\": [10]\n }'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/prompts/locations": { + "put": { + "operationId": "changeLocationsOfPromptSelection", + "tags": [ + "Prompts" + ], + "summary": "Change the locations of a prompt selection", + "description": "Applies one location change to every selected prompt at once. Select the prompts by their IDs, by their topics, or both. Each selected prompt resolves to its own target set: `add` keeps its locations and adds the selected ones, `replace` makes the selection its whole set, `remove` takes the selected ones off.\n\n**Note:**\n\n- At least one of `prompt_ids` or `topic_ids` must be provided as a non-empty array. The resulting set is deduplicated; IDs of other projects and of deleted prompts are ignored, and `prompts_count` is what is left.\n\n- Each prompt costs one prompt scenario per location it is tracked in, so the change is priced as the locations gained minus the locations lost over the whole selection. If it adds more than the plan’s prompt limit has left, the request returns `403` with `error_code` `insufficient_limit` and `limit_type` `llm_prompts`, and nothing is written.\n\n- Locations a prompt loses stop being checked; their results stay and come back when the location is assigned again. Locations a prompt gains are checked right away.\n\n- A prompt that loses every location stays in the project untracked. A change that alters nothing is a no-op.\n\n- While the project is being checked, the request returns `409` with `error_code` `location_check_in_progress`. Retry once the check has finished.\n\n- A location ID that is not the project’s own, or whose location was deleted, returns `422` with `error_code` `location_invalid`. A location that tracks no engine returns `422` with `error_code` `location_not_tracked`.\n\nIf successful, the server returns a JSON object with the change applied and each selected prompt’s resulting locations.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/prompts/#change-prompt-locations" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "prompt_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "IDs of individual prompts in the selection." + }, + "topic_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "IDs of topics whose prompts all join the selection." + }, + "action": { + "type": "string", + "description": "How `location_ids` applies to each selected prompt’s current location set: `add`, `replace`, or `remove`." + }, + "location_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Locations of the project, as listed by [List project locations](https://seranking.com/api/se-visible/locations/#list-project-locations), each with a tracked engine. Duplicates are collapsed. May be empty: `replace` with no locations takes every selected prompt off all of its locations." + } + }, + "required": [ + "action", + "location_ids" + ] + }, + "example": { + "prompt_ids": [ + 1, + 2 + ], + "action": "add", + "location_ids": [ + "9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "prompts_count": { + "type": "integer", + "description": "Number of prompts the selection resolved to." + }, + "impact": { + "type": "object", + "properties": { + "prompt_units": { + "type": "integer", + "description": "Units the selected prompts hold before the change, one per current location." + }, + "prompt_units_after": { + "type": "integer", + "description": "Units the selected prompts hold once the change is applied." + }, + "project_units": { + "type": "integer", + "description": "Prompt units across the project before the change." + }, + "project_units_after": { + "type": "integer", + "description": "Prompt units across the project after the change." + }, + "usage": { + "type": "object", + "properties": { + "used": { + "type": "integer", + "description": "Prompt units used across the organisation before the change." + }, + "max": { + "type": "integer", + "description": "The organisation’s prompt-unit limit." + }, + "cost": { + "type": "integer", + "description": "Units the change consumes: locations added minus locations removed over the whole selection. Zero for a one-for-one replacement, negative when prompts lose locations." + }, + "used_after": { + "type": "integer", + "description": "`used` + `cost`." + }, + "available": { + "type": "integer", + "description": "`max` minus `used`, never negative." + }, + "fits_limit": { + "type": "boolean", + "description": "Whether `cost` fits in `available`. A change that adds nothing always fits." + } + }, + "description": "Organisation prompt-unit usage around the change." + } + }, + "description": "Prompt units of the selection, the project, and the organisation around the change." + }, + "locations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Tracked location ID." + }, + "prompts_count": { + "type": "integer", + "description": "Selected prompts tracked in the location after the change." + } + }, + "description": "Every location of the project, in the project’s location order." + }, + "description": "Every location of the project, in the project’s location order." + }, + "prompts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Prompt ID." + }, + "locations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Tracked location ID." + }, + "country_code": { + "type": "string", + "description": "Platform country code." + }, + "geo_location_id": { + "type": "integer", + "nullable": true, + "description": "Geo dictionary ID; `null` for country-level tracking." + } + }, + "description": "Locations the prompt is tracked in after the change, in creation order." + }, + "description": "Locations the prompt is tracked in after the change, in creation order." + }, + "units": { + "type": "integer", + "description": "Number of current locations; equals the length of `locations`." + } + }, + "description": "Every selected prompt with its locations after the change, by ID ascending." + }, + "description": "Every selected prompt with its locations after the change, by ID ascending." + } + } + }, + "example": { + "prompts_count": 2, + "impact": { + "prompt_units": 3, + "prompt_units_after": 5, + "project_units": 12, + "project_units_after": 14, + "usage": { + "used": 18, + "max": 50, + "cost": 2, + "used_after": 20, + "available": 32, + "fits_limit": true + } + }, + "locations": [ + { + "id": "9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59", + "prompts_count": 2 + }, + { + "id": "1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081", + "prompts_count": 2 + } + ], + "prompts": [ + { + "id": 1, + "locations": [ + { + "id": "9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59", + "country_code": "US", + "geo_location_id": null + }, + { + "id": "1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081", + "country_code": "UK", + "geo_location_id": 1006886 + } + ], + "units": 2 + }, + { + "id": 2, + "locations": [ + { + "id": "9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59", + "country_code": "US", + "geo_location_id": null + }, + { + "id": "1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081", + "country_code": "UK", + "geo_location_id": 1006886 + } + ], + "units": 2 + } + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X PUT 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/prompts/locations' -H 'Authorization: Token YOUR_API_KEY' -H 'Content-Type: application/json' -d '{\n \"prompt_ids\": [1, 2],\n \"action\": \"add\",\n \"location_ids\": [\"9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59\"]\n }'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/prompts/{prompt_id}": { + "get": { + "operationId": "getPromptDetails", + "tags": [ + "Prompts" + ], + "summary": "Get prompt details", + "description": "Returns the details of a single prompt.\n\nIf successful, the server returns the prompt object.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/prompts/#get-prompt-details" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "prompt_id", + "in": "path", + "required": true, + "description": "ID of the prompt.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Prompt ID." + }, + "text": { + "type": "string", + "description": "Prompt text." + }, + "topic_id": { + "type": "integer", + "description": "ID of the topic the prompt belongs to." + }, + "created_at": { + "type": "string", + "description": "When the prompt was created, as an ISO 8601 timestamp." + }, + "updated_at": { + "type": "string", + "description": "When the prompt was last changed, as an ISO 8601 timestamp." + }, + "is_parsed": { + "type": "boolean", + "description": "Whether the prompt has been parsed." + }, + "search_intent": { + "type": "array", + "items": { + "type": "string", + "description": "Search intent codes: `I` (informational), `L` (local), `N` (navigational), `C` (commercial), `T` (transactional). `null` when the prompt is not classified yet; an empty array when it carries no intent." + }, + "description": "Search intent codes: `I` (informational), `L` (local), `N` (navigational), `C` (commercial), `T` (transactional). `null` when the prompt is not classified yet; an empty array when it carries no intent." + }, + "funnel_stage": { + "type": "array", + "items": { + "type": "string", + "description": "Funnel stages the prompt belongs to: `awareness`, `consideration`, `decision`, `none` (outside the funnel). `null` when the prompt is not classified yet." + }, + "description": "Funnel stages the prompt belongs to: `awareness`, `consideration`, `decision`, `none` (outside the funnel). `null` when the prompt is not classified yet." + }, + "lang_code": { + "type": "string", + "description": "ISO 639-1 code of the language the prompt is written in. `null` when the language is not detected yet." + }, + "is_branded": { + "type": "boolean", + "description": "Whether the prompt text names a brand (yours, a tracked competitor, or any other). `null` when the prompt is not classified yet." + } + } + }, + "example": { + "id": 1, + "text": "What are the best ground coffee brands for a rich and smooth flavor?", + "topic_id": 10, + "created_at": "2023-12-15T10:30:00.000000Z", + "updated_at": "2023-12-15T11:05:00.000000Z", + "is_parsed": true, + "search_intent": [ + "L", + "C" + ], + "funnel_stage": [ + "consideration" + ], + "lang_code": "en", + "is_branded": false + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/prompts/1' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/prompts/{prompt_id}/results": { + "get": { + "operationId": "getPromptResultList", + "tags": [ + "Prompts" + ], + "summary": "Get prompt result list", + "description": "Returns a paginated list of results for a prompt. Each result is one model run, with the model’s text, the brands it mentioned, sentiment, and an average position. You get one result per answer of each location–engine pair the prompt is tracked in; answers of a deleted engine or location, or of a location no longer assigned to the prompt, are excluded.\n\n**Note:** `topic_ids` and `tracked_brand_ids` are no longer part of this endpoint’s contract. They were previously accepted but never applied, so removing them changes no response. If your integration passed them here, the data you received was unfiltered — please re-check it. They remain valid on [List prompts or topics](#list-prompts-or-topics) and on the brand metrics endpoint, where they are applied.\n\nIf successful, the server returns a paginated object of results.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/prompts/#get-prompt-result-list" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "prompt_id", + "in": "path", + "required": true, + "description": "ID of the prompt.", + "schema": { + "type": "integer" + } + }, + { + "name": "date_range", + "in": "query", + "required": true, + "description": "1 to 2 entries: base period at index `0`, optional compare period at index `1`. Each has `from` and `to` in `YYYY-MM-DD`. See [Date ranges and compare mode](https://seranking.com/api/se-visible/getting-started/#date-ranges-and-compare-mode).", + "schema": { + "type": "array", + "items": { + "type": "object" + } + } + }, + { + "name": "model_types", + "in": "query", + "description": "Filter by AI model types (e.g. `chatgpt`). See the [Reference](https://seranking.com/api/se-visible/reference/) for the full list.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "country_codes", + "in": "query", + "description": "**Deprecated — use `location_ids`.** Filter by ISO 3166-1 alpha-2 country codes, resolved to the project’s live locations in those countries. It still works for now; migrate to `location_ids` before it is withdrawn. See the [Reference](https://seranking.com/api/se-visible/reference/) for the full list.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "location_ids", + "in": "query", + "description": "Filter by the project’s tracked locations, using location IDs from [List project locations](https://seranking.com/api/se-visible/locations/#list-project-locations). Multiple values combine as OR. An ID of another project or of a deleted location is rejected with `422`. Combined with `country_codes`, only locations matching both are read.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "sentiments", + "in": "query", + "description": "Filter by sentiment: `positive`, `neutral`, `negative`.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "exclude_branded", + "in": "query", + "description": "Accepted so the same control can be sent with every request, but not applied here: a branded prompt still returns its answers. The response is the same with and without it.", + "schema": { + "type": "boolean" + } + }, + { + "name": "metrics", + "in": "query", + "description": "Extra per-answer fields to add to each item: `sources_count` (distinct pages the answer cited), `cited_domains` (distinct domains of those pages, alphabetically).", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "sort_field", + "in": "query", + "description": "Order of the answers: `created_at` (newest first by default), `avg_position` (the primary brand’s position, best first by default; answers without a mention last either way), `sources_count` (most pages cited first by default). Ties break on the newest check.", + "schema": { + "type": "string", + "default": "created_at" + } + }, + { + "name": "sort_order", + "in": "query", + "description": "Sort direction: `asc` or `desc`. When omitted, the direction depends on `sort_field`: `created_at` and `sources_count` sort descending, `avg_position` sorts the best position first.", + "schema": { + "type": "string" + } + }, + { + "name": "search_query", + "in": "query", + "description": "Filter results by a search string.", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of items to return. Minimum 0; `0` returns every result and ignores `offset`.", + "schema": { + "type": "integer", + "default": 1000 + } + }, + { + "name": "offset", + "in": "query", + "description": "Number of items to skip from the start of the list. Minimum 0.", + "schema": { + "type": "integer", + "default": 0 + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Result ID. Pass it as `result_id` to get the result details." + }, + "prompt_id": { + "type": "integer", + "description": "ID of the prompt the result belongs to." + }, + "prompt": { + "type": "string", + "description": "Prompt text." + }, + "request_number": { + "type": "integer", + "description": "Request number for this prompt run." + }, + "avg_position": { + "type": "number", + "description": "Primary brand’s place among the brands the answer names (1 = first, lower is better); `0` when the answer does not mention it." + }, + "sentiment": { + "type": "string", + "description": "Sentiment: `positive`, `neutral`, `negative`, or `null`." + }, + "text": { + "type": "string", + "description": "The AI-generated response text." + }, + "has_urls": { + "type": "boolean", + "description": "Whether the result contains source URLs." + }, + "tops": { + "type": "array", + "items": { + "type": "object", + "properties": { + "brand_id": { + "type": "integer" + }, + "brand_name": { + "type": "string" + } + }, + "description": "Top brands mentioned (`brand_id`, `brand_name`)." + }, + "description": "Top brands mentioned (`brand_id`, `brand_name`)." + }, + "created_at": { + "type": "string", + "description": "When the result was created (`YYYY-MM-DD HH:MM:SS`)." + }, + "has_mentions": { + "type": "boolean", + "description": "Whether the result has brand mentions." + }, + "model": { + "type": "string", + "description": "AI model that produced the result: `chatgpt`, `google_gemini`, `perplexity`, `google_ai_mode`, `google_ai_overview`, `copilot`." + }, + "location_id": { + "type": "string", + "description": "Project location the answer was collected under." + }, + "sources_count": { + "type": "integer", + "description": "Distinct pages the answer cited. Present only when `metrics[]=sources_count` is requested." + }, + "cited_domains": { + "type": "array", + "items": { + "type": "string", + "description": "Distinct domains of the pages the answer cited, alphabetically. Present only when `metrics[]=cited_domains` is requested." + }, + "description": "Distinct domains of the pages the answer cited, alphabetically. Present only when `metrics[]=cited_domains` is requested." + } + }, + "description": "Array of results." + }, + "description": "Array of results." + }, + "total": { + "type": "integer", + "description": "Total number of results available." + } + } + }, + "example": { + "items": [ + { + "id": "0199f3a2-7c1e-7d4a-9b2e-5f0c8a1d2e3f_48213_1", + "prompt_id": 1, + "prompt": "What are the best ground coffee brands for a rich and smooth flavor?", + "request_number": 1, + "avg_position": 1.5, + "sentiment": "positive", + "text": "Based on extensive research and customer reviews, some of the best ground coffee brands...", + "has_urls": true, + "tops": [ + { + "brand_id": 1, + "brand_name": "Lavazza" + }, + { + "brand_id": 2, + "brand_name": "Illy" + }, + { + "brand_id": 3, + "brand_name": "Starbucks" + } + ], + "created_at": "2023-12-15 10:30:00", + "has_mentions": true, + "model": "chatgpt", + "location_id": "9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59", + "sources_count": 7, + "cited_domains": [ + "coffeeblog.com", + "example.com" + ] + }, + { + "id": "0199f3a2-7c1e-7d4a-9b2e-5f0c8a1d2e3f_48213_2", + "prompt_id": 1, + "prompt": "What are the best ground coffee brands for a rich and smooth flavor?", + "request_number": 2, + "avg_position": 2.3, + "sentiment": "neutral", + "text": "Coffee preferences vary greatly among consumers, but several brands consistently...", + "has_urls": false, + "tops": [ + { + "brand_id": 4, + "brand_name": "Folgers" + }, + { + "brand_id": 5, + "brand_name": "Maxwell House" + }, + { + "brand_id": 6, + "brand_name": "Dunkin'" + } + ], + "created_at": "2023-12-15 10:35:00", + "has_mentions": true, + "model": "google_gemini", + "location_id": "9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59", + "sources_count": 0, + "cited_domains": [] + } + ], + "total": 25 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET --globoff 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/prompts/1/results?date_range[0][from]=2026-05-01&date_range[0][to]=2026-05-31&metrics[]=sources_count&metrics[]=cited_domains' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/prompts/{prompt_id}/results/{result_id}": { + "get": { + "operationId": "getPromptResultDetails", + "tags": [ + "Prompts" + ], + "summary": "Get prompt result details", + "description": "Returns the full detail of a single result, including the complete response text, the source URLs, and the brands mentioned.\n\nIf successful, the server returns the result object.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/prompts/#get-prompt-result-details" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "prompt_id", + "in": "path", + "required": true, + "description": "ID of the prompt.", + "schema": { + "type": "integer" + } + }, + { + "name": "result_id", + "in": "path", + "required": true, + "description": "The `id` of the result from the result list. The deprecated integer ID is still accepted.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Result ID." + }, + "prompt": { + "type": "string", + "description": "Prompt text." + }, + "request_number": { + "type": "integer", + "description": "Request number for this prompt run." + }, + "avg_position": { + "type": "number", + "description": "Primary brand’s place among the brands the answer names (1 = first, lower is better); `0` when the answer does not mention it." + }, + "sentiment": { + "type": "string", + "description": "Sentiment: `positive`, `neutral`, `negative`, or `null`." + }, + "text": { + "type": "string", + "description": "The AI-generated response text." + }, + "urls": { + "type": "array", + "items": { + "type": "string", + "description": "Source URLs mentioned in the result." + }, + "description": "Source URLs mentioned in the result." + }, + "brands": { + "type": "array", + "items": { + "type": "object", + "properties": { + "brand_id": { + "type": "integer" + }, + "brand_name": { + "type": "string" + } + }, + "description": "Brands mentioned in the result (`brand_id`, `brand_name`)." + }, + "description": "Brands mentioned in the result (`brand_id`, `brand_name`)." + }, + "created_at": { + "type": "string", + "description": "When the result was created (`YYYY-MM-DD HH:MM:SS`)." + }, + "has_mentions": { + "type": "boolean", + "description": "Whether the result has brand mentions." + }, + "model": { + "type": "string", + "description": "AI model that produced the result: `chatgpt`, `google_gemini`, `perplexity`, `google_ai_mode`, `google_ai_overview`, `copilot`." + } + } + }, + "example": { + "id": "0199f3a2-7c1e-7d4a-9b2e-5f0c8a1d2e3f_48213_1", + "prompt": "What are the best ground coffee brands for a rich and smooth flavor?", + "request_number": 1, + "avg_position": 1.5, + "sentiment": "positive", + "text": "Based on extensive research and customer reviews, some of the best ground coffee brands for rich and smooth flavor include Lavazza, known for its Italian roasting expertise and premium blends...", + "urls": [ + "https://example.com/coffee-review", + "https://coffeeblog.com/best-brands" + ], + "brands": [ + { + "brand_id": 1, + "brand_name": "Lavazza" + }, + { + "brand_id": 2, + "brand_name": "Illy" + }, + { + "brand_id": 3, + "brand_name": "Starbucks" + } + ], + "created_at": "2023-12-15 10:30:00", + "has_mentions": true, + "model": "chatgpt" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/prompts/1/results/0199f3a2-7c1e-7d4a-9b2e-5f0c8a1d2e3f_48213_1' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/sources": { + "get": { + "operationId": "getProjectSources", + "tags": [ + "Sources" + ], + "summary": "Get project sources", + "description": "Retrieves the sources (domains, subdomains, or URLs) that AI models cited across a project, with extensive filtering. The shape of each row in the response depends on `source_type`: `domain` returns one row per registrable domain (its subdomains are aggregated into the row), `subdomain` returns one row per host exactly as collected, and `url` returns one row per cited page.\n\n**Note:**\n\n- `source_type` switches the response between domain rows (`domain` and `subdomain`) and URL rows. It also changes which `source_sort_field` and `columns` values are valid: passing a value that belongs to the other type returns `422`.\n\n- Most numeric fields are wrapped in a metric object with a `values` array. A single period returns one entry in `values`. When you supply `date_range[1]` (compare mode), the field returns two entries plus a `delta` with `absolute` and `percentage`.\n\n- `source_type=domain` and `source_type=subdomain` — `ai_answers_count`, `pages`, `coverage`, `prompts_count`, `mention_rate`, `my_brand_mentions_count`, `competitors_count`, `first_seen`, `last_seen`, `dt`, `backlinks`, `referring_domains`, `domain_traffic`, and the delta variants `ai_answers_count_delta`, `pages_delta`, `coverage_delta`, `prompts_count_delta`, `mention_rate_delta`, `my_brand_mentions_count_delta`, `competitors_count_delta`, `responses_count_delta`.\n\n- `source_type=url` — `ai_answers_count`, `coverage`, `prompts_count`, `competitors_count`, `my_brand_mentions`, `gap_score`, `first_seen`, `last_seen`, `last_check_date`, `dt`, `traffic`, `domain_traffic`, and the delta variants `ai_answers_count_delta`, `prompts_count_delta`, `coverage_delta`, `responses_count_delta`.\n\n- The delta variants sort by the absolute change between periods (period 0 minus period 1) and require `date_range[1]`, otherwise the request is rejected with `422`. Rows with a `null` delta — for example when a strict-null metric such as `coverage` is missing in one period — are pushed to the end of the result in both ascending and descending order.\n\n- Rows with no value for `dt`, `traffic`, `domain_traffic`, `backlinks`, `referring_domains`, `gap_score`, `first_seen`, `last_seen`, or `last_check_date` also go to the end in both directions. Period metrics computed per request, such as `coverage`, keep the default order: nulls first ascending, last descending.\n\n- `source_type=domain` — `domain`, `domain_type`, `subdomains_count`, `pages`, `coverage`, `ai_answers_count`, `prompts_count`, `my_brand_mentions_count`, `mention_rate`, `brand_ids`, `domain_traffic`, `dt`, `backlinks`, `referring_domains`, `first_seen`, `last_seen`, `competitors_count`, `responses_count`.\n\n- `source_type=subdomain` — same as `domain`, minus `subdomains_count`.\n\n- `source_type=url` — `url`, `title`, `type`, `coverage`, `ai_answers_count`, `prompts_count`, `my_brand_mentions`, `gap_score`, `brand_ids`, `domain_traffic`, `dt`, `traffic`, `backlink_type`, `last_check_date`, `first_seen`, `last_seen`, `status`, `competitors_count`, `responses_count`.\n\n- The locked column (`domain` or `url`) is accepted but redundant — it is always returned regardless of the requested ids. An id outside the set allowed for the current `source_type` returns `422`.\n\n**Note:** `tracked_brand_ids` is no longer part of this endpoint’s contract. It was previously accepted but never applied, so removing it changes no response. If your integration passed it here, the data you received was unfiltered — please re-check it. To filter sources by brand, use `brand_ids` together with `brand_match_mode`.\n\nIf successful, the server returns a sources object with the row list and a total count.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/sources/#get-project-sources" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "date_range", + "in": "query", + "required": true, + "description": "1 to 2 entries: base period at index `0`, optional compare period at index `1`. Each has `from` and `to` in `YYYY-MM-DD`. See [Date ranges and compare mode](https://seranking.com/api/se-visible/getting-started/#date-ranges-and-compare-mode).", + "schema": { + "type": "array", + "items": { + "type": "object" + } + } + }, + { + "name": "source_type", + "in": "query", + "description": "Row shape of the response: `domain` (one row per registrable domain, subdomains aggregated into it), `subdomain` (one row per host as collected), or `url` (one row per page). Also determines the valid set of `source_sort_field` and `columns` values.", + "schema": { + "type": "string", + "default": "domain" + } + }, + { + "name": "model_types", + "in": "query", + "description": "Filter by AI model types (e.g. `chatgpt`).", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "country_codes", + "in": "query", + "description": "**Deprecated — use `location_ids`.** Filter by ISO 3166-1 alpha-2 country codes. Resolved to the project’s live locations in those countries, so a deleted location is not matched, a country the project no longer tracks returns an empty result, and two locations in one country cannot be told apart. It keeps working for now; migrate to `location_ids` before it is withdrawn.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "location_ids", + "in": "query", + "description": "Filter by the project’s tracked locations, using location IDs from [List project locations](https://seranking.com/api/se-visible/locations/#list-project-locations). Multiple values combine as OR. An ID from another project or of a deleted location returns `422`. Combined with `country_codes`, only locations matching both are read. A row is attributed to the location its check collected it under, so a location added later has no earlier history.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "topic_ids", + "in": "query", + "description": "Filter by topic IDs.", + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + { + "name": "prompt_ids", + "in": "query", + "description": "Filter by prompt IDs.", + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + { + "name": "req_num", + "in": "query", + "description": "Limit to the answers with this request number within a check.", + "schema": { + "type": "integer" + } + }, + { + "name": "sentiments", + "in": "query", + "description": "Filter by sentiment: `positive`, `neutral`, `negative`.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "exclude_branded", + "in": "query", + "description": "When `true`, every number in the response is computed from non-branded prompts only, and branded prompts drop out. A prompt not yet classified counts as non-branded. Off when omitted.", + "schema": { + "type": "boolean" + } + }, + { + "name": "search_query", + "in": "query", + "description": "Filter sources by a substring of the domain or URL.", + "schema": { + "type": "string" + } + }, + { + "name": "domain_id", + "in": "query", + "description": "Restrict results to a single domain.", + "schema": { + "type": "integer" + } + }, + { + "name": "types", + "in": "query", + "description": "Filter by URL category type (e.g. `blog`, `news`, `social`). See the [Reference](https://seranking.com/api/se-visible/reference/) for the full list.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "is_my_brand_mentions", + "in": "query", + "description": "Filter sources by whether the project’s primary brand is mentioned: `1` mentioned, `0` not mentioned, `-1` mention status not available.", + "schema": { + "type": "integer" + } + }, + { + "name": "has_backlink", + "in": "query", + "description": "Filter source pages by `backlink_type`: `dofollow` (links to a brand domain and passes authority), `nofollow` (links to a brand domain without passing authority), `none` (checked, no link to a brand domain). Several values combine as OR. Pages not yet checked or that could not be read match none of the values; `-1` is not accepted. URL rows only: with `source_type=domain` (the default) it returns `422`.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "competitors_count_from", + "in": "query", + "description": "Minimum number of competitor brands on the source (inclusive, min `0`).", + "schema": { + "type": "integer" + } + }, + { + "name": "competitors_count_to", + "in": "query", + "description": "Maximum number of competitor brands on the source (inclusive, min `0`).", + "schema": { + "type": "integer" + } + }, + { + "name": "brand_ids", + "in": "query", + "description": "Keep sources that mention these brand IDs (see `brand_match_mode`).", + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + { + "name": "brand_match_mode", + "in": "query", + "description": "When filtering by `brand_ids`, match `any` of the brands or `all` of them.", + "schema": { + "type": "string", + "default": "any" + } + }, + { + "name": "domain_types", + "in": "query", + "description": "Filter rows by their domain type; several values combine as OR. Matches any element of the row’s `domain_type` array. Values: `you` (the primary brand’s own domain), `competitors` (a domain of another tracked brand), `corporate`, `ugc`, `editorial`, `reference`, `institutional` (stored base classification), `other` (neither a role nor a classification). `domain` and `subdomain` rows only: with `source_type=url` it returns `422`.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "columns", + "in": "query", + "description": "Column ids to return. When omitted, every column is returned. When provided, each row contains only these columns plus the always-present locked first column (`domain` or `url`), `domain_id`, which is used to drill down from a domain row to its URLs, and `url_id` on URL rows. Key order in the response is not guaranteed. The valid set depends on `source_type`; see the note below.\n\nDefault: All columns", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "source_sort_field", + "in": "query", + "description": "Field to sort by. The valid set depends on `source_type`; see the note below.", + "schema": { + "type": "string", + "default": "ai_answers_count" + } + }, + { + "name": "sort_order", + "in": "query", + "description": "Sort direction: `asc` or `desc`.", + "schema": { + "type": "string", + "default": "desc" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of sources to return (min `0`). `0` returns every row and ignores `offset`.", + "schema": { + "type": "integer", + "default": 1000 + } + }, + { + "name": "offset", + "in": "query", + "description": "Number of sources to skip from the start of the list (min `0`).", + "schema": { + "type": "integer", + "default": 0 + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain name: the registrable domain for `source_type=domain`, the host exactly as collected for `source_type=subdomain`." + }, + "domain_id": { + "type": "integer", + "description": "Unique domain identifier." + }, + "ai_answers_count": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer", + "description": "Metric value per period. One entry for a single period; two entries in compare mode (base, then compare). An entry can be `null` when a period has no data." + }, + "description": "Metric value per period. One entry for a single period; two entries in compare mode (base, then compare). An entry can be `null` when a period has no data." + }, + "delta": { + "type": "object", + "properties": { + "absolute": { + "type": "integer", + "description": "Absolute change (base minus compare). `null` when a period has no data." + }, + "percentage": { + "type": "number", + "description": "Percentage change. `null` when a period has no data." + } + }, + "description": "Present only in compare mode. Difference between the two periods." + } + }, + "description": "Distinct answers in the period that cite at least one page of this source." + }, + "pages": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer", + "description": "Metric value per period. One entry for a single period; two entries in compare mode (base, then compare). An entry can be `null` when a period has no data." + }, + "description": "Metric value per period. One entry for a single period; two entries in compare mode (base, then compare). An entry can be `null` when a period has no data." + } + }, + "description": "Distinct pages of this domain cited in the period’s answers." + }, + "coverage": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "number", + "description": "Metric value per period. One entry for a single period; two entries in compare mode (base, then compare). An entry can be `null` when a period has no data." + }, + "description": "Metric value per period. One entry for a single period; two entries in compare mode (base, then compare). An entry can be `null` when a period has no data." + }, + "delta": { + "type": "object", + "properties": { + "absolute": { + "type": "number", + "description": "Absolute change (base minus compare). `null` when a period has no data." + }, + "percentage": { + "type": "number", + "description": "Percentage change. `null` when a period has no data." + } + }, + "description": "Present only in compare mode. Difference between the two periods." + } + }, + "description": "`ai_answers_count` as a percentage of `responses_count`, one decimal. `null` when `responses_count` is `0`." + }, + "brand_ids": { + "type": "array", + "items": { + "type": "integer", + "description": "Brand IDs mentioned on this domain." + }, + "description": "Brand IDs mentioned on this domain." + }, + "competitors_count": { + "description": "Distinct competitor brands attached to this domain’s source URLs in the period." + }, + "prompts_count": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer", + "description": "Metric value per period. One entry for a single period; two entries in compare mode (base, then compare). An entry can be `null` when a period has no data." + }, + "description": "Metric value per period. One entry for a single period; two entries in compare mode (base, then compare). An entry can be `null` when a period has no data." + }, + "delta": { + "type": "object", + "properties": { + "absolute": { + "type": "integer", + "description": "Absolute change (base minus compare). `null` when a period has no data." + }, + "percentage": { + "type": "number", + "description": "Percentage change. `null` when a period has no data." + } + }, + "description": "Present only in compare mode. Difference between the two periods." + } + }, + "description": "Distinct prompts whose answers cited this source in the period." + }, + "my_brand_mentions_count": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer", + "description": "Metric value per period. One entry for a single period; two entries in compare mode (base, then compare). An entry can be `null` when a period has no data." + }, + "description": "Metric value per period. One entry for a single period; two entries in compare mode (base, then compare). An entry can be `null` when a period has no data." + } + }, + "description": "URLs on this domain that mention the primary brand." + }, + "mention_rate": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer", + "description": "Metric value per period. One entry for a single period; two entries in compare mode (base, then compare). An entry can be `null` when a period has no data." + }, + "description": "Metric value per period. One entry for a single period; two entries in compare mode (base, then compare). An entry can be `null` when a period has no data." + } + }, + "description": "Percentage of this domain’s pages in the period whose content mentions the primary brand (`my_brand_mentions_count / pages * 100`), whole number. `null` in a period where the domain has no pages." + }, + "responses_count": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer", + "description": "Metric value per period. One entry for a single period; two entries in compare mode (base, then compare). An entry can be `null` when a period has no data." + }, + "description": "Metric value per period. One entry for a single period; two entries in compare mode (base, then compare). An entry can be `null` when a period has no data." + }, + "delta": { + "type": "object", + "properties": { + "absolute": { + "type": "integer", + "description": "Absolute change (base minus compare). `null` when a period has no data." + }, + "percentage": { + "type": "integer", + "description": "Percentage change. `null` when a period has no data." + } + }, + "description": "Present only in compare mode. Difference between the two periods." + } + }, + "description": "Answers in the period that name at least one brand, after the request’s filters. The same for every row; `0` in a period the source was not cited." + }, + "first_seen": { + "type": "string", + "description": "First time this domain appeared in results." + }, + "last_seen": { + "type": "string", + "description": "Last time this domain appeared in results." + }, + "domain_type": { + "type": "array", + "items": { + "type": "string", + "description": "The row’s domain types (1 or 2 values): the project role first — `you` for the primary brand’s own domain, otherwise `competitors` for a domain owned by another tracked brand — then the stored base classification (`corporate`, `ugc`, `editorial`, `reference`, `institutional`). `[\"other\"]` when the row has neither, so a competitor that is also an editorial site reads `[\"competitors\", \"editorial\"]`." + }, + "description": "The row’s domain types (1 or 2 values): the project role first — `you` for the primary brand’s own domain, otherwise `competitors` for a domain owned by another tracked brand — then the stored base classification (`corporate`, `ugc`, `editorial`, `reference`, `institutional`). `[\"other\"]` when the row has neither, so a competitor that is also an editorial site reads `[\"competitors\", \"editorial\"]`." + }, + "subdomains_count": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer", + "description": "Metric value per period. One entry for a single period; two entries in compare mode (base, then compare). An entry can be `null` when a period has no data." + }, + "description": "Metric value per period. One entry for a single period; two entries in compare mode (base, then compare). An entry can be `null` when a period has no data." + } + }, + "description": "Distinct subdomains of the domain that appeared as a source in the period. `source_type=domain` only; absent for `subdomain` rows." + }, + "dt": { + "type": "integer", + "description": "Domain trust (`0`–`100` inlink rank). Domain-level and project-agnostic, so a plain number rather than a metric object. A non-negative number is a measurement, `-1` means the data source had nothing for this row, and `null` means it has not been requested yet." + }, + "backlinks": { + "type": "integer", + "description": "Total backlinks to the domain. Plain number; same `null` rule as `dt`." + }, + "referring_domains": { + "type": "integer", + "description": "Total referring domains. Plain number; same `null` rule as `dt`." + }, + "domain_traffic": { + "type": "integer", + "nullable": true, + "description": "Estimated monthly organic search traffic of the whole domain. Plain number; `-1` when no data is available, `null` when not requested yet." + }, + "url": { + "type": "string", + "description": "Full URL." + }, + "url_id": { + "type": "integer", + "description": "URL identifier. Always returned, like `domain_id`." + }, + "type": { + "type": "string", + "description": "URL category type (e.g. `blog`, `news`, `social`). See the [Reference](https://seranking.com/api/se-visible/reference/) for the full list." + }, + "title": { + "type": "string", + "description": "Page title extracted from the HTML." + }, + "my_brand_mentions": { + "type": "integer", + "description": "`1` if the URL currently mentions the primary brand, `0` if the page was read and the primary brand was not found, `-1` if the page could not be read, `null` if not parsed yet." + }, + "gap_score": { + "nullable": true, + "description": "Gap score for ranking: base-period `ai_answers_count` times the number of tracked brands found on the page, so a page citing competitors in many answers scores high. `0` when the page mentions the primary brand, `-1` when no tracked brand was found on the page or the page could not be read; `null` while the page is waiting for its first parse.", + "type": "integer" + }, + "last_check_date": { + "type": "string", + "description": "When this URL was last parsed for brand mentions. `null` if not yet parsed." + }, + "status": { + "type": "integer", + "description": "HTTP status code of the URL. `null` if not yet checked." + }, + "backlink_type": { + "type": "string", + "description": "Whether this URL links to a domain of a tracked brand: `dofollow` (the link passes authority), `nofollow` (it does not), `none` (checked, no link to a brand domain), `-1` (a parse was attempted and no link type was determined), `null` (not parsed yet)." + }, + "traffic": { + "type": "integer", + "description": "Estimated monthly organic search traffic of this page, worldwide (not scoped to a search region). Plain number; `-1` when no data is available, `null` when not requested yet." + } + }, + "description": "Source rows. Each row is a domain object (when `source_type=domain`) or a URL object (when `source_type=url`)." + }, + "description": "Source rows. Each row is a domain object (when `source_type=domain`) or a URL object (when `source_type=url`)." + }, + "total": { + "type": "integer", + "description": "Total number of sources available for the filters." + } + } + }, + "examples": { + "domainSourcesSinglePeriod": { + "summary": "Domain sources, single period", + "value": { + "items": [ + { + "domain": "example.com", + "domain_id": 123, + "ai_answers_count": { + "values": [ + 45 + ] + }, + "pages": { + "values": [ + 12 + ] + }, + "coverage": { + "values": [ + 75.5 + ] + }, + "brand_ids": [ + 1, + 2 + ], + "competitors_count": { + "values": [ + 2 + ] + }, + "prompts_count": { + "values": [ + 10 + ] + }, + "my_brand_mentions_count": { + "values": [ + 3 + ] + }, + "mention_rate": { + "values": [ + 25 + ] + }, + "responses_count": { + "values": [ + 60 + ] + }, + "first_seen": "2024-01-01 00:00:00", + "last_seen": "2024-01-15 00:00:00", + "domain_type": [ + "competitors", + "editorial" + ], + "subdomains_count": { + "values": [ + 2 + ] + }, + "dt": 62, + "backlinks": 1520, + "referring_domains": 84, + "domain_traffic": 41000 + } + ], + "total": 1 + } + }, + "urlSourcesCompareMode": { + "summary": "URL sources, compare mode", + "value": { + "items": [ + { + "url": "https://example.com/article1", + "url_id": 4567, + "domain_id": 123, + "ai_answers_count": { + "values": [ + 15, + 8 + ], + "delta": { + "absolute": 7, + "percentage": 87.5 + } + }, + "coverage": { + "values": [ + 25.5, + 16 + ], + "delta": { + "absolute": 9.5, + "percentage": 59.38 + } + }, + "type": "blog", + "title": "Article 1", + "brand_ids": [ + 1, + 2 + ], + "competitors_count": 2, + "my_brand_mentions": 1, + "gap_score": null, + "prompts_count": { + "values": [ + 5, + 3 + ], + "delta": { + "absolute": 2, + "percentage": 66.67 + } + }, + "responses_count": { + "values": [ + 60, + 50 + ], + "delta": { + "absolute": 10, + "percentage": 20 + } + }, + "first_seen": "2024-01-01 00:00:00", + "last_seen": "2024-02-15 00:00:00", + "last_check_date": "2024-02-15 00:00:00", + "status": 200, + "dt": 62, + "backlink_type": "dofollow", + "domain_traffic": null, + "traffic": 4321 + } + ], + "total": 1 + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET --globoff 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/sources?source_type=domain&date_range[0][from]=2026-05-01&date_range[0][to]=2026-05-31&source_sort_field=ai_answers_count&sort_order=desc' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "To return only selected columns, pass columns[]", + "source": "curl -X GET --globoff 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/sources?source_type=url&date_range[0][from]=2026-05-01&date_range[0][to]=2026-05-31&columns[]=title&columns[]=coverage&columns[]=ai_answers_count' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/sources/metrics": { + "get": { + "operationId": "getAggregatedSourceMetrics", + "tags": [ + "Sources" + ], + "summary": "Get aggregated source metrics", + "description": "Returns aggregated source metrics for dynamic table and chart rendering — the sources equivalent of [Get aggregated brand metrics](https://seranking.com/api/se-visible/brands/#get-aggregated-brand-metrics). You choose how the data is grouped (`dimensions[]`) and which metrics to return (`metrics[]`).\n\n**Note:**\n\n- You pass 1 to 3 dimensions: at most one entity or type grain (`url`, `domain`, `subdomain`, `page_type`, `domain_type`), optionally `model_type` (the AI engine of the citing answers) beside it, and optionally one date dimension — `check_id` or `check_date` for one row per check, `check_week` or `check_month` for one row per calendar period (its checks aggregated, labelled by the period start). `model_type` on its own is also a grain.\n\n- With **1 dimension**, each row holds that dimension’s own columns plus one metric object per requested metric.\n\n- With **2 or 3 dimensions**, the response is a pivot: every dimension but the last keys the rows (in request order), and the **last** one becomes the columns. `meta.columns.dynamic` lists the remaining row dimension names, then the pivot column IDs, labelled by `meta.columns.labels`. Each cell is an object mapping every requested metric to its metric object.\n\n- Pivot rows are gap-filled with `0` cells: a date dimension returns every base check or period, `model_type` every engine the project runs; entities and types appear only when cited. A filled cell still carries the `responses_count` of its scope. `limit` and `offset` page the filled rows.\n\n- A pivot over an entity grain (`url`, `domain`, `subdomain`) requires `url_ids[]` or `domain_ids[]` and plots exactly those IDs — fetch the top rows first, then the pivot for those IDs. A pivot does not accept `filters` or `sort_field`, and a date dimension covers a single period: either returns `422`.\n\n- A date dimension on its own returns, per check, the period’s distinct AI answers that carry at least one brand mention, as rows with a single `ai_answers_count` cell. These are totals across all sources (per-source counts never sum to them, since one answer cites several sources). Only `ai_answers_count` is supported there, and `filters` require a grain.\n\n- Every metric value is an object, not a plain number: `{ \"values\": [v0] }` in single-period mode. Passing `date_range[1]` enables compare mode (requests without a date dimension only), which adds the second period and a `delta` object: `{ \"values\": [v0, v1], \"delta\": { \"absolute\": 15, \"percentage\": 50 } }`. Deltas are returned only in compare mode.\n\n- `subdomains_count` is valid only when the grain is `domain`, the only grain that folds subdomains into a domain row. With any other grain it returns `422`.\n\nIf successful, the server returns a metrics object with pagination, column layout, and the data rows.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/sources/#get-aggregated-source-metrics" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "dimensions[]", + "in": "query", + "required": true, + "description": "1 to 3 dimensions, no duplicates. Two or more pivot by the last one, in request order. Values: `check_id`, `check_date`, `check_week`, `check_month`, `url`, `domain`, `subdomain`, `page_type`, `domain_type`, `model_type`.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "week_start", + "in": "query", + "description": "First weekday for a `check_week` dimension, from 0 to 6 (`0` Sunday, `6` Saturday).", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "metrics[]", + "in": "query", + "required": true, + "description": "At least one metric, each returned as a metric object. Values: `ai_answers_count`, `citations_share`, `prompts_count`, `my_brand_mentions_count`, `competitors_count`, `responses_count`, `subdomains_count`. `responses_count` is the number of answers in the row’s scope (its period or check, and its engine under a `model_type` split) that carry at least one brand mention, cited or not — the `citations_share` denominator. It is the same for every entity or type in that scope and is not additive across them.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "date_range", + "in": "query", + "required": true, + "description": "1 to 2 entries: base period at index `0`, optional compare period at index `1`. Each has `from` and `to` in `YYYY-MM-DD`. Each period aggregates all checks within its dates. See [Date ranges and compare mode](https://seranking.com/api/se-visible/getting-started/#date-ranges-and-compare-mode).", + "schema": { + "type": "array", + "items": { + "type": "object" + } + } + }, + { + "name": "model_types", + "in": "query", + "description": "Filter by AI model types (e.g. `chatgpt`).", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "country_codes", + "in": "query", + "description": "**Deprecated — use `location_ids`.** Filter by ISO 3166-1 alpha-2 country codes. Resolved to the project’s live locations in those countries, so a deleted location is not matched, a country the project no longer tracks returns an empty result, and two locations in one country cannot be told apart. It keeps working for now; migrate to `location_ids` before it is withdrawn.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "location_ids", + "in": "query", + "description": "Filter by the project’s tracked locations, using location IDs from [List project locations](https://seranking.com/api/se-visible/locations/#list-project-locations). Multiple values combine as OR. An ID from another project or of a deleted location returns `422`. Combined with `country_codes`, only locations matching both are read.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "topic_ids", + "in": "query", + "description": "Filter by topic IDs.", + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + { + "name": "sentiments", + "in": "query", + "description": "Filter by sentiment: `positive`, `neutral`, `negative`.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "exclude_branded", + "in": "query", + "description": "When `true`, every number in the response is computed from non-branded prompts only. A prompt not yet classified counts as non-branded. Off when omitted.", + "schema": { + "type": "boolean" + } + }, + { + "name": "prompt_ids", + "in": "query", + "description": "Filter by prompt IDs.", + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + { + "name": "req_num", + "in": "query", + "description": "Limit to the answers with this request number within a check.", + "schema": { + "type": "integer" + } + }, + { + "name": "search_query", + "in": "query", + "description": "Search query for filtering results.", + "schema": { + "type": "string" + } + }, + { + "name": "filters", + "in": "query", + "description": "Up to 10 post-aggregation metric conditions, combined with AND. Rows failing any condition are dropped, and `meta.pagination.total` reflects that. Each condition has `metric` (a `metrics[]` value), `target` (`0` base period value, `1` compare period value, or `delta` absolute change; `1` and `delta` require `date_range[1]`), `operator` (`gt`, `gte`, `eq`, `lt`, `lte`), and `value` (a number). All four are required. Example: `filters[0][metric]=ai_answers_count&filters[0][target]=delta&filters[0][operator]=gt&filters[0][value]=0`.", + "schema": { + "type": "array", + "items": { + "type": "object" + } + } + }, + { + "name": "url_ids[]", + "in": "query", + "description": "Up to 50 IDs. Narrow the sources the rows aggregate to these `url_id` values, whatever the grain. Required for a pivot over an entity grain, which plots exactly these IDs.", + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + { + "name": "domain_ids[]", + "in": "query", + "description": "Up to 50 IDs. Narrow the sources to these `domain_id` values (as returned in the rows), whatever the grain. In the `subdomain` grain an ID selects exactly that subdomain; in the other grains a domain ID also matches every URL and subdomain under it.", + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + { + "name": "types[]", + "in": "query", + "description": "Up to 50 values. Narrow the sources to these page types (e.g. `listicle`, `blog`, `news`), whatever the grain. See the [Reference](https://seranking.com/api/se-visible/reference/) for the full list.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "domain_types[]", + "in": "query", + "description": "Up to 50 values. Narrow the sources to these domain types (matches any element of a row’s `domain_type` array), whatever the grain: `you`, `competitors`, `corporate`, `ugc`, `editorial`, `reference`, `institutional`, `other`.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "sort_field", + "in": "query", + "description": "A requested metric name; sorts on period 0 values. Append `_delta` to sort by the absolute delta (e.g. `ai_answers_count_delta`), which requires `date_range[1]`, otherwise the request returns `422`.", + "schema": { + "type": "string", + "default": "First metric, descending" + } + }, + { + "name": "sort_order", + "in": "query", + "description": "Sort direction: `asc` or `desc`.", + "schema": { + "type": "string", + "default": "desc" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum rows to return, from 0 to 1000. `0` returns every row and requires two or more dimensions (`422` otherwise).", + "schema": { + "type": "integer", + "default": 50 + } + }, + { + "name": "offset", + "in": "query", + "description": "Number of rows to skip (min `0`).", + "schema": { + "type": "integer", + "default": 0 + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total rows: the grain values, or the filled rows of a pivot." + } + } + }, + "columns": { + "type": "object", + "properties": { + "primary": { + "type": "string", + "description": "First dimension the rows are keyed by (one of the `dimensions[]` values)." + }, + "dynamic": { + "type": "array", + "items": { + "type": "string", + "description": "With 1 dimension, the requested metric names. In a pivot, the remaining row dimension names, then the pivot column IDs (entity IDs, type values, or date labels, as strings)." + }, + "description": "With 1 dimension, the requested metric names. In a pivot, the remaining row dimension names, then the pivot column IDs (entity IDs, type values, or date labels, as strings)." + }, + "labels": { + "type": "object", + "properties": { + "123": { + "type": "string" + }, + "456": { + "type": "string" + } + }, + "description": "Pivot only. Maps each pivot column ID to its display label (URL or domain name, or the value itself)." + } + } + } + }, + "description": "Pagination and column layout." + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "123": { + "type": "object", + "properties": { + "ai_answers_count": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "citations_share": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + } + }, + "456": { + "type": "object", + "properties": { + "ai_answers_count": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "citations_share": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + } + }, + "domain_id": { + "type": "integer" + }, + "domain": { + "type": "string" + }, + "ai_answers_count": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer" + } + }, + "delta": { + "type": "object", + "properties": { + "absolute": { + "type": "integer" + }, + "percentage": { + "type": "integer" + } + } + } + } + }, + "citations_share": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "check_date": { + "type": "string" + } + }, + "description": "Rows. With 1 dimension, each row is keyed by its own columns — `domain_id` and `domain` for the `domain` and `subdomain` grains; `url_id`, `url`, and `domain_id` for `url`; `page_type`, `domain_type`, or `model_type` for the type grains; the date label for a date dimension — plus one metric object per requested metric. In a pivot, each row holds the row dimensions’ columns, then one cell per pivot column keyed by its ID, mapping every requested metric to its metric object, with `0` cells where nothing was cited." + }, + "description": "Rows. With 1 dimension, each row is keyed by its own columns — `domain_id` and `domain` for the `domain` and `subdomain` grains; `url_id`, `url`, and `domain_id` for `url`; `page_type`, `domain_type`, or `model_type` for the type grains; the date label for a date dimension — plus one metric object per requested metric. In a pivot, each row holds the row dimensions’ columns, then one cell per pivot column keyed by its ID, mapping every requested metric to its metric object, with `0` cells where nothing was cited." + } + } + }, + "examples": { + "domainGrainSinglePeriod": { + "summary": "Domain grain, single period", + "value": { + "meta": { + "pagination": { + "total": 2 + }, + "columns": { + "primary": "domain", + "dynamic": [ + "ai_answers_count", + "citations_share" + ] + } + }, + "data": [ + { + "domain_id": 123, + "domain": "example.com", + "ai_answers_count": { + "values": [ + 45 + ] + }, + "citations_share": { + "values": [ + 75 + ] + } + }, + { + "domain_id": 456, + "domain": "other.com", + "ai_answers_count": { + "values": [ + 27 + ] + }, + "citations_share": { + "values": [ + 45 + ] + } + } + ] + } + }, + "domainGrainCompareMode": { + "summary": "Domain grain, compare mode", + "value": { + "meta": { + "pagination": { + "total": 1 + }, + "columns": { + "primary": "domain", + "dynamic": [ + "ai_answers_count" + ] + } + }, + "data": [ + { + "domain_id": 123, + "domain": "example.com", + "ai_answers_count": { + "values": [ + 45, + 30 + ], + "delta": { + "absolute": 15, + "percentage": 50 + } + } + } + ] + } + }, + "pivotCheckDateByDomainGapFilled": { + "summary": "Pivot: check date by domain, gap-filled", + "value": { + "meta": { + "pagination": { + "total": 2 + }, + "columns": { + "primary": "check_date", + "dynamic": [ + "123", + "456" + ], + "labels": { + "123": "example.com", + "456": "other.com" + } + } + }, + "data": [ + { + "123": { + "ai_answers_count": { + "values": [ + 45 + ] + }, + "citations_share": { + "values": [ + 12.5 + ] + } + }, + "456": { + "ai_answers_count": { + "values": [ + 0 + ] + }, + "citations_share": { + "values": [ + 0 + ] + } + }, + "check_date": "2026-01-01" + }, + { + "123": { + "ai_answers_count": { + "values": [ + 41 + ] + }, + "citations_share": { + "values": [ + 11.9 + ] + } + }, + "456": { + "ai_answers_count": { + "values": [ + 3 + ] + }, + "citations_share": { + "values": [ + 0.9 + ] + } + }, + "check_date": "2026-01-08" + } + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET --globoff 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/sources/metrics?dimensions[]=domain&metrics[]=ai_answers_count&metrics[]=citations_share&date_range[0][from]=2026-05-01&date_range[0][to]=2026-05-31' \\\n -H 'Authorization: Token YOUR_API_KEY'" + }, + { + "lang": "Shell", + "label": "To chart selected domains per check date, pivot by domain and pass the domain IDs", + "source": "curl -X GET --globoff 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/sources/metrics?dimensions[]=check_date&dimensions[]=domain&domain_ids[]=123&domain_ids[]=456&metrics[]=ai_answers_count&metrics[]=citations_share&date_range[0][from]=2026-01-01&date_range[0][to]=2026-01-31' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/engines": { + "get": { + "operationId": "listProjectEngines", + "tags": [ + "Engines" + ], + "summary": "List project engines", + "description": "Returns the AI engines a project tracks, one entry per engine type. An entry carries no location, because an engine is tracked in all of the project’s locations.\n\nIf successful, the server returns a JSON array of the project’s engines.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/engines/#list-project-engines" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "engine_type": { + "type": "string", + "description": "AI engine type. One of `chatgpt`, `google_gemini`, `perplexity`, `google_ai_mode`, `google_ai_overview`, `copilot`." + } + } + } + }, + "example": [ + { + "engine_type": "chatgpt" + }, + { + "engine_type": "google_gemini" + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/engines' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "post": { + "operationId": "addEngine", + "tags": [ + "Engines" + ], + "summary": "Add an engine", + "description": "Adds an AI engine to every location and language the project tracks, and starts tracking each location’s prompts with it.\n\n**Note:**\n\n- An engine tracked in only some locations is completed. The request is rejected only when the engine is already tracked everywhere: it then returns `422` with `error_code` `engine_already_added`.\n\n- Re-adding an engine that was removed earlier restores it together with the results, mentions and sources collected before the removal. A location that was removed stays removed and does not get the engine.\n\nIf successful, the server returns `201 Created` with the added engine.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/engines/#add-an-engine" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "engine_type": { + "type": "string", + "description": "AI engine type to add. One of `chatgpt`, `google_gemini`, `perplexity`, `google_ai_mode`, `google_ai_overview`, `copilot`." + } + }, + "required": [ + "engine_type" + ] + }, + "example": { + "engine_type": "chatgpt" + } + } + } + }, + "responses": { + "201": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "engine_type": { + "type": "string", + "description": "AI engine type." + } + } + }, + "example": { + "engine_type": "chatgpt" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/engines' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"engine_type\": \"chatgpt\"\n }'" + } + ] + }, + "put": { + "operationId": "replaceEngineSet", + "tags": [ + "Engines" + ], + "summary": "Replace the engine set", + "description": "Replaces the set of engines a project tracks with the given list in one atomic request. Engines missing from the project are added, or restored with their previously collected results, mentions and sources. Engines absent from the list are removed.\n\n**Note:**\n\n- The list applies to every location the project tracks. An engine tracked in only some locations is completed, so the request also evens out an uneven set and is idempotent.\n\n- The list cannot be empty: a project always keeps at least one engine. An empty list, an unknown engine type or a duplicate entry returns `422`.\n\nIf successful, the server returns a JSON array with the resulting set of project engines.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/engines/#replace-the-engine-set" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "engines": { + "type": "array", + "items": { + "type": "object", + "properties": { + "engine_type": { + "type": "string", + "description": "AI engine type. One of `chatgpt`, `google_gemini`, `perplexity`, `google_ai_mode`, `google_ai_overview`, `copilot`." + } + } + }, + "description": "Full desired set of engines for the project. At least 1 entry, no duplicates." + } + }, + "required": [ + "engines" + ] + }, + "example": { + "engines": [ + { + "engine_type": "chatgpt" + }, + { + "engine_type": "google_ai_overview" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "engine_type": { + "type": "string", + "description": "AI engine type." + } + } + } + }, + "example": [ + { + "engine_type": "chatgpt" + }, + { + "engine_type": "google_ai_overview" + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X PUT 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/engines' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"engines\": [\n { \"engine_type\": \"chatgpt\" },\n { \"engine_type\": \"google_ai_overview\" }\n ]\n }'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/engines/{engine_type}": { + "delete": { + "operationId": "removeEngine", + "tags": [ + "Engines" + ], + "summary": "Remove an engine", + "description": "Removes an engine from the whole project, in every location and language it was tracked in. Its prompt links, results, mentions and sources disappear from the project but are retained, and come back if you add the engine again.\n\n**Note:**\n\n- An engine that would leave a location without any engine, including the project’s last engine, cannot be removed. Attempting to do so returns `422` with `error_code` `cannot_remove_last_engine`.\n\n- An engine type the project does not track, including an unknown one, returns `404`.\n\nIf successful, the server returns `204 No Content` with an empty body.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/engines/#remove-an-engine" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "engine_type", + "in": "path", + "required": true, + "description": "Engine type to remove from the project. One of `chatgpt`, `google_gemini`, `perplexity`, `google_ai_mode`, `google_ai_overview`, `copilot`.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X DELETE 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/engines/google_ai_overview' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/locations": { + "get": { + "operationId": "listProjectLocations", + "tags": [ + "Locations" + ], + "summary": "List project locations", + "description": "Returns the locations tracked by a project, oldest first, together with how many locations the project uses and how many its plan allows.\n\n**Note:**\n\n- `max_locations` is the plan allowance for this project, not across the organisation. This differs from the organisation-wide prompt limit returned by [Get subscription](https://seranking.com/api/se-visible/subscription/) (`limits.prompts`).\n\n- A project left with more locations than its allowance, for example after a plan downgrade, has its checks paused until the excess locations are removed. Nothing is deleted, and the locations and their history stay readable.\n\nIf successful, the server returns a JSON object with the project’s locations and its location usage.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/locations/#list-project-locations" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "locations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Location ID." + }, + "country_code": { + "type": "string", + "description": "Upper-case two-letter country code from the platform country vocabulary. Mostly ISO 3166-1 alpha-2, with `UK` used instead of `GB`." + }, + "geo_location_id": { + "type": "integer", + "nullable": true, + "description": "ID of the tracked city or region in the geo dictionary — the value to send back when updating the location. `null` means country-level tracking." + }, + "city": { + "type": "string", + "nullable": true, + "description": "Display name of the tracked city or region. `null` means country-level tracking." + }, + "prompts_count": { + "type": "integer", + "description": "Number of prompts currently assigned to this location." + } + }, + "description": "Locations tracked by the project, oldest first." + }, + "description": "Locations tracked by the project, oldest first." + }, + "locations_used": { + "type": "integer", + "description": "Number of locations currently tracked by the project." + }, + "max_locations": { + "type": "integer", + "description": "Locations the plan allows this project to track. `null` means the plan does not cap them." + } + } + }, + "example": { + "locations": [ + { + "id": "9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59", + "country_code": "US", + "geo_location_id": null, + "city": null, + "prompts_count": 56 + }, + { + "id": "1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081", + "country_code": "UK", + "geo_location_id": 42, + "city": "Manchester, England, United Kingdom", + "prompts_count": 0 + } + ], + "locations_used": 2, + "max_locations": 1 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/locations' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + }, + "post": { + "operationId": "addLocation", + "tags": [ + "Locations" + ], + "summary": "Add a location", + "description": "Adds a location to a project and sets it up for every engine and language the project currently tracks. Send only `country_code` to track the whole country, or add a `geo_location_id` to track a city or region inside it.\n\n**Note:**\n\n- Existing prompt assignments are not copied, so a newly added location has no prompts.\n\n- Adding a place that was deleted before creates a new location. The deleted one stays deleted with its history.\n\n- Get `geo_location_id` from [Search cities and regions](https://seranking.com/api/se-visible/geo-autocomplete/#search-cities-and-regions), using the suggestions for the same country. Only the existence of the ID is validated: the API cannot check that the point actually lies in `country_code`.\n\n- If the project has reached its location allowance, the request returns `403` with `error_code` `insufficient_limit` and `limit_type` `llm_locations`.\n\n- If the project already tracks the same country and city, the request returns `409` with `error_code` `location_duplicate`.\n\nIf successful, the server returns `201 Created` with the added location.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/locations/#add-a-location" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "country_code": { + "type": "string", + "description": "Two-letter country code from the platform vocabulary, for example `US` or `UK`. Must be an available country. Minimum 2 characters, maximum 2 characters." + }, + "geo_location_id": { + "type": "integer", + "nullable": true, + "description": "ID of the city or region to track inside the country, as returned by [Search cities and regions](https://seranking.com/api/se-visible/geo-autocomplete/#search-cities-and-regions). Omit it or send `null` for country-level tracking." + } + }, + "required": [ + "country_code" + ] + }, + "example": { + "country_code": "UK", + "geo_location_id": 42 + } + } + } + }, + "responses": { + "201": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Location ID." + }, + "country_code": { + "type": "string", + "description": "Upper-case two-letter country code from the platform country vocabulary." + }, + "geo_location_id": { + "type": "integer", + "description": "ID of the tracked city or region. `null` means country-level tracking." + }, + "city": { + "type": "string", + "description": "Display name of the tracked city or region. `null` means country-level tracking." + }, + "prompts_count": { + "type": "integer", + "description": "Number of prompts currently assigned to this location." + } + } + }, + "example": { + "id": "1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081", + "country_code": "UK", + "geo_location_id": 42, + "city": "Manchester, England, United Kingdom", + "prompts_count": 0 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X POST 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/locations' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"country_code\": \"UK\",\n \"geo_location_id\": 42\n }'" + } + ] + } + }, + "/v1/se-visible/projects/{project_id}/locations/{location_id}": { + "patch": { + "operationId": "updateLocation", + "tags": [ + "Locations" + ], + "summary": "Update a location", + "description": "Points the location at the given country and city. The location keeps its ID, engines, and prompt assignments, so future checks run for the new place and everything collected so far stays under this location.\n\n**Note:**\n\n- The location keeps its `id`, so existing references to it stay valid.\n\n- Always send the target place in full: omitting `geo_location_id` or sending `null` returns the location to country-level tracking.\n\n- Sending the location’s current place changes nothing and returns the location as is.\n\n- If the project already tracks that place, the request returns `409` with `error_code` `location_duplicate`.\n\n- While the project is being checked, the request returns `409` with `error_code` `location_check_in_progress`. Retry once the check has finished, otherwise results still on their way would be filed under the new place.\n\nIf successful, the server returns the replacement location. Its `id` is the one to use from now on.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/locations/#update-a-location" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "location_id", + "in": "path", + "required": true, + "description": "UUID of the location to update.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "country_code": { + "type": "string", + "description": "Two-letter country code from the platform vocabulary, for example `US` or `UK`. Must be an available country. Minimum 2 characters, maximum 2 characters." + }, + "geo_location_id": { + "type": "integer", + "nullable": true, + "description": "ID of the city or region to track inside the country, as returned by [Search cities and regions](https://seranking.com/api/se-visible/geo-autocomplete/#search-cities-and-regions). Omit it or send `null` for country-level tracking." + } + }, + "required": [ + "country_code" + ] + }, + "example": { + "country_code": "UK", + "geo_location_id": null + } + } + } + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Location ID." + }, + "country_code": { + "type": "string", + "description": "Upper-case two-letter country code from the platform country vocabulary." + }, + "geo_location_id": { + "nullable": true, + "description": "ID of the tracked city or region. `null` means country-level tracking.", + "type": "integer" + }, + "city": { + "nullable": true, + "description": "Display name of the tracked city or region. `null` means country-level tracking.", + "type": "string" + }, + "prompts_count": { + "type": "integer", + "description": "Number of prompts currently assigned to this location." + } + } + }, + "example": { + "id": "1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081", + "country_code": "UK", + "geo_location_id": null, + "city": null, + "prompts_count": 56 + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X PATCH 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/locations/1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081' \\\n -H 'Authorization: Token YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"country_code\": \"UK\",\n \"geo_location_id\": null\n }'" + } + ] + }, + "delete": { + "operationId": "deleteLocation", + "tags": [ + "Locations" + ], + "summary": "Delete a location", + "description": "Deletes a location from a project and unassigns it from every prompt it is assigned to. The prompts themselves stay: a prompt left without locations is simply no longer tracked.\n\n**Note:**\n\n- If the location is assigned to prompts, the request returns `409` with `error_code` `location_in_use` and the number of affected prompts in `prompts_count`. Repeat the request with `confirm=true` to delete it anyway, so you can warn the user first.\n\n- The last location of a project cannot be deleted. Attempting to do so returns `422` with `error_code` `cannot_remove_last_location`.\n\nIf successful, the server returns `204 No Content` with an empty body.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/locations/#delete-a-location" + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "description": "UUID of the project.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "location_id", + "in": "path", + "required": true, + "description": "UUID of the location to delete.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "confirm", + "in": "query", + "description": "Must be `true` to delete a location that is assigned to prompts.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "204": { + "description": "No content." + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X DELETE 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/locations/1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081?confirm=true' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/se-visible/autocomplete/geo/countries": { + "get": { + "operationId": "listCountries", + "tags": [ + "Geo Autocomplete" + ], + "summary": "List countries", + "description": "Returns the countries a project location can track, with English names. Find the entry whose `country_code` matches the project location and pass its `id` as `country_id` to [Search cities and regions](#search-cities-and-regions).\n\n**Note:**\n\n- If the upstream Geo Autocomplete service is unavailable, the request returns `502` with the message “Geo Autocomplete service is unavailable.”\n\nIf successful, the server returns a JSON array of countries.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/geo-autocomplete/#list-countries" + }, + "parameters": [ + { + "name": "engine", + "in": "query", + "description": "AI engine type to return the country list for. One of `chatgpt`, `google_gemini`, `perplexity`, `google_ai_mode`, `google_ai_overview`, `copilot`. Omit to return the unified Google country list.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Country ID. Pass it as `country_id` to [Search cities and regions](#search-cities-and-regions)." + }, + "name": { + "type": "string", + "description": "Country name in English." + }, + "country_code": { + "type": "string", + "description": "Country code in the same vocabulary as a project location’s `country_code`, for example `UK`." + } + } + } + }, + "example": [ + { + "id": 2826, + "name": "United Kingdom", + "country_code": "UK" + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/se-visible/autocomplete/geo/countries' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/se-visible/autocomplete/geo/locations": { + "get": { + "operationId": "searchCitiesAndRegions", + "tags": [ + "Geo Autocomplete" + ], + "summary": "Search cities and regions", + "description": "Returns city and region suggestions inside a country that match a search query. Send the `id` of the suggestion you pick as `geo_location_id` when you [add a location](https://seranking.com/api/se-visible/locations/#add-a-location) or [update a location](https://seranking.com/api/se-visible/locations/#update-a-location).\n\n**Note:**\n\n- Location names come back in English for any `lang` other than `en`, `de`, `es`, `fr`, `it`, `ja`, `nl`, `pt`, `ru`, `sv` and `uk`.\n\n- If `country_id` is not a known country, the request returns `400` with `error_code` `invalid_country_id`.\n\n- If the upstream Geo Autocomplete service is unavailable, the request returns `502` with the message “Geo Autocomplete service is unavailable.”\n\nIf successful, the server returns a JSON array of city and region suggestions.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/geo-autocomplete/#search-cities-and-regions" + }, + "parameters": [ + { + "name": "query", + "in": "query", + "required": true, + "description": "Search text matched against city and region names. Maximum 255 characters.", + "schema": { + "type": "string" + } + }, + { + "name": "country_id", + "in": "query", + "required": true, + "description": "Country `id` returned by [List countries](#list-countries). Minimum `1`.", + "schema": { + "type": "integer" + } + }, + { + "name": "lang", + "in": "query", + "required": true, + "description": "Language of the location names. Case-insensitive. One of `en`, `fr`, `es`, `de`, `nl`, `it`, `ja`, `ko`, `hi`, `ar`, `pt`, `da`, `sv`, `nb`, `fi`, `ga`, `is`, `lb`, `zh`, `th`, `ms`, `id`, `tl`, `he`, `af`, `cs`, `el`, `tr`, `pl`, `ro`, `uk`, `ru`, `kk`, `uz`, `hu`, `et`, `lv`, `lt`.", + "schema": { + "type": "string" + } + }, + { + "name": "engine", + "in": "query", + "description": "AI engine type to search the location list for. One of `chatgpt`, `google_gemini`, `perplexity`, `google_ai_mode`, `google_ai_overview`, `copilot`. Omit to search the Google location list.", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of suggestions to return. Minimum `1`, maximum `10`.", + "schema": { + "type": "integer", + "default": 10 + } + } + ], + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Geo location ID. Send it as `geo_location_id` when adding or updating a project location." + }, + "display_name": { + "type": "string", + "description": "Name the project location reports as `city`. Can be the full name, equal to `canonical_name`." + }, + "canonical_name": { + "type": "string", + "description": "Full name with the region and country, to tell apart places with the same name." + } + } + } + }, + "example": [ + { + "id": 42, + "display_name": "Manchester, England, United Kingdom", + "canonical_name": "Manchester, England, United Kingdom" + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/se-visible/autocomplete/geo/locations?query=man&country_id=2826&lang=en&limit=10' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + }, + "/v1/se-visible/subscription": { + "get": { + "operationId": "getSubscriptionDetails", + "tags": [ + "Subscription" + ], + "summary": "Get subscription details", + "description": "Returns the authenticated user’s organisation subscription and current usage limits. This is organisation-level, not project-scoped.\n\nThis endpoint takes no parameters.\n\nIf successful, the server returns the subscription object.\n\n- SE Visible usage is governed by these plan limits (projects, prompts, user seats, and the per-project caps on locations and engines), not by per-request credits.\n\n- Prompts are counted in prompt scenarios: one per prompt per tracked location. A prompt tracked in 3 locations consumes 3. Engines and the prompt’s language do not multiply it.", + "externalDocs": { + "description": "Documentation", + "url": "https://seranking.com/api/se-visible/subscription/#get-subscription-details" + }, + "responses": { + "200": { + "description": "Successful response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "plan_key": { + "type": "string", + "description": "Subscription plan key (e.g. `pro`)." + }, + "status": { + "type": "string", + "description": "Subscription status (e.g. `active`)." + }, + "created_at": { + "type": "string", + "description": "Subscription creation datetime." + }, + "ends_at": { + "type": "string", + "description": "Subscription end datetime." + }, + "billing_period": { + "type": "string", + "description": "Billing period (e.g. `monthly`), or `null` if not set." + }, + "auto_renew": { + "type": "boolean", + "description": "Whether the subscription renews automatically." + }, + "limits": { + "type": "object", + "properties": { + "projects": { + "type": "object", + "properties": { + "max": { + "type": "integer", + "description": "Maximum number of projects allowed by the plan; `null` when `unlimited` is `true`." + }, + "used": { + "type": "integer", + "description": "Number of projects currently in use." + }, + "available": { + "type": "integer", + "description": "Number of projects remaining; `null` when `unlimited` is `true`, otherwise never below 0." + }, + "unlimited": { + "type": "boolean", + "description": "`true` when the plan does not cap projects; `max` and `available` are then `null`." + } + } + }, + "prompts": { + "type": "object", + "properties": { + "max": { + "type": "integer", + "description": "Maximum number of prompts allowed by the plan; `null` when `unlimited` is `true`." + }, + "used": { + "type": "integer", + "description": "Number of prompts currently in use." + }, + "available": { + "type": "integer", + "description": "Number of prompts remaining; `null` when `unlimited` is `true`, otherwise never below 0." + }, + "unlimited": { + "type": "boolean", + "description": "`true` when the plan does not cap prompts; `max` and `available` are then `null`." + } + } + }, + "user_seats": { + "type": "object", + "properties": { + "max": { + "type": "integer", + "description": "Maximum number of user seats allowed by the plan; `null` when `unlimited` is `true`." + }, + "used": { + "type": "integer", + "description": "Number of user seats currently in use." + }, + "available": { + "type": "integer", + "description": "Number of user seats remaining; `null` when `unlimited` is `true`. Otherwise `max - used` without clamping, so it is negative when active users exceed the seat limit." + }, + "unlimited": { + "type": "boolean", + "description": "`true` when the plan does not cap user seats; `max` and `available` are then `null`." + } + } + }, + "locations_per_project": { + "type": "object", + "properties": { + "max": { + "type": "integer", + "description": "Maximum number of locations per project; `null` when `unlimited` is `true`." + }, + "unlimited": { + "type": "boolean", + "description": "`true` when the plan does not cap locations per project." + } + }, + "description": "Cap on tracked locations, applied to each project separately, so it has no `used` or `available`." + }, + "web_engines": { + "type": "object", + "properties": { + "max": { + "type": "integer", + "description": "Maximum number of web engines per project; `null` when `unlimited` is `true`." + }, + "unlimited": { + "type": "boolean", + "description": "`true` when the plan does not cap web engines per project." + } + }, + "description": "Cap on browser (web scraping) engines a project can track, applied to each project separately." + }, + "api_engines": { + "type": "object", + "properties": { + "max": { + "type": "integer", + "description": "Maximum number of API engines per project; `null` when `unlimited` is `true`." + }, + "unlimited": { + "type": "boolean", + "description": "`true` when the plan does not cap API engines per project." + } + }, + "description": "Cap on API engines a project can track, applied to each project separately." + } + }, + "description": "Usage limits for the subscription." + } + } + }, + "example": { + "plan_key": "pro", + "status": "active", + "created_at": "2026-01-15 10:30:00", + "ends_at": "2026-02-15 10:30:00", + "billing_period": "monthly", + "auto_renew": true, + "limits": { + "projects": { + "max": 5, + "used": 2, + "available": 3, + "unlimited": false + }, + "prompts": { + "max": 450, + "used": 120, + "available": 330, + "unlimited": false + }, + "user_seats": { + "max": 3, + "used": 1, + "available": 2, + "unlimited": false + }, + "locations_per_project": { + "max": 1, + "unlimited": false + }, + "web_engines": { + "max": 6, + "unlimited": false + }, + "api_engines": { + "max": 0, + "unlimited": false + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/PaymentRequired" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "x-codeSamples": [ + { + "lang": "Shell", + "label": "cURL", + "source": "curl -X GET 'https://api.seranking.com/v1/se-visible/subscription' \\\n -H 'Authorization: Token YOUR_API_KEY'" + } + ] + } + } + }, + "components": { + "securitySchemes": { + "tokenAuth": { + "type": "apiKey", + "in": "header", + "name": "Authorization", + "description": "Recommended. Send the API key in the `Authorization` header with the `Token` scheme: `Authorization: Token YOUR_API_KEY`." + }, + "apikeyQuery": { + "type": "apiKey", + "in": "query", + "name": "apikey", + "description": "Alternative. Send the API key as the `apikey` query parameter. It must always be a query parameter, even when other data goes in the request body." + } + }, + "schemas": { + "GatewayError": { + "type": "object", + "description": "Error returned by the API gateway before the request reaches the API.", + "properties": { + "error_description": { + "type": "string", + "description": "Human-readable error message." + } + } + } + }, + "responses": { + "Unauthorized": { + "description": "The API key is missing, unknown or disabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + }, + "example": { + "error_description": "Authentication failed. Please ensure you have a valid, enabled API key. To get an API key, please contact us at api@seranking.com." + } + } + } + }, + "PaymentRequired": { + "description": "The account has no active subscription or not enough credits for this request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + }, + "example": { + "error_description": "Insufficient funds, API key is temporarily disabled. Please make a payment to enable you API key, or contact us at api@seranking.com." + } + } + } + }, + "Forbidden": { + "description": "The API key may not call this endpoint or use this HTTP method.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + }, + "example": { + "error_description": "Authentication failed. Please ensure you have a valid, enabled API key. To get an API key, please contact us at api@seranking.com." + } + } + } + }, + "TooManyRequests": { + "description": "The request rate limit of the API key was exceeded. See [API rate limits](https://seranking.com/api/rate-limits/).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + }, + "example": { + "error_description": "You made 11 requests, which is over the allowed limit of 10 requests per second. Please try again later." + } + } + } + } + } + } +} diff --git a/openapi/se-visible-api.yaml b/openapi/se-visible-api.yaml new file mode 100644 index 0000000..06c1903 --- /dev/null +++ b/openapi/se-visible-api.yaml @@ -0,0 +1,6238 @@ +openapi: 3.0.3 +info: + title: SE Visible API + version: 1.0.0 + description: >- + SE Visible tracks how brands appear across AI engines (ChatGPT, Google Gemini, Google AI Mode, and Google AI + Overview). The SE Visible API lets you create and manage brand visibility projects and pull metrics, prompt results, + and cited sources programmatically. + + + - create projects and manage brand visibility + + + - manage tracked brands, competitors, and brand aliases + + + - organize prompts into topics + + + - get AI prompt results with sentiment and brand mentions + + + - pull aggregated visibility metrics (visibility score, share of voice, sentiment, average position) + + + ## Authentication + + + All endpoints are served from `https://api.seranking.com` and use one SE Ranking API key, the same key for the Data + API, the Project API, the Local Marketing API and the SE Visible API. Send it in the `Authorization: Token + YOUR_API_KEY` header (recommended) or as the `apikey` query parameter. See [Getting API + access](https://seranking.com/api/how-to-get-api/). + + + Rate limits: [API rate limits](https://seranking.com/api/rate-limits/). Credits: [API credit + system](https://seranking.com/api/api-credits-system/). + contact: + name: SE Ranking API Support + url: https://seranking.com/api/ + email: api@seranking.com + license: + name: MIT + url: https://github.com/seranking/openapi/blob/main/LICENSE +externalDocs: + description: SE Visible API documentation + url: https://seranking.com/api/se-visible/ +servers: + - url: https://api.seranking.com + description: Production +security: + - tokenAuth: [] + - apikeyQuery: [] +tags: + - name: Projects + description: >- + The Projects API creates and manages SE Visible projects. A project tracks one primary brand with a domain across + a set of locations and AI engines. Everything else in SE Visible (brands, topics, prompts, results, and sources) + hangs off a project. + + + Using the SE Visible API, you can: + + + - list every project in your organisation with its domain, brand names, and status + + + - create a new project and have it processed asynchronously to generate prompts and collect data + + + - read a project’s full details, including processing progress, topics, check dates, and tracked competitor brands + + + - change how often a project is checked (daily or weekly) + + + - delete a project (soft delete, can be restored) + + + All endpoints are relative to the base URL `https://api.seranking.com/v1/se-visible`. + + + Documentation: [Projects](https://seranking.com/api/se-visible/projects/) + - name: Brands + description: >- + The Brands API manages the brands tracked inside a project: the primary brand and its competitors, along with + their aliases. It also surfaces brands that AI models mentioned in your results and aggregated visibility metrics. + + + Using the SE Visible API, you can: + + + - list a project’s tracked brands (primary brand and competitors) with their aliases + + + - add competitor brands and manage their aliases + + + - see which brands AI models mentioned in a project’s results + + + - pull aggregated brand metrics such as visibility score, share of voice, sentiment, and brand’s average position + in AI answers + + + All endpoints are relative to the base URL `https://api.seranking.com/v1/se-visible`. + + + Documentation: [Brands](https://seranking.com/api/se-visible/brands/) + - name: Topics + description: >- + The Topics API manages the topics inside a project. Topics group related prompts so you can organise prompts you + track and slice visibility metrics by topic. Each project has one default topic that is created automatically. + + + Using the SE Visible API, you can: + + + - create one or more topics in a project at once + + + - rename an existing topic + + + - delete a topic and the prompts grouped under it + + + All endpoints are relative to the base URL `https://api.seranking.com/v1/se-visible`. + + + Documentation: [Topics](https://seranking.com/api/se-visible/topics/) + - name: Prompts + description: >- + The Prompts API manages the prompts sent to AI models inside a project and exposes the results those models + return. Prompts are grouped under topics. Each prompt is run against the project’s AI models, and every run + produces a result containing the model’s text, the brands and URLs it mentioned, the sentiment, and an average + position. + + + Using the SE Visible API, you can: + + + - list project’s prompts with their visibility metrics, or list topics with aggregated metrics + + + - create prompts under a topic and delete prompts in bulk + + + - move prompts to another topic + + + - change the locations of a prompt selection + + + - read the details of a single prompt + + + - list the results for a prompt and read a single result in detail + + + All endpoints are relative to the base URL `https://api.seranking.com/v1/se-visible`. + + + Documentation: [Prompts](https://seranking.com/api/se-visible/prompts/) + - name: Sources + description: >- + The Sources API returns the AI-cited domains and URLs analyzed throughout a project. It is part of citation + analysis of SE Visible where prompts and AI results tell you what AI engines said, and sources tell you which web + pages they pulled the information from. Use it to identify the domains and pages that drive your AI visibility, + see how often they appear in AI answers, and track whether they mention your brand or your competitors’ brands. + + + Using the SE Visible API, you can: + + + - list the domains (or subdomains) AI models cite for a project, with appearance counts, coverage, prompt reach, + and domain trust, backlink, and traffic data + + + - drill into the individual URLs behind those domains, with page title, category, HTTP status, traffic, and + backlink type + + + - filter sources by model, location, topic, prompt, sentiment, brand mentions, competitor presence, backlink type, + and domain type + + + - compare a selected metric across two different date ranges to analyze performance changes + + + - get aggregated source metrics grouped by domain, URL, page type, domain type, AI model, or check date for tables + and charts + + + All endpoints are relative to the base URL `https://api.seranking.com/v1/se-visible`. + + + Documentation: [Sources](https://seranking.com/api/se-visible/sources/) + - name: Engines + description: >- + The Engines API manages the AI engines a project tracks. An engine belongs to the whole project rather than to a + single location: it is tracked in every location and language of the project. Where the project is tracked is + managed with [Locations](https://seranking.com/api/se-visible/locations/). + + + Using the SE Visible API, you can: + + + - list the engines a project tracks + + + - add an engine to a project, or restore one removed earlier together with its collected data + + + - replace the project’s whole engine set in one request + + + - remove an engine from a project + + + Engine types are listed in the [Reference](https://seranking.com/api/se-visible/reference/#ai-models). + + + All endpoints are relative to the base URL `https://api.seranking.com/v1/se-visible`. + + + Documentation: [Engines](https://seranking.com/api/se-visible/engines/) + - name: Locations + description: >- + The Locations API manages the locations a project tracks. A location is a country, optionally narrowed down to a + city or region inside it. Every location is checked with all of the project’s engines, and prompts are assigned to + the locations they are tracked in. + + + Using the SE Visible API, you can: + + + - list a project’s locations together with the plan’s location allowance + + + - add a country-level or city-level location to a project + + + - move a location to another country or city + + + - delete a location from a project + + + To track a city or region, look up its `geo_location_id` with the [Geo + autocomplete](https://seranking.com/api/se-visible/geo-autocomplete/) endpoints first. + + + All endpoints are relative to the base URL `https://api.seranking.com/v1/se-visible`. + + + Documentation: [Locations](https://seranking.com/api/se-visible/locations/) + - name: Geo Autocomplete + description: >- + The Geo autocomplete API looks up the countries, cities and regions a project location can track. Use it to find + the `geo_location_id` you need to track a city or region rather than a whole country. These endpoints are not tied + to a project. + + + Using the SE Visible API, you can: + + + - list the countries a project location can track + + + - search cities and regions inside a country by name + + + To track a city or region: + + + - Call [List countries](#list-countries) and find the entry whose `country_code` matches the location you want to + track. + + + - Pass that entry’s `id` as `country_id` to [Search cities and regions](#search-cities-and-regions). + + + - Send the `id` of the suggestion you pick as `geo_location_id`, together with the same `country_code`, when you + [add a location](https://seranking.com/api/se-visible/locations/#add-a-location) or [update a + location](https://seranking.com/api/se-visible/locations/#update-a-location). + + + All endpoints are relative to the base URL `https://api.seranking.com/v1/se-visible`. + + + Documentation: [Geo autocomplete](https://seranking.com/api/se-visible/geo-autocomplete/) + - name: Subscription + description: >- + The Subscription API returns SE Visible subscription plan and its current usage limits for your organisation. Use + it to check your plan, billing period, and how many projects, prompts, and user seats you have left before you + create new resources. + + + Using the SE Visible API, you can: + + + - read your organisation’s subscription plan and status + + + - check the billing period, renewal date, and auto-renew setting + + + - see the `max`, `used`, and `available` counts for projects, prompts, and user seats + + + All endpoints are relative to the base URL `https://api.seranking.com/v1/se-visible`. + + + Documentation: [Subscription](https://seranking.com/api/se-visible/subscription/) +paths: + /v1/se-visible/projects: + get: + operationId: listProjects + tags: + - Projects + summary: List projects + description: >- + Returns all projects belonging to the authenticated user’s organisation. Each project includes its domain, + tracked brand names, and status. To see the engines a project runs against, use [List project + engines](https://seranking.com/api/se-visible/engines/#list-project-engines). + + + This endpoint takes no parameters. + + + If successful, the server returns a JSON array of project objects. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/projects/#list-projects + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: string + description: Project UUID. + domain: + type: string + description: Target domain URL, including protocol. + brand_names: + type: array + items: + type: string + description: Brand names tracked in the project. + description: Brand names tracked in the project. + created_at: + type: string + description: Project creation timestamp. + checked_at: + type: string + description: >- + Most recent successful check completion timestamp. `null` if the project has not completed a + check yet. + status: + type: string + description: "Project status: `queued`, `processing`, `success`, or `error`." + example: + - id: 550e8400-e29b-41d4-a716-446655440000 + domain: https://lavazza.com + brand_names: + - Lavazza + created_at: "2023-12-15 10:30:00" + checked_at: "2023-12-15 11:45:00" + status: success + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/se-visible/projects' \ + -H 'Authorization: Token YOUR_API_KEY' + post: + operationId: createProject + tags: + - Projects + summary: Create project + description: >- + Creates a new project for tracking brand visibility across AI models. + + + **Note:** + + + - A new project is queued and processed asynchronously to generate prompts and collect data. The response + returns the project `id` immediately, before processing finishes. + + + - Poll [Get project details](#get-project-details) and read `check.processed_percent` (0 to 100) and + `project.status` (`queued`, `processing`, `success`, `error`) to track progress. + + + If successful, the server returns the UUID of the newly created project. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/projects/#create-project + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + domain: + type: string + description: Target domain URL to analyze for brand visibility. + project_name: + type: string + nullable: true + description: Name for the project, up to 255 characters. Defaults to `domain` when omitted or `null`. + country_code: + type: string + description: >- + ISO 3166-1 alpha-2 country code for project context. For example `US`, `UK`, `CA`, `FR`, `DE`. See + the [Reference](https://seranking.com/api/se-visible/reference/) for the full list. + lang_code: + type: string + description: >- + ISO 639-1 language code for project context. For example `en`, `fr`, `de`, `es`. See the + [Reference](https://seranking.com/api/se-visible/reference/) for the full list. + brand_names: + type: array + items: + type: string + description: >- + Brand names to track, including variations and aliases. At least one entry, each non-empty and up to + 2000 characters. + topics: + type: array + items: + type: string + description: Topics to track. 1 to 50 entries, each non-empty and up to 2000 characters. + competitors: + type: array + items: + type: object + properties: + brand: + type: string + description: Competitor brand name, up to 255 characters. Must be sent together with `domain`. + domain: + type: string + description: >- + Competitor hostname without protocol, up to 255 characters. Must contain a dot, for example + `illy.com`. Must be sent together with `brand`. + description: Competitor brands to track from the start. Up to 50 entries. + engines: + type: array + items: + type: string + description: >- + AI engines to enable for the project: `chatgpt`, `google_gemini`, `perplexity`, `google_ai_mode`, + `google_ai_overview`, `copilot`. At least one entry, values must be distinct. When omitted, all + available engines are enabled. You can manage engines later with the [project engines + endpoints](https://seranking.com/api/se-visible/engines/#list-project-engines). Takes precedence + over `models`. + models: + type: array + items: + type: string + description: >- + **Deprecated:** legacy alias for `engines`; use `engines` instead. At least one entry. When both are + sent, `engines` wins. When both are omitted, all available engines are enabled. + tracking: + type: object + description: >- + Tracking cadence for the new project. When omitted, the project is checked `daily` with 1 answer per + prompt. + properties: + frequency: + type: string + description: >- + Check period: `daily` or `weekly`. The number of answers analyzed per prompt follows from it + (`daily` → 1, `weekly` → 3) and cannot be set directly. You can change it later with [Update + tracking settings](#update-tracking-settings). + required: + - domain + - country_code + - lang_code + - brand_names + - topics + example: + domain: https://lavazza.com + project_name: Lavazza + country_code: US + lang_code: en + brand_names: + - Lavazza + topics: + - Ground Coffee + - Whole Bean Coffee + - Espresso Machines + - Coffee Makers + - Accessories + competitors: + - brand: Illy + domain: illy.com + engines: + - chatgpt + tracking: + frequency: weekly + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: string + description: UUID of the newly created project. + example: + id: 550e8400-e29b-41d4-a716-446655440000 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST 'https://api.seranking.com/v1/se-visible/projects' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "domain": "https://lavazza.com", + "project_name": "Lavazza", + "country_code": "US", + "lang_code": "en", + "brand_names": ["Lavazza"], + "topics": [ + "Ground Coffee", + "Whole Bean Coffee", + "Espresso Machines", + "Coffee Makers", + "Accessories" + ], + "competitors": [ + { "brand": "Illy", "domain": "illy.com" } + ], + "engines": ["chatgpt"], + "tracking": { "frequency": "weekly" } + }' + /v1/se-visible/projects/{project_id}: + get: + operationId: getProjectDetails + tags: + - Projects + summary: Get project details + description: >- + Returns detailed information about a single project: its metadata, check processing progress, the topics being + tracked, available historical check dates, the next scheduled check, the competitor brands attached to it, and + its tracking settings. + + + If successful, the server returns a project details object. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/projects/#get-project-details + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + project: + type: object + properties: + id: + type: string + description: Topic ID. + domain: + type: string + description: Brand domain URL, including protocol. `null` if no domain is set. + brand_names: + type: array + items: + type: string + created_at: + type: string + checked_at: + type: string + status: + type: string + country_code: + type: string + description: Country code the project was created for (`UK` for Great Britain). + description: >- + Project metadata. Same shape as a list item (`id`, `domain`, `brand_names`, `created_at`, + `checked_at`, `status`), plus `country_code`. + country_code: + type: string + description: Country code the project was created for (`UK` for Great Britain). + check: + type: object + properties: + processed_percent: + type: integer + description: Percentage of check processing completion, 0 to 100. + topics: + type: array + items: + type: object + properties: + id: + type: integer + description: Topic ID. + title: + type: string + description: Topic title. + is_default: + type: boolean + description: "`true` for the project’s default topic." + prompts_count: + type: integer + description: Number of prompts in this topic. + description: Topics being tracked in this project. + description: Topics being tracked in this project. + check_dates: + type: array + items: + type: string + description: >- + Start dates of successful and currently processing checks, sorted ascending, oldest first + (`YYYY-MM-DD`). + description: >- + Start dates of successful and currently processing checks, sorted ascending, oldest first + (`YYYY-MM-DD`). + next_check_date: + type: string + description: Next scheduled check date. `null` if no check is scheduled. + tracked_brands: + type: array + items: + type: object + properties: + brand_id: + type: integer + description: Brand ID. + brand_name: + type: string + description: Brand name. + domain: + type: string + nullable: true + description: Brand domain URL, including protocol. `null` if no domain is set. + description: Non-primary brands explicitly attached to the project for competitor tracking. + description: Non-primary brands explicitly attached to the project for competitor tracking. + has_unparsed_prompts: + type: boolean + description: Whether the project has prompts that have not yet been parsed. + tracking: + type: object + properties: + frequency: + type: string + description: >- + How often the project is checked: `daily` (every day) or `weekly` (once a week, on the weekday + the project was created). + answers_per_prompt: + type: integer + description: >- + How many AI answers are analyzed per prompt on each run, 1 to 5. Follows from `frequency` + (`daily` → 1, `weekly` → 3) and cannot be set directly. + description: Tracking settings of the project. + example: + project: + id: 550e8400-e29b-41d4-a716-446655440000 + domain: https://lavazza.com + brand_names: + - Lavazza + created_at: "2023-12-15 10:30:00" + checked_at: "2023-12-15 11:45:00" + status: success + country_code: US + country_code: US + check: + processed_percent: 75 + topics: + - id: 1 + title: Default + is_default: true + prompts_count: 0 + - id: 2 + title: Ground Coffee + is_default: false + prompts_count: 10 + - id: 3 + title: Whole Bean Coffee + is_default: false + prompts_count: 8 + check_dates: + - "2023-12-13" + - "2023-12-14" + - "2023-12-15" + next_check_date: "2023-12-22 10:00:00" + tracked_brands: + - brand_id: 10 + brand_name: Illy + domain: https://illy.com + - brand_id: 11 + brand_name: Nespresso + domain: null + has_unparsed_prompts: false + tracking: + frequency: weekly + answers_per_prompt: 3 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000' \ + -H 'Authorization: Token YOUR_API_KEY' + delete: + operationId: deleteProject + tags: + - Projects + summary: Delete a project + description: >- + Soft-deletes a project from your organisation. The project is removed from active use but can be restored if + needed. + + + If successful, the server returns `204 No Content` with an empty body. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/projects/#delete-a-project + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X DELETE 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/se-visible/projects/{project_id}/settings/tracking: + patch: + operationId: updateTrackingSettings + tags: + - Projects + summary: Update tracking settings + description: >- + Changes how often a project is checked. + + + **Note:** + + + - The number of answers analyzed per prompt follows from the period and cannot be set: `daily` analyzes 1 answer + per prompt on each run, `weekly` analyzes 3. + + + - Weekly checks run on the weekday the project was created. You cannot pick a different weekday. + + + If successful, the server returns the updated tracking settings. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/projects/#update-tracking-settings + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + frequency: + type: string + description: "Check period for the project: `daily` or `weekly`." + required: + - frequency + example: + frequency: daily + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + frequency: + type: string + description: >- + How often the project is checked: `daily` (every day) or `weekly` (once a week, on the weekday the + project was created). + answers_per_prompt: + type: integer + description: >- + How many AI answers are analyzed per prompt on each run, 1 to 5. Follows from `frequency` (`daily` + → 1, `weekly` → 3). + example: + frequency: daily + answers_per_prompt: 1 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X PATCH + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/settings/tracking' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "frequency": "daily" + }' + /v1/se-visible/projects/{project_id}/brands: + get: + operationId: listTrackedBrands + tags: + - Brands + summary: List tracked brands + description: >- + Returns all brands tracked in a project, including the primary brand and competitors. The primary brand has + `is_primary: true` and is listed first. Each brand includes its domain and aliases. + + + If successful, the server returns a JSON array of tracked brands. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/brands/#list-tracked-brands + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: integer + description: Brand ID. + title: + type: string + description: Brand name. + domain: + type: string + description: Brand domain URL, including protocol. + is_primary: + type: boolean + description: "`true` for the primary brand, `false` for a competitor." + aliases: + type: array + items: + type: object + properties: + id: + type: integer + description: Alias ID. + title: + type: string + description: Alias name. + description: Aliases (sub-brands) linked to this brand. + description: Aliases (sub-brands) linked to this brand. + example: + - id: 1 + title: Nike + domain: https://nike.com + is_primary: true + aliases: + - id: 2 + title: Nike Running + - id: 3 + title: Nike Basketball + - id: 4 + title: Adidas + domain: https://adidas.com + is_primary: false + aliases: + - id: 5 + title: Adidas Running + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/brands' \ + -H 'Authorization: Token YOUR_API_KEY' + post: + operationId: createCompetitorBrand + tags: + - Brands + summary: Create competitor brand + description: |- + Creates a new competitor brand with a domain and optional aliases. + + If successful, the server returns the created brand as a tracked brand object. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/brands/#create-competitor-brand + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + title: + type: string + description: Brand title. Maximum 500 characters. Must be unique within the project. + domain: + type: string + description: Brand domain URL. Maximum 500 characters. + aliases: + type: array + items: + type: object + properties: + title: + type: string + description: >- + Alias title. Maximum 500 characters. Must be unique and not match any existing brand or alias + in the project. + description: Optional aliases for the brand. + required: + - title + - domain + example: + title: Adidas + domain: https://adidas.com + aliases: + - title: Adidas Running + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: integer + description: Brand ID. + title: + type: string + description: Brand name. + domain: + type: string + description: Brand domain URL, including protocol. + is_primary: + type: boolean + description: Always `false` for brands created through this endpoint. + aliases: + type: array + items: + type: object + properties: + id: + type: integer + description: Brand ID. + title: + type: string + description: Brand name. + description: Aliases linked to this brand (`id`, `title`). + description: Aliases linked to this brand (`id`, `title`). + example: + id: 4 + title: Adidas + domain: https://adidas.com + is_primary: false + aliases: + - id: 5 + title: Adidas Running + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X POST 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/brands' + \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "title": "Adidas", + "domain": "https://adidas.com", + "aliases": [ + { "title": "Adidas Running" } + ] + }' + /v1/se-visible/projects/{project_id}/brands/mentioned: + get: + operationId: listMentionedBrands + tags: + - Brands + summary: List mentioned brands + description: >- + Returns all brands detected in the project’s AI check results. These are distinct from the brands you manually + track, and are useful for discovering competitors to add. Without query parameters, the full list is returned. + + + - Parameters are applied in this order: `search_query`, then `offset`, then `limit`. + + + - The response is a flat array with no pagination envelope. The response to a request without parameters is + unchanged. + + + - An invalid `search_query`, `limit`, or `offset` returns `422`. + + + If successful, the server returns a JSON array of mentioned brands. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/brands/#list-mentioned-brands + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + - name: search_query + in: query + description: Case-insensitive substring match on the brand title. Maximum 255 characters. + schema: + type: string + - name: limit + in: query + description: Maximum number of brands to return. Minimum `1`. Omit to return the full list. + schema: + type: integer + - name: offset + in: query + description: Number of brands to skip. Minimum `0`. + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + brand_id: + type: integer + description: Brand ID. + brand: + type: string + description: Brand name. + example: + - brand_id: 10 + brand: Nike + - brand_id: 11 + brand: Adidas + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/brands/mentioned?search_query=nike&limit=100&offset=0' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/se-visible/projects/{project_id}/brands/metrics: + get: + operationId: getAggregatedBrandMetrics + tags: + - Brands + summary: Get aggregated brand metrics + description: >- + Returns aggregated brand metrics for dynamic table rendering. You choose how the data is grouped + (`dimensions[]`) and which metrics to return (`metrics[]`). + + + **Note:** + + + - You pass 1 to 3 dimensions. The **last** dimension is always the pivot (it becomes columns); all preceding + dimensions define the row grouping. + + + - Every metric value is an object, not a plain number: `{ "values": [v0] }` in single-period mode. Passing + `date_range[1]` enables compare mode, which adds the second period and a `delta` object: `{ "values": [v0, v1], + "delta": { "absolute": 12, "percentage": 40 } }`. Deltas are returned only in compare mode. + + + - With **1 dimension**, each row holds the dimension key plus one key per metric. With **2 or 3 dimensions**, + `meta.columns.dynamic` lists the pivot IDs, and each row gains one nested object per pivot ID — keyed by that ID + — mapping each metric name to its value object. A pivot with no data for a metric is `null`. + + + - `date_range[0]` is the base period. Add `date_range[1]` to compare against a second period. + + + - `aio_overlap` and `aio_presence` are brand-agnostic: they are aggregated over all prompt results in the group, + not only the responses that mention a tracked brand, so they stay constant across the brand pivot. Sorting by + these metrics is not supported. + + + If successful, the server returns a metrics object with pagination, column layout, and the data rows. + + + **Note:** what each metric value means. “Answers” are the answers in the row that name at least one brand. + + + - `visibility_score`: share of the answers that mention the brand, weighted by its place among the brands an + answer names (first place counts in full, later places less). `0`–`100`. + + + - `avg_position`: the brand’s average place among the brands an answer names (`1` = first), over the answers + that mention it, one decimal. `null` when the brand is not mentioned. + + + - `sentiment_score`: (positive − negative mentions) / all the brand’s mentions × 100. `-100`–`100`; `null` when + the brand is not mentioned. + + + - `total_mentions`: answers that mention the brand, each answer counted once. + + + - `rank`: the brand’s place by `visibility_score`, then `avg_position`. `null` when the brand is not mentioned. + + + - `total_response_count`: the number of answers, the same for every brand in the row. + + + - `positive_count`, `neutral_count`, `negative_count`: the brand’s mentions with that sentiment. One answer can + hold several. + + + - `positive_pct`, `neutral_pct`, `negative_pct`: that sentiment’s share of the brand’s mentions, two decimals, + `0`–`100`. `null` when the brand is not mentioned. + + + - `total_all_mentions`: `total_mentions` summed over every brand the answers name, tracked or not. + + + - `unique_brands_count`: distinct brands the answers name, tracked or not. + + + - `share_of_voice`: `total_mentions` / `total_all_mentions` × 100. `0`–`100`. + + + - `aio_overlap` and `aio_presence`: `0`–`100`. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/brands/#get-aggregated-brand-metrics + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + - name: dimensions[] + in: query + required: true + description: >- + 1 to 3 dimensions, no duplicates. Last is the pivot. Values: `topic_id`, `brand_id`, `prompt_id`, + `model_type`, `location_id`, `check_id`, `check_date`, `check_week`, `check_month`. `check_week` and + `check_month` group checks by calendar week (starting on `week_start`) or month, labelled by the period + start (`YYYY-MM-DD`); neither can be combined with another date dimension. + schema: + type: array + items: + type: string + - name: metrics[] + in: query + required: true + description: >- + 1 to 15 metrics per request. Values: `visibility_score`, `avg_position`, `sentiment_score`, + `total_mentions`, `rank`, `total_response_count`, `positive_count`, `neutral_count`, `negative_count`, + `positive_pct`, `neutral_pct`, `negative_pct`, `total_all_mentions`, `unique_brands_count`, + `share_of_voice`, `aio_overlap`, `aio_presence`. + schema: + type: array + items: + type: string + - name: date_range + in: query + required: true + description: >- + Base period at index `0`, optional compare period at index `1`. Each has `from` and `to` in `YYYY-MM-DD`. At + least one period, at most two. See [Date ranges and compare + mode](https://seranking.com/api/se-visible/getting-started/#date-ranges-and-compare-mode). + schema: + type: array + items: + type: object + - name: week_start + in: query + description: >- + First weekday of the `check_week` buckets, between 0 and 6: `0` (Sunday) through `6` (Saturday). Only used + with `check_week`. + schema: + type: integer + nullable: true + default: 1 + - name: model_types + in: query + description: Filter by AI model types (e.g. `chatgpt`). + schema: + type: array + items: + type: string + - name: country_codes + in: query + description: >- + **Deprecated** — use `location_ids`. Filter by ISO 3166-1 alpha-2 country codes. It keeps working for now, + but it cannot tell two locations in one country apart. + schema: + type: array + items: + type: string + - name: location_ids + in: query + description: >- + Filter by the project’s tracked locations. Values are location IDs from [List project + locations](https://seranking.com/api/se-visible/locations/#list-project-locations); an ID from another + project or of a deleted location returns `422`. Multiple values combine as OR. Sent together with + `country_codes`, only locations matching both are read. + schema: + type: array + items: + type: string + - name: topic_ids + in: query + description: Filter by topic IDs. + schema: + type: array + items: + type: integer + - name: sentiments + in: query + description: "Filter by sentiment: `positive`, `neutral`, `negative`." + schema: + type: array + items: + type: string + - name: exclude_branded + in: query + description: >- + When `true`, every number in the response is computed from non-branded prompts only. A prompt whose branded + status is not detected yet counts as non-branded. Off when omitted. + schema: + type: boolean + - name: prompt_ids + in: query + description: Filter by prompt IDs. + schema: + type: array + items: + type: integer + - name: req_num + in: query + description: Filter by request number within a check. + schema: + type: integer + - name: tracked_brand_ids + in: query + description: Filter by tracked brand IDs. + schema: + type: array + items: + type: integer + - name: brand_ids + in: query + description: >- + Filter returned metric rows by brand IDs. Metrics and rank are computed before this output filter is + applied. When `tracked_brand_ids` is omitted and `brand_id` is the pivot dimension, these IDs also supply + the pivot columns, in the order requested. + schema: + type: array + items: + type: integer + - name: search_query + in: query + description: Search query for filtering results. + schema: + type: string + - name: sort_field + in: query + description: Metric name or pivot expression `metric_name[dimension=value]` (e.g. `visibility_score[brand_id=12]`). + schema: + type: string + default: First metric, descending + - name: sort_order + in: query + description: "Sort direction: `asc` or `desc`." + schema: + type: string + default: desc + - name: limit + in: query + description: >- + Maximum rows to return. `0` returns every row and makes `offset` a no-op, but is accepted only when the + first dimension is date-based (`check_id`, `check_date`, `check_week`, or `check_month`). Minimum `0`. + schema: + type: integer + default: 50 + - name: offset + in: query + description: Number of rows to skip. Minimum `0`. + schema: + type: integer + default: 0 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + meta: + type: object + properties: + pagination: + type: object + properties: + total: + type: integer + description: Total rows for the primary dimension. + columns: + type: object + properties: + primary: + type: string + description: >- + First grouping dimension (rows): `topic_id`, `brand_id`, `prompt_id`, `model_type`, + `location_id`, `check_id`, `check_date`, `check_week`, or `check_month`. + dynamic: + type: array + items: + type: integer + description: Pivot dimension IDs that become column keys. Empty in 1D mode. + description: Pivot dimension IDs that become column keys. Empty in 1D mode. + description: Pagination and column layout. + data: + type: array + items: + type: object + properties: + "8": + type: object + properties: + visibility_score: + type: object + properties: + values: + type: array + items: + type: integer + nullable: true + "12": + type: object + properties: + visibility_score: + type: object + properties: + values: + type: array + items: + type: integer + "15": + type: object + properties: + visibility_score: + type: object + properties: + values: + type: array + items: + type: integer + topic_id: + type: integer + visibility_score: + type: object + properties: + values: + type: array + items: + type: integer + brand_id: + type: integer + total_mentions: + type: object + properties: + values: + type: array + items: + type: integer + delta: + type: object + properties: + absolute: + type: integer + percentage: + type: number + description: >- + Rows keyed by the grouping dimension IDs. Each metric value is an object with `values` and, in + compare mode, `delta`. In 2D and 3D mode, each row also holds one nested object per pivot ID, + mapping metric names to their value objects. + description: >- + Rows keyed by the grouping dimension IDs. Each metric value is an object with `values` and, in + compare mode, `delta`. In 2D and 3D mode, each row also holds one nested object per pivot ID, + mapping metric names to their value objects. + examples: + 1dSingleDimension: + summary: 1D (single dimension) + value: + meta: + pagination: + total: 145 + columns: + primary: topic_id + dynamic: [] + data: + - topic_id: 5 + visibility_score: + values: + - 95 + - topic_id: 7 + visibility_score: + values: + - 41 + 1dInCompareModeTwoPeriods: + summary: 1D in compare mode (two periods) + value: + meta: + pagination: + total: 145 + columns: + primary: brand_id + dynamic: [] + data: + - brand_id: 12 + total_mentions: + values: + - 42 + - 30 + delta: + absolute: 12 + percentage: 40 + - brand_id: 15 + total_mentions: + values: + - 27 + - 31 + delta: + absolute: -4 + percentage: -12.9 + 2dSecondDimensionPivoted: + summary: 2D (second dimension pivoted) + value: + meta: + pagination: + total: 145 + columns: + primary: topic_id + dynamic: + - 12 + - 15 + - 8 + data: + - "8": + visibility_score: + values: + - 15 + "12": + visibility_score: + values: + - 95 + "15": + visibility_score: + values: + - 82 + topic_id: 5 + - "8": + visibility_score: null + "12": + visibility_score: + values: + - 41 + "15": + visibility_score: + values: + - 98 + topic_id: 7 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET --globoff + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/brands/metrics?dimensions[]=topic_id&dimensions[]=brand_id&metrics[]=visibility_score&date_range[0][from]=2026-05-01&date_range[0][to]=2026-05-31' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/se-visible/projects/{project_id}/brands/{brand_id}: + patch: + operationId: updateBrand + tags: + - Brands + summary: Update brand + description: >- + Updates a brand’s domain and/or syncs its aliases. When `aliases` is provided, it replaces all existing aliases + (new ones are added, existing kept, absent ones removed). Pass an empty array to clear all aliases. Both body + fields are optional. + + + If successful, the server returns the updated brand as a tracked brand object (`id`, `title`, `domain`, + `is_primary`, `aliases`). + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/brands/#update-brand + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + - name: brand_id + in: path + required: true + description: Brand ID to update. + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + domain: + type: string + description: New domain URL. Maximum 500 characters. + aliases: + type: array + items: + type: object + properties: + title: + type: string + description: Alias title. Maximum 500 characters. Must not match any other brand or alias in the project. + description: Aliases to sync (replaces existing). Pass `[]` to clear all aliases. + example: + domain: https://new-domain.com + aliases: + - title: Brand Alias 1 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: integer + title: + type: string + domain: + type: string + is_primary: + type: boolean + aliases: + type: array + items: + type: object + properties: + id: + type: integer + title: + type: string + example: + id: 4 + title: Adidas + domain: https://new-domain.com + is_primary: false + aliases: + - id: 9 + title: Brand Alias 1 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X PATCH + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/brands/4' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "domain": "https://new-domain.com", + "aliases": [ + { "title": "Brand Alias 1" } + ] + }' + delete: + operationId: deleteBrand + tags: + - Brands + summary: Delete brand + description: >- + Deletes a brand and all its aliases. + + + **Note:** + + + - The primary brand cannot be deleted. Attempting to do so returns `422` with the message “Cannot delete the + primary brand”. + + + If successful, the server returns `204 No Content` with an empty body. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/brands/#delete-brand + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + - name: brand_id + in: path + required: true + description: Brand ID to delete. + schema: + type: integer + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X DELETE + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/brands/4' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/se-visible/projects/{project_id}/brands/{brand_id}/aliases: + post: + operationId: addAliasesToBrand + tags: + - Brands + summary: Add aliases to brand + description: >- + Adds one or more aliases to an existing brand. Works for both the primary brand and competitors. + + + The body is a JSON array of alias objects. + + + If successful, the server returns the brand as a tracked brand object with the updated `aliases` array (`id`, + `title`, `domain`, `is_primary`, `aliases`). + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/brands/#add-aliases-to-brand + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + - name: brand_id + in: path + required: true + description: Brand ID to add aliases to. + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + type: object + properties: + title: + type: string + description: >- + Alias title. Maximum 500 characters. Must be unique and not match any existing brand or alias in + the project. + required: + - title + example: + - title: New Alias 1 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: integer + title: + type: string + domain: + type: string + is_primary: + type: boolean + aliases: + type: array + items: + type: object + properties: + id: + type: integer + title: + type: string + example: + id: 4 + title: Adidas + domain: https://adidas.com + is_primary: false + aliases: + - id: 5 + title: Adidas Running + - id: 12 + title: New Alias 1 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X POST + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/brands/4/aliases' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '[ + { "title": "New Alias 1" } + ]' + /v1/se-visible/projects/{project_id}/topics: + post: + operationId: createTopics + tags: + - Topics + summary: Create topics + description: >- + Creates one or more topics in a project. Pass the titles you want to add and the server creates a topic for each + one, returning the created topics. + + + If successful, the server returns a JSON array of the created topics. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/topics/#create-topics + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + titles: + type: array + items: + type: string + description: Topic titles to create. At least one title, each non-empty and maximum 255 characters. + required: + - titles + example: + titles: + - Artificial Intelligence + - Machine Learning + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: integer + description: Topic ID. + title: + type: string + description: Topic title. + created_at: + type: string + description: When the topic was created. + updated_at: + type: string + description: When the topic was last updated. + example: + - id: 123 + title: Artificial Intelligence + created_at: "2023-12-15T10:30:00.000000Z" + updated_at: "2023-12-15T10:30:00.000000Z" + - id: 124 + title: Machine Learning + created_at: "2023-12-15T10:30:00.000000Z" + updated_at: "2023-12-15T10:30:00.000000Z" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X POST 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/topics' + \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "titles": ["Artificial Intelligence", "Machine Learning"] + }' + /v1/se-visible/projects/{project_id}/topics/{topic_id}: + put: + operationId: updateTopicTitle + tags: + - Topics + summary: Update a topic title + description: |- + Updates the title of a topic in a project. + + **Note:** + + - The default topic cannot be updated. + + If successful, the server returns the updated topic. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/topics/#update-a-topic-title + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + - name: topic_id + in: path + required: true + description: Topic ID to update. + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + title: + type: string + description: New title for the topic. Minimum 1 character, maximum 255 characters. + required: + - title + example: + title: Artificial Intelligence + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: integer + description: Topic ID. + title: + type: string + description: Topic title. + is_default: + nullable: true + description: >- + `true` only for the project’s default topic, `null` for every other topic. Returned only for a + topic that already existed. + type: boolean + created_at: + type: string + description: When the topic was created. + updated_at: + type: string + description: When the topic was last updated. + example: + id: 123 + title: Artificial Intelligence + is_default: null + created_at: "2023-12-15T10:30:00.000000Z" + updated_at: "2023-12-15T11:05:00.000000Z" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X PUT + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/topics/123' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "title": "Artificial Intelligence" + }' + delete: + operationId: deleteTopic + tags: + - Topics + summary: Delete a topic + description: |- + Deletes a topic and its associated prompts from a project. + + If successful, the server returns `204 No Content` with an empty body. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/topics/#delete-a-topic + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + - name: topic_id + in: path + required: true + description: Topic ID to delete. + schema: + type: integer + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X DELETE + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/topics/123' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/se-visible/projects/{project_id}/prompts: + get: + operationId: listPromptsOrTopics + tags: + - Prompts + summary: List prompts or topics + description: >- + Returns a paginated list of the project’s prompts with their visibility metrics, or a list of topics with + metrics aggregated across their prompts. The `group_mode` parameter controls which of the two shapes the + response takes. + + + **Note:** + + + - `group_mode=prompt` (the default) returns individual prompts, one item per prompt. + + + - `group_mode=topic` returns topics instead, with metrics aggregated across all prompts in each topic. + + + - The response schema differs between the two modes. See both response examples below. + + + **Note:** the `*_delta` sort variants sort by the absolute change between periods. They require `date_range[1]` + to be present and to contain checks, otherwise the request is rejected with `422`. `id` sorts by prompt (or + topic) ID. `rank` is accepted but currently falls back to the default `visibility` ordering. A prompt or topic + without a `source_presence` or `organic_overlap` value in the period stays last in either direction, also under + their `_delta` variants. `citations_count` and `citations_share` sort by the answers that cited the + `cited_source` and require it, otherwise the request is rejected with `422`. `avg_position` and + `avg_position_delta` run inverted: `desc` puts the best position, or the biggest improvement, first. + + + **Note:** with `columns`, the response keeps the same shape but skips the work behind the columns you do not + list: `competitors` (`tops` comes back empty), `organic_overlap` and `source_presence` (their metrics come back + with a `null` value, unless you sort by that metric or its change). The `prompt` column and the base metrics + (`mentions`, `avg_position`, `sentiments`, `visibility`, `sov`) are always computed. An unknown column ID is + rejected with `422`. + + + If successful, the server returns a paginated object. The shape of each item in `items` depends on `group_mode`. + + + Each visibility metric (`mentions`, `avg_position`, `sentiments`, `visibility`, `sov`, `organic_overlap`, + `source_presence`) is returned as a `MetricValue` object rather than a plain number. + + + **Note:** value ranges — `sentiments` is `-100`–`100`; `visibility`, `sov`, `organic_overlap`, and + `source_presence` are `0`–`100`; `mentions` is a raw count; `avg_position` is a float. + + + **Example — group_mode=prompt (default)** + + + One row per prompt. Row-specific fields: `id`, `topic_id`, `prompt`, `is_parsed`. + + + **Example — group_mode=topic** + + + One row per topic, metrics aggregated across the topic’s prompts. Row-specific fields: `id`, `title`, + `prompts_count`, `branded_prompts_count` (replacing `topic_id`, `prompt`, `is_parsed`). The metric objects are + identical to prompt mode. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/prompts/#list-prompts-or-topics + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + - name: group_mode + in: query + description: "What to list: `prompt` for individual prompts, `topic` for topics with aggregated metrics." + schema: + type: string + default: prompt + - name: date_range + in: query + required: true + description: >- + 1 to 2 entries: base period at index `0`, optional compare period at index `1`. Each has `from` and `to` in + `YYYY-MM-DD`. See [Date ranges and compare + mode](https://seranking.com/api/se-visible/getting-started/#date-ranges-and-compare-mode). + schema: + type: array + items: + type: object + - name: model_types + in: query + description: >- + Filter by AI model types (e.g. `chatgpt`). See the + [Reference](https://seranking.com/api/se-visible/reference/) for the full list. + schema: + type: array + items: + type: string + - name: country_codes + in: query + description: >- + **Deprecated — use `location_ids`.** Filter by ISO 3166-1 alpha-2 country codes, resolved to the project’s + live locations in those countries. It still works for now; migrate to `location_ids` before it is withdrawn. + See the [Reference](https://seranking.com/api/se-visible/reference/) for the full list. + schema: + type: array + items: + type: string + - name: location_ids + in: query + description: >- + Filter by the project’s tracked locations, using location IDs from [List project + locations](https://seranking.com/api/se-visible/locations/#list-project-locations). Multiple values combine + as OR. An ID of another project or of a deleted location is rejected with `422`. Combined with + `country_codes`, only locations matching both are read. + schema: + type: array + items: + type: string + - name: topic_ids + in: query + description: Filter by topic IDs. + schema: + type: array + items: + type: integer + - name: search_query + in: query + description: Filter prompts by a search string. + schema: + type: string + - name: limit + in: query + description: Maximum number of items to return. Minimum 0; `0` returns an empty page. + schema: + type: integer + default: 1000 + - name: offset + in: query + description: Number of items to skip from the start of the list. Minimum 0. + schema: + type: integer + default: 0 + - name: sort_field + in: query + description: >- + Field to sort by: `id`, `visibility`, `avg_position`, `mentions`, `sentiments`, `sov`, `rank`, + `visibility_delta`, `avg_position_delta`, `sentiments_delta`, `sov_delta`, `citations_count`, + `citations_share`, `source_presence`, `source_presence_delta`, `organic_overlap`, `organic_overlap_delta`. + See the note below. + schema: + type: string + default: visibility + - name: sort_order + in: query + description: "Sort direction: `asc` or `desc`." + schema: + type: string + default: asc + - name: sentiments + in: query + description: "Filter by sentiment: `positive`, `neutral`, `negative`." + schema: + type: array + items: + type: string + - name: tracked_brand_ids + in: query + description: Filter by tracked brand IDs. + schema: + type: array + items: + type: integer + - name: exclude_branded + in: query + description: >- + When `true`, every number in the response is computed from non-branded prompts only, and branded prompts + drop out of the list. A prompt not classified yet counts as non-branded. Off when omitted. + schema: + type: boolean + - name: search_intents + in: query + description: >- + Filter by search intent: `I` (informational), `L` (local), `N` (navigational), `C` (commercial), `T` + (transactional). A prompt is returned when it carries any of the selected intents; prompts not classified + yet are not returned while this filter is applied. + schema: + type: array + items: + type: string + - name: funnel_stages + in: query + description: >- + Filter by funnel stage: `awareness`, `consideration`, `decision`, `none`. A prompt is returned when it + carries any of the selected stages. `none` matches only prompts explicitly marked as outside the funnel; + prompts not classified yet are not returned while this filter is applied. + schema: + type: array + items: + type: string + - name: lang_codes + in: query + description: >- + Filter by the prompt’s language (ISO 639-1, e.g. `en`, `de`). See the + [Reference](https://seranking.com/api/se-visible/reference/) for the full list. Prompts whose language is + not detected yet are not returned while this filter is applied. + schema: + type: array + items: + type: string + - name: columns + in: query + description: >- + Columns to compute, for both `group_mode` values: `prompt`, `topic`, `visibility`, `sov`, `avg_position`, + `competitors`, `sentiments`, `locations`, `source_presence`, `intent`, `funnel_stage`, `is_branded`, + `organic_overlap`, `lang_code`. When omitted, every metric is computed. See the note below. + schema: + type: array + items: + type: string + - name: cited_source[type] + in: query + description: >- + Keep only the prompts whose answers cited one source row from [Get project + sources](https://seranking.com/api/se-visible/sources/#get-project-sources) in the base period + (`date_range[1]` is ignored for it): `url`, `domain`, or `subdomain`. `url` needs `cited_source[url_id]`; + `domain` and `subdomain` need `cited_source[domain_id]`. Prompt list only: with `group_mode=topic` the + request is rejected with `422`. + schema: + type: string + - name: cited_source[url_id] + in: query + description: The `url_id` of the cited URL row. Minimum 1. Required with `cited_source[type]=url`, rejected otherwise. + schema: + type: integer + - name: cited_source[domain_id] + in: query + description: >- + Minimum 1. Required with `cited_source[type]=domain` or `subdomain`, rejected with `url`. For `subdomain` it + is the row’s own `domain_id`; for `domain` it is the `domain_id` the domain row returns. + schema: + type: integer + - name: metrics + in: query + description: >- + Facts about the `cited_source` to add to each prompt as extra fields: `citations_count`, `citations_share`, + `first_seen`, `last_seen`. Requires `cited_source`, otherwise the request is rejected with `422`. + schema: + type: array + items: + type: string + - name: prompt_ids + in: query + description: >- + Compute the metrics from the answers of these prompts only; the listed rows are not narrowed. Ignored when + `search_query`, `exclude_branded`, `funnel_stages`, `search_intents`, or `lang_codes` is set. + schema: + type: array + items: + type: integer + - name: req_num + in: query + description: >- + Compute the metrics from the answers with this `request_number` only; the listed rows are not narrowed. + Ignored when `search_query`, `exclude_branded`, `funnel_stages`, `search_intents`, or `lang_codes` is set. + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + total: + type: integer + description: Total number of prompts available. + items: + type: array + items: + type: object + properties: + id: + type: integer + description: Prompt ID. + topic_id: + type: integer + description: ID of the topic the prompt belongs to. + prompt: + type: string + description: Prompt text. + locations: + type: array + items: + type: object + properties: + id: + type: string + description: Tracked location ID. + country_code: + type: string + description: Country code of the location (e.g. `US`). + geo_location_id: + nullable: true + description: Geo location ID of the city or region. `null` for country-level tracking. + type: integer + description: >- + Locations the prompt is currently tracked in, in creation order. Period and `model_types` + filters do not narrow it. + description: >- + Locations the prompt is currently tracked in, in creation order. Period and `model_types` + filters do not narrow it. + units: + type: integer + description: Number of current locations; equals the length of `locations`. + mentions: + type: object + properties: + values: + type: array + items: + type: integer + description: >- + Metric values. One element per requested period: one value with no comparison, two + values (base, compared) when a comparison period is supplied. Elements may be `null` + when a period has no data. + description: >- + Metric values. One element per requested period: one value with no comparison, two + values (base, compared) when a comparison period is supplied. Elements may be `null` + when a period has no data. + delta: + type: object + properties: + absolute: + type: integer + description: Absolute change. `null` when it cannot be computed. + percentage: + type: number + description: Percentage change. `null` when it cannot be computed. + description: Change between periods. Present only when a comparison period is requested. + description: >- + Number of the prompt’s answers that mention the primary brand. See + [MetricValue](#metricvalue-object). + avg_position: + type: object + properties: + values: + type: array + items: + type: number + description: >- + Metric values. One element per requested period: one value with no comparison, two + values (base, compared) when a comparison period is supplied. Elements may be `null` + when a period has no data. + description: >- + Metric values. One element per requested period: one value with no comparison, two + values (base, compared) when a comparison period is supplied. Elements may be `null` + when a period has no data. + delta: + type: object + properties: + absolute: + type: number + description: Absolute change. `null` when it cannot be computed. + percentage: + type: number + description: Percentage change. `null` when it cannot be computed. + description: Change between periods. Present only when a comparison period is requested. + description: >- + Primary brand’s average place among the brands an answer names (1 = first, lower is better), + over the answers that mention it; `0` when none does. See + [MetricValue](#metricvalue-object). + sentiments: + type: object + properties: + values: + type: array + items: + type: integer + description: >- + Metric values. One element per requested period: one value with no comparison, two + values (base, compared) when a comparison period is supplied. Elements may be `null` + when a period has no data. + description: >- + Metric values. One element per requested period: one value with no comparison, two + values (base, compared) when a comparison period is supplied. Elements may be `null` + when a period has no data. + delta: + type: object + properties: + absolute: + type: integer + description: Absolute change. `null` when it cannot be computed. + percentage: + type: number + description: Percentage change. `null` when it cannot be computed. + description: Change between periods. Present only when a comparison period is requested. + description: >- + Primary brand’s sentiment score, −100–100: (positive − negative mentions) / all its mentions + × 100. See [MetricValue](#metricvalue-object). + visibility: + type: object + properties: + values: + type: array + items: + type: integer + description: >- + Metric values. One element per requested period: one value with no comparison, two + values (base, compared) when a comparison period is supplied. Elements may be `null` + when a period has no data. + description: >- + Metric values. One element per requested period: one value with no comparison, two + values (base, compared) when a comparison period is supplied. Elements may be `null` + when a period has no data. + delta: + type: object + properties: + absolute: + type: number + description: Absolute change. `null` when it cannot be computed. + percentage: + type: number + description: Percentage change. `null` when it cannot be computed. + description: Change between periods. Present only when a comparison period is requested. + description: >- + Primary brand’s visibility score, 0–100: the share of answers that mention it, weighted by + its place (first place counts in full, later places less). See + [MetricValue](#metricvalue-object). + sov: + type: object + properties: + values: + type: array + items: + type: integer + description: >- + Metric values. One element per requested period: one value with no comparison, two + values (base, compared) when a comparison period is supplied. Elements may be `null` + when a period has no data. + description: >- + Metric values. One element per requested period: one value with no comparison, two + values (base, compared) when a comparison period is supplied. Elements may be `null` + when a period has no data. + delta: + type: object + properties: + absolute: + type: number + description: Absolute change. `null` when it cannot be computed. + percentage: + type: number + description: Percentage change. `null` when it cannot be computed. + description: Change between periods. Present only when a comparison period is requested. + description: >- + Primary brand’s share of voice, 0–100: answers mentioning it as a percentage of all brands’ + answer mentions. See [MetricValue](#metricvalue-object). + organic_overlap: + type: object + properties: + values: + type: array + items: + type: integer + nullable: true + description: >- + Metric values. One element per requested period: one value with no comparison, two + values (base, compared) when a comparison period is supplied. Elements may be `null` + when a period has no data. + description: >- + Metric values. One element per requested period: one value with no comparison, two + values (base, compared) when a comparison period is supplied. Elements may be `null` + when a period has no data. + delta: + type: object + properties: + absolute: + type: integer + description: Absolute change. `null` when it cannot be computed. + percentage: + type: number + description: Percentage change. `null` when it cannot be computed. + description: Change between periods. Present only when a comparison period is requested. + description: >- + Share of the organic top-20 links that also appear in the AI Overview block, as a + percentage. Averaged only over queries where the AI Overview was shown; `values` is `null` + when the block was never present. See [MetricValue](#metricvalue-object). + source_presence: + type: object + properties: + values: + type: array + items: + type: integer + description: >- + Metric values. One element per requested period: one value with no comparison, two + values (base, compared) when a comparison period is supplied. Elements may be `null` + when a period has no data. + description: >- + Metric values. One element per requested period: one value with no comparison, two + values (base, compared) when a comparison period is supplied. Elements may be `null` + when a period has no data. + delta: + type: object + properties: + absolute: + type: integer + description: Absolute change. `null` when it cannot be computed. + percentage: + type: number + description: Percentage change. `null` when it cannot be computed. + description: Change between periods. Present only when a comparison period is requested. + description: >- + Share of the prompt’s answers in the period that cite at least one source page, as a whole + percentage. Pooled over every engine and location the filters leave. `values` is `null` when + the period holds no answers, `0` when answers arrived but none cited a source. See + [MetricValue](#metricvalue-object). + tops: + type: array + items: + type: object + properties: + brand_id: + type: integer + brand_name: + type: string + description: >- + Brands with the best average position in the prompt’s answers, best first (`brand_id`, + `brand_name`). + description: >- + Brands with the best average position in the prompt’s answers, best first (`brand_id`, + `brand_name`). + is_parsed: + type: boolean + description: Whether the prompt has been parsed. + search_intent: + type: array + items: + type: string + description: Search intent codes (e.g. `["I"]`). `null` when not applicable. + description: Search intent codes (e.g. `["I"]`). `null` when not applicable. + funnel_stage: + type: array + items: + type: string + description: >- + Funnel stages the prompt belongs to: `awareness`, `consideration`, `decision`, `none` + (outside the funnel). `null` when the prompt is not classified yet, and also when it is + stored with an empty stage set (the prompt details endpoint returns `["none"]` for it). + description: >- + Funnel stages the prompt belongs to: `awareness`, `consideration`, `decision`, `none` + (outside the funnel). `null` when the prompt is not classified yet, and also when it is + stored with an empty stage set (the prompt details endpoint returns `["none"]` for it). + lang_code: + description: >- + ISO 639-1 code of the language the prompt is written in. `null` when the language is not + detected yet. + is_branded: + type: boolean + description: >- + Whether the prompt text names a brand (yours, a tracked competitor, or any other). `null` + when the prompt is not classified yet. + citations_count: + type: integer + description: >- + Answers of the prompt that cited the `cited_source`. Present only when + `metrics[]=citations_count` is requested with a `cited_source`. + citations_share: + type: number + description: >- + `citations_count` as a percentage of the prompt’s answers in the period that name one or + more brands, one decimal. Present only when `metrics[]=citations_share` is requested with a + `cited_source`. + first_seen: + type: string + description: >- + First answer citing the `cited_source` (`YYYY-MM-DD HH:MM:SS`). Present only when + `metrics[]=first_seen` is requested with a `cited_source`. + last_seen: + type: string + description: >- + Last answer citing the `cited_source` (`YYYY-MM-DD HH:MM:SS`). Present only when + `metrics[]=last_seen` is requested with a `cited_source`. + title: + type: string + description: Topic title. + prompts_count: + type: integer + description: Number of the topic’s prompts that the prompt-level filters leave. + branded_prompts_count: + type: integer + description: >- + Number of the topic’s prompts whose text names a brand. Subtract it from `prompts_count` to + get the non-branded population that `exclude_branded` keeps. + description: Array of prompts. + description: Array of prompts. + examples: + example1: + summary: Example 1 + value: + total: 194 + items: + - id: 477111 + topic_id: 112593 + prompt: What are the best document automation software solutions for small businesses? + locations: + - id: 9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59 + country_code: US + geo_location_id: null + units: 1 + mentions: + values: + - 187 + - 87 + delta: + absolute: 100 + percentage: 114.9 + avg_position: + values: + - 1.4 + - 1.7 + delta: + absolute: -0.3 + percentage: -17.6 + sentiments: + values: + - 77 + - 65 + delta: + absolute: 12 + percentage: 18.5 + visibility: + values: + - 97 + - 97 + delta: + absolute: 0.5 + percentage: 0.5 + sov: + values: + - 10 + - 8 + delta: + absolute: 1.5 + percentage: 17.8 + organic_overlap: + values: + - 35 + - 28 + delta: + absolute: 7 + percentage: 25 + source_presence: + values: + - 60 + - 52 + delta: + absolute: 8 + percentage: 15.4 + tops: + - brand_id: 6075 + brand_name: Adobe creative cloud + is_parsed: true + search_intent: + - I + funnel_stage: + - consideration + lang_code: en + is_branded: false + citations_count: 41 + citations_share: 68.3 + first_seen: "2026-08-04 09:12:00" + last_seen: "2026-08-30 17:40:00" + example2: + summary: Example 2 + value: + total: 18 + items: + - id: 61 + title: On-Page SEO Checker + prompts_count: 1 + branded_prompts_count: 0 + mentions: + values: + - 191 + - 168 + delta: + absolute: 23 + percentage: 13.7 + avg_position: + values: + - 1 + - 1 + delta: + absolute: 0 + percentage: 0 + sentiments: + values: + - 11 + - 5 + delta: + absolute: 6 + percentage: 120 + visibility: + values: + - 100 + - 92 + delta: + absolute: 7.6 + percentage: 8.3 + sov: + values: + - 11 + - 9 + delta: + absolute: 1.9 + percentage: 21.1 + organic_overlap: + values: + - null + - null + source_presence: + values: + - 45 + - 40 + delta: + absolute: 5 + percentage: 12.5 + tops: + - brand_id: 1509 + brand_name: Se ranking + search_intent: + - I + funnel_stage: + - awareness + - consideration + lang_code: + - en + locations: + - id: 9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59 + country_code: US + geo_location_id: null + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET --globoff + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/prompts?group_mode=prompt&date_range[0][from]=2026-05-01&date_range[0][to]=2026-05-31' + \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: To include a comparison period (adds delta to each metric in the response), pass a second date_range entry + source: >- + curl -X GET --globoff + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/prompts?group_mode=prompt&date_range[0][from]=2026-05-23&date_range[0][to]=2026-08-20&date_range[1][from]=2026-02-22&date_range[1][to]=2026-05-22' + \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: The same comparison mode applies to group_mode=topic + source: >- + curl -X GET --globoff + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/prompts?group_mode=topic&date_range[0][from]=2026-05-23&date_range[0][to]=2026-08-20&date_range[1][from]=2026-02-22&date_range[1][to]=2026-05-22' + \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: >- + curl -X GET --globoff + 'https://api.seranking.com/v1/se-visible/projects/{project_id}/prompts?group_mode=prompt&date_range[0][from]=2026-05-23&date_range[0][to]=2026-08-20&date_range[1][from]=2026-02-22&date_range[1][to]=2026-05-22&cited_source[type]=domain&cited_source[domain_id]=123&metrics[]=citations_count&metrics[]=citations_share&metrics[]=first_seen&metrics[]=last_seen' + \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: cURL + source: >- + curl -X GET --globoff + 'https://api.seranking.com/v1/se-visible/projects/{project_id}/prompts?group_mode=topic&date_range[0][from]=2026-05-23&date_range[0][to]=2026-08-20&date_range[1][from]=2026-02-22&date_range[1][to]=2026-05-22' + \ + -H 'Authorization: Token YOUR_API_KEY' + delete: + operationId: deletePrompts + tags: + - Prompts + summary: Delete prompts + description: >- + Deletes one or more prompts from a project in a single request. Provide `prompt_ids` to delete individual + prompts and/or `topic_ids` to delete all prompts of the given topics. At least one of the two must be supplied. + + + If successful, the server returns `204 No Content` with an empty body. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/prompts/#delete-prompts + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + prompt_ids: + type: array + items: + type: integer + description: IDs of the prompts to delete. + topic_ids: + type: array + items: + type: integer + description: IDs of topics whose prompts should all be deleted. + example: + prompt_ids: + - 1 + - 2 + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X DELETE + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/prompts' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "prompt_ids": [1, 2] + }' + /v1/se-visible/projects/{project_id}/topics/{topic_id}/prompts: + post: + operationId: createPromptsForTopic + tags: + - Prompts + summary: Create prompts for a topic + description: >- + Creates one or more prompts under a topic. The prompts are added to the topic identified by `topic_id` and start + being processed against the project’s AI models in the selected locations. + + + **Note:** + + + - Omit `location_ids` to track the prompts in the project’s default location (its oldest location that still + tracks an engine). + + + - Each prompt costs one prompt per selected location: 3 prompts over 2 locations charge 6 against your plan’s + prompt limit. If they do not fit, the request is rejected with `403` (`insufficient_limit`) and nothing is + created. The prompt’s language and the number of tracked engines do not multiply the charge. + + + - Repeated texts, and texts that already exist in the topic, are not created again, so the response may list + fewer IDs than you sent, or be `[]`. + + + If successful, the server returns `201` with a JSON array of the created prompt IDs. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/prompts/#create-prompts-for-a-topic + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + - name: topic_id + in: path + required: true + description: ID of the topic the prompts are created under. + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + prompts: + type: array + items: + type: string + description: "Prompt texts to create: at least one text, each non-empty and at most 2000 characters." + location_ids: + type: array + items: + type: string + description: >- + Project locations to track the prompts in, using location IDs from [List project + locations](https://seranking.com/api/se-visible/locations/#list-project-locations). At least one ID; + an empty array is rejected. An ID that is not the project’s own, or of a deleted location, is + rejected with `422` (`location_invalid`). + required: + - prompts + example: + prompts: + - What are the benefits of using artificial intelligence in healthcare? + - How does AI improve patient diagnosis? + location_ids: + - 9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59 + - 1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081 + responses: + "201": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: integer + example: + - 7 + - 40 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X POST + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/topics/10/prompts' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "prompts": [ + "What are the benefits of using artificial intelligence in healthcare?", + "How does AI improve patient diagnosis?" + ], + "location_ids": [ + "9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59", + "1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081" + ] + }' + /v1/se-visible/projects/{project_id}/prompts/move/{topic_id}: + post: + operationId: movePromptsToTopic + tags: + - Prompts + summary: Move prompts to a topic + description: >- + Moves prompts to the target topic identified by `topic_id`. Select the prompts to move by their IDs, by their + source topics, or both. + + + **Note:** + + + - At least one of `prompt_ids` or `topic_ids` must be provided. + + + - When `topic_ids` is supplied, **all** prompts belonging to those topics are moved. + + + - Both fields can be combined; the resulting set is deduplicated. + + + - The operation is atomic (all-or-nothing), and the target topic must belong to the same project. + + + If successful, the server returns `204 No Content` with an empty body. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/prompts/#move-prompts-to-a-topic + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + - name: topic_id + in: path + required: true + description: ID of the target topic the prompts are moved to. + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + prompt_ids: + type: array + items: + type: integer + description: IDs of individual prompts to move. + topic_ids: + type: array + items: + type: integer + description: IDs of source topics whose prompts should all be moved. + example: + prompt_ids: + - 1 + - 2 + topic_ids: + - 10 + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X POST + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/prompts/move/12' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "prompt_ids": [1, 2], + "topic_ids": [10] + }' + /v1/se-visible/projects/{project_id}/prompts/locations: + put: + operationId: changeLocationsOfPromptSelection + tags: + - Prompts + summary: Change the locations of a prompt selection + description: >- + Applies one location change to every selected prompt at once. Select the prompts by their IDs, by their topics, + or both. Each selected prompt resolves to its own target set: `add` keeps its locations and adds the selected + ones, `replace` makes the selection its whole set, `remove` takes the selected ones off. + + + **Note:** + + + - At least one of `prompt_ids` or `topic_ids` must be provided as a non-empty array. The resulting set is + deduplicated; IDs of other projects and of deleted prompts are ignored, and `prompts_count` is what is left. + + + - Each prompt costs one prompt scenario per location it is tracked in, so the change is priced as the locations + gained minus the locations lost over the whole selection. If it adds more than the plan’s prompt limit has left, + the request returns `403` with `error_code` `insufficient_limit` and `limit_type` `llm_prompts`, and nothing is + written. + + + - Locations a prompt loses stop being checked; their results stay and come back when the location is assigned + again. Locations a prompt gains are checked right away. + + + - A prompt that loses every location stays in the project untracked. A change that alters nothing is a no-op. + + + - While the project is being checked, the request returns `409` with `error_code` `location_check_in_progress`. + Retry once the check has finished. + + + - A location ID that is not the project’s own, or whose location was deleted, returns `422` with `error_code` + `location_invalid`. A location that tracks no engine returns `422` with `error_code` `location_not_tracked`. + + + If successful, the server returns a JSON object with the change applied and each selected prompt’s resulting + locations. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/prompts/#change-prompt-locations + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + prompt_ids: + type: array + items: + type: integer + description: IDs of individual prompts in the selection. + topic_ids: + type: array + items: + type: integer + description: IDs of topics whose prompts all join the selection. + action: + type: string + description: >- + How `location_ids` applies to each selected prompt’s current location set: `add`, `replace`, or + `remove`. + location_ids: + type: array + items: + type: string + description: >- + Locations of the project, as listed by [List project + locations](https://seranking.com/api/se-visible/locations/#list-project-locations), each with a + tracked engine. Duplicates are collapsed. May be empty: `replace` with no locations takes every + selected prompt off all of its locations. + required: + - action + - location_ids + example: + prompt_ids: + - 1 + - 2 + action: add + location_ids: + - 9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + prompts_count: + type: integer + description: Number of prompts the selection resolved to. + impact: + type: object + properties: + prompt_units: + type: integer + description: Units the selected prompts hold before the change, one per current location. + prompt_units_after: + type: integer + description: Units the selected prompts hold once the change is applied. + project_units: + type: integer + description: Prompt units across the project before the change. + project_units_after: + type: integer + description: Prompt units across the project after the change. + usage: + type: object + properties: + used: + type: integer + description: Prompt units used across the organisation before the change. + max: + type: integer + description: The organisation’s prompt-unit limit. + cost: + type: integer + description: >- + Units the change consumes: locations added minus locations removed over the whole + selection. Zero for a one-for-one replacement, negative when prompts lose locations. + used_after: + type: integer + description: "`used` + `cost`." + available: + type: integer + description: "`max` minus `used`, never negative." + fits_limit: + type: boolean + description: Whether `cost` fits in `available`. A change that adds nothing always fits. + description: Organisation prompt-unit usage around the change. + description: Prompt units of the selection, the project, and the organisation around the change. + locations: + type: array + items: + type: object + properties: + id: + type: string + description: Tracked location ID. + prompts_count: + type: integer + description: Selected prompts tracked in the location after the change. + description: Every location of the project, in the project’s location order. + description: Every location of the project, in the project’s location order. + prompts: + type: array + items: + type: object + properties: + id: + type: integer + description: Prompt ID. + locations: + type: array + items: + type: object + properties: + id: + type: string + description: Tracked location ID. + country_code: + type: string + description: Platform country code. + geo_location_id: + type: integer + nullable: true + description: Geo dictionary ID; `null` for country-level tracking. + description: Locations the prompt is tracked in after the change, in creation order. + description: Locations the prompt is tracked in after the change, in creation order. + units: + type: integer + description: Number of current locations; equals the length of `locations`. + description: Every selected prompt with its locations after the change, by ID ascending. + description: Every selected prompt with its locations after the change, by ID ascending. + example: + prompts_count: 2 + impact: + prompt_units: 3 + prompt_units_after: 5 + project_units: 12 + project_units_after: 14 + usage: + used: 18 + max: 50 + cost: 2 + used_after: 20 + available: 32 + fits_limit: true + locations: + - id: 9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59 + prompts_count: 2 + - id: 1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081 + prompts_count: 2 + prompts: + - id: 1 + locations: + - id: 9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59 + country_code: US + geo_location_id: null + - id: 1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081 + country_code: UK + geo_location_id: 1006886 + units: 2 + - id: 2 + locations: + - id: 9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59 + country_code: US + geo_location_id: null + - id: 1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081 + country_code: UK + geo_location_id: 1006886 + units: 2 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X PUT + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/prompts/locations' + -H 'Authorization: Token YOUR_API_KEY' -H 'Content-Type: application/json' -d '{ + "prompt_ids": [1, 2], + "action": "add", + "location_ids": ["9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59"] + }' + /v1/se-visible/projects/{project_id}/prompts/{prompt_id}: + get: + operationId: getPromptDetails + tags: + - Prompts + summary: Get prompt details + description: |- + Returns the details of a single prompt. + + If successful, the server returns the prompt object. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/prompts/#get-prompt-details + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + - name: prompt_id + in: path + required: true + description: ID of the prompt. + schema: + type: integer + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: integer + description: Prompt ID. + text: + type: string + description: Prompt text. + topic_id: + type: integer + description: ID of the topic the prompt belongs to. + created_at: + type: string + description: When the prompt was created, as an ISO 8601 timestamp. + updated_at: + type: string + description: When the prompt was last changed, as an ISO 8601 timestamp. + is_parsed: + type: boolean + description: Whether the prompt has been parsed. + search_intent: + type: array + items: + type: string + description: >- + Search intent codes: `I` (informational), `L` (local), `N` (navigational), `C` (commercial), `T` + (transactional). `null` when the prompt is not classified yet; an empty array when it carries no + intent. + description: >- + Search intent codes: `I` (informational), `L` (local), `N` (navigational), `C` (commercial), `T` + (transactional). `null` when the prompt is not classified yet; an empty array when it carries no + intent. + funnel_stage: + type: array + items: + type: string + description: >- + Funnel stages the prompt belongs to: `awareness`, `consideration`, `decision`, `none` (outside + the funnel). `null` when the prompt is not classified yet. + description: >- + Funnel stages the prompt belongs to: `awareness`, `consideration`, `decision`, `none` (outside the + funnel). `null` when the prompt is not classified yet. + lang_code: + type: string + description: >- + ISO 639-1 code of the language the prompt is written in. `null` when the language is not detected + yet. + is_branded: + type: boolean + description: >- + Whether the prompt text names a brand (yours, a tracked competitor, or any other). `null` when the + prompt is not classified yet. + example: + id: 1 + text: What are the best ground coffee brands for a rich and smooth flavor? + topic_id: 10 + created_at: "2023-12-15T10:30:00.000000Z" + updated_at: "2023-12-15T11:05:00.000000Z" + is_parsed: true + search_intent: + - L + - C + funnel_stage: + - consideration + lang_code: en + is_branded: false + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/prompts/1' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/se-visible/projects/{project_id}/prompts/{prompt_id}/results: + get: + operationId: getPromptResultList + tags: + - Prompts + summary: Get prompt result list + description: >- + Returns a paginated list of results for a prompt. Each result is one model run, with the model’s text, the + brands it mentioned, sentiment, and an average position. You get one result per answer of each location–engine + pair the prompt is tracked in; answers of a deleted engine or location, or of a location no longer assigned to + the prompt, are excluded. + + + **Note:** `topic_ids` and `tracked_brand_ids` are no longer part of this endpoint’s contract. They were + previously accepted but never applied, so removing them changes no response. If your integration passed them + here, the data you received was unfiltered — please re-check it. They remain valid on [List prompts or + topics](#list-prompts-or-topics) and on the brand metrics endpoint, where they are applied. + + + If successful, the server returns a paginated object of results. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/prompts/#get-prompt-result-list + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + - name: prompt_id + in: path + required: true + description: ID of the prompt. + schema: + type: integer + - name: date_range + in: query + required: true + description: >- + 1 to 2 entries: base period at index `0`, optional compare period at index `1`. Each has `from` and `to` in + `YYYY-MM-DD`. See [Date ranges and compare + mode](https://seranking.com/api/se-visible/getting-started/#date-ranges-and-compare-mode). + schema: + type: array + items: + type: object + - name: model_types + in: query + description: >- + Filter by AI model types (e.g. `chatgpt`). See the + [Reference](https://seranking.com/api/se-visible/reference/) for the full list. + schema: + type: array + items: + type: string + - name: country_codes + in: query + description: >- + **Deprecated — use `location_ids`.** Filter by ISO 3166-1 alpha-2 country codes, resolved to the project’s + live locations in those countries. It still works for now; migrate to `location_ids` before it is withdrawn. + See the [Reference](https://seranking.com/api/se-visible/reference/) for the full list. + schema: + type: array + items: + type: string + - name: location_ids + in: query + description: >- + Filter by the project’s tracked locations, using location IDs from [List project + locations](https://seranking.com/api/se-visible/locations/#list-project-locations). Multiple values combine + as OR. An ID of another project or of a deleted location is rejected with `422`. Combined with + `country_codes`, only locations matching both are read. + schema: + type: array + items: + type: string + - name: sentiments + in: query + description: "Filter by sentiment: `positive`, `neutral`, `negative`." + schema: + type: array + items: + type: string + - name: exclude_branded + in: query + description: >- + Accepted so the same control can be sent with every request, but not applied here: a branded prompt still + returns its answers. The response is the same with and without it. + schema: + type: boolean + - name: metrics + in: query + description: >- + Extra per-answer fields to add to each item: `sources_count` (distinct pages the answer cited), + `cited_domains` (distinct domains of those pages, alphabetically). + schema: + type: array + items: + type: string + - name: sort_field + in: query + description: >- + Order of the answers: `created_at` (newest first by default), `avg_position` (the primary brand’s position, + best first by default; answers without a mention last either way), `sources_count` (most pages cited first + by default). Ties break on the newest check. + schema: + type: string + default: created_at + - name: sort_order + in: query + description: >- + Sort direction: `asc` or `desc`. When omitted, the direction depends on `sort_field`: `created_at` and + `sources_count` sort descending, `avg_position` sorts the best position first. + schema: + type: string + - name: search_query + in: query + description: Filter results by a search string. + schema: + type: string + - name: limit + in: query + description: Maximum number of items to return. Minimum 0; `0` returns every result and ignores `offset`. + schema: + type: integer + default: 1000 + - name: offset + in: query + description: Number of items to skip from the start of the list. Minimum 0. + schema: + type: integer + default: 0 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + items: + type: array + items: + type: object + properties: + id: + type: string + description: Result ID. Pass it as `result_id` to get the result details. + prompt_id: + type: integer + description: ID of the prompt the result belongs to. + prompt: + type: string + description: Prompt text. + request_number: + type: integer + description: Request number for this prompt run. + avg_position: + type: number + description: >- + Primary brand’s place among the brands the answer names (1 = first, lower is better); `0` + when the answer does not mention it. + sentiment: + type: string + description: "Sentiment: `positive`, `neutral`, `negative`, or `null`." + text: + type: string + description: The AI-generated response text. + has_urls: + type: boolean + description: Whether the result contains source URLs. + tops: + type: array + items: + type: object + properties: + brand_id: + type: integer + brand_name: + type: string + description: Top brands mentioned (`brand_id`, `brand_name`). + description: Top brands mentioned (`brand_id`, `brand_name`). + created_at: + type: string + description: When the result was created (`YYYY-MM-DD HH:MM:SS`). + has_mentions: + type: boolean + description: Whether the result has brand mentions. + model: + type: string + description: >- + AI model that produced the result: `chatgpt`, `google_gemini`, `perplexity`, + `google_ai_mode`, `google_ai_overview`, `copilot`. + location_id: + type: string + description: Project location the answer was collected under. + sources_count: + type: integer + description: Distinct pages the answer cited. Present only when `metrics[]=sources_count` is requested. + cited_domains: + type: array + items: + type: string + description: >- + Distinct domains of the pages the answer cited, alphabetically. Present only when + `metrics[]=cited_domains` is requested. + description: >- + Distinct domains of the pages the answer cited, alphabetically. Present only when + `metrics[]=cited_domains` is requested. + description: Array of results. + description: Array of results. + total: + type: integer + description: Total number of results available. + example: + items: + - id: 0199f3a2-7c1e-7d4a-9b2e-5f0c8a1d2e3f_48213_1 + prompt_id: 1 + prompt: What are the best ground coffee brands for a rich and smooth flavor? + request_number: 1 + avg_position: 1.5 + sentiment: positive + text: Based on extensive research and customer reviews, some of the best ground coffee brands... + has_urls: true + tops: + - brand_id: 1 + brand_name: Lavazza + - brand_id: 2 + brand_name: Illy + - brand_id: 3 + brand_name: Starbucks + created_at: "2023-12-15 10:30:00" + has_mentions: true + model: chatgpt + location_id: 9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59 + sources_count: 7 + cited_domains: + - coffeeblog.com + - example.com + - id: 0199f3a2-7c1e-7d4a-9b2e-5f0c8a1d2e3f_48213_2 + prompt_id: 1 + prompt: What are the best ground coffee brands for a rich and smooth flavor? + request_number: 2 + avg_position: 2.3 + sentiment: neutral + text: Coffee preferences vary greatly among consumers, but several brands consistently... + has_urls: false + tops: + - brand_id: 4 + brand_name: Folgers + - brand_id: 5 + brand_name: Maxwell House + - brand_id: 6 + brand_name: Dunkin' + created_at: "2023-12-15 10:35:00" + has_mentions: true + model: google_gemini + location_id: 9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59 + sources_count: 0 + cited_domains: [] + total: 25 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET --globoff + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/prompts/1/results?date_range[0][from]=2026-05-01&date_range[0][to]=2026-05-31&metrics[]=sources_count&metrics[]=cited_domains' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/se-visible/projects/{project_id}/prompts/{prompt_id}/results/{result_id}: + get: + operationId: getPromptResultDetails + tags: + - Prompts + summary: Get prompt result details + description: >- + Returns the full detail of a single result, including the complete response text, the source URLs, and the + brands mentioned. + + + If successful, the server returns the result object. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/prompts/#get-prompt-result-details + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + - name: prompt_id + in: path + required: true + description: ID of the prompt. + schema: + type: integer + - name: result_id + in: path + required: true + description: The `id` of the result from the result list. The deprecated integer ID is still accepted. + schema: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: string + description: Result ID. + prompt: + type: string + description: Prompt text. + request_number: + type: integer + description: Request number for this prompt run. + avg_position: + type: number + description: >- + Primary brand’s place among the brands the answer names (1 = first, lower is better); `0` when the + answer does not mention it. + sentiment: + type: string + description: "Sentiment: `positive`, `neutral`, `negative`, or `null`." + text: + type: string + description: The AI-generated response text. + urls: + type: array + items: + type: string + description: Source URLs mentioned in the result. + description: Source URLs mentioned in the result. + brands: + type: array + items: + type: object + properties: + brand_id: + type: integer + brand_name: + type: string + description: Brands mentioned in the result (`brand_id`, `brand_name`). + description: Brands mentioned in the result (`brand_id`, `brand_name`). + created_at: + type: string + description: When the result was created (`YYYY-MM-DD HH:MM:SS`). + has_mentions: + type: boolean + description: Whether the result has brand mentions. + model: + type: string + description: >- + AI model that produced the result: `chatgpt`, `google_gemini`, `perplexity`, `google_ai_mode`, + `google_ai_overview`, `copilot`. + example: + id: 0199f3a2-7c1e-7d4a-9b2e-5f0c8a1d2e3f_48213_1 + prompt: What are the best ground coffee brands for a rich and smooth flavor? + request_number: 1 + avg_position: 1.5 + sentiment: positive + text: >- + Based on extensive research and customer reviews, some of the best ground coffee brands for rich and + smooth flavor include Lavazza, known for its Italian roasting expertise and premium blends... + urls: + - https://example.com/coffee-review + - https://coffeeblog.com/best-brands + brands: + - brand_id: 1 + brand_name: Lavazza + - brand_id: 2 + brand_name: Illy + - brand_id: 3 + brand_name: Starbucks + created_at: "2023-12-15 10:30:00" + has_mentions: true + model: chatgpt + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/prompts/1/results/0199f3a2-7c1e-7d4a-9b2e-5f0c8a1d2e3f_48213_1' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/se-visible/projects/{project_id}/sources: + get: + operationId: getProjectSources + tags: + - Sources + summary: Get project sources + description: >- + Retrieves the sources (domains, subdomains, or URLs) that AI models cited across a project, with extensive + filtering. The shape of each row in the response depends on `source_type`: `domain` returns one row per + registrable domain (its subdomains are aggregated into the row), `subdomain` returns one row per host exactly as + collected, and `url` returns one row per cited page. + + + **Note:** + + + - `source_type` switches the response between domain rows (`domain` and `subdomain`) and URL rows. It also + changes which `source_sort_field` and `columns` values are valid: passing a value that belongs to the other type + returns `422`. + + + - Most numeric fields are wrapped in a metric object with a `values` array. A single period returns one entry in + `values`. When you supply `date_range[1]` (compare mode), the field returns two entries plus a `delta` with + `absolute` and `percentage`. + + + - `source_type=domain` and `source_type=subdomain` — `ai_answers_count`, `pages`, `coverage`, `prompts_count`, + `mention_rate`, `my_brand_mentions_count`, `competitors_count`, `first_seen`, `last_seen`, `dt`, `backlinks`, + `referring_domains`, `domain_traffic`, and the delta variants `ai_answers_count_delta`, `pages_delta`, + `coverage_delta`, `prompts_count_delta`, `mention_rate_delta`, `my_brand_mentions_count_delta`, + `competitors_count_delta`, `responses_count_delta`. + + + - `source_type=url` — `ai_answers_count`, `coverage`, `prompts_count`, `competitors_count`, `my_brand_mentions`, + `gap_score`, `first_seen`, `last_seen`, `last_check_date`, `dt`, `traffic`, `domain_traffic`, and the delta + variants `ai_answers_count_delta`, `prompts_count_delta`, `coverage_delta`, `responses_count_delta`. + + + - The delta variants sort by the absolute change between periods (period 0 minus period 1) and require + `date_range[1]`, otherwise the request is rejected with `422`. Rows with a `null` delta — for example when a + strict-null metric such as `coverage` is missing in one period — are pushed to the end of the result in both + ascending and descending order. + + + - Rows with no value for `dt`, `traffic`, `domain_traffic`, `backlinks`, `referring_domains`, `gap_score`, + `first_seen`, `last_seen`, or `last_check_date` also go to the end in both directions. Period metrics computed + per request, such as `coverage`, keep the default order: nulls first ascending, last descending. + + + - `source_type=domain` — `domain`, `domain_type`, `subdomains_count`, `pages`, `coverage`, `ai_answers_count`, + `prompts_count`, `my_brand_mentions_count`, `mention_rate`, `brand_ids`, `domain_traffic`, `dt`, `backlinks`, + `referring_domains`, `first_seen`, `last_seen`, `competitors_count`, `responses_count`. + + + - `source_type=subdomain` — same as `domain`, minus `subdomains_count`. + + + - `source_type=url` — `url`, `title`, `type`, `coverage`, `ai_answers_count`, `prompts_count`, + `my_brand_mentions`, `gap_score`, `brand_ids`, `domain_traffic`, `dt`, `traffic`, `backlink_type`, + `last_check_date`, `first_seen`, `last_seen`, `status`, `competitors_count`, `responses_count`. + + + - The locked column (`domain` or `url`) is accepted but redundant — it is always returned regardless of the + requested ids. An id outside the set allowed for the current `source_type` returns `422`. + + + **Note:** `tracked_brand_ids` is no longer part of this endpoint’s contract. It was previously accepted but + never applied, so removing it changes no response. If your integration passed it here, the data you received was + unfiltered — please re-check it. To filter sources by brand, use `brand_ids` together with `brand_match_mode`. + + + If successful, the server returns a sources object with the row list and a total count. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/sources/#get-project-sources + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + - name: date_range + in: query + required: true + description: >- + 1 to 2 entries: base period at index `0`, optional compare period at index `1`. Each has `from` and `to` in + `YYYY-MM-DD`. See [Date ranges and compare + mode](https://seranking.com/api/se-visible/getting-started/#date-ranges-and-compare-mode). + schema: + type: array + items: + type: object + - name: source_type + in: query + description: >- + Row shape of the response: `domain` (one row per registrable domain, subdomains aggregated into it), + `subdomain` (one row per host as collected), or `url` (one row per page). Also determines the valid set of + `source_sort_field` and `columns` values. + schema: + type: string + default: domain + - name: model_types + in: query + description: Filter by AI model types (e.g. `chatgpt`). + schema: + type: array + items: + type: string + - name: country_codes + in: query + description: >- + **Deprecated — use `location_ids`.** Filter by ISO 3166-1 alpha-2 country codes. Resolved to the project’s + live locations in those countries, so a deleted location is not matched, a country the project no longer + tracks returns an empty result, and two locations in one country cannot be told apart. It keeps working for + now; migrate to `location_ids` before it is withdrawn. + schema: + type: array + items: + type: string + - name: location_ids + in: query + description: >- + Filter by the project’s tracked locations, using location IDs from [List project + locations](https://seranking.com/api/se-visible/locations/#list-project-locations). Multiple values combine + as OR. An ID from another project or of a deleted location returns `422`. Combined with `country_codes`, + only locations matching both are read. A row is attributed to the location its check collected it under, so + a location added later has no earlier history. + schema: + type: array + items: + type: string + - name: topic_ids + in: query + description: Filter by topic IDs. + schema: + type: array + items: + type: integer + - name: prompt_ids + in: query + description: Filter by prompt IDs. + schema: + type: array + items: + type: integer + - name: req_num + in: query + description: Limit to the answers with this request number within a check. + schema: + type: integer + - name: sentiments + in: query + description: "Filter by sentiment: `positive`, `neutral`, `negative`." + schema: + type: array + items: + type: string + - name: exclude_branded + in: query + description: >- + When `true`, every number in the response is computed from non-branded prompts only, and branded prompts + drop out. A prompt not yet classified counts as non-branded. Off when omitted. + schema: + type: boolean + - name: search_query + in: query + description: Filter sources by a substring of the domain or URL. + schema: + type: string + - name: domain_id + in: query + description: Restrict results to a single domain. + schema: + type: integer + - name: types + in: query + description: >- + Filter by URL category type (e.g. `blog`, `news`, `social`). See the + [Reference](https://seranking.com/api/se-visible/reference/) for the full list. + schema: + type: array + items: + type: string + - name: is_my_brand_mentions + in: query + description: >- + Filter sources by whether the project’s primary brand is mentioned: `1` mentioned, `0` not mentioned, `-1` + mention status not available. + schema: + type: integer + - name: has_backlink + in: query + description: >- + Filter source pages by `backlink_type`: `dofollow` (links to a brand domain and passes authority), + `nofollow` (links to a brand domain without passing authority), `none` (checked, no link to a brand domain). + Several values combine as OR. Pages not yet checked or that could not be read match none of the values; `-1` + is not accepted. URL rows only: with `source_type=domain` (the default) it returns `422`. + schema: + type: array + items: + type: string + - name: competitors_count_from + in: query + description: Minimum number of competitor brands on the source (inclusive, min `0`). + schema: + type: integer + - name: competitors_count_to + in: query + description: Maximum number of competitor brands on the source (inclusive, min `0`). + schema: + type: integer + - name: brand_ids + in: query + description: Keep sources that mention these brand IDs (see `brand_match_mode`). + schema: + type: array + items: + type: integer + - name: brand_match_mode + in: query + description: When filtering by `brand_ids`, match `any` of the brands or `all` of them. + schema: + type: string + default: any + - name: domain_types + in: query + description: >- + Filter rows by their domain type; several values combine as OR. Matches any element of the row’s + `domain_type` array. Values: `you` (the primary brand’s own domain), `competitors` (a domain of another + tracked brand), `corporate`, `ugc`, `editorial`, `reference`, `institutional` (stored base classification), + `other` (neither a role nor a classification). `domain` and `subdomain` rows only: with `source_type=url` it + returns `422`. + schema: + type: array + items: + type: string + - name: columns + in: query + description: >- + Column ids to return. When omitted, every column is returned. When provided, each row contains only these + columns plus the always-present locked first column (`domain` or `url`), `domain_id`, which is used to drill + down from a domain row to its URLs, and `url_id` on URL rows. Key order in the response is not guaranteed. + The valid set depends on `source_type`; see the note below. + + + Default: All columns + schema: + type: array + items: + type: string + - name: source_sort_field + in: query + description: Field to sort by. The valid set depends on `source_type`; see the note below. + schema: + type: string + default: ai_answers_count + - name: sort_order + in: query + description: "Sort direction: `asc` or `desc`." + schema: + type: string + default: desc + - name: limit + in: query + description: Maximum number of sources to return (min `0`). `0` returns every row and ignores `offset`. + schema: + type: integer + default: 1000 + - name: offset + in: query + description: Number of sources to skip from the start of the list (min `0`). + schema: + type: integer + default: 0 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + items: + type: array + items: + type: object + properties: + domain: + type: string + description: >- + Domain name: the registrable domain for `source_type=domain`, the host exactly as collected + for `source_type=subdomain`. + domain_id: + type: integer + description: Unique domain identifier. + ai_answers_count: + type: object + properties: + values: + type: array + items: + type: integer + description: >- + Metric value per period. One entry for a single period; two entries in compare mode + (base, then compare). An entry can be `null` when a period has no data. + description: >- + Metric value per period. One entry for a single period; two entries in compare mode + (base, then compare). An entry can be `null` when a period has no data. + delta: + type: object + properties: + absolute: + type: integer + description: Absolute change (base minus compare). `null` when a period has no data. + percentage: + type: number + description: Percentage change. `null` when a period has no data. + description: Present only in compare mode. Difference between the two periods. + description: Distinct answers in the period that cite at least one page of this source. + pages: + type: object + properties: + values: + type: array + items: + type: integer + description: >- + Metric value per period. One entry for a single period; two entries in compare mode + (base, then compare). An entry can be `null` when a period has no data. + description: >- + Metric value per period. One entry for a single period; two entries in compare mode + (base, then compare). An entry can be `null` when a period has no data. + description: Distinct pages of this domain cited in the period’s answers. + coverage: + type: object + properties: + values: + type: array + items: + type: number + description: >- + Metric value per period. One entry for a single period; two entries in compare mode + (base, then compare). An entry can be `null` when a period has no data. + description: >- + Metric value per period. One entry for a single period; two entries in compare mode + (base, then compare). An entry can be `null` when a period has no data. + delta: + type: object + properties: + absolute: + type: number + description: Absolute change (base minus compare). `null` when a period has no data. + percentage: + type: number + description: Percentage change. `null` when a period has no data. + description: Present only in compare mode. Difference between the two periods. + description: >- + `ai_answers_count` as a percentage of `responses_count`, one decimal. `null` when + `responses_count` is `0`. + brand_ids: + type: array + items: + type: integer + description: Brand IDs mentioned on this domain. + description: Brand IDs mentioned on this domain. + competitors_count: + description: Distinct competitor brands attached to this domain’s source URLs in the period. + prompts_count: + type: object + properties: + values: + type: array + items: + type: integer + description: >- + Metric value per period. One entry for a single period; two entries in compare mode + (base, then compare). An entry can be `null` when a period has no data. + description: >- + Metric value per period. One entry for a single period; two entries in compare mode + (base, then compare). An entry can be `null` when a period has no data. + delta: + type: object + properties: + absolute: + type: integer + description: Absolute change (base minus compare). `null` when a period has no data. + percentage: + type: number + description: Percentage change. `null` when a period has no data. + description: Present only in compare mode. Difference between the two periods. + description: Distinct prompts whose answers cited this source in the period. + my_brand_mentions_count: + type: object + properties: + values: + type: array + items: + type: integer + description: >- + Metric value per period. One entry for a single period; two entries in compare mode + (base, then compare). An entry can be `null` when a period has no data. + description: >- + Metric value per period. One entry for a single period; two entries in compare mode + (base, then compare). An entry can be `null` when a period has no data. + description: URLs on this domain that mention the primary brand. + mention_rate: + type: object + properties: + values: + type: array + items: + type: integer + description: >- + Metric value per period. One entry for a single period; two entries in compare mode + (base, then compare). An entry can be `null` when a period has no data. + description: >- + Metric value per period. One entry for a single period; two entries in compare mode + (base, then compare). An entry can be `null` when a period has no data. + description: >- + Percentage of this domain’s pages in the period whose content mentions the primary brand + (`my_brand_mentions_count / pages * 100`), whole number. `null` in a period where the domain + has no pages. + responses_count: + type: object + properties: + values: + type: array + items: + type: integer + description: >- + Metric value per period. One entry for a single period; two entries in compare mode + (base, then compare). An entry can be `null` when a period has no data. + description: >- + Metric value per period. One entry for a single period; two entries in compare mode + (base, then compare). An entry can be `null` when a period has no data. + delta: + type: object + properties: + absolute: + type: integer + description: Absolute change (base minus compare). `null` when a period has no data. + percentage: + type: integer + description: Percentage change. `null` when a period has no data. + description: Present only in compare mode. Difference between the two periods. + description: >- + Answers in the period that name at least one brand, after the request’s filters. The same + for every row; `0` in a period the source was not cited. + first_seen: + type: string + description: First time this domain appeared in results. + last_seen: + type: string + description: Last time this domain appeared in results. + domain_type: + type: array + items: + type: string + description: >- + The row’s domain types (1 or 2 values): the project role first — `you` for the primary + brand’s own domain, otherwise `competitors` for a domain owned by another tracked brand — + then the stored base classification (`corporate`, `ugc`, `editorial`, `reference`, + `institutional`). `["other"]` when the row has neither, so a competitor that is also an + editorial site reads `["competitors", "editorial"]`. + description: >- + The row’s domain types (1 or 2 values): the project role first — `you` for the primary + brand’s own domain, otherwise `competitors` for a domain owned by another tracked brand — + then the stored base classification (`corporate`, `ugc`, `editorial`, `reference`, + `institutional`). `["other"]` when the row has neither, so a competitor that is also an + editorial site reads `["competitors", "editorial"]`. + subdomains_count: + type: object + properties: + values: + type: array + items: + type: integer + description: >- + Metric value per period. One entry for a single period; two entries in compare mode + (base, then compare). An entry can be `null` when a period has no data. + description: >- + Metric value per period. One entry for a single period; two entries in compare mode + (base, then compare). An entry can be `null` when a period has no data. + description: >- + Distinct subdomains of the domain that appeared as a source in the period. + `source_type=domain` only; absent for `subdomain` rows. + dt: + type: integer + description: >- + Domain trust (`0`–`100` inlink rank). Domain-level and project-agnostic, so a plain number + rather than a metric object. A non-negative number is a measurement, `-1` means the data + source had nothing for this row, and `null` means it has not been requested yet. + backlinks: + type: integer + description: Total backlinks to the domain. Plain number; same `null` rule as `dt`. + referring_domains: + type: integer + description: Total referring domains. Plain number; same `null` rule as `dt`. + domain_traffic: + type: integer + nullable: true + description: >- + Estimated monthly organic search traffic of the whole domain. Plain number; `-1` when no + data is available, `null` when not requested yet. + url: + type: string + description: Full URL. + url_id: + type: integer + description: URL identifier. Always returned, like `domain_id`. + type: + type: string + description: >- + URL category type (e.g. `blog`, `news`, `social`). See the + [Reference](https://seranking.com/api/se-visible/reference/) for the full list. + title: + type: string + description: Page title extracted from the HTML. + my_brand_mentions: + type: integer + description: >- + `1` if the URL currently mentions the primary brand, `0` if the page was read and the + primary brand was not found, `-1` if the page could not be read, `null` if not parsed yet. + gap_score: + nullable: true + description: >- + Gap score for ranking: base-period `ai_answers_count` times the number of tracked brands + found on the page, so a page citing competitors in many answers scores high. `0` when the + page mentions the primary brand, `-1` when no tracked brand was found on the page or the + page could not be read; `null` while the page is waiting for its first parse. + type: integer + last_check_date: + type: string + description: When this URL was last parsed for brand mentions. `null` if not yet parsed. + status: + type: integer + description: HTTP status code of the URL. `null` if not yet checked. + backlink_type: + type: string + description: >- + Whether this URL links to a domain of a tracked brand: `dofollow` (the link passes + authority), `nofollow` (it does not), `none` (checked, no link to a brand domain), `-1` (a + parse was attempted and no link type was determined), `null` (not parsed yet). + traffic: + type: integer + description: >- + Estimated monthly organic search traffic of this page, worldwide (not scoped to a search + region). Plain number; `-1` when no data is available, `null` when not requested yet. + description: >- + Source rows. Each row is a domain object (when `source_type=domain`) or a URL object (when + `source_type=url`). + description: >- + Source rows. Each row is a domain object (when `source_type=domain`) or a URL object (when + `source_type=url`). + total: + type: integer + description: Total number of sources available for the filters. + examples: + domainSourcesSinglePeriod: + summary: Domain sources, single period + value: + items: + - domain: example.com + domain_id: 123 + ai_answers_count: + values: + - 45 + pages: + values: + - 12 + coverage: + values: + - 75.5 + brand_ids: + - 1 + - 2 + competitors_count: + values: + - 2 + prompts_count: + values: + - 10 + my_brand_mentions_count: + values: + - 3 + mention_rate: + values: + - 25 + responses_count: + values: + - 60 + first_seen: "2024-01-01 00:00:00" + last_seen: "2024-01-15 00:00:00" + domain_type: + - competitors + - editorial + subdomains_count: + values: + - 2 + dt: 62 + backlinks: 1520 + referring_domains: 84 + domain_traffic: 41000 + total: 1 + urlSourcesCompareMode: + summary: URL sources, compare mode + value: + items: + - url: https://example.com/article1 + url_id: 4567 + domain_id: 123 + ai_answers_count: + values: + - 15 + - 8 + delta: + absolute: 7 + percentage: 87.5 + coverage: + values: + - 25.5 + - 16 + delta: + absolute: 9.5 + percentage: 59.38 + type: blog + title: Article 1 + brand_ids: + - 1 + - 2 + competitors_count: 2 + my_brand_mentions: 1 + gap_score: null + prompts_count: + values: + - 5 + - 3 + delta: + absolute: 2 + percentage: 66.67 + responses_count: + values: + - 60 + - 50 + delta: + absolute: 10 + percentage: 20 + first_seen: "2024-01-01 00:00:00" + last_seen: "2024-02-15 00:00:00" + last_check_date: "2024-02-15 00:00:00" + status: 200 + dt: 62 + backlink_type: dofollow + domain_traffic: null + traffic: 4321 + total: 1 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET --globoff + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/sources?source_type=domain&date_range[0][from]=2026-05-01&date_range[0][to]=2026-05-31&source_sort_field=ai_answers_count&sort_order=desc' + \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: To return only selected columns, pass columns[] + source: >- + curl -X GET --globoff + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/sources?source_type=url&date_range[0][from]=2026-05-01&date_range[0][to]=2026-05-31&columns[]=title&columns[]=coverage&columns[]=ai_answers_count' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/se-visible/projects/{project_id}/sources/metrics: + get: + operationId: getAggregatedSourceMetrics + tags: + - Sources + summary: Get aggregated source metrics + description: >- + Returns aggregated source metrics for dynamic table and chart rendering — the sources equivalent of [Get + aggregated brand metrics](https://seranking.com/api/se-visible/brands/#get-aggregated-brand-metrics). You choose + how the data is grouped (`dimensions[]`) and which metrics to return (`metrics[]`). + + + **Note:** + + + - You pass 1 to 3 dimensions: at most one entity or type grain (`url`, `domain`, `subdomain`, `page_type`, + `domain_type`), optionally `model_type` (the AI engine of the citing answers) beside it, and optionally one date + dimension — `check_id` or `check_date` for one row per check, `check_week` or `check_month` for one row per + calendar period (its checks aggregated, labelled by the period start). `model_type` on its own is also a grain. + + + - With **1 dimension**, each row holds that dimension’s own columns plus one metric object per requested metric. + + + - With **2 or 3 dimensions**, the response is a pivot: every dimension but the last keys the rows (in request + order), and the **last** one becomes the columns. `meta.columns.dynamic` lists the remaining row dimension + names, then the pivot column IDs, labelled by `meta.columns.labels`. Each cell is an object mapping every + requested metric to its metric object. + + + - Pivot rows are gap-filled with `0` cells: a date dimension returns every base check or period, `model_type` + every engine the project runs; entities and types appear only when cited. A filled cell still carries the + `responses_count` of its scope. `limit` and `offset` page the filled rows. + + + - A pivot over an entity grain (`url`, `domain`, `subdomain`) requires `url_ids[]` or `domain_ids[]` and plots + exactly those IDs — fetch the top rows first, then the pivot for those IDs. A pivot does not accept `filters` or + `sort_field`, and a date dimension covers a single period: either returns `422`. + + + - A date dimension on its own returns, per check, the period’s distinct AI answers that carry at least one brand + mention, as rows with a single `ai_answers_count` cell. These are totals across all sources (per-source counts + never sum to them, since one answer cites several sources). Only `ai_answers_count` is supported there, and + `filters` require a grain. + + + - Every metric value is an object, not a plain number: `{ "values": [v0] }` in single-period mode. Passing + `date_range[1]` enables compare mode (requests without a date dimension only), which adds the second period and + a `delta` object: `{ "values": [v0, v1], "delta": { "absolute": 15, "percentage": 50 } }`. Deltas are returned + only in compare mode. + + + - `subdomains_count` is valid only when the grain is `domain`, the only grain that folds subdomains into a + domain row. With any other grain it returns `422`. + + + If successful, the server returns a metrics object with pagination, column layout, and the data rows. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/sources/#get-aggregated-source-metrics + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + - name: dimensions[] + in: query + required: true + description: >- + 1 to 3 dimensions, no duplicates. Two or more pivot by the last one, in request order. Values: `check_id`, + `check_date`, `check_week`, `check_month`, `url`, `domain`, `subdomain`, `page_type`, `domain_type`, + `model_type`. + schema: + type: array + items: + type: string + - name: week_start + in: query + description: First weekday for a `check_week` dimension, from 0 to 6 (`0` Sunday, `6` Saturday). + schema: + type: integer + default: 1 + - name: metrics[] + in: query + required: true + description: >- + At least one metric, each returned as a metric object. Values: `ai_answers_count`, `citations_share`, + `prompts_count`, `my_brand_mentions_count`, `competitors_count`, `responses_count`, `subdomains_count`. + `responses_count` is the number of answers in the row’s scope (its period or check, and its engine under a + `model_type` split) that carry at least one brand mention, cited or not — the `citations_share` denominator. + It is the same for every entity or type in that scope and is not additive across them. + schema: + type: array + items: + type: string + - name: date_range + in: query + required: true + description: >- + 1 to 2 entries: base period at index `0`, optional compare period at index `1`. Each has `from` and `to` in + `YYYY-MM-DD`. Each period aggregates all checks within its dates. See [Date ranges and compare + mode](https://seranking.com/api/se-visible/getting-started/#date-ranges-and-compare-mode). + schema: + type: array + items: + type: object + - name: model_types + in: query + description: Filter by AI model types (e.g. `chatgpt`). + schema: + type: array + items: + type: string + - name: country_codes + in: query + description: >- + **Deprecated — use `location_ids`.** Filter by ISO 3166-1 alpha-2 country codes. Resolved to the project’s + live locations in those countries, so a deleted location is not matched, a country the project no longer + tracks returns an empty result, and two locations in one country cannot be told apart. It keeps working for + now; migrate to `location_ids` before it is withdrawn. + schema: + type: array + items: + type: string + - name: location_ids + in: query + description: >- + Filter by the project’s tracked locations, using location IDs from [List project + locations](https://seranking.com/api/se-visible/locations/#list-project-locations). Multiple values combine + as OR. An ID from another project or of a deleted location returns `422`. Combined with `country_codes`, + only locations matching both are read. + schema: + type: array + items: + type: string + - name: topic_ids + in: query + description: Filter by topic IDs. + schema: + type: array + items: + type: integer + - name: sentiments + in: query + description: "Filter by sentiment: `positive`, `neutral`, `negative`." + schema: + type: array + items: + type: string + - name: exclude_branded + in: query + description: >- + When `true`, every number in the response is computed from non-branded prompts only. A prompt not yet + classified counts as non-branded. Off when omitted. + schema: + type: boolean + - name: prompt_ids + in: query + description: Filter by prompt IDs. + schema: + type: array + items: + type: integer + - name: req_num + in: query + description: Limit to the answers with this request number within a check. + schema: + type: integer + - name: search_query + in: query + description: Search query for filtering results. + schema: + type: string + - name: filters + in: query + description: >- + Up to 10 post-aggregation metric conditions, combined with AND. Rows failing any condition are dropped, and + `meta.pagination.total` reflects that. Each condition has `metric` (a `metrics[]` value), `target` (`0` base + period value, `1` compare period value, or `delta` absolute change; `1` and `delta` require + `date_range[1]`), `operator` (`gt`, `gte`, `eq`, `lt`, `lte`), and `value` (a number). All four are + required. Example: + `filters[0][metric]=ai_answers_count&filters[0][target]=delta&filters[0][operator]=gt&filters[0][value]=0`. + schema: + type: array + items: + type: object + - name: url_ids[] + in: query + description: >- + Up to 50 IDs. Narrow the sources the rows aggregate to these `url_id` values, whatever the grain. Required + for a pivot over an entity grain, which plots exactly these IDs. + schema: + type: array + items: + type: integer + - name: domain_ids[] + in: query + description: >- + Up to 50 IDs. Narrow the sources to these `domain_id` values (as returned in the rows), whatever the grain. + In the `subdomain` grain an ID selects exactly that subdomain; in the other grains a domain ID also matches + every URL and subdomain under it. + schema: + type: array + items: + type: integer + - name: types[] + in: query + description: >- + Up to 50 values. Narrow the sources to these page types (e.g. `listicle`, `blog`, `news`), whatever the + grain. See the [Reference](https://seranking.com/api/se-visible/reference/) for the full list. + schema: + type: array + items: + type: string + - name: domain_types[] + in: query + description: >- + Up to 50 values. Narrow the sources to these domain types (matches any element of a row’s `domain_type` + array), whatever the grain: `you`, `competitors`, `corporate`, `ugc`, `editorial`, `reference`, + `institutional`, `other`. + schema: + type: array + items: + type: string + - name: sort_field + in: query + description: >- + A requested metric name; sorts on period 0 values. Append `_delta` to sort by the absolute delta (e.g. + `ai_answers_count_delta`), which requires `date_range[1]`, otherwise the request returns `422`. + schema: + type: string + default: First metric, descending + - name: sort_order + in: query + description: "Sort direction: `asc` or `desc`." + schema: + type: string + default: desc + - name: limit + in: query + description: >- + Maximum rows to return, from 0 to 1000. `0` returns every row and requires two or more dimensions (`422` + otherwise). + schema: + type: integer + default: 50 + - name: offset + in: query + description: Number of rows to skip (min `0`). + schema: + type: integer + default: 0 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + meta: + type: object + properties: + pagination: + type: object + properties: + total: + type: integer + description: "Total rows: the grain values, or the filled rows of a pivot." + columns: + type: object + properties: + primary: + type: string + description: First dimension the rows are keyed by (one of the `dimensions[]` values). + dynamic: + type: array + items: + type: string + description: >- + With 1 dimension, the requested metric names. In a pivot, the remaining row dimension + names, then the pivot column IDs (entity IDs, type values, or date labels, as strings). + description: >- + With 1 dimension, the requested metric names. In a pivot, the remaining row dimension + names, then the pivot column IDs (entity IDs, type values, or date labels, as strings). + labels: + type: object + properties: + "123": + type: string + "456": + type: string + description: >- + Pivot only. Maps each pivot column ID to its display label (URL or domain name, or the + value itself). + description: Pagination and column layout. + data: + type: array + items: + type: object + properties: + "123": + type: object + properties: + ai_answers_count: + type: object + properties: + values: + type: array + items: + type: integer + citations_share: + type: object + properties: + values: + type: array + items: + type: number + "456": + type: object + properties: + ai_answers_count: + type: object + properties: + values: + type: array + items: + type: integer + citations_share: + type: object + properties: + values: + type: array + items: + type: number + domain_id: + type: integer + domain: + type: string + ai_answers_count: + type: object + properties: + values: + type: array + items: + type: integer + delta: + type: object + properties: + absolute: + type: integer + percentage: + type: integer + citations_share: + type: object + properties: + values: + type: array + items: + type: integer + check_date: + type: string + description: >- + Rows. With 1 dimension, each row is keyed by its own columns — `domain_id` and `domain` for the + `domain` and `subdomain` grains; `url_id`, `url`, and `domain_id` for `url`; `page_type`, + `domain_type`, or `model_type` for the type grains; the date label for a date dimension — plus + one metric object per requested metric. In a pivot, each row holds the row dimensions’ columns, + then one cell per pivot column keyed by its ID, mapping every requested metric to its metric + object, with `0` cells where nothing was cited. + description: >- + Rows. With 1 dimension, each row is keyed by its own columns — `domain_id` and `domain` for the + `domain` and `subdomain` grains; `url_id`, `url`, and `domain_id` for `url`; `page_type`, + `domain_type`, or `model_type` for the type grains; the date label for a date dimension — plus one + metric object per requested metric. In a pivot, each row holds the row dimensions’ columns, then + one cell per pivot column keyed by its ID, mapping every requested metric to its metric object, + with `0` cells where nothing was cited. + examples: + domainGrainSinglePeriod: + summary: Domain grain, single period + value: + meta: + pagination: + total: 2 + columns: + primary: domain + dynamic: + - ai_answers_count + - citations_share + data: + - domain_id: 123 + domain: example.com + ai_answers_count: + values: + - 45 + citations_share: + values: + - 75 + - domain_id: 456 + domain: other.com + ai_answers_count: + values: + - 27 + citations_share: + values: + - 45 + domainGrainCompareMode: + summary: Domain grain, compare mode + value: + meta: + pagination: + total: 1 + columns: + primary: domain + dynamic: + - ai_answers_count + data: + - domain_id: 123 + domain: example.com + ai_answers_count: + values: + - 45 + - 30 + delta: + absolute: 15 + percentage: 50 + pivotCheckDateByDomainGapFilled: + summary: "Pivot: check date by domain, gap-filled" + value: + meta: + pagination: + total: 2 + columns: + primary: check_date + dynamic: + - "123" + - "456" + labels: + "123": example.com + "456": other.com + data: + - "123": + ai_answers_count: + values: + - 45 + citations_share: + values: + - 12.5 + "456": + ai_answers_count: + values: + - 0 + citations_share: + values: + - 0 + check_date: "2026-01-01" + - "123": + ai_answers_count: + values: + - 41 + citations_share: + values: + - 11.9 + "456": + ai_answers_count: + values: + - 3 + citations_share: + values: + - 0.9 + check_date: "2026-01-08" + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET --globoff + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/sources/metrics?dimensions[]=domain&metrics[]=ai_answers_count&metrics[]=citations_share&date_range[0][from]=2026-05-01&date_range[0][to]=2026-05-31' + \ + -H 'Authorization: Token YOUR_API_KEY' + - lang: Shell + label: To chart selected domains per check date, pivot by domain and pass the domain IDs + source: >- + curl -X GET --globoff + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/sources/metrics?dimensions[]=check_date&dimensions[]=domain&domain_ids[]=123&domain_ids[]=456&metrics[]=ai_answers_count&metrics[]=citations_share&date_range[0][from]=2026-01-01&date_range[0][to]=2026-01-31' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/se-visible/projects/{project_id}/engines: + get: + operationId: listProjectEngines + tags: + - Engines + summary: List project engines + description: >- + Returns the AI engines a project tracks, one entry per engine type. An entry carries no location, because an + engine is tracked in all of the project’s locations. + + + If successful, the server returns a JSON array of the project’s engines. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/engines/#list-project-engines + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + engine_type: + type: string + description: >- + AI engine type. One of `chatgpt`, `google_gemini`, `perplexity`, `google_ai_mode`, + `google_ai_overview`, `copilot`. + example: + - engine_type: chatgpt + - engine_type: google_gemini + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/engines' + \ + -H 'Authorization: Token YOUR_API_KEY' + post: + operationId: addEngine + tags: + - Engines + summary: Add an engine + description: >- + Adds an AI engine to every location and language the project tracks, and starts tracking each location’s prompts + with it. + + + **Note:** + + + - An engine tracked in only some locations is completed. The request is rejected only when the engine is already + tracked everywhere: it then returns `422` with `error_code` `engine_already_added`. + + + - Re-adding an engine that was removed earlier restores it together with the results, mentions and sources + collected before the removal. A location that was removed stays removed and does not get the engine. + + + If successful, the server returns `201 Created` with the added engine. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/engines/#add-an-engine + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + engine_type: + type: string + description: >- + AI engine type to add. One of `chatgpt`, `google_gemini`, `perplexity`, `google_ai_mode`, + `google_ai_overview`, `copilot`. + required: + - engine_type + example: + engine_type: chatgpt + responses: + "201": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + engine_type: + type: string + description: AI engine type. + example: + engine_type: chatgpt + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X POST 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/engines' + \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "engine_type": "chatgpt" + }' + put: + operationId: replaceEngineSet + tags: + - Engines + summary: Replace the engine set + description: >- + Replaces the set of engines a project tracks with the given list in one atomic request. Engines missing from the + project are added, or restored with their previously collected results, mentions and sources. Engines absent + from the list are removed. + + + **Note:** + + + - The list applies to every location the project tracks. An engine tracked in only some locations is completed, + so the request also evens out an uneven set and is idempotent. + + + - The list cannot be empty: a project always keeps at least one engine. An empty list, an unknown engine type or + a duplicate entry returns `422`. + + + If successful, the server returns a JSON array with the resulting set of project engines. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/engines/#replace-the-engine-set + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + engines: + type: array + items: + type: object + properties: + engine_type: + type: string + description: >- + AI engine type. One of `chatgpt`, `google_gemini`, `perplexity`, `google_ai_mode`, + `google_ai_overview`, `copilot`. + description: Full desired set of engines for the project. At least 1 entry, no duplicates. + required: + - engines + example: + engines: + - engine_type: chatgpt + - engine_type: google_ai_overview + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + engine_type: + type: string + description: AI engine type. + example: + - engine_type: chatgpt + - engine_type: google_ai_overview + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X PUT 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/engines' + \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "engines": [ + { "engine_type": "chatgpt" }, + { "engine_type": "google_ai_overview" } + ] + }' + /v1/se-visible/projects/{project_id}/engines/{engine_type}: + delete: + operationId: removeEngine + tags: + - Engines + summary: Remove an engine + description: >- + Removes an engine from the whole project, in every location and language it was tracked in. Its prompt links, + results, mentions and sources disappear from the project but are retained, and come back if you add the engine + again. + + + **Note:** + + + - An engine that would leave a location without any engine, including the project’s last engine, cannot be + removed. Attempting to do so returns `422` with `error_code` `cannot_remove_last_engine`. + + + - An engine type the project does not track, including an unknown one, returns `404`. + + + If successful, the server returns `204 No Content` with an empty body. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/engines/#remove-an-engine + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + - name: engine_type + in: path + required: true + description: >- + Engine type to remove from the project. One of `chatgpt`, `google_gemini`, `perplexity`, `google_ai_mode`, + `google_ai_overview`, `copilot`. + schema: + type: string + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X DELETE + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/engines/google_ai_overview' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/se-visible/projects/{project_id}/locations: + get: + operationId: listProjectLocations + tags: + - Locations + summary: List project locations + description: >- + Returns the locations tracked by a project, oldest first, together with how many locations the project uses and + how many its plan allows. + + + **Note:** + + + - `max_locations` is the plan allowance for this project, not across the organisation. This differs from the + organisation-wide prompt limit returned by [Get + subscription](https://seranking.com/api/se-visible/subscription/) (`limits.prompts`). + + + - A project left with more locations than its allowance, for example after a plan downgrade, has its checks + paused until the excess locations are removed. Nothing is deleted, and the locations and their history stay + readable. + + + If successful, the server returns a JSON object with the project’s locations and its location usage. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/locations/#list-project-locations + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + locations: + type: array + items: + type: object + properties: + id: + type: string + description: Location ID. + country_code: + type: string + description: >- + Upper-case two-letter country code from the platform country vocabulary. Mostly ISO 3166-1 + alpha-2, with `UK` used instead of `GB`. + geo_location_id: + type: integer + nullable: true + description: >- + ID of the tracked city or region in the geo dictionary — the value to send back when + updating the location. `null` means country-level tracking. + city: + type: string + nullable: true + description: Display name of the tracked city or region. `null` means country-level tracking. + prompts_count: + type: integer + description: Number of prompts currently assigned to this location. + description: Locations tracked by the project, oldest first. + description: Locations tracked by the project, oldest first. + locations_used: + type: integer + description: Number of locations currently tracked by the project. + max_locations: + type: integer + description: Locations the plan allows this project to track. `null` means the plan does not cap them. + example: + locations: + - id: 9f8c2b1a-1e2d-4c3b-8a7f-0d1e2c3b4a59 + country_code: US + geo_location_id: null + city: null + prompts_count: 56 + - id: 1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081 + country_code: UK + geo_location_id: 42 + city: Manchester, England, United Kingdom + prompts_count: 0 + locations_used: 2 + max_locations: 1 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/locations' \ + -H 'Authorization: Token YOUR_API_KEY' + post: + operationId: addLocation + tags: + - Locations + summary: Add a location + description: >- + Adds a location to a project and sets it up for every engine and language the project currently tracks. Send + only `country_code` to track the whole country, or add a `geo_location_id` to track a city or region inside it. + + + **Note:** + + + - Existing prompt assignments are not copied, so a newly added location has no prompts. + + + - Adding a place that was deleted before creates a new location. The deleted one stays deleted with its history. + + + - Get `geo_location_id` from [Search cities and + regions](https://seranking.com/api/se-visible/geo-autocomplete/#search-cities-and-regions), using the + suggestions for the same country. Only the existence of the ID is validated: the API cannot check that the point + actually lies in `country_code`. + + + - If the project has reached its location allowance, the request returns `403` with `error_code` + `insufficient_limit` and `limit_type` `llm_locations`. + + + - If the project already tracks the same country and city, the request returns `409` with `error_code` + `location_duplicate`. + + + If successful, the server returns `201 Created` with the added location. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/locations/#add-a-location + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + country_code: + type: string + description: >- + Two-letter country code from the platform vocabulary, for example `US` or `UK`. Must be an available + country. Minimum 2 characters, maximum 2 characters. + geo_location_id: + type: integer + nullable: true + description: >- + ID of the city or region to track inside the country, as returned by [Search cities and + regions](https://seranking.com/api/se-visible/geo-autocomplete/#search-cities-and-regions). Omit it + or send `null` for country-level tracking. + required: + - country_code + example: + country_code: UK + geo_location_id: 42 + responses: + "201": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: string + description: Location ID. + country_code: + type: string + description: Upper-case two-letter country code from the platform country vocabulary. + geo_location_id: + type: integer + description: ID of the tracked city or region. `null` means country-level tracking. + city: + type: string + description: Display name of the tracked city or region. `null` means country-level tracking. + prompts_count: + type: integer + description: Number of prompts currently assigned to this location. + example: + id: 1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081 + country_code: UK + geo_location_id: 42 + city: Manchester, England, United Kingdom + prompts_count: 0 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X POST + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/locations' \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "country_code": "UK", + "geo_location_id": 42 + }' + /v1/se-visible/projects/{project_id}/locations/{location_id}: + patch: + operationId: updateLocation + tags: + - Locations + summary: Update a location + description: >- + Points the location at the given country and city. The location keeps its ID, engines, and prompt assignments, + so future checks run for the new place and everything collected so far stays under this location. + + + **Note:** + + + - The location keeps its `id`, so existing references to it stay valid. + + + - Always send the target place in full: omitting `geo_location_id` or sending `null` returns the location to + country-level tracking. + + + - Sending the location’s current place changes nothing and returns the location as is. + + + - If the project already tracks that place, the request returns `409` with `error_code` `location_duplicate`. + + + - While the project is being checked, the request returns `409` with `error_code` `location_check_in_progress`. + Retry once the check has finished, otherwise results still on their way would be filed under the new place. + + + If successful, the server returns the replacement location. Its `id` is the one to use from now on. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/locations/#update-a-location + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + - name: location_id + in: path + required: true + description: UUID of the location to update. + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + country_code: + type: string + description: >- + Two-letter country code from the platform vocabulary, for example `US` or `UK`. Must be an available + country. Minimum 2 characters, maximum 2 characters. + geo_location_id: + type: integer + nullable: true + description: >- + ID of the city or region to track inside the country, as returned by [Search cities and + regions](https://seranking.com/api/se-visible/geo-autocomplete/#search-cities-and-regions). Omit it + or send `null` for country-level tracking. + required: + - country_code + example: + country_code: UK + geo_location_id: null + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: string + description: Location ID. + country_code: + type: string + description: Upper-case two-letter country code from the platform country vocabulary. + geo_location_id: + nullable: true + description: ID of the tracked city or region. `null` means country-level tracking. + type: integer + city: + nullable: true + description: Display name of the tracked city or region. `null` means country-level tracking. + type: string + prompts_count: + type: integer + description: Number of prompts currently assigned to this location. + example: + id: 1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081 + country_code: UK + geo_location_id: null + city: null + prompts_count: 56 + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X PATCH + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/locations/1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081' + \ + -H 'Authorization: Token YOUR_API_KEY' \ + -H 'Content-Type: application/json' \ + -d '{ + "country_code": "UK", + "geo_location_id": null + }' + delete: + operationId: deleteLocation + tags: + - Locations + summary: Delete a location + description: >- + Deletes a location from a project and unassigns it from every prompt it is assigned to. The prompts themselves + stay: a prompt left without locations is simply no longer tracked. + + + **Note:** + + + - If the location is assigned to prompts, the request returns `409` with `error_code` `location_in_use` and the + number of affected prompts in `prompts_count`. Repeat the request with `confirm=true` to delete it anyway, so + you can warn the user first. + + + - The last location of a project cannot be deleted. Attempting to do so returns `422` with `error_code` + `cannot_remove_last_location`. + + + If successful, the server returns `204 No Content` with an empty body. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/locations/#delete-a-location + parameters: + - name: project_id + in: path + required: true + description: UUID of the project. + schema: + type: string + format: uuid + - name: location_id + in: path + required: true + description: UUID of the location to delete. + schema: + type: string + format: uuid + - name: confirm + in: query + description: Must be `true` to delete a location that is assigned to prompts. + schema: + type: boolean + default: false + responses: + "204": + description: No content. + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X DELETE + 'https://api.seranking.com/v1/se-visible/projects/550e8400-e29b-41d4-a716-446655440000/locations/1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081?confirm=true' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/se-visible/autocomplete/geo/countries: + get: + operationId: listCountries + tags: + - Geo Autocomplete + summary: List countries + description: >- + Returns the countries a project location can track, with English names. Find the entry whose `country_code` + matches the project location and pass its `id` as `country_id` to [Search cities and + regions](#search-cities-and-regions). + + + **Note:** + + + - If the upstream Geo Autocomplete service is unavailable, the request returns `502` with the message “Geo + Autocomplete service is unavailable.” + + + If successful, the server returns a JSON array of countries. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/geo-autocomplete/#list-countries + parameters: + - name: engine + in: query + description: >- + AI engine type to return the country list for. One of `chatgpt`, `google_gemini`, `perplexity`, + `google_ai_mode`, `google_ai_overview`, `copilot`. Omit to return the unified Google country list. + schema: + type: string + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: integer + description: Country ID. Pass it as `country_id` to [Search cities and regions](#search-cities-and-regions). + name: + type: string + description: Country name in English. + country_code: + type: string + description: Country code in the same vocabulary as a project location’s `country_code`, for example `UK`. + example: + - id: 2826 + name: United Kingdom + country_code: UK + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/se-visible/autocomplete/geo/countries' \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/se-visible/autocomplete/geo/locations: + get: + operationId: searchCitiesAndRegions + tags: + - Geo Autocomplete + summary: Search cities and regions + description: >- + Returns city and region suggestions inside a country that match a search query. Send the `id` of the suggestion + you pick as `geo_location_id` when you [add a + location](https://seranking.com/api/se-visible/locations/#add-a-location) or [update a + location](https://seranking.com/api/se-visible/locations/#update-a-location). + + + **Note:** + + + - Location names come back in English for any `lang` other than `en`, `de`, `es`, `fr`, `it`, `ja`, `nl`, `pt`, + `ru`, `sv` and `uk`. + + + - If `country_id` is not a known country, the request returns `400` with `error_code` `invalid_country_id`. + + + - If the upstream Geo Autocomplete service is unavailable, the request returns `502` with the message “Geo + Autocomplete service is unavailable.” + + + If successful, the server returns a JSON array of city and region suggestions. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/geo-autocomplete/#search-cities-and-regions + parameters: + - name: query + in: query + required: true + description: Search text matched against city and region names. Maximum 255 characters. + schema: + type: string + - name: country_id + in: query + required: true + description: Country `id` returned by [List countries](#list-countries). Minimum `1`. + schema: + type: integer + - name: lang + in: query + required: true + description: >- + Language of the location names. Case-insensitive. One of `en`, `fr`, `es`, `de`, `nl`, `it`, `ja`, `ko`, + `hi`, `ar`, `pt`, `da`, `sv`, `nb`, `fi`, `ga`, `is`, `lb`, `zh`, `th`, `ms`, `id`, `tl`, `he`, `af`, `cs`, + `el`, `tr`, `pl`, `ro`, `uk`, `ru`, `kk`, `uz`, `hu`, `et`, `lv`, `lt`. + schema: + type: string + - name: engine + in: query + description: >- + AI engine type to search the location list for. One of `chatgpt`, `google_gemini`, `perplexity`, + `google_ai_mode`, `google_ai_overview`, `copilot`. Omit to search the Google location list. + schema: + type: string + - name: limit + in: query + description: Maximum number of suggestions to return. Minimum `1`, maximum `10`. + schema: + type: integer + default: 10 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: integer + description: Geo location ID. Send it as `geo_location_id` when adding or updating a project location. + display_name: + type: string + description: Name the project location reports as `city`. Can be the full name, equal to `canonical_name`. + canonical_name: + type: string + description: Full name with the region and country, to tell apart places with the same name. + example: + - id: 42 + display_name: Manchester, England, United Kingdom + canonical_name: Manchester, England, United Kingdom + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: >- + curl -X GET + 'https://api.seranking.com/v1/se-visible/autocomplete/geo/locations?query=man&country_id=2826&lang=en&limit=10' + \ + -H 'Authorization: Token YOUR_API_KEY' + /v1/se-visible/subscription: + get: + operationId: getSubscriptionDetails + tags: + - Subscription + summary: Get subscription details + description: >- + Returns the authenticated user’s organisation subscription and current usage limits. This is organisation-level, + not project-scoped. + + + This endpoint takes no parameters. + + + If successful, the server returns the subscription object. + + + - SE Visible usage is governed by these plan limits (projects, prompts, user seats, and the per-project caps on + locations and engines), not by per-request credits. + + + - Prompts are counted in prompt scenarios: one per prompt per tracked location. A prompt tracked in 3 locations + consumes 3. Engines and the prompt’s language do not multiply it. + externalDocs: + description: Documentation + url: https://seranking.com/api/se-visible/subscription/#get-subscription-details + responses: + "200": + description: Successful response. + content: + application/json: + schema: + type: object + properties: + plan_key: + type: string + description: Subscription plan key (e.g. `pro`). + status: + type: string + description: Subscription status (e.g. `active`). + created_at: + type: string + description: Subscription creation datetime. + ends_at: + type: string + description: Subscription end datetime. + billing_period: + type: string + description: Billing period (e.g. `monthly`), or `null` if not set. + auto_renew: + type: boolean + description: Whether the subscription renews automatically. + limits: + type: object + properties: + projects: + type: object + properties: + max: + type: integer + description: Maximum number of projects allowed by the plan; `null` when `unlimited` is `true`. + used: + type: integer + description: Number of projects currently in use. + available: + type: integer + description: Number of projects remaining; `null` when `unlimited` is `true`, otherwise never below 0. + unlimited: + type: boolean + description: "`true` when the plan does not cap projects; `max` and `available` are then `null`." + prompts: + type: object + properties: + max: + type: integer + description: Maximum number of prompts allowed by the plan; `null` when `unlimited` is `true`. + used: + type: integer + description: Number of prompts currently in use. + available: + type: integer + description: Number of prompts remaining; `null` when `unlimited` is `true`, otherwise never below 0. + unlimited: + type: boolean + description: "`true` when the plan does not cap prompts; `max` and `available` are then `null`." + user_seats: + type: object + properties: + max: + type: integer + description: Maximum number of user seats allowed by the plan; `null` when `unlimited` is `true`. + used: + type: integer + description: Number of user seats currently in use. + available: + type: integer + description: >- + Number of user seats remaining; `null` when `unlimited` is `true`. Otherwise `max - used` + without clamping, so it is negative when active users exceed the seat limit. + unlimited: + type: boolean + description: "`true` when the plan does not cap user seats; `max` and `available` are then `null`." + locations_per_project: + type: object + properties: + max: + type: integer + description: Maximum number of locations per project; `null` when `unlimited` is `true`. + unlimited: + type: boolean + description: "`true` when the plan does not cap locations per project." + description: >- + Cap on tracked locations, applied to each project separately, so it has no `used` or + `available`. + web_engines: + type: object + properties: + max: + type: integer + description: Maximum number of web engines per project; `null` when `unlimited` is `true`. + unlimited: + type: boolean + description: "`true` when the plan does not cap web engines per project." + description: Cap on browser (web scraping) engines a project can track, applied to each project separately. + api_engines: + type: object + properties: + max: + type: integer + description: Maximum number of API engines per project; `null` when `unlimited` is `true`. + unlimited: + type: boolean + description: "`true` when the plan does not cap API engines per project." + description: Cap on API engines a project can track, applied to each project separately. + description: Usage limits for the subscription. + example: + plan_key: pro + status: active + created_at: "2026-01-15 10:30:00" + ends_at: "2026-02-15 10:30:00" + billing_period: monthly + auto_renew: true + limits: + projects: + max: 5 + used: 2 + available: 3 + unlimited: false + prompts: + max: 450 + used: 120 + available: 330 + unlimited: false + user_seats: + max: 3 + used: 1 + available: 2 + unlimited: false + locations_per_project: + max: 1 + unlimited: false + web_engines: + max: 6 + unlimited: false + api_engines: + max: 0 + unlimited: false + "401": + $ref: "#/components/responses/Unauthorized" + "402": + $ref: "#/components/responses/PaymentRequired" + "403": + $ref: "#/components/responses/Forbidden" + "429": + $ref: "#/components/responses/TooManyRequests" + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X GET 'https://api.seranking.com/v1/se-visible/subscription' \ + -H 'Authorization: Token YOUR_API_KEY' +components: + securitySchemes: + tokenAuth: + type: apiKey + in: header + name: Authorization + description: >- + Recommended. Send the API key in the `Authorization` header with the `Token` scheme: `Authorization: Token + YOUR_API_KEY`. + apikeyQuery: + type: apiKey + in: query + name: apikey + description: >- + Alternative. Send the API key as the `apikey` query parameter. It must always be a query parameter, even when + other data goes in the request body. + schemas: + GatewayError: + type: object + description: Error returned by the API gateway before the request reaches the API. + properties: + error_description: + type: string + description: Human-readable error message. + responses: + Unauthorized: + description: The API key is missing, unknown or disabled. + content: + application/json: + schema: + $ref: "#/components/schemas/GatewayError" + example: + error_description: >- + Authentication failed. Please ensure you have a valid, enabled API key. To get an API key, please contact + us at api@seranking.com. + PaymentRequired: + description: The account has no active subscription or not enough credits for this request. + content: + application/json: + schema: + $ref: "#/components/schemas/GatewayError" + example: + error_description: >- + Insufficient funds, API key is temporarily disabled. Please make a payment to enable you API key, or + contact us at api@seranking.com. + Forbidden: + description: The API key may not call this endpoint or use this HTTP method. + content: + application/json: + schema: + $ref: "#/components/schemas/GatewayError" + example: + error_description: >- + Authentication failed. Please ensure you have a valid, enabled API key. To get an API key, please contact + us at api@seranking.com. + TooManyRequests: + description: >- + The request rate limit of the API key was exceeded. See [API rate + limits](https://seranking.com/api/rate-limits/). + content: + application/json: + schema: + $ref: "#/components/schemas/GatewayError" + example: + error_description: You made 11 requests, which is over the allowed limit of 10 requests per second. Please try again later.