Pages

2009-08-16

A list of all numbers on Google Voice

Update 2016-03-26: If you just want a good vanity number and don't want to spend 1-2 days setting up Unix, mail me at phonenumbers@phor.net with your area code(s). I ask $30 for this service in BTC or Paypal 

Update 2011-01-27: thanks to A. Manessi for bug reports
Update 2010-07-09: thanks to Michael Poon at MIT for showing how to login via curl

1. Login to Google Voice with Firefox / LiveHTTPHeaders

Don't use Chrome. I know, I know... just download Firefox.

2. Find which area codes Google Voice has

mkdir GOOGLEVOICE; cd GOOGLEVOICE

# open https://www.google.com/voice/b/0/setup/searchnew/?ac=484&start=0
# use LiveHTTPHeaders and get the cookies
URL="https://www.google.com/voice/b/0/setup/searchnew/"
COOKIES="gv=DQAAAxxxxxx; PREF=xxxxx; xxxx SSID=xxxx" # PUT YOUR COOKIES IN HERE
curl --cookie "$COOKIES" "${URL}?ac=[201-999]&start=0" | grep -ho "+1[0-9]\{3\}" | cut -b3-5 | sort -u >> areacodes

# area codes available as of 2016-03-26
# 201 202 203 205 207 208 209 210 213 216 218 219 220 224 225 229
# 231 234 240 248 251 252 254 256 260 262 267 269 270 276 281 301
# 302 304 305 307 309 312 313 314 315 316 317 318 319 320 321 323
# 325 330 331 334 336 337 339 346 347 351 352 361 385 386 401 402
# 405 406 407 408 409 410 412 413 414 415 417 419 423 424 430 432
# 434 435 440 442 443 458 469 470 475 478 479 484 501 502 503 504
# 505 507 508 510 512 513 515 516 518 520 530 531 539 540 541 551
# 559 561 562 563 567 570 571 573 574 575 585 586 601 605 607 608
# 609 612 614 615 616 617 619 620 623 626 628 629 630 631 636 646
# 650 651 657 660 661 662 667 669 678 681 682 701 702 703 704 706
# 707 708 714 715 716 717 719 720 724 725 727 731 732 734 737 740
# 747 754 757 760 762 763 765 769 772 773 774 775 779 781 785 786
# 801 802 803 804 805 806 810 812 813 814 815 816 817 818 828 830
# 831 832 843 845 847 848 850 856 857 858 859 860 862 863 864 865
# 872 878 901 903 904 908 909 910 912 913 914 915 916 917 918 919
# 920 925 928 929 931 936 937 938 940 941 949 951 952 954 956 970
# 971 972 973 978 979 980 984 985 989 

3. Get numbers in your target area codes

# add a full number from each area code you want to NUMBERS printf "4840000000\n8480000000\n" > numbers # BFS on each digit to find all numbers, about 30 minutes per area code cut -b1-3 numbers | sort -u | (while read LINE; do curl --cookie "$COOKIES" "${URL}?ac=${LINE:0:3}&q=$LINE[0-9]&start=0"; done) | grep -Pho '\d{10}\b' | sort -u >> numbers cut -b1-4 numbers | sort -u | (while read LINE; do curl --cookie "$COOKIES" "${URL}?ac=${LINE:0:3}&q=$LINE[0-9]&start=0"; done) | grep -Pho '\d{10}\b' | sort -u >> numbers cut -b1-5 numbers | sort -u | (while read LINE; do curl --cookie "$COOKIES" "${URL}?ac=${LINE:0:3}&q=$LINE[0-9]&start=0"; done) | grep -Pho '\d{10}\b' | sort -u >> numbers cut -b1-6 numbers | sort -u | (while read LINE; do curl --cookie "$COOKIES" "${URL}?ac=${LINE:0:3}&q=$LINE[0-9]&start=0"; done) | grep -Pho '\d{10}\b' | sort -u >> numbers cut -b1-7 numbers | sort -u | (while read LINE; do curl --cookie "$COOKIES" "${URL}?ac=${LINE:0:3}&q=$LINE[0-9]&start=0"; done) | grep -Pho '\d{10}\b' | sort -u >> numbers cut -b1-8 numbers | sort -u | (while read LINE; do curl --cookie "$COOKIES" "${URL}?ac=${LINE:0:3}&q=$LINE[0-9]&start=0"; done) | grep -Pho '\d{10}\b' | sort -u >> numbers cut -b1-8 numbers | sort -u | (while read LINE; do curl --cookie "$COOKIES" "${URL}?ac=${LINE:0:3}&q=$LINE[0-9]&start=5"; done) | grep -Pho '\d{10}\b' | sort -u >> numbers

4. Harvest out your winnings 

sort -u numbers > sorted; mv sorted numbers

5. Find cool numbers, using my definition of cool

# repeated set of 4 digits
grep -P "(\d{4}).*\1" numbers
# 4843248432

# the whole number, with a limited number of unique digits
grep -P "^(\d)\1*(\d)\1*\2*\1*\2*\1*\2*\1*\2*(\d)(\1|\2|\3)*$" numbers
grep -P "^...(\d)\1*(\d)(\1|\2)*$" numbers
# 7722020227

# triple double
grep -P "(\d)\1.*(\d)\2.*(\d)\3" numbers
# 4842220022
# 4842220044

# triples
grep -P "(\d)\1\1.*(\d)\2\2" numbers
grep -P '(\d)\1{2,}' numbers
# 4849388886
# 4842220002

# palindrome
grep -P "(\d)(\d)(\d)(\d)(\d)\5?\4\3\2\1" numbers
grep -P "(\d)(\d)(\d)(\d)\4?\3\2\1" numbers
# 4846399364
# 4842020248

# toggles
grep -P "(\d)(\d)\1\2\1" numbers
grep -P "(\d)(\d)\1\2\1\2" numbers
# 4848421212

# use two digits
grep -P "(\d)(\d)(\1|\2){4}" numbers
# 4842020002
# 4842020020
# 4842020022
# 4842020220