Ahrefs Organic search API

Organic search data

Business capability
Digital Marketing Management BC-400.60

Operations 3

GET /organic-keywords Organic keywords #
GET /organic-competitors Organic competitors #
GET /top-pages Top pages #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ahrefs-organic-search-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ahrefs-organic-search-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Site Explorer Organic search API
  description: Fetch data from Site Explorer reports
  termsOfService: https://ahrefs.com/terms
  contact:
    name: Ahrefs
    url: https://ahrefs.com/
    email: support@ahrefs.com
  version: 3.0.0
servers:
- url: https://api.ahrefs.com/v3/site-explorer
  description: Ahrefs Site Explorer
security:
- http:
  - read
tags:
- name: Organic search
  description: Organic search data
paths:
  /organic-keywords:
    get:
      tags:
      - Organic search
      summary: Organic keywords
      operationId: organic-keywords
      parameters:
      - description: A manual timeout duration in seconds.
        required: false
        explode: false
        schema:
          type: integer
        name: timeout
        in: query
      - description: The number of results to return.
        required: false
        explode: false
        schema:
          type: integer
          default: 1000
        name: limit
        in: query
      - description: A comma-separated list of columns to order results by, with optional direction. See response schema for valid column identifiers.
        required: false
        explode: false
        schema:
          type: string
          examples:
          - field_a,field_b:asc,field_c:desc
        name: order_by
        in: query
      - description: "The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**best_position**: The top position your target ranks for in the organic search results for a keyword.  \ntype: integer nullable\n\n**best_position_diff**: The change in position between your selected dates.  \ntype: integer nullable\n\n**best_position_has_thumbnail**: The top position has a thumbnail.  \ntype: boolean nullable\n\n**best_position_has_thumbnail_prev**: The top position has a thumbnail on the comparison date.  \ntype: boolean nullable\n\n**best_position_has_video**: The top position has a video.  \ntype: boolean nullable\n\n**best_position_has_video_prev**: The top position has a video on the comparison date.  \ntype: boolean nullable\n\n**best_position_kind**: The kind of the top position: organic, paid, or a SERP feature.  \ntype: string nullable  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`\n\n**best_position_kind_merged**: The kind of the top position optimized for sorting.  \ntype: string  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`\n\n**best_position_kind_prev**: The kind of the top position on the comparison date.  \ntype: string nullable  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`\n\n**best_position_prev**: The top position on the comparison date.  \ntype: integer nullable\n\n**best_position_set**: The ranking group of the top position.  \ntype: string  \nenum: `\"top_3\"` `\"top_4_10\"` `\"top_11_50\"` `\"top_51_more\"`\n\n**best_position_set_prev**: The ranking group of the top position on the comparison date.  \ntype: string nullable  \nenum: `\"top_3\"` `\"top_4_10\"` `\"top_11_50\"` `\"top_51_more\"`\n\n**best_position_url**: The ranking URL in organic search results.  \ntype: string nullable\n\n**best_position_url_prev**: The ranking URL on the comparison date.  \ntype: string nullable\n\n**best_position_url_raw**: The ranking page URL in encoded format.  \ntype: string nullable\n\n**best_position_url_raw_prev**: The ranking page URL on the comparison date in encoded format.  \ntype: string nullable\n\n**cpc**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents.  \ntype: integer nullable\n\n**cpc_merged**: The CPC field optimized for sorting.  \ntype: integer nullable\n\n**cpc_prev**: The CPC metric on the comparison date.  \ntype: integer nullable\n\n**entities**: Organizations, products, persons, works, events, and locations found in a keyword.  \ntype: array(object)\n\n**event_entities**: Events found in a keyword.  \ntype: array(string)\n\n**is_best_position_set_top_11_50**: The ranking group of the top position is 11-50.  \ntype: boolean\n\n**is_best_position_set_top_11_50_prev**: The ranking group of the top position was 11-50 on the comparison date.  \ntype: boolean nullable\n\n**is_best_position_set_top_3**: The ranking group of the top position is Top 3.  \ntype: boolean\n\n**is_best_position_set_top_3_prev**: The ranking group of the top position was Top 3 on the comparison date.  \ntype: boolean nullable\n\n**is_best_position_set_top_4_10**: The ranking group of the top position is 4-10.  \ntype: boolean\n\n**is_best_position_set_top_4_10_prev**: The ranking group of the top position was 4-10 on the comparison date.  \ntype: boolean nullable\n\n**is_branded**: User intent: branded. The user is searching for a specific brand or company name.  \ntype: boolean\n\n**is_commercial**: User intent: commercial. The user is comparing products or services before making a purchase decision.  \ntype: boolean\n\n**is_informational**: User intent: informational. The user is looking for information or an answer to a specific question.  \ntype: boolean\n\n**is_local**: User intent: local. The user is looking for information relevant to a specific location or nearby services.  \ntype: boolean\n\n**is_main_position**: Excludes positions in AI Overviews, Sitelinks, Top stories, Image packs, Videos, Discussions and forums, and posts on X (Twitter).  \ntype: boolean\n\n**is_main_position_prev**: Excludes positions in AI Overviews, Sitelinks, Top stories, Image packs, Videos, Discussions and forums, and posts on X (Twitter) on the comparison date.  \ntype: boolean\n\n**is_navigational**: User intent: navigational. The user is searching for a specific website or web page.  \ntype: boolean\n\n**is_transactional**: User intent: transactional. The user is ready to complete an action, often a purchase.  \ntype: boolean\n\n**keyword**: The keyword your target ranks for.  \ntype: string\n\n**keyword_country**: The country of a keyword your target ranks for.  \ntype: string  \nenum: `\"AD\"` `\"AE\"` `\"AF\"` `\"AG\"` `\"AI\"` `\"AL\"` `\"AM\"` `\"AO\"` `\"AQ\"` `\"AR\"` `\"AS\"` `\"AT\"` `\"AU\"` `\"AW\"` `\"AX\"` `\"AZ\"` `\"BA\"` `\"BB\"` `\"BD\"` `\"BE\"` `\"BF\"` `\"BG\"` `\"BH\"` `\"BI\"` `\"BJ\"` `\"BL\"` `\"BM\"` `\"BN\"` `\"BO\"` `\"BQ\"` `\"BR\"` `\"BS\"` `\"BT\"` `\"BV\"` `\"BW\"` `\"BY\"` `\"BZ\"` `\"CA\"` `\"CC\"` `\"CD\"` `\"CF\"` `\"CG\"` `\"CH\"` `\"CI\"` `\"CK\"` `\"CL\"` `\"CM\"` `\"CN\"` `\"CO\"` `\"CR\"` `\"CU\"` `\"CV\"` `\"CW\"` `\"CX\"` `\"CY\"` `\"CZ\"` `\"DE\"` `\"DJ\"` `\"DK\"` `\"DM\"` `\"DO\"` `\"DZ\"` `\"EC\"` `\"EE\"` `\"EG\"` `\"EH\"` `\"ER\"` `\"ES\"` `\"ET\"` `\"FI\"` `\"FJ\"` `\"FK\"` `\"FM\"` `\"FO\"` `\"FR\"` `\"GA\"` `\"GB\"` `\"GD\"` `\"GE\"` `\"GF\"` `\"GG\"` `\"GH\"` `\"GI\"` `\"GL\"` `\"GM\"` `\"GN\"` `\"GP\"` `\"GQ\"` `\"GR\"` `\"GS\"` `\"GT\"` `\"GU\"` `\"GW\"` `\"GY\"` `\"HK\"` `\"HM\"` `\"HN\"` `\"HR\"` `\"HT\"` `\"HU\"` `\"ID\"` `\"IE\"` `\"IL\"` `\"IM\"` `\"IN\"` `\"IO\"` `\"IQ\"` `\"IR\"` `\"IS\"` `\"IT\"` `\"JE\"` `\"JM\"` `\"JO\"` `\"JP\"` `\"KE\"` `\"KG\"` `\"KH\"` `\"KI\"` `\"KM\"` `\"KN\"` `\"KP\"` `\"KR\"` `\"KW\"` `\"KY\"` `\"KZ\"` `\"LA\"` `\"LB\"` `\"LC\"` `\"LI\"` `\"LK\"` `\"LR\"` `\"LS\"` `\"LT\"` `\"LU\"` `\"LV\"` `\"LY\"` `\"MA\"` `\"MC\"` `\"MD\"` `\"ME\"` `\"MF\"` `\"MG\"` `\"MH\"` `\"MK\"` `\"ML\"` `\"MM\"` `\"MN\"` `\"MO\"` `\"MP\"` `\"MQ\"` `\"MR\"` `\"MS\"` `\"MT\"` `\"MU\"` `\"MV\"` `\"MW\"` `\"MX\"` `\"MY\"` `\"MZ\"` `\"NA\"` `\"NC\"` `\"NE\"` `\"NF\"` `\"NG\"` `\"NI\"` `\"NL\"` `\"NO\"` `\"NP\"` `\"NR\"` `\"NU\"` `\"NZ\"` `\"OM\"` `\"OTHER\"` `\"PA\"` `\"PE\"` `\"PF\"` `\"PG\"` `\"PH\"` `\"PK\"` `\"PL\"` `\"PM\"` `\"PN\"` `\"PR\"` `\"PS\"` `\"PT\"` `\"PW\"` `\"PY\"` `\"QA\"` `\"RE\"` `\"RO\"` `\"RS\"` `\"RU\"` `\"RW\"` `\"SA\"` `\"SB\"` `\"SC\"` `\"SD\"` `\"SE\"` `\"SG\"` `\"SH\"` `\"SI\"` `\"SJ\"` `\"SK\"` `\"SL\"` `\"SM\"` `\"SN\"` `\"SO\"` `\"SR\"` `\"SS\"` `\"ST\"` `\"SV\"` `\"SX\"` `\"SY\"` `\"SZ\"` `\"TC\"` `\"TD\"` `\"TF\"` `\"TG\"` `\"TH\"` `\"TJ\"` `\"TK\"` `\"TL\"` `\"TM\"` `\"TN\"` `\"TO\"` `\"TR\"` `\"TT\"` `\"TV\"` `\"TW\"` `\"TZ\"` `\"UA\"` `\"UG\"` `\"UM\"` `\"US\"` `\"UY\"` `\"UZ\"` `\"VA\"` `\"VC\"` `\"VE\"` `\"VG\"` `\"VI\"` `\"VN\"` `\"VU\"` `\"WF\"` `\"WS\"` `\"YE\"` `\"YT\"` `\"ZA\"` `\"ZM\"` `\"ZW\"`\n\n**keyword_difficulty** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.  \ntype: integer nullable\n\n**keyword_difficulty_merged** (10 units): The keyword difficulty field optimized for sorting.  \ntype: integer nullable\n\n**keyword_difficulty_prev** (10 units): The keyword difficulty on the comparison date.  \ntype: integer nullable\n\n**keyword_language**: The language of the search query  \ntype: array(string)\n\n**keyword_merged**: The keyword field optimized for sorting.  \ntype: string\n\n**keyword_prev**: The keyword your target ranks for on the comparison date.  \ntype: string\n\n**language**: The SERP language.  \ntype: string\n\n**language_prev**: The SERP language on the comparison date.  \ntype: string nullable\n\n**last_update**: The date when we last checked search engine results for a keyword.  \ntype: datetime\n\n**last_update_prev**: The date when we checked search engine results up to the comparison date.  \ntype: datetime nullable\n\n**location_entities**: Locations found in a keyword.  \ntype: array(string)\n\n**organisation_entities**: Organizations found in a keyword.  \ntype: array(string)\n\n**person_entities**: Persons found in a keyword.  \ntype: array(string)\n\n**position_kind**: The kind of a position: organic, paid or a SERP feature. This applies to all positions for a given keyword and URL before picking the top position.  \ntype: string  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`\n\n**position_kind_prev**: The kind of a position on the comparison date.  \ntype: string  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`\n\n**positions_kinds**: The kinds of the top positions.  \ntype: array(string)  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`\n\n**positions_kinds_prev**: The kinds of the top positions on the comparison date.  \ntype: array(string)  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`\n\n**product_entities**: Products found in a keyword.  \ntype: array(string)\n\n**serp_features**: The SERP features that appear in search results for a keyword.  \ntype: array(string)  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`\n\n**serp_features_count**: The number of SERP features that appear in search results for a keyword.  \ntype: integer\n\n**serp_features_count_prev**: The number of SERP features on the comparison date.  \ntype: integer nullable\n\n**serp_features_merged**: The SERP features field optimized for sorting.  \ntype: array(string)  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`\n\n**serp_features_prev**: The SERP features that appear in search results for a keyword on the comparison date.  \ntype: array(string)  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`\n\n**serp_target_main_positions_count**: The number of target URLs ranking for a keyword excluding positions in Sitelinks, Top stories, Image packs, and posts on X (Twitter).  \ntype: integer\n\n**serp_target_main_positions_count_prev**: The number of target URLs ranking for a keyword excluding positions in Sitelinks, Top stories, Image packs, and posts on X (Twitter) on the comparison date.  \ntype: integer nullable\n\n**serp_target_positions_count**: The number of target URLs ranking for a keyword.  \ntype: integer\n\n**serp_target_positions_count_prev**: The number of target URLs ranking for a keyword on the comparison date.  \ntype: integer nullable\n\n**status**: The status of a page: the new page that just started to rank (\"left\"), the lost page that disappeared from search results (\"right\"), or no change (\"both\").  \ntype: string  \nenum: `\"left\"` `\"right\"` `\"both\"`\n\n**sum_paid_traffic** (10 units): An estimation of the number of monthly visits that your target gets from paid search for a keyword.  \ntype: integer nullable\n\n**sum_paid_traffic_merged** (10 units): The paid traffic field optimized for sorting.  \ntype: integer\n\n**sum_paid_traffic_prev** (10 units): The paid traffic on the comparison date.  \ntype: integer nullable\n\n**sum_traffic** (10 units): An estimation of the number of monthly visitors that your target gets from organic search for a keyword.  \ntype: integer nullable\n\n**sum_traffic_merged** (10 units): The traffic field optimized for sorting.  \ntype: integer\n\n**sum_traffic_prev** (10 units): The traffic on the comparison date.  \ntype: integer nullable\n\n**title**: The title displayed for the page in a keyword's SERP.  \ntype: string\n\n**title_prev**: The title displayed for the page in a keyword's SERP on the comparison date.  \ntype: string\n\n**volume** (10 units): An estimation of the number of searches for a keyword over the latest month.  \ntype: integer nullable\n\n**volume_desktop_pct**: The percentage of the total search volume that comes from desktop devices.  \ntype: float nullable\n\n**volume_merged** (10 units): The search volume field optimized for sorting.  \ntype: integer nullable\n\n**volume_mobile_pct**: The percentage of the total search volume that comes from mobile devices.  \ntype: float nullable\n\n**volume_prev** (10 units): The search volume on the comparison date.  \ntype: integer nullable\n\n**words**: The number of words in a keyword.  \ntype: integer\n\n**words_merged**: The number of words in a keyword optimized for sorting.  \ntype: integer\n\n**words_prev**: The number of words in a keyword on the comparison date.  \ntype: integer\n\n**work_entities**: Works found in a keyword.  \ntype: array(string)"
        required: false
        explode: false
        schema:
          type: string
        name: where
        in: query
      - description: A comma-separated list of columns to return. See response schema for valid column identifiers.
        required: true
        explode: false
        schema:
          type: string
        name: select
        in: query
      - description: The protocol of your target.
        required: false
        explode: false
        schema:
          type: string
          enum:
          - both
          - http
          - https
          default: both
        name: protocol
        in: query
      - description: 'The target of the search: a domain or a URL.'
        required: true
        explode: false
        schema:
          type: string
          format: url
        name: target
        in: query
      - description: The scope of the search based on the target you entered.
        required: false
        explode: false
        schema:
          type: string
          enum:
          - exact
          - prefix
          - domain
          - subdomains
          default: subdomains
        name: mode
        in: query
      - description: A two-letter country code (ISO 3166-1 alpha-2).
        required: false
        explode: false
        schema:
          type: string
          enum:
          - ad
          - ae
          - af
          - ag
          - ai
          - al
          - am
          - ao
          - ar
          - as
          - at
          - au
          - aw
          - az
          - ba
          - bb
          - bd
          - be
          - bf
          - bg
          - bh
          - bi
          - bj
          - bn
          - bo
          - br
          - bs
          - bt
          - bw
          - by
          - bz
          - ca
          - cd
          - cf
          - cg
          - ch
          - ci
          - ck
          - cl
          - cm
          - cn
          - co
          - cr
          - cu
          - cv
          - cy
          - cz
          - de
          - dj
          - dk
          - dm
          - do
          - dz
          - ec
          - ee
          - eg
          - es
          - et
          - fi
          - fj
          - fm
          - fo
          - fr
          - ga
          - gb
          - gd
          - ge
          - gf
          - gg
          - gh
          - gi
          - gl
          - gm
          - gn
          - gp
          - gq
          - gr
          - gt
          - gu
          - gy
          - hk
          - hn
          - hr
          - ht
          - hu
          - id
          - ie
          - il
          - im
          - in
          - iq
          - is
          - it
          - je
          - jm
          - jo
          - jp
          - ke
          - kg
          - kh
          - ki
          - kn
          - kr
          - kw
          - ky
          - kz
          - la
          - lb
          - lc
          - li
          - lk
          - ls
          - lt
          - lu
          - lv
          - ly
          - ma
          - mc
          - md
          - me
          - mg
          - mk
          - ml
          - mm
          - mn
          - mq
          - mr
          - ms
          - mt
          - mu
          - mv
          - mw
          - mx
          - my
          - mz
          - na
          - nc
          - ne
          - ng
          - ni
          - nl
          - 'no'
          - np
          - nr
          - nu
          - nz
          - om
          - pa
          - pe
          - pf
          - pg
          - ph
          - pk
          - pl
          - pn
          - pr
          - ps
          - pt
          - py
          - qa
          - re
          - ro
          - rs
          - ru
          - rw
          - sa
          - sb
          - sc
          - se
          - sg
          - sh
          - si
          - sk
          - sl
          - sm
          - sn
          - so
          - sr
          - st
          - sv
          - td
          - tg
          - th
          - tj
          - tk
          - tl
          - tm
          - tn
          - to
          - tr
          - tt
          - tw
          - tz
          - ua
          - ug
          - us
          - uy
          - uz
          - vc
          - ve
          - vg
          - vi
          - vn
          - vu
          - ws
          - ye
          - yt
          - za
          - zm
          - zw
        name: country
        in: query
      - description: A date to compare metrics with in YYYY-MM-DD format.
        required: false
        explode: false
        schema:
          type: string
          format: date
        name: date_compared
        in: query
      - description: A date to report metrics on in YYYY-MM-DD format.
        required: true
        explode: false
        schema:
          type: string
          format: date
        name: date
        in: query
      - description: 'The organic traffic calculation mode: static or adaptive. It affects organic traffic and traffic value.'
        required: false
        explode: false
        schema:
          type: string
          enum:
          - static
          - adaptive
          default: static
        name: traffic_mode
        in: query
      - description: 'The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.'
        required: false
        explode: false
        schema:
          type: string
          enum:
          - monthly
          - average
          default: monthly
        name: volume_mode
        in: query
      - $ref: '#/components/parameters/output_json_php_xml'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/organic-keywords'
            application/xml:
              schema:
                $ref: '#/components/schemas/organic-keywords'
        '400':
          $ref: '#/components/responses/error_400'
        '401':
          $ref: '#/components/responses/error_401'
        '403':
          $ref: '#/components/responses/error_403'
        '429':
          $ref: '#/components/responses/error_429'
        '500':
          $ref: '#/components/responses/error_500'
  /organic-competitors:
    get:
      tags:
      - Organic search
      summary: Organic competitors
      operationId: organic-competitors
      parameters:
      - description: A manual timeout duration in seconds.
        required: false
        explode: false
        schema:
          type: integer
        name: timeout
        in: query
      - description: The number of results to return.
        required: false
        explode: false
        schema:
          type: integer
          default: 1000
        name: limit
        in: query
      - description: A comma-separated list of columns to order results by, with optional direction. See response schema for valid column identifiers.
        required: false
        explode: false
        schema:
          type: string
          examples:
          - field_a,field_b:asc,field_c:desc
        name: order_by
        in: query
      - description: "The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**competitor_domain**: A competitor's domain of your target in “domains\" group mode.  \ntype: domain nullable\n\n**competitor_url**: A competitor's URL of your target in pages\" group mode.  \ntype: url nullable\n\n**cpc_competitor**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents for a competitor.  \ntype: integer nullable\n\n**cpc_target**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents for a target.  \ntype: integer nullable\n\n**domain_rating**: The strength of a domain's backlink profile compared to the others in our database on a 100-point scale.  \ntype: float\n\n**group_mode**: To see competing pages instead, use the “exact URL” target mode or “path” target mode if your target doesn't have multiple pages.  \ntype: string  \nenum: `\"domains\"` `\"pages\"`\n\n**keyword_difficulty_competitor** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale for a competitor.  \ntype: integer nullable\n\n**keyword_difficulty_target** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale for a target.  \ntype: integer nullable\n\n**keywords_common**: Organic keywords that both your target and a competitor are ranking for.  \ntype: integer\n\n**keywords_competitor**: Organic keywords that a competitor is ranking for, but your target isn't.  \ntype: integer\n\n**keywords_target**: Organic keywords that your target is ranking for, but a competitor isn't.  \ntype: integer\n\n**pages**: The total number of pages from a target ranking in search results.  \ntype: integer nullable\n\n**pages_diff**: The change in pages between your selected dates.  \ntype: integer\n\n**pages_merged**: The pages field optimized for sorting.  \ntype: integer\n\n**pages_prev**: The total number of pages from a target ranking in search results on the comparison date.  \ntype: integer nullable\n\n**share**: The percentage of common keywords out of the total number of keywords that your target and a competitor both rank for.  \ntype: float\n\n**traffic** (10 units): An estimation of the number of monthly visits that a page gets from organic search over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter.  \ntype: integer nullable\n\n**traffic_diff**: The change in traffic between your selected dates.  \ntype: integer\n\n**traffic_merged** (10 units): The traffic field optimized for sorting.  \ntype: integer\n\n**traffic_prev** (10 units): An estimation of the number of monthly visits that a page gets from organic search over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter on the comparison date.  \ntype: integer nullable\n\n**value** (10 units): The estimated value of a page's monthly organic search traffic, in USD cents.  \ntype: integer nullable\n\n**value_diff**: The change in value between your selected dates.  \ntype: integer\n\n**value_merged** (10 units): The value field optimized for sorting.  \ntype: integer nullable\n\n**value_prev** (10 units): The estimated value of a page's monthly organic search traffic, in USD cents on the comparison date.  \ntype: integer nullable\n\n**volume_competitor** (10 units): An estimation of the average monthly number of searches for a keyword over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter for a competitor.  \ntype: integer nullable\n\n**volume_target** (10 units): An estimation of the average monthly number of searches for a keyword over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter for a target.  \ntype: integer nullable\n\n**words_competitor**: The number of words in a keyword for a competitor.  \ntype: integer\n\n**words_target**: The number of words in a keyword for a target.  \ntype: integer"
        required: false
        explode: false
        schema:
          type: string
        name: where
        in: query
      - description: A comma-separated list of columns to return. See response schema for valid column identifiers.
        required: true
        explode: false
        schema:
          type: string
        name: select
        in: query
      - description: The protocol of your target.
        required: false
        explode: false
        schema:
          type: string
          enum:
          - both
          - http
          - https
          default: both
        name: protocol
        in: query
      - description: 'The target of the search: a domain or a URL.'
        required: true
        explode: false
        schema:
          type: string
          format: url
        name: target
        in: query
      - description: The scope of the search based on the target you entered.
        required: false
        explode: false
        schema:
          type: string
          enum:
          - exact
          - prefix
          - domain
          - subdomains
          default: subdomains
        name: mode
        in: query
      - description: A two-letter country code (ISO 3166-1 alpha-2).
        required: true
        explode: false
        schema:
          type: string
          enum:
          - ad
          - ae
          - af
          - ag
          - ai
          - al
          - am
          - ao
          - ar
          - as
          - at
          - au
          - aw
          - az
          - ba
          - bb
          - bd
          - be
          - bf
          - bg
          - bh
          - bi
          - bj
          - bn
          - bo
          - br
          - bs
          - bt
          - bw
          - by
          - bz
          - ca
          - cd
          - cf
          - cg
          - ch
          - ci
          - ck
          - cl
          - cm
          - cn
          - co
          - cr
          - cu
          - cv
          - cy
          - cz
          - de
          - dj
          - dk
          - dm
          - do
          - dz
          - ec
          - ee
          - eg
          - es
          - et
          - fi
          - fj
          - fm
          - fo
          - fr
          - ga
          - gb
          - gd
          - ge
          - gf
          - gg
          - gh
          - gi
          - gl
          - gm
          - gn
          - gp
          - gq
          - gr
          - gt
          - gu
          - gy
          - hk
          - hn
          - hr
          - ht
          - hu
          - id
          - ie
          - il
          - im
          - in
          - iq
          - is
          - it
          - je
          - jm
          - jo
          - jp
          - ke
          - kg
          - kh
          - ki
          - kn
          - kr
          - kw
          - ky
          - kz
          - la
          - lb
          - lc
          - li
          - lk
          - ls
          - lt
          - lu
          - lv
          - ly
          - ma
          - mc
          - md
          - me
          - mg
          - mk
          - ml
          - mm
          - mn
          - mq
          - mr
          - ms
          - mt
          - mu
          - mv
          - mw
          - mx
          - my
          - mz
          - na
          - nc
          - ne
          - ng
          - ni
          - nl
          - 'no'
          - np
          - nr
          - nu
          - nz
          - om
          - pa
          - pe
          - pf
          - pg
       

# --- truncated at 32 KB (114 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/ahrefs/refs/heads/main/openapi/ahrefs-organic-search-api-openapi.yml