content: <?xml version="1.0" encoding="UTF-8"?><edgarSubmission xmlns="http://www.sec.gov/edgar/ownership" xmlns:com="http://www.sec.gov/edgar/common">
    <headerData>
      <submissionType>144</submissionType>
      <filerInfo>
        <filer>
          <filerCredentials>
            <cik>0001220428</cik>
            <ccc>XXXXXXXX</ccc>
          </filerCredentials>
        </filer>
        <liveTestFlag>LIVE</liveTestFlag>
  
  
  
      </filerInfo>
    </headerData>
    <formData>
      <issuerInfo>
        <issuerCik>0001201792</issuerCik>
        <issuerName>AMERICAN PUBLIC EDUCATION INC</issuerName>
        <secFileNumber>001-33810</secFileNumber>
        <issuerAddress>
          <com:street1>111 W CONGRESS STREET</com:street1>
          <com:city>CHARLES TOWN</com:city>
          <com:stateOrCountry>WV</com:stateOrCountry>
          <com:zipCode>25414</com:zipCode>
        </issuerAddress>
        <issuerContactPhone>(304) 724-3700</issuerContactPhone>
        <nameOfPersonForWhoseAccountTheSecuritiesAreToBeSold>SUNDERLAND RICHARD W JR</nameOfPersonForWhoseAccountTheSecuritiesAreToBeSold>
        <relationshipsToIssuer>
          <relationshipToIssuer>Officer</relationshipToIssuer>
        </relationshipsToIssuer>
      </issuerInfo>
      <securitiesInformation>
        <securitiesClassTitle>Common</securitiesClassTitle>
        <brokerOrMarketmakerDetails>
          <name>Fidelity Brokerage Services LLC</name>
          <address>
            <com:street1>900 Salem Street</com:street1>
            <com:city>Smithfield</com:city>
            <com:stateOrCountry>RI</com:stateOrCountry>
            <com:zipCode>02917</com:zipCode>
          </address>
        </brokerOrMarketmakerDetails>
        <noOfUnitsSold>5843</noOfUnitsSold>
        <aggregateMarketValue>161675.81</aggregateMarketValue>
        <noOfUnitsOutstanding>18039666</noOfUnitsOutstanding>
        <approxSaleDate>05/16/2025</approxSaleDate>
        <securitiesExchangeName>NASDAQ</securitiesExchangeName>
      </securitiesInformation>
      <securitiesToBeSold>
        <securitiesClassTitle>Common</securitiesClassTitle>
        <acquiredDate>01/30/2019</acquiredDate>
        <natureOfAcquisitionTransaction>Restricted Stock Vesting</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>Issuer</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>1378</amountOfSecuritiesAcquired>
        <paymentDate>01/30/2019</paymentDate>
        <natureOfPayment>Compensation</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common</securitiesClassTitle>
        <acquiredDate>03/06/2019</acquiredDate>
        <natureOfAcquisitionTransaction>Restricted Stock Vesting</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>Issuer</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>2736</amountOfSecuritiesAcquired>
        <paymentDate>03/06/2019</paymentDate>
        <natureOfPayment>Compensation</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common</securitiesClassTitle>
        <acquiredDate>01/15/2021</acquiredDate>
        <natureOfAcquisitionTransaction>Restricted Stock Vesting</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>Issuer</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>1729</amountOfSecuritiesAcquired>
        <paymentDate>01/15/2021</paymentDate>
        <natureOfPayment>Compensation</natureOfPayment>
      </securitiesToBeSold>
      <nothingToReportFlagOnSecuritiesSoldInPast3Months>N</nothingToReportFlagOnSecuritiesSoldInPast3Months>
      <securitiesSoldInPast3Months>
        <sellerDetails>
          <name>Richard Sunderland</name>
          <address>
            <com:street1>111 West Congress Street</com:street1>
            <com:city>Charles Town</com:city>
            <com:stateOrCountry>WV</com:stateOrCountry>
            <com:zipCode>25414</com:zipCode>
          </address>
        </sellerDetails>
        <securitiesClassTitle>Common</securitiesClassTitle>
        <saleDate>05/14/2025</saleDate>
        <amountOfSecuritiesSold>6288</amountOfSecuritiesSold>
        <grossProceeds>171723.12</grossProceeds>
      </securitiesSoldInPast3Months>
      <securitiesSoldInPast3Months>
        <sellerDetails>
          <name>Richard Sunderland</name>
          <address>
            <com:street1>111 West Congress Street</com:street1>
            <com:city>Charles Town</com:city>
            <com:stateOrCountry>WV</com:stateOrCountry>
            <com:zipCode>25414</com:zipCode>
          </address>
        </sellerDetails>
        <securitiesClassTitle>Common</securitiesClassTitle>
        <saleDate>05/15/2025</saleDate>
        <amountOfSecuritiesSold>5944</amountOfSecuritiesSold>
        <grossProceeds>162867.40</grossProceeds>
      </securitiesSoldInPast3Months>
      <noticeSignature>
        <noticeDate>05/16/2025</noticeDate>
        <signature>/s/ Joshua Schmitt, as a duly authorized representative of Fidelity Brokerage Services LLC, as attorney-in-fact for Richard W. Sunderland.</signature>
      </noticeSignature>
    </formData>
  </edgarSubmission>
metadata_documents: [{"type": "144", "sequence": "1", "filename": "primary_doc.xml", "secsgml_size_bytes": 5137}]
text: 144
  0001220428
  XXXXXXXX
  LIVE
  0001201792
  AMERICAN PUBLIC EDUCATION INC
  001-33810
  111 W CONGRESS STREET
  CHARLES TOWN
  WV
  25414
  (304) 724-3700
  SUNDERLAND RICHARD W JR
  Officer
  Common
  Fidelity Brokerage Services LLC
  900 Salem Street
  Smithfield
  RI
  02917
  5843
  161675.81
  18039666
  05/16/2025
  NASDAQ
  Common
  01/30/2019
  Restricted Stock Vesting
  Issuer
  N
  1378
  01/30/2019
  Compensation
  Common
  03/06/2019
  Restricted Stock Vesting
  Issuer
  N
  2736
  03/06/2019
  Compensation
  Common
  01/15/2021
  Restricted Stock Vesting
  Issuer
  N
  1729
  01/15/2021
  Compensation
  N
  Richard Sunderland
  111 West Congress Street
  Charles Town
  WV
  25414
  Common
  05/14/2025
  6288
  171723.12
  Richard Sunderland
  111 West Congress Street
  Charles Town
  WV
  25414
  Common
  05/15/2025
  5944
  162867.40
  05/16/2025
  /s/ Joshua Schmitt, as a duly authorized representative of Fidelity Brokerage Services LLC, as attorney-in-fact for Richard W. Sunderland.