<?xml version="1.0" encoding="UTF-8"?><edgarSubmission xmlns="http://www.sec.gov/edgar/schedule13g" xmlns:com="http://www.sec.gov/edgar/common">
  <headerData>
    <submissionType>SCHEDULE 13G/A</submissionType>
    <previousAccessionNumber>0001011438-23-000320</previousAccessionNumber>
    <filerInfo>
      <filer>
        <filerCredentials>
          <cik>0001166152</cik>
          <ccc>XXXXXXXX</ccc>
        </filerCredentials>
      </filer>
      <liveTestFlag>LIVE</liveTestFlag>


    </filerInfo>
  </headerData>
  <formData>
    <coverPageHeader>
      <amendmentNo>2</amendmentNo>
      <securitiesClassTitle>Common Stock, $0.01 par value per share</securitiesClassTitle>
      <eventDateRequiresFilingThisStatement>09/30/2025</eventDateRequiresFilingThisStatement>
      <issuerInfo>
        <issuerCik>0001201792</issuerCik>
        <issuerName>AMERICAN PUBLIC EDUCATION INC</issuerName>
        <issuerCusip>02913V103</issuerCusip>
        <issuerPrincipalExecutiveOfficeAddress>
          <com:street1>111 W CONGRESS STREET</com:street1>
          <com:street2>111 W CONGRESS STREET</com:street2>
          <com:city>CHARLES TOWN</com:city>
          <com:stateOrCountry>WV</com:stateOrCountry>
          <com:zipCode>25414</com:zipCode>
        </issuerPrincipalExecutiveOfficeAddress>
      </issuerInfo>
      <designateRulesPursuantThisScheduleFiled>
        <designateRulePursuantThisScheduleFiled>Rule 13d-1(b)</designateRulePursuantThisScheduleFiled>
        <designateRulePursuantThisScheduleFiled>Rule 13d-1(c)</designateRulePursuantThisScheduleFiled>
      </designateRulesPursuantThisScheduleFiled>
    </coverPageHeader>
    <coverPageHeaderReportingPersonDetails>

      <reportingPersonName>PRESCOTT GROUP CAPITAL MANAGEMENT, L.L.C.</reportingPersonName>
      <citizenshipOrOrganization>OK</citizenshipOrOrganization>
      <reportingPersonBeneficiallyOwnedNumberOfShares>
        <soleVotingPower>857226.00</soleVotingPower>
        <sharedVotingPower>0.00</sharedVotingPower>
        <soleDispositivePower>857226.00</soleDispositivePower>
        <sharedDispositivePower>0.00</sharedDispositivePower>
      </reportingPersonBeneficiallyOwnedNumberOfShares>
      <reportingPersonBeneficiallyOwnedAggregateNumberOfShares>857226.00</reportingPersonBeneficiallyOwnedAggregateNumberOfShares>
      <classPercent>4.7</classPercent>
      <typeOfReportingPerson>IA</typeOfReportingPerson>
    </coverPageHeaderReportingPersonDetails>
    <coverPageHeaderReportingPersonDetails>

      <reportingPersonName>PRESCOTT GROUP AGGRESSIVE SMALL CAP LP</reportingPersonName>
      <citizenshipOrOrganization>OK</citizenshipOrOrganization>
      <reportingPersonBeneficiallyOwnedNumberOfShares>
        <soleVotingPower>0.00</soleVotingPower>
        <sharedVotingPower>857226.00</sharedVotingPower>
        <soleDispositivePower>0.00</soleDispositivePower>
        <sharedDispositivePower>857226.00</sharedDispositivePower>
      </reportingPersonBeneficiallyOwnedNumberOfShares>
      <reportingPersonBeneficiallyOwnedAggregateNumberOfShares>857226.00</reportingPersonBeneficiallyOwnedAggregateNumberOfShares>
      <classPercent>4.7</classPercent>
      <typeOfReportingPerson>PN</typeOfReportingPerson>
    </coverPageHeaderReportingPersonDetails>
    <coverPageHeaderReportingPersonDetails>

      <reportingPersonName>PRESCOTT GROUP AGGRESSIVE SMALL CAP II LP</reportingPersonName>
      <citizenshipOrOrganization>OK</citizenshipOrOrganization>
      <reportingPersonBeneficiallyOwnedNumberOfShares>
        <soleVotingPower>0.00</soleVotingPower>
        <sharedVotingPower>857226.00</sharedVotingPower>
        <soleDispositivePower>0.00</soleDispositivePower>
        <sharedDispositivePower>857226.00</sharedDispositivePower>
      </reportingPersonBeneficiallyOwnedNumberOfShares>
      <reportingPersonBeneficiallyOwnedAggregateNumberOfShares>857226.00</reportingPersonBeneficiallyOwnedAggregateNumberOfShares>
      <classPercent>4.7</classPercent>
      <typeOfReportingPerson>PN</typeOfReportingPerson>
    </coverPageHeaderReportingPersonDetails>
    <coverPageHeaderReportingPersonDetails>

      <reportingPersonName>PRESCOTT GROUP AGGRESSIVE SMALL CAP MASTER FUND GP</reportingPersonName>
      <citizenshipOrOrganization>OK</citizenshipOrOrganization>
      <reportingPersonBeneficiallyOwnedNumberOfShares>
        <soleVotingPower>0.00</soleVotingPower>
        <sharedVotingPower>857226.00</sharedVotingPower>
        <soleDispositivePower>0.00</soleDispositivePower>
        <sharedDispositivePower>857226.00</sharedDispositivePower>
      </reportingPersonBeneficiallyOwnedNumberOfShares>
      <reportingPersonBeneficiallyOwnedAggregateNumberOfShares>857226.00</reportingPersonBeneficiallyOwnedAggregateNumberOfShares>
      <classPercent>4.7</classPercent>
      <typeOfReportingPerson>PN</typeOfReportingPerson>
    </coverPageHeaderReportingPersonDetails>
    <coverPageHeaderReportingPersonDetails>

      <reportingPersonName>FROHLICH PHIL</reportingPersonName>
      <citizenshipOrOrganization>X1</citizenshipOrOrganization>
      <reportingPersonBeneficiallyOwnedNumberOfShares>
        <soleVotingPower>857226.00</soleVotingPower>
        <sharedVotingPower>0.00</sharedVotingPower>
        <soleDispositivePower>857226.00</soleDispositivePower>
        <sharedDispositivePower>0.00</sharedDispositivePower>
      </reportingPersonBeneficiallyOwnedNumberOfShares>
      <reportingPersonBeneficiallyOwnedAggregateNumberOfShares>857226.00</reportingPersonBeneficiallyOwnedAggregateNumberOfShares>
      <classPercent>4.7</classPercent>
      <typeOfReportingPerson>IN</typeOfReportingPerson>
      <typeOfReportingPerson>HC</typeOfReportingPerson>
    </coverPageHeaderReportingPersonDetails>
    <items>
      <item1>
        <issuerName>AMERICAN PUBLIC EDUCATION INC</issuerName>
        <issuerPrincipalExecutiveOfficeAddress>111 W CONGRESS STREET, 111 W CONGRESS STREET, CHARLES TOWN, WEST VIRGINIA, 25414.</issuerPrincipalExecutiveOfficeAddress>
      </item1>
      <item2>
        <filingPersonName>Prescott Group Capital Management, L.L.C. ("Prescott Capital"), Prescott Group Aggressive Small Cap, L.P. ("Prescott Small Cap"), Prescott Group Aggressive Small Cap II, L.P. ("Prescott Small Cap II" and, together with Prescott Small Cap, the "Small Cap Funds"), Prescott Group Aggressive Small Cap Master Fund, G.P. ("Master Fund") and Mr. Phil Frohlich.</filingPersonName>
        <principalBusinessOfficeOrResidenceAddress>1924 South Utica, Suite 1120
