API

Spoiler: No but yes

There is no discord.id API.

But: You could just call the Discord API Endpoint (authorized)

Warning

Non-humans are not allowed to use discord.id.

Abusing discord.id as an API will get your IP banned.

Prefill

This prefills the input ID field:

https://discord.id/?prefill=DiscordID