DEVELOPER DOCS
API docs
ids()

ids([ids])

Queries either by transaction ID or block ID (depending on the value passed to search()).

Parameters

  • ids: An array of IDs passed as strings

Search By Transaction ID

Use the ids() function to by transaction ID. The search employs OR logic, returning transactions tagged with ANY provided value:

const results = await myQuery
	.search("irys:transactions")
	.ids(["xXyv3u9nHHWGiMJl_DMgLwwRdOTlIlQZyqaK_rOkNZw", 
	      "_xE7tG1kl2FgCUDgJ5jNJeVA6R5kuys7A6f1qfh9_Kw"]);

You can also search Arweave by transaction ID.

const results = await myQuery
	.search("arweave:transactions")
	.ids(["xXyv3u9nHHWGiMJl_DMgLwwRdOTlIlQZyqaK_rOkNZw", 
	      "_xE7tG1kl2FgCUDgJ5jNJeVA6R5kuys7A6f1qfh9_Kw"]);

Search By Block ID

Use the ids() function to search for Arweave blocks with the specified IDs.

const results = await myQuery
	.search("arweave:blocks")
	.ids(["R0ZLe4RvHxLJLzI1Z9ppyYVWFyHW4D1YrxXKuA9PGrwkk2QAuXCnD1xOJe-QOz4l"])