XML 148 R130.htm IDEA: XBRL DOCUMENT
v3.26.1

SHARE-BASED COMPENSATION - Share-based compensation related to share options (Details) $ / shares in Units, ¥ in Thousands, $ in Millions |  |  |  |  | 1 Months Ended | 12 Months Ended |  |
--- | --- | --- | --- | --- | --- | --- | --- | ---
Dec. 01, 2025 shares | May 05, 2022 agreement shares | Apr. 20, 2022 shares | Mar. 31, 2022 shares | May 31, 2025 shares | Apr. 30, 2022 $ / shares shares | Jul. 31, 2020 shares | Dec. 31, 2025 CNY (¥) shares | Dec. 31, 2025 USD ($) shares | Dec. 31, 2024 CNY (¥) shares | Dec. 31, 2024 USD ($) shares | Dec. 31, 2023 CNY (¥) shares | Dec. 31, 2023 USD ($) shares | Dec. 31, 2018 | May 31, 2022 shares | Dec. 28, 2018 shares
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Share-based compensation related to share options | ¥ |  |  |  |  |  |  |  |  | ¥ 1,904,924 |  | ¥ 2,726,075 |  | ¥ 3,215,549 |  |  |  |
Shengdu |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Percentage of ownership interest acquired |  |  |  | 51.00% |  |  |  |  |  |  |  |  |  |  |  |  |
Share options |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Aggregate intrinsic value of share options exercised | $ |  |  |  |  |  |  |  |  |  | $ 102.4 |  | $ 72.8 |  | $ 92.8 |  |  |
Share-based compensation related to share options | ¥ |  |  |  |  |  |  |  |  | 138,456 |  | 541,956 |  | 771,151 |  |  |  |
Restricted shares |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Share-based compensation related to share options | ¥ |  |  |  |  |  |  |  |  | ¥ 516,008 |  | ¥ 1,086,942 |  | ¥ 1,631,104 |  |  |  |
Number of shares restriction removed |  |  |  |  |  |  |  |  | 26,726,342 | 26,726,342 | 13,297,108 | 13,297,108 | 13,292,404 | 13,292,404 |  |  |
Total fair value of shares | ¥ |  |  |  |  |  |  |  |  | ¥ 747,300 |  | ¥ 365,100 |  | ¥ 364,900 |  |  |  |
Restricted share units |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Share-based compensation related to share options | ¥ |  |  |  |  |  |  |  |  | 1,250,460 |  | 1,097,177 |  | 813,294 |  |  |  |
Total fair value of shares | ¥ |  |  |  |  |  |  |  |  | ¥ 1,115,600 |  | ¥ 901,500 |  | 231,100 |  |  |  |
Class A Ordinary Shares |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Ordinary shares, shares issued | [1] |  |  |  |  |  |  |  | 3,366,778,024 | 3,366,778,024 | 3,479,616,986 | 3,479,616,986 |  |  |  |  |
Restricted class A ordinary shares | Shengdu |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Share-based compensation related to share options | ¥ |  |  |  |  |  |  |  |  | ¥ 121,000 |  | ¥ 406,300 |  | ¥ 405,200 |  |  |  |
Restriction period |  |  |  |  | 3 years |  |  |  |  |  |  |  |  |  |  |  |
Number of shares restriction removed |  |  |  |  |  |  |  |  | 44,315,854 | 44,315,854 |  |  |  |  |  |  |
Number of shares issued in acquisition |  |  |  | 44,315,854 | 44,315,854 |  |  |  |  |  |  |  |  |  |  |  |
Restricted class A ordinary shares | First anniversary | Shengdu |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Percentage of restrictions on restricted shares |  |  |  | 30.00% |  |  |  |  |  |  |  |  |  |  |  |  |
Restricted class A ordinary shares | Second anniversary | Shengdu |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Percentage of restrictions on restricted shares |  |  |  | 30.00% |  |  |  |  |  |  |  |  |  |  |  |  |
Restricted class A ordinary shares | Third anniversary | Shengdu |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Percentage of restrictions on restricted shares |  |  |  | 40.00% |  |  |  |  |  |  |  |  |  |  |  |  |
Mr. PENG Yongdong, chairman and chief executive officer | Restricted class A ordinary shares |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Number of shares issued |  |  |  |  |  |  |  |  | 62,824,250 | 62,824,250 |  |  |  |  |  |  |
Mr. SHAN Yigang, an executive director | Restricted class A ordinary shares |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Number of shares issued |  |  |  |  |  |  |  |  | 53,868,189 | 53,868,189 |  |  |  |  |  |  |
2018 Share Option Plan |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Granted (in shares) |  |  |  |  |  |  |  |  | 0 | 0 | 0 | 0 | 0 | 0 |  |  |
2018 Share Option Plan | Share options |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Options exercisable term |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 10 years |  |
Recognized weighted-average period |  |  |  |  |  |  |  |  | 1 year | 1 year |  |  |  |  |  |  |
2018 Share Option Plan | Share options | Minimum |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Vesting period |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 1 year |  |
2018 Share Option Plan | Share options | Maximum |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Vesting period |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 5 years |  |
2018 Share Option Plan | Class A Ordinary Shares | Maximum |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Maximum number of shares of the company available for issuance |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 350,225,435
2020 Global Share Incentive Plan |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Number of shares restriction removed |  |  |  |  |  |  |  |  | 28,080,498 | 28,080,498 | 22,936,809 | 22,936,809 | 5,963,517 | 5,963,517 |  |  |
Restricted shares granted |  |  |  |  |  |  |  |  | 25,371,822 | 25,371,822 | 29,718,591 | 29,718,591 | 46,425,615 | 46,425,615 |  |  |
2020 Global Share Incentive Plan | Share options | Minimum |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Vesting period |  |  |  |  |  |  |  |  | 1 year | 1 year |  |  |  |  |  |  |
2020 Global Share Incentive Plan | Share options | Maximum |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Vesting period |  |  |  |  |  |  |  |  | 5 years | 5 years |  |  |  |  |  |  |
2020 Global Share Incentive Plan | Restricted share units |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Granted (in shares) |  |  |  |  |  |  |  |  | 25,371,822 | 25,371,822 |  |  |  |  |  |  |
Options exercisable term |  |  |  |  |  |  |  | 10 years |  |  |  |  |  |  |  |  |
Recognized weighted-average period |  |  |  |  |  |  |  |  | 2 years 2 months 12 days | 2 years 2 months 12 days |  |  |  |  |  |  |
Number of shares percentage on issued and outstanding |  |  |  |  |  |  |  | 1.00% |  |  |  |  |  |  |  |  |
Maximum number of shares of the company available for issuance |  |  |  |  |  |  |  | 80,000,000 |  |  |  |  |  |  |  |  |
2020 Global Share Incentive Plan | Class A Ordinary Shares | Maximum |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Share options granted, exercise price | $ / shares |  |  |  |  |  |  | $ 0.00002 |  |  |  |  |  |  |  |  |  |
Ordinary shares, shares issued |  |  |  |  |  |  | 253,246,913 |  |  |  |  |  |  |  |  |  |
2022 Share Incentive Plan | Restricted shares |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Recognized weighted-average period |  |  |  |  |  |  |  |  | 1 year 4 months 24 days | 1 year 4 months 24 days |  |  |  |  |  |  |
2022 Share Incentive Plan | Restricted class A ordinary shares |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Share-based compensation related to share options | ¥ |  |  |  |  |  |  |  |  | ¥ 395,000 |  | ¥ 680,600 |  | ¥ 1,225,900 |  |  |  |
2022 Share Incentive Plan | Restricted class A ordinary shares |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Restriction period |  |  | 5 years |  |  |  |  |  |  |  |  |  |  |  |  |  |
Number of agreements | agreement |  |  | 2 |  |  |  |  |  |  |  |  |  |  |  |  |  |
2022 Share Incentive Plan | Restricted class A ordinary shares | Shengdu |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Restriction period |  |  | 5 years |  |  |  |  |  |  |  |  |  |  |  |  |  |
2022 Share Incentive Plan | Restricted class A ordinary shares | Maximum |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Maximum number of shares of the company available for issuance |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 125,692,439 |
2022 Share Incentive Plan | Restricted class A ordinary shares | First anniversary |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Percentage of restrictions on restricted shares |  |  | 50.00% |  |  |  |  |  |  |  |  |  |  |  |  |  |
2022 Share Incentive Plan | Restricted class A ordinary shares | Second anniversary |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Percentage of restrictions on restricted shares |  |  | 50.00% |  |  |  |  |  |  |  |  |  |  |  |  |  |
2022 Share Incentive Plan | Restricted class A ordinary shares | Third anniversary |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Percentage of restrictions on restricted shares |  |  | 33.00% |  |  |  |  |  |  |  |  |  |  |  |  |  |
2022 Share Incentive Plan | Restricted class A ordinary shares | Fourth anniversary |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Percentage of restrictions on restricted shares |  |  | 33.00% |  |  |  |  |  |  |  |  |  |  |  |  |  |
2022 Share Incentive Plan | Restricted class A ordinary shares | Fifth anniversary |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Percentage of restrictions on restricted shares |  |  | 33.00% |  |  |  |  |  |  |  |  |  |  |  |  |  |
2022 Share Incentive Plan | Mr. PENG Yongdong, chairman and chief executive officer | Restricted class A ordinary shares |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Number of shares issued |  |  | 71,824,250 |  |  |  |  |  |  |  |  |  |  |  |  |  |
Number of shares restriction removed |  | 9,000,000 |  |  |  | 45,830,712 |  |  | 9,000,000 | 9,000,000 |  |  |  |  |  |  |
2022 Share Incentive Plan | Mr. SHAN Yigang, an executive director | Restricted class A ordinary shares |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
SHARE-BASED COMPENSATION |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Number of shares issued |  |  | 53,868,189 |  |  |  |  |  |  |  |  |  |  |  |  |  |
Number of shares restriction removed |  |  |  |  |  | 34,373,035 |  |  |  |  |  |  |  |  |  |  |
[1] | Excluding the Class A ordinary shares registered in the name of the depositary bank for future issuance of ADSs upon the exercise or vesting of awards granted under our share incentive plans and the Class A ordinary shares repurchased but not cancelled in the form of ADSs.

