XML 58 R41.htm IDEA: XBRL DOCUMENT
v3.22.0.1

Basis of Presentation and Summary of Significant Accounting Policies - Foreign Currency Transactions (Detail) - USD ($) | 12 Months Ended |
--- | --- | ---
Dec. 31, 2021 | Dec. 31, 2020
Minimum |  |
Foreign Currency Translation [Line Items] |  |
Forward contracts terms | 30 days |
Maximum |  |
Foreign Currency Translation [Line Items] |  |
Forward contracts terms | 60 days |
Forward Contracts |  |
Foreign Currency Translation [Line Items] |  |
Notional amounts of open forward contracts | $ 250,700,000 | $ 169,900,000

X
- Definition Foreign currency translation. + References No definition available. + Details
Name: | ttd_ForeignCurrencyTranslationLineItems
Namespace Prefix: | ttd_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition Nominal or face amount used to calculate payment on derivative. + References Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef -Publisher FASB -Name Accounting Standards Codification -Topic 815 -SubTopic 10 -Section 50 -Paragraph 1B -URI http://asc.fasb.org/extlink&oid=125515794&loc=SL5580258-113959 Reference 2: http://www.xbrl.org/2009/role/commonPracticeRef -Publisher FASB -Name Accounting Standards Codification -Topic 815 -SubTopic 10 -Section 50 -Paragraph 1A -Subparagraph (d) -URI http://asc.fasb.org/extlink&oid=125515794&loc=SL5579245-113959 + Details
Name: | us-gaap_DerivativeNotionalAmount
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | na
Period Type: | instant

X
- Definition Period the derivative contract is outstanding, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days. + References No definition available. + Details
Name: | us-gaap_DerivativeTermOfContract
Namespace Prefix: | us-gaap_
Data Type: | xbrli:durationItemType
Balance Type: | na
Period Type: | duration

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_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis=us-gaap_ForwardContractsMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |