There's a few practical problems with creating that kind of legislation though.
How do you decide who has to comply with it? Every time I build a website that collects any data from users at all, do I have to also create an API for accessing that data?
Bigger companies such as FB and Google would most likely just move stuff offshore to get around this anyway.