X
- Definition Employee service share based compensation non vested awards total compensation cost recognized weighted-average period. + References No definition available. + Details
Name: | beke_EmployeeServiceShareBasedCompensationNonVestedAwardsTotalCompensationCostRecognizedWeightedAveragePeriod
Namespace Prefix: | beke_
Data Type: | xbrli:durationItemType
Balance Type: | na
Period Type: | duration

X
- Definition Percentage of restrictions on transfer and dividend rights, sale, pledge or any other form of disposal of the restricted shares are removed. + References No definition available. + Details
Name: | beke_PercentageOfRestrictionsOnRestrictedShares
Namespace Prefix: | beke_
Data Type: | dtr-types:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Percentage of restrictions on transfer and dividend rights, sale, pledge or any other form of disposal of the restricted shares are removed as per agreement number two. + References No definition available. + Details
Name: | beke_PercentageOfRestrictionsOnRestrictedSharesAgreementTwo
Namespace Prefix: | beke_
Data Type: | dtr-types:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Period to remove restrictions on restricted shares. + References No definition available. + Details
Name: | beke_RestrictedSharePeriod
Namespace Prefix: | beke_
Data Type: | xbrli:durationItemType
Balance Type: | na
Period Type: | duration

X
- Definition Number of agreements for granting shares and the vesting schedule according to each restricted share agreement. + References No definition available. + Details
Name: | beke_ShareBasedCompensationArrangementByShareBasedPaymentAwardGrantedNumberOfAgreements
Namespace Prefix: | beke_
Data Type: | xbrli:integerItemType
Balance Type: | na
Period Type: | duration

