Overview
Jump to AboutAbout
It’s a group of products with SEO reports including:
- Domain Analytics
- Organic Research
- Advertising Research
- Keyword Gap Analysis
- Keyword Analytics
- Backlink Analytics
Jump to AuthenticationAuthentication
Request authentication is provided via API keys. An API key is assigned to each user after subscribing to Semrush. You’ll find it in Subscription info > API units. If your API key is unavailable there, refer to API access.
Never share your API key publicly. If you share an API call example, replace your key with a placeholder such as https://api.semrush.com/?key=<key>.
Your API key also gives access to your API unit balance. Exposing your credentials can result in your account being compromised, which could lead to unexpected charges.
Jump to Response formatResponse format
All SEO API report endpoints return responses in CSV format.
Jump to ColumnsColumns
Each Semrush SEO API method supports a set of output columns that determine the data returned in the CSV response.
You can customize your request using the export_columns parameter to include only the fields relevant to your analysis.
The following table indicates:
- Request parameter (the
export_columnsparameter value) - Response parameter (the column name in the CSV report)
- Description of what each column represents
- Possible values to help interpret the results (if applicable)
- API methods where the columns are used
AbAdwords BlockAcAdwords CostAdAdwords KeywordsAtAdwords TrafficCoCompetition0–1, where 1 means the highest competition.CpCPCCrCompetitor RelevanceCvCoverage0–100, where 100 means ads appeared every month.DbDatabaseUS, UK, Italy, etc.DnDomainDsDescriptionDtDateFkKeywords SERP FeaturesFpSERP FeaturesFlSERP FeaturesFKnKnowledge panel, Local pack, etc.)FPnKnowledge panel, Local pack, etc.)FP1,FP2..FPn, where n is the number of a SERP feature from this list.FKnKnowledge panel, Local pack, etc.)FPnKnowledge panel, Local pack, etc.)FP1,FP2..FPn, where n is the number of a SERP feature from this list.InIntents0–3, where 0 - Commercial, 1 - Informational, 2 - Navigational, 3 - Transactional.IpuIntent Unknown PositionsIp0Intent Commercial PositionsIp1Intent Informational PositionsIp2Intent Navigational PositionsIp3Intent Transactional PositionsItuIntent Unknown TrafficIt0Intent Commercial TrafficIt1Intent Informational TrafficIt2Intent Navigational TrafficIt3Intent Transactional TrafficIcuIntent Unknown Traffic CostIc0Intent Commercial Traffic CostIc1Intent Informational Traffic CostIc2Intent Navigational Traffic CostIc3Intent Transactional Traffic CostKdKeyword Difficulty Index0–100, where higher is harder.NpCommon KeywordsNqSearch VolumeNrNumber of ResultsOcOrganic CostOeOrganic Positions ImprovedOiOrganic Positions DeclinedOlOrganic Positions LostOnOrganic Positions NewOrOrganic KeywordsOtOrganic TrafficP0Domain0–100, where 0 means not ranked.P1Domain0–100, where 0 means not ranked.P2Domain0–100, where 0 means not ranked.P3Domain0–100, where 0 means not ranked.P4Domain0–100, where 0 means not ranked.PcNumber of KeywordsPdPosition DifferencePhKeywordPoPosition0–100, where 0 means not ranked.PpPrevious Position0–100, where 0 means not ranked.PtPosition typeRkRankScSERP Features Traffic CostScmSERP Features Traffic Cost DifferenceShPLA keywordsSvPLA uniquesSrSERP Features PositionsSrbSERP Features Positions BrandedSrlSERP Features Positions LostSrmSERP Features Positions DifferenceSrnSERP Features Positions NewStSERP Features TrafficStbSERP Features Traffic BrandedStmSERP Features Traffic DifferenceTcTraffic Cost (%)TgTrafficTdTrendsTrTraffic (%)TsTimestampTtTitleUnAd idUrUrlVuVisible UrlXnX0,X1..X9,XAX0,X1..X9,XA, where n is: 0: 1-3, 1: 4-10, 2: 11-20, 3: 21-30, 4: 31-40, 5: 41-50, 6: 51-60, 7: 61-70, 8: 71-80, 9: 81-90, A: 91-100ascoreascorebacklinks_lost_numbacklinks_lost_numbacklinks_new_numbacklinks_new_numbacklinks_numbacklinks_numcategory_namecategory_namecommon_refdomainscommon_refdomainsdatedatedomain_ascoredomain_ascoredomain_trust_scoredomain_trust_scoredomains_lost_numdomains_lost_numdomains_new_numdomains_new_numdomains_numdomains_numexternal_numexternal_numfirst_seenfirst_seenframeframe<iframe> attribute or not. Possible values: true, false.frames_numframes_num<iframe> attribute.internal_numinternal_numipclassc_numipclassc_num192.0.0.0 through 223.255.255.0, with the network number contained in the first three octets.ips_numips_numlast_seenlast_seenmatches_nummatches_numpage_ascorepage_ascoreratingrating0–1, where 1 means the highest confidence.similaritysimilaritysource_titlesource_titletargettargettarget_typetarget_typeroot_domain, domain, and url.Jump to Tips and tricksTips and tricks
- Column names can’t be changed
- The order of columns can be changed
- The number of columns can be increased
- Semrush will only remove old columns after notifying users
Jump to DatabasesDatabases
Regional database types:
- Desktop: Specified as a two-letter code.
- Mobile: Specified as a two-letter code with the
mobile-prefix. - Extended: Specified as a two-letter code with the
-extsuffix.
Mobile and extended databases aren’t available for any requests in the Keyword reports.
usukcarudefresitbrauarbechdkfihkieilmxnlnoplsesgtrjpinhuafaldzaoamatazbhbdbybzbobabwbnbgcvkhcmclcocrhrcyczcddoecegsveeetgeghgrgtgyhthnisidjmjokzkwlvlbltlumgmymtmumdmnmemamznanpnzningompypephptrosasnrssksizakrlkthbstttnuaaeuyvevnzmzwlymobile-usmobile-ukmobile-camobile-demobile-frmobile-esmobile-itmobile-brmobile-aumobile-dkmobile-mxmobile-nlmobile-semobile-trmobile-inmobile-idmobile-ilil-exttr-extdk-extno-extse-extfi-extch-extmobile-il-extpapktwqaJump to Error messagesError messages
ERROR 40 :: MANDATORY PARAMETER action NOT SET OR EMPTYaction parameter is missing, or its value is not set.ERROR 41 :: MANDATORY PARAMETER type NOT SET OR EMPTYtype parameter is missing, or its value is not set.ERROR 42 :: MANDATORY PARAMETER domain NOT SET OR EMPTYdomain parameter is missing, or its value is not set.ERROR 43 :: MANDATORY PARAMETER phrase NOT SET OR EMPTYphrase parameter is missing, or its value is not set.ERROR 44 :: MANDATORY PARAMETER url NOT SET OR EMPTYurl parameter is missing, or its value is not set.ERROR 46 :: MANDATORY PARAMETER database NOT SET OR EMPTYdatabase parameter is missing, or its value is not set.ERROR 48 :: REQUEST METHOD NOT ALLOWED, USE GETERROR 50 :: NOTHING FOUNDERROR 110 :: INVALID IMPORT KEYERROR 120 :: WRONG KEY - ID PAIRERROR 130 :: API DISABLEDERROR 131 :: LIMIT EXCEEDEDERROR 132 :: API UNITS BALANCE IS ZEROERROR 133 :: DB ACCESS DENIEDERROR 134 :: TOTAL LIMIT EXCEEDEDERROR 135 :: API REPORT TYPE DISABLEDERROR 136 :: Multiple limits not allowedERROR 402 :: Request param not validERROR 402 :: Request param not valid :: Duplicate domainsERROR 404 :: Not foundERROR 429 :: Too Many RequestsERROR 500 :: Internal ErrorERROR 605 :: Invalid display_offset parameter, must be a positive integer number and less than display_limit or it should be skippedERROR 613 :: Too many rows requested, check display_offset and display_limit parametersdisplay_limit and/or display_offset to a lower value.ERROR 10000 :: Wrong parameter '{parameter}'. {description}.ERROR 10001 :: Wrong parameter '{parameter}'. {description}.ERROR 10010 :: Wrong parameter '{parameter}'. {description}.ERROR 10011 :: Wrong parameter '{parameter}'. {description}.ERROR 10012 :: Wrong parameter '{parameter}'. {description}.ERROR 10013 :: Wrong parameter '{parameter}'. {description}.ERROR 10014 :: Wrong parameter '{parameter}'. {description}.ERROR 10015 :: Wrong parameter '{parameter}'. {description}.ERROR 10030 :: Wrong parameter '{parameter}'. {description}.ERROR 10031 :: Wrong parameter '{parameter}'. {description}.ERROR 10040 :: Wrong parameter '{parameter}'. {description}.selected_targets parameter mustn’t contain more domains than targets with the segment equal to ‘excludes’.selected_targets aligns with the excludes segment limit and adjust domains accordingly.ERROR 10041 :: Wrong parameter '{parameter}'. {description}.selected_targets domains are specified in the targets parameter.selected_targets, specify only those domains that are indicated in the targets parameter.ERROR 10042 :: Wrong parameter '{parameter}'. {description}.ERROR 10043 :: Wrong parameter '{parameter}'. {description}.ERROR 10044 :: Wrong parameter '{parameter}'. {description}.ERROR 10045 :: Wrong parameter '{parameter}'. {description}.Jump to FiltersFilters
To apply filters to a report, add the display_filter parameter with a URL-encoded string that contains filters separated by | (%7C). Max. number of filters that can be applied at once is 25.
A single filter consists of <sign>|<field>|<operation>|<value>, where:
<sign>:+(%2B) or-(%2D) to include or exclude the corresponding data.<field>: Possible fields are listed in the tables in the upcoming sections.<operation>: Possible operations are listed in the Operations section and depend on the field type.<value>: Possible values depend on the field.
Some ready-to-use functions might encode the + sign incorrectly. Make sure that it’s encoded as %2B.
Jump to Example requestsExample requests
https://api.semrush.com/?type=phrase_related&key=YOUR_API_KEY&phrase=seo&export_columns=Ph,Nq,Cp,Co,Nr,Td,Rr,Fk&database=us&display_limit=10&display_sort=nq_desc&display_filter=%2B%7CNq%7CLt%7C1000https://api.semrush.com/?type=domain_organic&key=YOUR_API_KEY&display_limit=10&export_columns=Ph,Po,Pp,Pd,Nq,Cp,Ur,Tr,In,Pp&domain=toyota.com&display_sort=tr_desc&database=us&display_filter=%2B%7CIn%7CEq%7C3%7C%2B%7CPp%7CGt%7C5Jump to Metric fieldsMetric fields
CoCpDbHsWcNqNrP0P1P2P3P4PhPoPpPrQuRtTcTrTsTtUrVuIn0 (Commercial), 1 (Informational), 2 (Navigational), 3 (Transactional).IpuIp0Ip1Ip2Ip3Jump to Text fieldsText fields
PhQuRtUrVutitletextadurlJump to Fields with fixed valuesFields with fixed values
Dbus, uk, mobile-uk, ca, mobile-ca, ru, de, mobile-de, fr, mobile-fr, es, mobile-es, it, mobile-it, br, mobile-br, au, mobile-au, bing-us, ar, be, ch, dk, mobile-dk, fi, hk, ie, il, mobile-il, mx, mobile-mx, nl, mobile-nl, no, pl, se, mobile-se, sg, tr, mobile-tr, jp, in, mobile-in, hu, mobile-usHs0, 1typenofollow, frame, form, imagezoneBr0, 1, 3. Not Branded: 0. Branded for other domain: 1. Branded: 3.Jump to OperationsOperations
<operation> can be set depending on the field type.
Jump to For metric fieldsFor metric fields
EqGtLtJump to For text fieldsFor text fields
BwEwEqCoWmJump to For fields with fixed valuesFor fields with fixed values
Leave the field blank.
Jump to SERP FeaturesSERP Features
The table provides a list of supported SERP features with their codes and descriptions and indicates whether a particular SERP feature includes a direct link to the target domain.
0123456789101112131415161718192021222324252627282930313234353637383940414243444546474849505152The SERP features codes can be included in the FKn and FPn columns (as listed in Columns table) when making requests to retrieve data on keyword-specific SERP features and their positions. These columns are used with the export_columns parameter; however, not all requests accept FKn and FPn as part of export_columns.
Jump to Example requestExample request
https://api.semrush.com/?key=API_KEY&type=domain_ranks&export_columns=Db,Dn,Rk,Or,Ot,Oc,Ad,At,Ac,Sh,Sv,FK1,FP1&domain=apple.com&database=usThis example retrieves SERP feature data for your domain, where FP1 shows the count of times the domain ranks within a specific SERP feature (in this case, 1 is for Knowledge panel) and FK1 shows the total occurrences of this feature for keywords the domain ranks for, whether or not the domain appears in it.
Jump to SortingsSortings
You can sort the response results by different parameters in ascending or descending order.
To set the sorting in SEO report requests, include the display_sort parameter with the target sorting rule. You can set only one sorting rule per request.
For example, you can sort keywords by traffic share in descending order in the Domain Organic Search Keywords request:
https://api.semrush.com/?type=domain_organic&key=YOUR_API_KEY&display_filter=%2B%7CPh%7CCo%7Cseo&display_limit=10&export_columns=Ph,Po,Pp,Pd,Nq,Cp,Ur,Tr,Tc,Co,Nr,Td&domain=seobook.com&display_sort=tr_desc&database=usam_ascAm)am_descAm)bm_ascBm)bm_descBm)cg_ascCg)cg_descCg)cm_ascCm)cm_descCm)co_ascCo)co_descCo)cp_ascCp)cp_descCp)cr_ascCr)cr_descCr)cv_ascCv)cv_descCv)dt_ascTs)dt_descTs)kd_ascKd)kd_descKd)np_ascNp)np_descNp)nq_ascNq)nq_descNq)nr_ascNr)nr_descNr)om_ascOm)om_descOm)p0_ascP0)p0_descP0)p1_ascP1)p1_descP1)p2_ascP2)p2_descP2)p3_ascP3)p3_descP3)p4_ascP4)p4_descP4)pc_ascPc)pc_descPc)po_ascPo)po_descPo)pr_ascPr)pr_descPr)scm_ascScm)scm_descScm)srm_ascSrm)srm_descSrm)stm_ascStm)stm_descStm)tc_ascTc)tc_descTc)tg_ascTg)tg_descTg)tm_ascTm)tm_descTm)tr_ascTr)tr_descTr)ts_ascTs)ts_descTs)um_ascUm)um_descUm)last_seen_asclast_seen)last_seen_desclast_seen)first_seen_ascfirst_seen)first_seen_descfirst_seen)times_seen_asctimes_seen)times_seen_desctimes_seen)ads_count_ascads_count)ads\_count_descads_count)Jump to Historical dataHistorical data
Most analytic reports let you download historical data.
Historical data costs more than regular data requests. For example, in the Domain Overview (all databases) report, the historical data costs 50 API units per line while the current data is 10 API units per line.
The historical data price is listed below the regular data price:
Some reports, like Domain Overview (history), provide only historical data. For these reports, the displayed request price already applies to historical data.
Last updated: March 26, 2026