Tulsa, Oklahoma 74104</principalBusinessOfficeOrResidenceAddress>
        <citizenship>Prescott Capital is an Oklahoma limited liability company. The Small Cap Funds are Oklahoma limited partnerships. The Master Fund is an Oklahoma general partnership.  Mr. Phil Frohlich is the principal of Prescott Capital and is a U.S. citizen.</citizenship>
      </item2>
      <item3>
        <notApplicableFlag>N</notApplicableFlag>
        <typeOfPersonFiling>IA</typeOfPersonFiling>
        <typeOfPersonFiling>HC</typeOfPersonFiling>
      </item3>
      <item4>
        <amountBeneficiallyOwned>Each of Prescott Capital, the Small Cap Funds, the Master Fund and Mr. Phil Frohlich are the beneficial owners of 857,226 shares of Common Stock as of September 30, 2025.</amountBeneficiallyOwned>
        <classPercent>Each of Prescott Capital, the Small Cap Funds, the Master Fund and Mr. Phil Frohlich are the beneficial owners of 4.7% of the outstanding shares of Common Stock as of September 30, 2025. This percentage is determined by dividing 857,226 by 18,067,134, the number of shares of Common Stock outstanding as of August 1, 2025, as reported in the Issuer's Form 10-Q filed with the Securities and Exchange Commission on August 6, 2025.</classPercent>
        <numberOfSharesPersonHas>
          <solePowerOrDirectToVote>The information required by Item 4(c)(i) is set forth in Row 5 of the cover page for each of the Reporting Persons and is incorporated herein by reference.</solePowerOrDirectToVote>
          <sharedPowerOrDirectToVote>The information required by Item 4(c)(ii) is set forth in Row 6 of the cover page for each of the Reporting Persons and is incorporated herein by reference.</sharedPowerOrDirectToVote>
          <solePowerOrDirectToDispose>The information required by Item 4(c)(iii) is set forth in Row 7 of the cover page for each of the Reporting Persons and is incorporated herein by reference.</solePowerOrDirectToDispose>
          <sharedPowerOrDirectToDispose>The information required by Item 4(c)(iv) is set forth in Row 8 of the cover page for each of the Reporting Persons and is incorporated herein by reference.


