<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2025"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="gty-20260728.xsd" xlink:type="simple"/>
    <context id="duration_2026-07-28_to_2026-07-28">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001052752</identifier>
        </entity>
        <period>
            <startDate>2026-07-28</startDate>
            <endDate>2026-07-28</endDate>
        </period>
    </context>
    <dei:EntityRegistrantName
      contextRef="duration_2026-07-28_to_2026-07-28"
      id="Hidden_dei_EntityRegistrantName">GETTY REALTY CORP /MD/</dei:EntityRegistrantName>
    <dei:AmendmentFlag contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-250">true</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey
      contextRef="duration_2026-07-28_to_2026-07-28"
      id="Hidden_dei_EntityCentralIndexKey">0001052752</dei:EntityCentralIndexKey>
    <dei:DocumentType contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-261">8-K/A</dei:DocumentType>
    <dei:DocumentPeriodEndDate contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-262">2026-07-28</dei:DocumentPeriodEndDate>
    <dei:EntityIncorporationStateCountryCode contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-263">MD</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-264">001-13777</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-265">11-3412575</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1 contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-266">292 Madison Avenue</dei:EntityAddressAddressLine1>
    <dei:EntityAddressAddressLine2 contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-76">9th Floor</dei:EntityAddressAddressLine2>
    <dei:EntityAddressCityOrTown contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-267">New York</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-268">NY</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-269">10017-6318</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-270">(646)</dei:CityAreaCode>
    <dei:LocalPhoneNumber contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-271">349-6000</dei:LocalPhoneNumber>
    <dei:WrittenCommunications contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-272">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-273">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-274">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-275">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-276">Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-277">GTY</dei:TradingSymbol>
    <dei:SecurityExchangeName contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-278">NYSE</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-279">false</dei:EntityEmergingGrowthCompany>
    <dei:AmendmentDescription contextRef="duration_2026-07-28_to_2026-07-28" id="ixv-174">On August&#160;3, 2026, Getty Realty Corp. (the &#x201c;Company&#x201d;) filed with the Securities and Exchange Commission a Current Report on Form 8-K (the &#x201c;Initial Report&#x201d;) for, among other things, the purpose of reporting that Nicole Rapport would succeed Eugene Shnayderman as Chief Accounting Officer and that Mr.&#160;Shnayderman&#x2019;s last day with the Company would be August&#160;14, 2026 (the &#x201c;Separation Date&#x201d;). The purpose of this Current Report on Form 8-K/A is to amend the Initial Report by providing a summary of the separation agreement between Mr.&#160;Shnayderman and the Company entered into on August&#160;14, 2026 (the &#x201c;Separation Agreement&#x201d;), which was executed subsequent to the filing of the Initial Report.</dei:AmendmentDescription>
</xbrl>
