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