Major depression constitutes a serious challenge in personal and public health. Tens of millions of people each year suf-fer from depression and only a fraction receives adequate treatment. We explore the potential to use social media to detect and diagnose major depressive disorder in individu-als. We first employ crowdsourcing to compile a set of Twitter users who report being diagnosed with clinical de-pression, based on a standard psychometric instrument. Through their social media postings over a year preceding the onset of depression, we measure behavioral attributes re-lating to social engagement, emotion, language and linguis-tic styles, ego network, and mentions of antidepressant med-ications. We leverage these behavioral cues, to build a sta-tistical classifier that provides estimates of the risk of de-pression, before the reported onset. We find that social me-dia contains useful signals for characterizing the onset of depression in individuals, as measured through decrease in social activity, raised negative affect, highly clustered egonetworks, heightened relational and medicinal concerns, and greater expression of religious involvement. We believe our findings and methods may be useful in developing tools for identifying the onset of major depression, for use by healthcare agencies; or on behalf of individuals, enabling those suffering from depression to be more proactive about their mental health.