X
- Definition Share based compensation arrangement by share based payment award options in percentage of issued and outstanding. + References No definition available. + Details
Name: | beke_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsInPercentageOfIssuedAndOutstanding
Namespace Prefix: | beke_
Data Type: | dtr-types:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Amount of expense for award under share-based payment arrangement. Excludes amount capitalized. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section S45 -Paragraph 1 -Publisher FASB -URI https://asc.fasb.org/1943274/2147479983/718-10-S45-1 Reference 2: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SAB Topic 14.F) -Publisher FASB -URI https://asc.fasb.org/1943274/2147479830/718-10-S99-1 Reference 3: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (h)(1)(i) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_AllocatedShareBasedCompensationExpense
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Definition Number of shares of equity interest issued or issuable by acquirer as part of consideration transferred in business combination. + References Reference 1: http://www.xbrl.org/2003/role/exampleRef -Topic 805 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 8 -Publisher FASB -URI https://asc.fasb.org/1943274/2147479328/805-10-50-8 Reference 2: http://www.xbrl.org/2003/role/exampleRef -Topic 805 -SubTopic 10 -Name Accounting Standards Codification -Section 55 -Paragraph 41 -Publisher FASB -URI https://asc.fasb.org/1943274/2147479303/805-10-55-41 Reference 3: http://www.xbrl.org/2003/role/exampleRef -Topic 805 -SubTopic 30 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Publisher FASB -URI https://asc.fasb.org/1943274/2147479581/805-30-50-2 Reference 4: http://www.xbrl.org/2003/role/exampleRef -Topic 805 -SubTopic 30 -Name Accounting Standards Codification -Section 50 -Paragraph 1 -Subparagraph (b)(4) -Publisher FASB -URI https://asc.fasb.org/1943274/2147479581/805-30-50-1 Reference 5: http://www.xbrl.org/2003/role/exampleRef -Topic 805 -SubTopic 10 -Name Accounting Standards Codification -Section 55 -Paragraph 42 -Publisher FASB -URI https://asc.fasb.org/1943274/2147479303/805-10-55-42 + Details
Name: | us-gaap_BusinessAcquisitionEquityInterestsIssuedOrIssuableNumberOfSharesIssued
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | duration

