What are the spell-id's actually? Some Blizzard internal identifier? I noticed they seem to match the spell-id's that for example wowhead.com uses.
Yes, the client data files contains a database (called spells.dbc IIRC) where all available spells are indexed using an identifier. This identifier is used by wowhead and wowdb, and evidently by the game engine itself.