Firstly, no chemical (especially pesticides) should be used for
a purpose for which it was not intended.
Secondly, imidacloprid is a neonicotinoid. These products remain
in the environment for years and are toxic to wildlife. They are
mobile in water, can contaminate ground water (through run off into
soil, drains, puddles etc), and remain in the soil for YEARS!
Research has shown that when used to treat the soil, it continued
to be taken up by plants even during years when it was not applied.
Even the microscopic levels taken up by the plants were lethal to
bees.
To get rid of ants, I recommend you research organic methods on
the internet. You could also try boiling water, depending on where
the ants are. If the ants are getting into your house (i once had
this problem), spray a dilution of bleach on the surfaces. This
cured my ants problem almost completely within a day. You may get
an occasional ant coming in, but if you keep spraying for a while,
you'll soon get NO ANTS - I don't get any now.
Neonicotinoids are highly toxic, and I wouldn't even use them in
the garden, personally.
Neonicotinoids include imidacloprid acetimacloprid,
clothianidin, thiacloprid, thiamethoxam, dinotefuran and
nitenpyram. I avoid all of these.