Retrieve aggregated statistics for a specific habit within an optional date range. Includes completion counts, skip and failure counts, total logged values, and an optional daily progress breakdown.
GET
/
habits
/
{habitId}
/
statistics
Get habit statistics
curl --request GET \ --url https://api.habitify.me/v2/habits/{habitId}/statistics \ --header 'X-API-Key: <api-key>'
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Habitify","description":"This is the official knowledge base of Habitify, the habit tracker app for iOS, Android, desktop, and web. Find step-by-step guides on creating and tracking your habits, setting up integrations and automations for advanced tracking, and exploring Habitify's AI features, including Habitify MCP, Habi AI, and Siri AI-supported.","colors":{"primary":"#164AF2","light":"#164AF2","dark":"#1D45C9"},"logo":{"light":"https://mintcdn.com/habitify/6ubuIYTR9HqwJmST/images/Group3.png?fit=max\u0026auto=format\u0026n=6ubuIYTR9HqwJmST\u0026q=85\u0026s=19d2ca75b3476d732425d7ae3a079d41","dark":"https://mintcdn.com/habitify/79szqEEvHCts8PIA/images/Group1.png?fit=max\u0026auto=format\u0026n=79szqEEvHCts8PIA\u0026q=85\u0026s=aa244f00b99bdfebc0839912c4fadfbd"},"favicon":{"light":"https://mintcdn.com/habitify/6mDwR9tnCNQh0nLA/images/64-Desktop.png?fit=max\u0026auto=format\u0026n=6mDwR9tnCNQh0nLA\u0026q=85\u0026s=1a92045ea4ab8565691f7db03ebccb55","dark":"https://mintcdn.com/habitify/6mDwR9tnCNQh0nLA/images/64-Desktop.png?fit=max\u0026auto=format\u0026n=6mDwR9tnCNQh0nLA\u0026q=85\u0026s=1a92045ea4ab8565691f7db03ebccb55"},"navbar":{"links":[{"href":"mailto:contact@habitify.me","label":"Contact Us"}],"primary":{"type":"button","label":"Download App","href":"https://habitify.me/download"}},"footer":{"socials":{"x":"https://x.com/usehabitify","instagram":"https://instagram.com/habitify.me","facebook":"https://facebook.com/habitify","website":"https://habitify.me"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"habitify","hasAudioNarration":false,"actualSubdomain":"habitify","customDomains":["docs.habitify.me"],"gitSource":{"type":"github","owner":"unstatic-co","repo":"habitify-public-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6ad97767e2e889d7781ddf13","collectionId":"6068df77-ee1d-4d32-b116-279e1ecbb741","liveDeploymentHistoryId":"6ad97767e2e889d7781ddf13","schemaVersion":"v3"},"feedback":{"thumbs":false,"issues":false},"entitlements":{},"buildId":"6ad97767e2e889d7781ddf13","clientVersion":"0.0.3966","searchFilterCounts":[{"language":"default","tag":"Documentation","count":41},{"language":"default","tag":"API Documentation","count":24},{"language":"default","tag":"Integration","count":9},{"language":"default","tag":"Features","count":8},{"language":"default","tag":"Habits","count":8},{"language":"default","tag":"Habit Logs","count":7},{"language":"default","tag":"Tools","count":6},{"language":"default","tag":"Plans \u0026 Billing","count":5},{"language":"default","tag":"Areas","count":5},{"language":"default","tag":"Automation","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/habits/get-habit-statistics","slug":"/api-reference/habits/get-habit-statistics","pageMetadata":{"title":"Get habit statistics","description":"Retrieve aggregated statistics for a specific habit within an optional date range. Includes completion counts, skip and failure counts, total logged values, and an optional daily progress breakdown.","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json get /habits/{habitId}/statistics","href":"/api-reference/habits/get-habit-statistics","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Retrieve aggregated statistics for a specific habit within an optional date range. Includes completion counts, skip and failure counts, total logged values, and an optional daily progress breakdown.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Get habit statistics","description":"Retrieve aggregated statistics for a specific habit within an optional date range. Includes completion counts, skip and failure counts, total logged values, and an optional daily progress breakdown.","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json get /habits/{habitId}/statistics","href":"/api-reference/habits/get-habit-statistics","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Habits"],"summary":"Get habit statistics","description":"Retrieve aggregated statistics for a specific habit within an optional date range. Includes completion counts, skip and failure counts, total logged values, and an optional daily progress breakdown.","parameters":["521d0ad8-700c-4f47-9313-ffa45e05841c","74ba8b5e-8a97-4467-871f-b32dcb848af5","0c6200fd-2bff-42b7-b848-9083f0ddd143"],"responses":{"200":"2a8ef0f6-faa2-40be-bc26-7c6af5f21479","400":"1e8b2e25-c067-40f7-963e-6d0d05cdd112","401":"24a3ff75-43ea-47a4-8129-d9d5e763e190","404":"09036371-feb5-48ff-b3e0-f51bcd29fe39"},"method":"get","type":"path","servers":["92f06b36-4899-4a5f-95c1-eee7c40252af"],"security":["73b0dc9b-9203-4495-928c-38f0b8b18062","be42732c-7489-4c64-adf3-fbd786f2fa63","320a74b5-e987-458a-b04d-66c0c79170a1"],"path":"/habits/{habitId}/statistics","baseUrlOptions":["https://api.habitify.me/v2"],"title":"Get habit statistics","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"521d0ad8-700c-4f47-9313-ffa45e05841c":{"name":"habitId","in":"path","required":true,"schema":{"type":"string","isRequired":true,"description":"The unique identifier of the habit","uniqueKey":"","typeLabel":"string"},"description":"The unique identifier of the habit"},"74ba8b5e-8a97-4467-871f-b32dcb848af5":{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date","isRequired":false,"description":"Start date for the statistics range (YYYY-MM-DD format). Defaults to the habit's start date.","uniqueKey":"","typeLabel":"string\u003cdate>"},"description":"Start date for the statistics range (YYYY-MM-DD format). Defaults to the habit's start date."},"0c6200fd-2bff-42b7-b848-9083f0ddd143":{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date","isRequired":false,"description":"End date for the statistics range (YYYY-MM-DD format). Defaults to today.","uniqueKey":"","typeLabel":"string\u003cdate>"},"description":"End date for the statistics range (YYYY-MM-DD format). Defaults to today."}},"responses":{"2a8ef0f6-faa2-40be-bc26-7c6af5f21479":{"description":"Aggregated habit statistics for the requested period","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the habit","uniqueKey":"data.id","typeLabel":"string"},"name":{"type":"string","description":"Display name of the habit","uniqueKey":"data.name","typeLabel":"string"},"type":{"type":"string","description":"Habit type (good or bad)","uniqueKey":"data.type","typeLabel":"string"},"totalLogs":{"type":"number","description":"Sum of all logged values within the period","uniqueKey":"data.totalLogs","typeLabel":"number"},"skips":{"type":"integer","description":"Number of days the habit was skipped","uniqueKey":"data.skips","typeLabel":"integer"},"fails":{"type":"integer","description":"Number of days the habit was marked as failed","uniqueKey":"data.fails","typeLabel":"integer"},"completions":{"type":"integer","description":"Number of days the habit was completed successfully","uniqueKey":"data.completions","typeLabel":"integer"},"unit":{"type":"object","description":"Unit of measurement for the habit's logged values","properties":{"id":{"type":"string","description":"Unique identifier of the unit","uniqueKey":"data.unit.id","typeLabel":"string"},"name":{"type":"string","description":"Display name of the unit","uniqueKey":"data.unit.name","typeLabel":"string"},"symbol":{"type":"string","description":"Symbol for the unit (e.g., \"km\", \"min\")","uniqueKey":"data.unit.symbol","typeLabel":"string"}},"uniqueKey":"data.unit","typeLabel":"object"},"periodicity":{"type":"string","description":"Goal periodicity of the habit","uniqueKey":"data.periodicity","typeLabel":"string"},"avg":{"type":"number","description":"Average logged value per day within the period","uniqueKey":"data.avg","typeLabel":"number"},"dailyProgress":{"type":"array","description":"Day-by-day progress breakdown","items":{"type":"object","properties":{"date":{"type":"string","format":"date","description":"Date of the entry (YYYY-MM-DD format)","uniqueKey":"data.dailyProgress.items.[INDEX].date","typeLabel":"string\u003cdate>"},"totalLog":{"type":"number","description":"Total value logged for this date","uniqueKey":"data.dailyProgress.items.[INDEX].totalLog","typeLabel":"number"},"status":{"type":"string","enum":["completed","failed","skipped","inprogress"],"description":"Completion status of the habit for this date","uniqueKey":"data.dailyProgress.items.[INDEX].status","typeLabel":"enum\u003cstring>"}},"uniqueKey":"data.dailyProgress.items.[INDEX]","typeLabel":"object"},"uniqueKey":"data.dailyProgress","typeLabel":"object[]"}},"uniqueKey":"data","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"data":{"id":"\u003cstring>","name":"\u003cstring>","type":"\u003cstring>","totalLogs":123,"skips":123,"fails":123,"completions":123,"unit":{"id":"\u003cstring>","name":"\u003cstring>","symbol":"\u003cstring>"},"periodicity":"\u003cstring>","avg":123,"dailyProgress":[{"date":"2023-12-25","totalLog":123,"status":"completed"}]}}}},"exampleType":"generated"}},"exampleType":"generated"},"1e8b2e25-c067-40f7-963e-6d0d05cdd112":{"description":"Bad request - invalid query parameters","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"24a3ff75-43ea-47a4-8129-d9d5e763e190":{"description":"Unauthorized - missing or invalid authentication","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"09036371-feb5-48ff-b3e0-f51bcd29fe39":{"description":"Habit not found","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"73b0dc9b-9203-4495-928c-38f0b8b18062":{"ApiKeyTokenAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"API key generated from our app (Settings > API). Only one key can be active at a time.","scopes":[],"schemeName":"ApiKeyTokenAuth"}},"be42732c-7489-4c64-adf3-fbd786f2fa63":{"AccessTokenAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Access token acquired from OAuth2","scopes":[],"schemeName":"AccessTokenAuth"}},"320a74b5-e987-458a-b04d-66c0c79170a1":{"IdTokenAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"ID token from Firebase Auth","scopes":[],"schemeName":"IdTokenAuth"}}},"servers":{"92f06b36-4899-4a5f-95c1-eee7c40252af":{"url":"https://api.habitify.me/v2","description":"Production server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"X-API-Key","description":"API key generated from our app (Settings > API). Only one key can be active at a time.","scopes":[],"schemeName":"ApiKeyTokenAuth"},"schema":{"title":"X-API-Key","type":"string","description":"API key generated from our app (Settings > API). Only one key can be active at a time.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyTokenAuth","name":"X-API-Key"}],"title":"ApiKeyTokenAuth"},{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Access token acquired from OAuth2","scopes":[],"schemeName":"AccessTokenAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Access token acquired from OAuth2","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"AccessTokenAuth","name":"Authorization"}],"title":"AccessTokenAuth"},{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"ID token from Firebase Auth","scopes":[],"schemeName":"IdTokenAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"ID token from Firebase Auth","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"IdTokenAuth","name":"Authorization"}],"title":"IdTokenAuth"}]},"originalFileLocation":"https://static.habitify.me/habitify_apidocsv2_261026.json"},"subdomain":"habitify","siteName":"Habitify","title":"Get habit statistics - Habitify","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-09T11:21:23.393Z","originalFileLocation":"api-reference/habits/get-habit-statistics.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Retrieve aggregated statistics for a specific habit within an optional date range. Includes completion counts, skip and failure counts, total logged values, and an optional daily progress breakdown.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Habitify\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/habitify/V_6sSIuXd9KCLw9s/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/habitify/V_6sSIuXd9KCLw9s/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/habitify/V_6sSIuXd9KCLw9s/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/habitify/V_6sSIuXd9KCLw9s/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/habitify/V_6sSIuXd9KCLw9s/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/habitify/V_6sSIuXd9KCLw9s/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/habitify/V_6sSIuXd9KCLw9s/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/habitify/V_6sSIuXd9KCLw9s/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/habitify/V_6sSIuXd9KCLw9s/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get habit statistics - Habitify\">\u003cmeta data-mint-head property=\"og:description\" content=\"Retrieve aggregated statistics for a specific habit within an optional date range. Includes completion counts, skip and failure counts, total logged values, and an optional daily progress breakdown.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Habitify\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.habitify.me/api-reference/habits/get-habit-statistics\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://habitify.mintlify.app/_mintlify/api/og/v2?division=Habits\u0026amp;title=Get+habit+statistics\u0026amp;description=Retrieve+aggregated+statistics+for+a+specific+habit+within+an+optional+date+range.+Includes+completion+counts%2C+skip+and+failure+counts%2C+total+logged+values%2C+and\u0026amp;theme=7442d8443a4f400eb6dadc2d\u0026amp;signature=bd59173abd2b807dab518839d35f492af4810656f5000ccceb47f67ce900c5b5\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Get habit statistics - Habitify\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Retrieve aggregated statistics for a specific habit within an optional date range. Includes completion counts, skip and failure counts, total logged values, and an optional daily progress breakdown.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://habitify.mintlify.app/_mintlify/api/og/v2?division=Habits\u0026amp;title=Get+habit+statistics\u0026amp;description=Retrieve+aggregated+statistics+for+a+specific+habit+within+an+optional+date+range.+Includes+completion+counts%2C+skip+and+failure+counts%2C+total+logged+values%2C+and\u0026amp;theme=7442d8443a4f400eb6dadc2d\u0026amp;signature=bd59173abd2b807dab518839d35f492af4810656f5000ccceb47f67ce900c5b5\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/habitify/V_6sSIuXd9KCLw9s/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Habitify\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#164AF2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.habitify.me/api-reference/habits/get-habit-statistics\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/habits/get-habit-statistics.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.habitify.me/#organization\",\"name\":\"Habitify\",\"url\":\"https://docs.habitify.me\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/habitify/6ubuIYTR9HqwJmST/images/Group3.png?fit=max\u0026auto=format\u0026n=6ubuIYTR9HqwJmST\u0026q=85\u0026s=19d2ca75b3476d732425d7ae3a079d41\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.habitify.me#website\",\"name\":\"Habitify\",\"url\":\"https://docs.habitify.me\",\"publisher\":{\"@id\":\"https://docs.habitify.me/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.habitify.me/api-reference/habits/get-habit-statistics#webpage\",\"url\":\"https://docs.habitify.me/api-reference/habits/get-habit-statistics\",\"name\":\"Get habit statistics\",\"description\":\"Retrieve aggregated statistics for a specific habit within an optional date range. Includes completion counts, skip and failure counts, total logged values, and an optional daily progress breakdown.\",\"dateModified\":\"2026-09-09T11:21:23.393Z\",\"isPartOf\":{\"@id\":\"https://docs.habitify.me#website\"},\"breadcrumb\":{\"@id\":\"https://docs.habitify.me/api-reference/habits/get-habit-statistics#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.habitify.me/api-reference/habits/get-habit-statistics#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Habits\",\"item\":\"https://docs.habitify.me/api-reference/habits/get-all-habits\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get habit statistics\",\"item\":\"https://docs.habitify.me/api-reference/habits/get-habit-statistics\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.habitify.me/api-reference/habits/get-habit-statistics#apireference\",\"headline\":\"Get habit statistics\",\"name\":\"Get habit statistics\",\"description\":\"Retrieve aggregated statistics for a specific habit within an optional date range. Includes completion counts, skip and failure counts, total logged values, and an optional daily progress breakdown.\",\"url\":\"https://docs.habitify.me/api-reference/habits/get-habit-statistics\",\"mainEntityOfPage\":{\"@id\":\"https://docs.habitify.me/api-reference/habits/get-habit-statistics#webpage\"},\"dateModified\":\"2026-09-09T11:21:23.393Z\",\"publisher\":{\"@id\":\"https://docs.habitify.me/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.habitify.me#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Habitify\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Habitify","nav":{"global":null,"tabs":[{"tab":"Documentation","icon":"life-ring","pages":[{"title":"Documentation","href":"/habitify-introduction"}]},{"tab":"API Documentation","icon":"rectangle-api","groups":[{"group":"Habits","pages":[{"title":"Get all habits","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json get /habits","href":"/api-reference/habits/get-all-habits"},{"title":"Create a new habit","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json post /habits","href":"/api-reference/habits/create-a-new-habit"},{"title":"Get habit journal","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json get /habits/journal","href":"/api-reference/habits/get-habit-journal"},{"title":"Get a habit","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json get /habits/{habitId}","href":"/api-reference/habits/get-a-habit"},{"title":"Update a habit","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json put /habits/{habitId}","href":"/api-reference/habits/update-a-habit"},{"title":"Delete a habit","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json delete /habits/{habitId}","href":"/api-reference/habits/delete-a-habit"},{"title":"Archive a habit","description":"Archive a habit to hide it from the active habits list while preserving all of its data. Archived habits can still be viewed by filtering for archived habits.","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json post /habits/{habitId}/archive","href":"/api-reference/habits/archive-a-habit"},{"title":"Get habit statistics","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json get /habits/{habitId}/statistics","href":"/api-reference/habits/get-habit-statistics"}]},{"group":"Habit Logs","pages":[{"title":"Get logs for a habit","description":"Retrieve a paginated list of log entries for a specific habit, optionally filtered by an inclusive date range. Logs are ordered from newest to oldest.","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json get /habits/{habitId}/logs","href":"/api-reference/habit-logs/get-logs-for-a-habit"},{"title":"Add a log entry","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json post /habits/{habitId}/logs","href":"/api-reference/habit-logs/add-a-log-entry"},{"title":"Delete a log entry","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json delete /habits/{habitId}/logs/{logId}","href":"/api-reference/habit-logs/delete-a-log-entry"},{"title":"Mark habit as completed","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json post /habits/{habitId}/logs/complete","href":"/api-reference/habit-logs/mark-habit-as-completed"},{"title":"Mark habit as failed","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json post /habits/{habitId}/logs/failed","href":"/api-reference/habit-logs/mark-habit-as-failed"},{"title":"Mark habit as skipped","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json post /habits/{habitId}/logs/skipped","href":"/api-reference/habit-logs/mark-habit-as-skipped"},{"title":"Undo habit logs for a day","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json post /habits/{habitId}/logs/undo","href":"/api-reference/habit-logs/undo-habit-logs-for-a-day"}]},{"group":"Habit Notes","pages":[{"title":"Get notes for a habit","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json get /habits/{habitId}/notes","href":"/api-reference/habit-notes/get-notes-for-a-habit"},{"title":"Add a note to a habit","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json post /habits/{habitId}/notes","href":"/api-reference/habit-notes/add-a-note-to-a-habit"},{"title":"Update a note","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json put /habits/{habitId}/notes/{noteId}","href":"/api-reference/habit-notes/update-a-note"},{"title":"Delete a note","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json delete /habits/{habitId}/notes/{noteId}","href":"/api-reference/habit-notes/delete-a-note"}]},{"group":"Areas","pages":[{"title":"Get all areas","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json get /areas","href":"/api-reference/areas/get-all-areas"},{"title":"Create an area","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json post /areas","href":"/api-reference/areas/create-an-area"},{"title":"Get a specific area","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json get /areas/{areaId}","href":"/api-reference/areas/get-a-specific-area"},{"title":"Update an area","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json put /areas/{areaId}","href":"/api-reference/areas/update-an-area"},{"title":"Delete an area","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json delete /areas/{areaId}","href":"/api-reference/areas/delete-an-area"}]}]},{"tab":"Changelog","icon":"bullhorn","href":"https://feedback.habitify.me/changelog"}]},"title":"Get habit statistics - Habitify","buildId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","deploymentId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DKJwRUt2.js","utils-CWD_VS3u.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-oFjciODD.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-C76WsxC3.js","snippetPresets-DvPMxpX_.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CuNQfndH.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BVFpVUoF.js","shallow-t59Jg5Kr.js","getApiPlaygroundDisplay-C_JZ4amX.js","CodeSnippet-CLRDnx_h.js","CodeSnippets-C2myU4kc.js","Page-7TwLLapg.js","getPastedJson-B-JaVXw7.js","icon-BA-iDhH3.js","MethodPill-D4qZABFp.js","DuplicateIcon-THIDKO1O.js","createIcon-CYYJwgFd.js","DynamicMarkdown-UGQuxDKp.js","SectionHeading-jYELb23h.js","axios-vUo_bRtp.js","Markdown-DKsLa3wy.js","clsx-CefdjKz2.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BaREnp3o.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-sgx_0XzF.js"]}