XML 137 R120.htm IDEA: XBRL DOCUMENT
v3.23.1

Cash and Cash Equivalents - Summary of Cash and Cash Equivalents (Detail) (Parenthetical) - USD ($) $ in Millions | Dec. 31, 2021 | Dec. 31, 2020
--- | --- | ---
Banco Nacion Argentina [member] |  |
Disclosure of cash and cash equivalents [line items] |  |
Term deposits and other investments | $ 10 | $ 24

X
- Definition Line items represents cash and cash equivalents. + References No definition available. + Details
Name: | ypf_DisclosureOfCashAndCashEquivalentsLineItems
Namespace Prefix: | ypf_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition Term deposits and other investments , classified as cash equivalents. + References No definition available. + Details
Name: | ypf_TermDepositsAndOtherInvestmentsClassifiedAsCashEquivalents
Namespace Prefix: | ypf_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Details
Name: | ifrs-full_CategoriesOfRelatedPartiesAxis=ypf_BancoNacionArgentinaMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |