In your example "garden" is a noun and its function in the sentence is the direct object of the transitive verb "search".
If we were to insert an adverb in the same sentence, we could do it like this:
'We thoroughly searched the garden for the lost ball'
In the above example, the adverb "thoroughly" describes the verb "searched" by determining how the search was performed.
Hope the above helps.
- For Teachers