Energy metabolism leads to a better management of energy use in megacities. Insights on strategies to improve energy efficiency and reduce resource consumption. We find a regionalization of energy flows and sectoral energy use. Scaling law for energy Vs density suggests strategies for compact cities planning. Supports development of models to reduce GHG emissions and increase resilience.