X
- Definition Percentage of voting equity interest acquired in business combination. + References Reference 1: http://www.xbrl.org/2003/role/exampleRef -Topic 805 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 8 -Publisher FASB -URI https://asc.fasb.org/1943274/2147479328/805-10-50-8 Reference 2: http://www.xbrl.org/2003/role/exampleRef -Topic 805 -SubTopic 10 -Name Accounting Standards Codification -Section 55 -Paragraph 38 -Publisher FASB -URI https://asc.fasb.org/1943274/2147479303/805-10-55-38 Reference 3: http://www.xbrl.org/2003/role/disclosureRef -Topic 805 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c) -Publisher FASB -URI https://asc.fasb.org/1943274/2147479328/805-10-50-2 + Details
Name: | us-gaap_BusinessAcquisitionPercentageOfVotingInterestsAcquired
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:percentItemType
Balance Type: | na
Period Type: | instant

X
- Definition Total number of common shares of an entity that have been sold or granted to shareholders (includes common shares that were issued, repurchased and remain in the treasury). These shares represent capital invested by the firm's shareholders and owners, and may be all or only a portion of the number of shares authorized. Shares issued include shares outstanding and shares held in the treasury. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Topic 210 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02(29)) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480566/210-10-S99-1 + Details
Name: | us-gaap_CommonStockSharesIssued
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | instant

X
- Definition Period over which grantee's right to exercise award under share-based payment arrangement is no longer contingent on satisfaction of service or performance condition, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days. Includes, but is not limited to, combination of market, performance or service condition. + References Reference 1: http://www.xbrl.org/2003/role/exampleRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (a)(1) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1
Namespace Prefix: | us-gaap_
Data Type: | xbrli:durationItemType
Balance Type: | na
Period Type: | duration

X
- Definition The number of grants made during the period on other than stock (or unit) option plans (for example, phantom stock or unit plan, stock or unit appreciation rights plan, performance target plan). + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(2)(iii)(01) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | duration

X
- Definition The number of equity-based payment instruments, excluding stock (or unit) options, that vested during the reporting period. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(2)(iii)(02) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | duration

