<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0304</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2012-02-21</periodOfReport>

    <issuer>
        <issuerCik>0001057352</issuerCik>
        <issuerName>COSTAR GROUP INC</issuerName>
        <issuerTradingSymbol>CSGP</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001438487</rptOwnerCik>
            <rptOwnerName>Stanfill John L</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O COSTAR GROUP, INC.</rptOwnerStreet1>
            <rptOwnerStreet2>1331 L STREET, NW</rptOwnerStreet2>
            <rptOwnerCity>WASHINGTON</rptOwnerCity>
            <rptOwnerState>DC</rptOwnerState>
            <rptOwnerZipCode>20005</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle>Sr. VP-Sales, Customer Service</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock, par value $0.01 per share</value>
            </securityTitle>
            <transactionDate>
                <value>2012-02-21</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>38800</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>89934</value>
                    <footnoteId id="F2"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <derivativeTable>
        <derivativeTransaction>
            <securityTitle>
                <value>Option to Acquire Common Stock</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>58.95</value>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2012-02-21</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>11600</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <footnoteId id="F3"/>
            </exerciseDate>
            <expirationDate>
                <value>2022-02-20</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>11600</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>11600</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </derivativeTransaction>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">Includes a grant of 8,200 shares of restricted common stock that vest in three equal installments on February 21, 2013, February 21, 2014, and February 21, 2015, and a grant of 30,600 shares of restricted common stock that vest upon CoStar Group, Inc.'s achievement of $90 million of cumulative earnings before interest depreciation and amortization (EBITDA) over a period of four consecutive calendar quarters by March 31, 2017.</footnote>
        <footnote id="F2">Represents all shares of common stock owned, consisting of 8,200 shares of Common Stock and 81,734 shares of Common Stock subject to unvested restricted common stock grants.</footnote>
        <footnote id="F3">The option vests in three equal installments on February 21, 2013, February 21, 2014, and February 21, 2015.</footnote>
    </footnotes>

    <remarks></remarks>

    <ownerSignature>
        <signatureName>/s/ Jonathan Coleman, Attorney-in-Fact</signatureName>
        <signatureDate>2012-02-23</signatureDate>
    </ownerSignature>
</ownershipDocument>
