<?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-20260421.xsd" xlink:type="simple"/>
    <context id="duration_2026-04-21_to_2026-04-21">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001052752</identifier>
        </entity>
        <period>
            <startDate>2026-04-21</startDate>
            <endDate>2026-04-21</endDate>
        </period>
    </context>
    <dei:EntityRegistrantName
      contextRef="duration_2026-04-21_to_2026-04-21"
      id="Hidden_dei_EntityRegistrantName">GETTY REALTY CORP /MD/</dei:EntityRegistrantName>
    <dei:AmendmentFlag contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-378">false</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey
      contextRef="duration_2026-04-21_to_2026-04-21"
      id="Hidden_dei_EntityCentralIndexKey">0001052752</dei:EntityCentralIndexKey>
    <dei:DocumentType contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-389">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-390">2026-04-21</dei:DocumentPeriodEndDate>
    <dei:EntityIncorporationStateCountryCode contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-391">MD</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-392">001-13777</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-393">11-3412575</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1 contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-394">292 Madison Avenue</dei:EntityAddressAddressLine1>
    <dei:EntityAddressAddressLine2 contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-75">9th Floor</dei:EntityAddressAddressLine2>
    <dei:EntityAddressCityOrTown contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-395">New York</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-396">NY</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-397">10017-6318</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-398">(646)</dei:CityAreaCode>
    <dei:LocalPhoneNumber contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-399">349-6000</dei:LocalPhoneNumber>
    <dei:WrittenCommunications contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-400">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-401">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-402">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-403">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-404">Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-405">GTY</dei:TradingSymbol>
    <dei:SecurityExchangeName contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-406">NYSE</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany contextRef="duration_2026-04-21_to_2026-04-21" id="ixv-407">false</dei:EntityEmergingGrowthCompany>
</xbrl>