EX-23.1 2 h26559exv23w1.txt CONSENT OF ERNST & YOUNG LLP EXHIBIT 23.1 CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM We consent to the incorporation by reference in the Registration Statement (Form S-8 Nos. 33-31407 and 33-63817) pertaining to the Apache Corporation 401(k) Savings Plan of our report dated June 20, 2005, with respect to the financial statements and schedule of the Apache Corporation 401(k) Savings Plan included in this Annual Report (Form 11-K) for the year ended December 31, 2004. /s/ Ernst & Young LLP Houston, Texas June 23, 2005