Prescott Capital, as the general partner and investment manager of the Small Cap Funds, the general partners of the Master Fund, may direct the Small Cap Funds to direct the voting and disposition of the 857,226 shares of Common Stock held by the Master Fund as of September 30, 2025. As the principal of Prescott Capital, Mr. Phil Frohlich may direct the voting and disposition of the 857,226 shares of Common Stock held by the Master Fund as of September 30, 2025.</sharedPowerOrDirectToDispose>
        </numberOfSharesPersonHas>
      </item4>
      <item5>
        <classOwnership5PercentOrLess>Y</classOwnership5PercentOrLess>
      </item5>
      <item6>
        <notApplicableFlag>Y</notApplicableFlag>
      </item6>
      <item7>
        <notApplicableFlag>Y</notApplicableFlag>
      </item7>
      <item8>
        <notApplicableFlag>Y</notApplicableFlag>
      </item8>
      <item9>
        <notApplicableFlag>Y</notApplicableFlag>
      </item9>
      <item10>
        <notApplicableFlag>N</notApplicableFlag>
        <certifications>By signing below I certify that, to the best of my knowledge and belief, the securities referred to above were acquired and are held in the ordinary course of business and were not acquired and are not held for the purpose of or with the effect of changing or influencing the control of the issuer of the securities and were not acquired and are not held in connection with or as a participant in any transaction having that purpose or effect, other than activities solely in connection with a nomination under &amp;#167; 240.14a-11.

By signing below I certify that, to the best of my knowledge and belief, the securities referred to above were not acquired and are not held for the purpose of or with the effect of changing or influencing the control of the issuer of the securities and were not acquired and are not held in connection with or as a participant in any transaction having that purpose or effect, other than activities solely in connection with a nomination under &amp;#167; 240.14a-11.

</certifications>
      </item10>
    </items>
    <signatureInformation>
      <reportingPersonName>PRESCOTT GROUP CAPITAL MANAGEMENT, L.L.C.</reportingPersonName>
      <signatureDetails>
        <signature>/s/ Phil Frohlich</signature>
        <title>Phil Frohlich, Managing Member</title>
        <date>11/04/2025</date>
      </signatureDetails>
    </signatureInformation>
    <signatureInformation>
      <reportingPersonName>PRESCOTT GROUP AGGRESSIVE SMALL CAP LP</reportingPersonName>
      <signatureDetails>
        <signature>/s/ Phil Frohlich</signature>
        <title>Phil Frohlich, Managing Member of Prescott Group Capital Management, L.L.C., its general partner</title>
        <date>11/04/2025</date>
      </signatureDetails>
    </signatureInformation>
    <signatureInformation>
      <reportingPersonName>PRESCOTT GROUP AGGRESSIVE SMALL CAP II LP</reportingPersonName>
      <signatureDetails>
        <signature>/s/ Phil Frohlich</signature>
        <title>Phil Frohlich, Managing Member of Prescott Group Capital Management, L.L.C., its general partner</title>
        <date>11/04/2025</date>
      </signatureDetails>
    </signatureInformation>
    <signatureInformation>
      <reportingPersonName>PRESCOTT GROUP AGGRESSIVE SMALL CAP MASTER FUND GP</reportingPersonName>
      <signatureDetails>
        <signature>/s/ Phil Frohlich</signature>
        <title>See Comments</title>
        <date>11/04/2025</date>
      </signatureDetails>
    </signatureInformation>
    <signatureInformation>
      <reportingPersonName>FROHLICH PHIL</reportingPersonName>
      <signatureDetails>
        <signature>/s/ Phil Frohlich</signature>
        <title>Phil Frohlich, Self</title>
        <date>11/04/2025</date>
      </signatureDetails>
    </signatureInformation>
    <signatureComments>Phil Frohlich, Managing Member of Prescott Group Capital Management, L.L.C., the general partner of Prescott Group Aggressive Small Cap II, L.P., and the general partner of Prescott Group Aggressive Small Cap, L.P.</signatureComments>
  </formData>
</edgarSubmission>
