tighter API usage; fallbacks for IP lookup