Catalysis of the reaction: 5-phospho-alpha-D-ribose 1-diphosphate + ATP + H2O + imidazol-4-ylacetate = 1-(5-phosphoribosyl)imidazol-4-ylacetate + ADP + diphosphate + 2 H+ + phosphate.
imidazoleacetate:5-phosphoribosyl-diphosphate ligase (ADP- and diphosphate-forming)