X
- Definition Fair value of share-based awards for which the grantee gained the right by satisfying service and performance requirements, to receive or retain shares or units, other instruments, or cash. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (d)(2) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodTotalFairValue
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Definition Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (f)(2) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 2: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (f)(2)(v) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 3: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (f)(2)(i) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 4: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (f)(2)(iii) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 5: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (f)(2)(iv) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 6: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (f)(2)(ii) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 7: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (l) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 8: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (a)(1) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 9: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (d)(1) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 10: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 35 -Paragraph 1D -Publisher FASB -URI https://asc.fasb.org/1943274/2147480483/718-10-35-1D Reference 11: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 35 -Paragraph 3 -Publisher FASB -URI https://asc.fasb.org/1943274/2147480483/718-10-35-3 Reference 12: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (a)(2) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 13: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (a)(3) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 14: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(1)(i) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 15: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(1)(ii) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 16: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(1)(iii) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 17: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(1)(iv) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 18: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(1)(iv)(01) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 19: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(1)(iv)(02) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 20: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(1)(iv)(03) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 21: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(1)(iv)(04) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 22: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(2)(i) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 23: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(2)(ii) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 24: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(2)(iii) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 25: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(2)(iii)(01) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 26: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(2)(iii)(02) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 27: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(2)(iii)(03) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 28: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (d)(2) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 29: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (e)(1) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 Reference 30: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (e)(2) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition The difference between the maximum number of shares (or other type of equity) authorized for issuance under the plan (including the effects of amendments and adjustments), and the sum of: 1) the number of shares (or other type of equity) already issued upon exercise of options or other equity-based awards under the plan; and 2) shares (or other type of equity) reserved for issuance on granting of outstanding awards, net of cancellations and forfeitures, if applicable. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | instant

X
- Definition Amount of accumulated difference between fair value of underlying shares on dates of exercise and exercise price on options exercised (or share units converted) into shares. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (d)(2) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Definition Gross number of share options (or share units) granted during the period. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(1)(iv)(01) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | duration

X
- Definition Number of shares issued under share-based payment arrangement. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardSharesIssuedInPeriod
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | duration

X
- Definition Weighted average per share amount at which grantees can acquire shares of common stock by exercise of options. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(1)(iv)(01) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageExercisePrice
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:perShareItemType
Balance Type: | na
Period Type: | duration

X
- Definition Period from grant date that an equity-based award expires, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days. + References Reference 1: http://www.xbrl.org/2003/role/exampleRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (a)(2) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod
Namespace Prefix: | us-gaap_
Data Type: | xbrli:durationItemType
Balance Type: | na
Period Type: | duration

X
- Details
Name: | us-gaap_BusinessAcquisitionAxis=beke_ShengduHomeRenovationCoLtdMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_AwardTypeAxis=us-gaap_EmployeeStockOptionMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_AwardTypeAxis=us-gaap_RestrictedStockMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_AwardTypeAxis=us-gaap_RestrictedStockUnitsRSUMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_StatementClassOfStockAxis=us-gaap_CommonClassAMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_StatementClassOfStockAxis=beke_RestrictedClassaOrdinarySharesMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_VestingAxis=us-gaap_ShareBasedCompensationAwardTrancheOneMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_VestingAxis=us-gaap_ShareBasedCompensationAwardTrancheTwoMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_VestingAxis=us-gaap_ShareBasedCompensationAwardTrancheThreeMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | srt_TitleOfIndividualAxis=beke_Mr.PengYongdongChairmanAndChiefExecutiveOfficerMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | srt_TitleOfIndividualAxis=beke_Mr.ShanYigangExecutiveDirectorMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_PlanNameAxis=beke_ShareOptionPlan2018Member
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | srt_RangeAxis=srt_MinimumMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | srt_RangeAxis=srt_MaximumMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_PlanNameAxis=beke_TwentyTwentyGlobalShareIncentivePlanMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_PlanNameAxis=beke_GlobalShareIncentivePlan2022Member
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_AwardTypeAxis=beke_RestrictedClassaOrdinarySharesMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_VestingAxis=beke_ShareBasedCompensationAwardTrancheFourMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_VestingAxis=beke_ShareBasedCompensationAwardTrancheFiveMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |