{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Turso","colors":{"primary":"#1EBCA1","light":"#1EBCA1","dark":"#1EBCA1"},"logo":{"light":"https://mintcdn.com/turso/0gN7SecUGL1uVO9v/logo/turso-light.svg?fit=max\u0026auto=format\u0026n=0gN7SecUGL1uVO9v\u0026q=85\u0026s=089d09358d8f5a3e3815861a7419a616","dark":"https://mintcdn.com/turso/0gN7SecUGL1uVO9v/logo/turso-dark.svg?fit=max\u0026auto=format\u0026n=0gN7SecUGL1uVO9v\u0026q=85\u0026s=2946b82b1620bb2c7839f85d7e2e113b"},"favicon":"https://mintcdn.com/turso/0gN7SecUGL1uVO9v/favicon.svg?fit=max\u0026auto=format\u0026n=0gN7SecUGL1uVO9v\u0026q=85\u0026s=3eb0166155fecb6dbad825308e71a8aa","api":{"mdx":{"auth":{"method":"bearer"},"server":"https://api.turso.tech"}},"appearance":{"default":"dark"},"background":{"color":{"light":"#FFFFFF","dark":"#121B22"}},"navbar":{"links":[{"href":"https://turso.tech/app","label":"Dashboard"}],"primary":{"type":"github","href":"https://github.com/tursodatabase/turso"}},"footer":{"socials":{"discord":"https://tur.so/discord","github":"https://github.com/tursodatabase","twitter":"https://twitter.com/tursodatabase","linkedin":"https://www.linkedin.com/company/turso"}},"integrations":{"gtm":{"tagId":"GTM-WW757Q5"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Turso Homepage","icon":"house","href":"https://turso.tech"},{"anchor":"Discord","icon":"discord","href":"https://tur.so/discord"},{"anchor":"GitHub","icon":"github","href":"https://github.com/tursodatabase/turso"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"turso","hasAudioNarration":false,"actualSubdomain":"turso","customDomains":["docs.turso.tech"],"gitSource":{"type":"github","owner":"tursodatabase","repo":"turso-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae0bcb5663d8e17af015da7","collectionId":"18b2fd47-af56-4c1f-910a-5d8fa38cbdd7","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae0bcb5663d8e17af015da7"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae0bcb5663d8e17af015da7","clientVersion":"0.0.3990","searchFilterCounts":[{"language":"default","tag":"Turso Cloud","count":223},{"language":"default","tag":"Turso Database","count":72},{"language":"default","tag":"SDKs","count":62},{"language":"default","tag":"API Reference","count":56},{"language":"default","tag":"CLI","count":56},{"language":"default","tag":"Resources","count":52},{"language":"default","tag":"Commands","count":50},{"language":"default","tag":"Official SDKs","count":47},{"language":"default","tag":"SQL Reference","count":46},{"language":"default","tag":"Statements","count":30}]},"assistantConfig":{},"basePath":"","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":"workos-sso-scim","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},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/databases/stats","slug":"/api-reference/databases/stats","pageMetadata":{"sidebarTitle":"Stats","openapi":"GET /v1/organizations/{organizationSlug}/databases/{databaseName}/stats","title":"Retrieve Database Stats","description":"Fetch the top queries of a database, including the count of rows read and written.","href":"/api-reference/databases/stats"},"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: \"Fetch the top queries of a database, including the count of rows read and written.\"\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":{"sidebarTitle":"Stats","openapi":"GET /v1/organizations/{organizationSlug}/databases/{databaseName}/stats","title":"Retrieve Database Stats","description":"Fetch the top queries of a database, including the count of rows read and written.","href":"/api-reference/databases/stats"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,RequestExample}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);return _jsx(RequestExample,{children:_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -L`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` GET`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.turso.tech/v1/organizations/{organizationSlug}/databases/{databaseName}/stats'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`-H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Authorization: Bearer TOKEN'`})]}),`\n`]})})})})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"sidebarTitle":"Stats","openapi":"GET /v1/organizations/{organizationSlug}/databases/{databaseName}/stats","title":"Retrieve Database Stats","description":"Fetch the top queries of a database, including the count of rows read and written.","href":"/api-reference/databases/stats"}}}},"mdxExtracts":{"tableOfContents":[],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"2\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -L\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> GET\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'https://api.turso.tech/v1/organizations/{organizationSlug}/databases/{databaseName}/stats'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">-H \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'Authorization: Bearer TOKEN'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}}},"jsLinks":["/_mintlify/custom/turso/37ed2bd0c4d50890/prefetch-viz-v3.js","/_mintlify/custom/turso/30fa7bada8cea66f/segment-viz-v2.js"],"openApiReferenceData":{"operation":{"summary":"Retrieve Database Stats","description":"Fetch the top queries of a database, including the count of rows read and written.","operationId":"getDatabaseStats","parameters":["1db3f3e5-2c4c-4a1a-b75d-9db4739077a6","15d1b882-3984-417a-84d9-f47d134f4e26"],"responses":{"200":"d285c5ba-49e1-4482-8721-c849da88f1ab","404":"243bff70-d9a9-42f5-a3dd-a195bad02289"},"method":"get","type":"path","servers":["31ddce8f-9304-4e19-9151-71934c32336c"],"security":[],"path":"/v1/organizations/{organizationSlug}/databases/{databaseName}/stats","baseUrlOptions":["https://api.turso.tech"],"title":"Retrieve Database Stats","codeSamples":[],"requiredOnlyExamples":false,"requestExamples":[{"dropdown":false,"language":"shellscript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"shellscript","children":{"type":"code","key":null,"ref":null,"props":{"language":"shellscript","numberOfLines":"2","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#DCDCAA"},"children":"curl"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -L"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -X"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" GET"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" 'https://api.turso.tech/v1/organizations/{organizationSlug}/databases/{databaseName}/stats'"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"-H "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"'Authorization: Bearer TOKEN'"}}]}},"\n"]}}}},"filename":"cURL"}],"requestExampleType":"mdx","responseExampleType":"generated"},"dependencies":{"parameters":{"1db3f3e5-2c4c-4a1a-b75d-9db4739077a6":{"in":"path","name":"organizationSlug","required":true,"schema":{"type":"string","isRequired":true,"description":"The slug of the organization or user account.","uniqueKey":"","typeLabel":"string"},"description":"The slug of the organization or user account."},"15d1b882-3984-417a-84d9-f47d134f4e26":{"name":"databaseName","in":"path","required":true,"schema":{"type":"string","isRequired":true,"description":"The name of the database.","uniqueKey":"","typeLabel":"string"},"description":"The name of the database."}},"responses":{"d285c5ba-49e1-4482-8721-c849da88f1ab":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"top_queries":{"oneOf":[{"type":"array","description":"The top queries performed on the given database as well as the total rows read and written.","items":{"type":"object","properties":{"query":{"type":"string","description":"A string representing the SQL query executed.","example":"SELECT COUNT(*), CustomerID FROM Orders GROUP BY CustomerID HAVING COUNT(*) > 5;","uniqueKey":"top_queries.oneOf.0.items.[INDEX].query","typeLabel":"string"},"rows_read":{"type":"integer","description":"An integer indicating the number of rows read by the query, which reflects the volume of data the query processed from the database.","example":123,"uniqueKey":"top_queries.oneOf.0.items.[INDEX].rows_read","typeLabel":"integer"},"rows_written":{"type":"integer","description":"An integer indicating the number of rows written (inserted, updated, or deleted) by the query, which reflects the impact of the query on the database data.","example":4567,"uniqueKey":"top_queries.oneOf.0.items.[INDEX].rows_written","typeLabel":"integer"}},"uniqueKey":"top_queries.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"top_queries.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"The top queries performed on the given database as well as the total rows read and written.","items":{"type":"object","properties":{"query":{"type":"string","description":"A string representing the SQL query executed.","example":"SELECT COUNT(*), CustomerID FROM Orders GROUP BY CustomerID HAVING COUNT(*) > 5;"},"rows_read":{"type":"integer","description":"An integer indicating the number of rows read by the query, which reflects the volume of data the query processed from the database.","example":123},"rows_written":{"type":"integer","description":"An integer indicating the number of rows written (inserted, updated, or deleted) by the query, which reflects the impact of the query on the database data.","example":4567}}},"uniqueKey":"top_queries.oneOf.1","typeLabel":"null"}],"uniqueKey":"top_queries","typeLabel":"object[] | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"top_queries":[{"query":"SELECT COUNT(*), CustomerID FROM Orders GROUP BY CustomerID HAVING COUNT(*) > 5;","rows_read":123,"rows_written":4567}]}}},"exampleType":"generated"}},"exampleType":"generated"},"243bff70-d9a9-42f5-a3dd-a195bad02289":{"description":"Database not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"The error message","example":"could not find database with name [databaseName]: record not found","uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"could not find database with name [databaseName]: record not found"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"5577e962-61f1-45e3-97f6-858ace342f9a":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}}},"servers":{"31ddce8f-9304-4e19-9151-71934c32336c":{"url":"https://api.turso.tech","description":"Turso's Platform API"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"Authorization","name":"Authorization"}],"title":"Authorization"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"turso","siteName":"Turso","title":"Retrieve Database Stats - Turso","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2025-10-12T08:14:08.300Z","originalFileLocation":"api-reference/databases/stats.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=\"dark\"}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=\"Fetch the top queries of a database, including the count of rows read and written.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Turso\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/turso/Iu9g4qZd-KNb0pxr/_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/turso/Iu9g4qZd-KNb0pxr/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/turso/Iu9g4qZd-KNb0pxr/_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/turso/Iu9g4qZd-KNb0pxr/_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/turso/Iu9g4qZd-KNb0pxr/_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/turso/Iu9g4qZd-KNb0pxr/_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/turso/Iu9g4qZd-KNb0pxr/_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/turso/Iu9g4qZd-KNb0pxr/_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/turso/Iu9g4qZd-KNb0pxr/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Retrieve Database Stats - Turso\">\u003cmeta data-mint-head property=\"og:description\" content=\"Fetch the top queries of a database, including the count of rows read and written.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Turso\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.turso.tech/api-reference/databases/stats\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://turso.mintlify.app/_mintlify/api/og/v2?division=Databases\u0026amp;title=Retrieve+Database+Stats\u0026amp;description=Fetch+the+top+queries+of+a+database%2C+including+the+count+of+rows+read+and+written.\u0026amp;theme=60deaf9b3086b31a23bf3c07\u0026amp;signature=01b39317b897f66ab145c52be2e26c9fe4bc19eec75399a091bbe7a6f4edc5af\">\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=\"Retrieve Database Stats - Turso\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Fetch the top queries of a database, including the count of rows read and written.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://turso.mintlify.app/_mintlify/api/og/v2?division=Databases\u0026amp;title=Retrieve+Database+Stats\u0026amp;description=Fetch+the+top+queries+of+a+database%2C+including+the+count+of+rows+read+and+written.\u0026amp;theme=60deaf9b3086b31a23bf3c07\u0026amp;signature=01b39317b897f66ab145c52be2e26c9fe4bc19eec75399a091bbe7a6f4edc5af\">\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/turso/Iu9g4qZd-KNb0pxr/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Turso\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1EBCA1\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.turso.tech/api-reference/databases/stats\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/databases/stats.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.turso.tech/#organization\",\"name\":\"Turso\",\"url\":\"https://docs.turso.tech\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/turso/0gN7SecUGL1uVO9v/logo/turso-light.svg?fit=max\u0026auto=format\u0026n=0gN7SecUGL1uVO9v\u0026q=85\u0026s=089d09358d8f5a3e3815861a7419a616\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.turso.tech#website\",\"name\":\"Turso\",\"url\":\"https://docs.turso.tech\",\"publisher\":{\"@id\":\"https://docs.turso.tech/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.turso.tech/api-reference/databases/stats#webpage\",\"url\":\"https://docs.turso.tech/api-reference/databases/stats\",\"name\":\"Retrieve Database Stats\",\"description\":\"Fetch the top queries of a database, including the count of rows read and written.\",\"dateModified\":\"2025-10-12T08:14:08.300Z\",\"isPartOf\":{\"@id\":\"https://docs.turso.tech#website\"},\"breadcrumb\":{\"@id\":\"https://docs.turso.tech/api-reference/databases/stats#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.turso.tech/api-reference/databases/stats#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://docs.turso.tech/api-reference/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Resources\",\"item\":\"https://docs.turso.tech/api-reference/databases/list\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Databases\",\"item\":\"https://docs.turso.tech/api-reference/databases/list\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Retrieve Database Stats\",\"item\":\"https://docs.turso.tech/api-reference/databases/stats\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.turso.tech/api-reference/databases/stats#apireference\",\"headline\":\"Retrieve Database Stats\",\"name\":\"Retrieve Database Stats\",\"description\":\"Fetch the top queries of a database, including the count of rows read and written.\",\"url\":\"https://docs.turso.tech/api-reference/databases/stats\",\"mainEntityOfPage\":{\"@id\":\"https://docs.turso.tech/api-reference/databases/stats#webpage\"},\"dateModified\":\"2025-10-12T08:14:08.300Z\",\"publisher\":{\"@id\":\"https://docs.turso.tech/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.turso.tech#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Turso\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Turso","nav":{"global":{"anchors":[{"anchor":"Turso Homepage","icon":"house","href":"https://turso.tech"},{"anchor":"Discord","icon":"discord","href":"https://tur.so/discord"},{"anchor":"GitHub","icon":"github","href":"https://github.com/tursodatabase/turso"}]},"tabs":[{"tab":"Turso Database","pages":[{"title":"Turso Database","href":"/introduction"}]},{"tab":"Turso Cloud","groups":[{"group":"Turso Cloud","pages":[{"title":"Turso Cloud Documentation","sidebarTitle":"Introduction","href":"/turso-cloud"},{"title":"Quickstart","href":"/quickstart"},{"title":"Local Development","href":"/local-development"},{"title":"libSQL","href":"/libsql"},{"title":"Limitations","href":"/cloud/limitations"},{"title":"Migrate to Turso","href":"/cloud/migrate-to-turso"},{"title":"Durability Guarantees","href":"/cloud/durability"},{"title":"Private Endpoints","href":"/cloud/private-endpoints"},{"title":"Database Access Allow Rules","href":"/cloud/allow-rules"},{"title":"BYOK Encryption","href":"/cloud/encryption"},{"title":"Usage \u0026 Billing","href":"/help/usage-and-billing"},{"title":"AI \u0026 Embeddings","href":"/features/ai-and-embeddings"},{"group":"Embedded Replicas","pages":[{"title":"Embedded Replicas","sidebarTitle":"Introduction","href":"/features/embedded-replicas/introduction"},{"group":"Platform Guides","pages":[{"title":"Embedded Replicas on Fly","sidebarTitle":"Turso + Fly","href":"/features/embedded-replicas/with-fly"},{"title":"Turso + Render","sidebarTitle":null,"href":"/features/embedded-replicas/with-render"},{"title":"Turso + Koyeb","sidebarTitle":null,"href":"/features/embedded-replicas/with-koyeb"},{"title":"Turso + Railway","sidebarTitle":null,"href":"/features/embedded-replicas/with-railway"},{"title":"Turso + Linode by Akamai","sidebarTitle":"Turso + Akamai","href":"/features/embedded-replicas/with-akamai"}]}]},{"title":"Branching","href":"/features/branching"},{"title":"Point-in-Time Recovery","href":"/features/point-in-time-recovery"},{"title":"Recover Deleted Databases","href":"/features/recover-deleted-databases"},{"title":"SQLite Extensions","href":"/features/sqlite-extensions"},{"group":"Deprecated","pages":[{"title":"Multi-DB Schemas (Deprecated)","href":"/features/multi-db-schemas"},{"title":"Attach Database (Deprecated)","href":"/features/attach-database"},{"title":"Data Edge (Deprecated)","href":"/features/data-edge"}]}]},{"group":"SDKs","pages":[{"sidebarTitle":"Introduction","title":"Turso SDKs","href":"/sdk/introduction"},{"title":"Authentication","href":"/sdk/authentication"},{"group":"Authorization","pages":[{"title":"Authorization","sidebarTitle":"Overview","href":"/sdk/authorization"},{"title":"Platform Tokens","href":"/sdk/authorization/tokens"},{"title":"External Auth Providers","href":"/sdk/authorization/jwks"},{"title":"Fine-Grained Permissions","sidebarTitle":"Fine-Grained Permissions","href":"/sdk/authorization/fine-grained-permissions"}]},{"group":"SQL over HTTP","pages":[{"title":"Turso Quickstart (SQL over HTTP)","sidebarTitle":"Quickstart","href":"/sdk/http/quickstart"},{"title":"SQL over HTTP Reference","sidebarTitle":"Reference","href":"/sdk/http/reference"}]},{"group":"Official SDKs","pages":[{"group":"TypeScript","pages":[{"title":"Turso Quickstart (TypeScript)","sidebarTitle":"Quickstart","href":"/sdk/ts/quickstart"},{"title":"Reference","href":"/sdk/ts/reference"},{"title":"Examples","url":"https://github.com/tursodatabase/libsql-client-ts/tree/main/packages/libsql-client/examples","href":"/sdk/ts/examples"},{"group":"Guides","pages":[{"title":"Next.js + Turso","sidebarTitle":"Next.js","href":"/sdk/ts/guides/nextjs"},{"title":"Remix + Turso","sidebarTitle":"Remix","href":"/sdk/ts/guides/remix"},{"title":"Astro + Turso","sidebarTitle":"Astro","href":"/sdk/ts/guides/astro"},{"title":"Nuxt + Turso","sidebarTitle":"Nuxt","href":"/sdk/ts/guides/nuxt"},{"title":"Qwik + Turso","sidebarTitle":"Qwik","href":"/sdk/ts/guides/qwik"},{"title":"SvelteKit + Turso","sidebarTitle":"SvelteKit","href":"/sdk/ts/guides/sveltekit"},{"title":"Quasar + Turso","sidebarTitle":"Quasar","href":"/sdk/ts/guides/quasar"},{"title":"Elysia + Turso","sidebarTitle":"Elysia","href":"/sdk/ts/guides/elysia"},{"title":"Hono + Turso","sidebarTitle":"Hono","href":"/sdk/ts/guides/hono"}]},{"group":"ORMs","pages":[{"title":"Drizzle + Turso","sidebarTitle":"Drizzle","href":"/sdk/ts/orm/drizzle"},{"title":"Prisma + Turso","sidebarTitle":"Prisma","href":"/sdk/ts/orm/prisma"}]},{"group":"Integrations","pages":[{"title":"Sentry","href":"/sdk/ts/integrations/sentry"}]}]},{"group":"Rust","pages":[{"title":"Turso Quickstart (Rust)","sidebarTitle":"Quickstart","href":"/sdk/rust/quickstart"},{"title":"Reference","href":"/sdk/rust/reference"},{"title":"Examples","url":"https://github.com/tursodatabase/libsql/tree/main/libsql/examples","href":"/sdk/rust/examples"},{"group":"Guides","pages":[{"title":"Turso + Actix","sidebarTitle":"Actix","href":"/sdk/rust/guides/actix"},{"title":"Turso + Axum","sidebarTitle":"Axum","href":"/sdk/rust/guides/axum"},{"title":"Turso + Rocket","sidebarTitle":"Rocket","href":"/sdk/rust/guides/rocket"},{"title":"Tauri + Turso","sidebarTitle":"Tauri","href":"/sdk/rust/guides/tauri"}]},{"group":"ORMs","pages":[{"title":"Toasty + Turso","sidebarTitle":"Toasty","href":"/sdk/rust/orm/toasty"}]}]},{"group":"Go","pages":[{"title":"Turso Quickstart (Go)","sidebarTitle":"Quickstart","href":"/sdk/go/quickstart"},{"title":"Reference","href":"/sdk/go/reference"},{"title":"Examples","url":"https://github.com/libsql/go-libsql/tree/main/example","href":"/sdk/go/examples"}]},{"group":"Python","pages":[{"title":"Turso Quickstart (Python)","sidebarTitle":"Quickstart","href":"/sdk/python/quickstart"},{"title":"Reference","href":"/sdk/python/reference"},{"title":"Examples","url":"https://github.com/tursodatabase/libsql-python/tree/main/examples","href":"/sdk/python/examples"},{"group":"Guides","pages":[{"title":"Flask + Turso","sidebarTitle":"Flask","href":"/sdk/python/guides/flask"}]},{"group":"ORMs","pages":[{"title":"SQLAlchemy + Turso","sidebarTitle":"SQLAlchemy","href":"/sdk/python/orm/sqlalchemy"}]}]},{"group":"PHP","pages":[{"title":"Turso Quickstart (PHP)","sidebarTitle":"Quickstart","href":"/sdk/php/quickstart"},{"title":"Reference","href":"/sdk/php/reference"},{"title":"Examples","url":"https://github.com/tursodatabase/turso-client-php/tree/main/examples","href":"/sdk/php/examples"},{"group":"ORMs","pages":[{"title":"Turso + Doctrine DBAL","sidebarTitle":"Doctrine DBAL","href":"/sdk/php/orm/doctrine-dbal"}]},{"group":"Guides","pages":[{"sidebarTitle":"Laravel","title":"Turso Quickstart (Laravel)","href":"/sdk/php/guides/laravel"}]}]},{"group":"Ruby","pages":[{"title":"Turso Quickstart (Ruby)","sidebarTitle":"Quickstart","href":"/sdk/ruby/quickstart"},{"title":"Turso Examples (Ruby)","sidebarTitle":"Examples","href":"/sdk/ruby/examples"}]},{"group":"ActiveRecord","pages":[{"title":"Turso Quickstart (ActiveRecord)","sidebarTitle":"Quickstart","href":"/sdk/activerecord/quickstart"},{"group":"Guides","pages":[{"title":"Ruby on Rails + Turso","sidebarTitle":"Ruby on Rails","href":"/sdk/activerecord/guides/rails"}]}]},{"group":"Android","pages":[{"title":"Turso Quickstart (Android)","sidebarTitle":"Quickstart","href":"/sdk/kotlin/quickstart"},{"title":"Android Reference","sidebarTitle":"Reference","href":"/sdk/kotlin/reference"}]},{"group":"Swift","pages":[{"title":"Turso Quickstart (Swift)","sidebarTitle":"Quickstart","href":"/sdk/swift/quickstart"},{"title":"Swift Reference","sidebarTitle":"Reference","href":"/sdk/swift/reference"}]},{"group":"C","pages":[{"title":"Turso Quickstart (C)","sidebarTitle":"Quickstart","href":"/sdk/c/quickstart"},{"title":"C Reference","sidebarTitle":"Reference","href":"/sdk/c/reference"},{"title":"Turso Examples (C)","sidebarTitle":"Examples","href":"/sdk/c/examples"}]}]},{"group":"Community SDKs","pages":[{"group":"Flutter / Dart","pages":[{"title":"Turso Quickstart (Flutter / Dart)","sidebarTitle":"Quickstart","href":"/sdk/flutter/quickstart"},{"title":"Reference","href":"/sdk/flutter/reference"},{"title":"Examples","url":"https://github.com/dikatok/libsql_dart/tree/main/example","href":"/sdk/flutter/examples"},{"group":"Integrations","pages":[{"title":"Drift + Turso / LibSQL","sidebarTitle":"Drift","href":"/sdk/flutter/integrations/drift"}]}]}]}]},{"group":"CLI","pages":[{"title":"Introduction","href":"/cli/introduction"},{"title":"Installation","href":"/cli/installation"},{"title":"Authentication","href":"/cli/authentication"},{"title":"Upgrading","href":"/cli/upgrading"},{"title":"Help","href":"/cli/help"},{"title":"Headless Mode","href":"/cli/headless-mode"},{"group":"Commands","pages":[{"group":"auth","pages":[{"title":"auth login","sidebarTitle":"login","href":"/cli/auth/login"},{"title":"auth logout","sidebarTitle":"logout","href":"/cli/auth/logout"},{"title":"auth signup","sidebarTitle":"signup","href":"/cli/auth/signup"},{"title":"auth token","sidebarTitle":"token","href":"/cli/auth/token"},{"title":"auth whoami","sidebarTitle":"whoami","href":"/cli/auth/whoami"},{"group":"api-tokens","pages":[{"title":"auth api-tokens mint","sidebarTitle":"mint","href":"/cli/auth/api-tokens/mint"},{"title":"auth api-tokens list","sidebarTitle":"list","href":"/cli/auth/api-tokens/list"},{"title":"auth api-tokens revoke","sidebarTitle":"revoke","href":"/cli/auth/api-tokens/revoke"}]}]},{"group":"contact","pages":[{"title":"contact bookmeeting","sidebarTitle":"bookmeeting","href":"/cli/contact/bookmeeting"},{"title":"contact feedback","sidebarTitle":"feedback","href":"/cli/contact/feedback"}]},{"group":"db","pages":[{"title":"db list","sidebarTitle":"list","href":"/cli/db/list"},{"title":"db create","sidebarTitle":"create","href":"/cli/db/create"},{"title":"db import","sidebarTitle":"import","href":"/cli/db/import"},{"title":"db show","sidebarTitle":"show","href":"/cli/db/show"},{"title":"db export","sidebarTitle":"export","href":"/cli/db/export"},{"title":"db destroy","sidebarTitle":"destroy","href":"/cli/db/destroy"},{"title":"db inspect","sidebarTitle":"inspect","href":"/cli/db/inspect"},{"title":"db shell","sidebarTitle":"shell","href":"/cli/db/shell"},{"title":"db locations","sidebarTitle":"locations","href":"/cli/db/locations"},{"group":"tokens","pages":[{"title":"db tokens create","sidebarTitle":"create","href":"/cli/db/tokens/create"},{"title":"db tokens invalidate","sidebarTitle":"invalidate","href":"/cli/db/tokens/invalidate"}]},{"group":"config allow-rules","pages":[{"title":"db config allow-rules show","sidebarTitle":"show","href":"/cli/db/config/allow-rules/show"},{"title":"db config allow-rules set","sidebarTitle":"set","href":"/cli/db/config/allow-rules/set"},{"title":"db config allow-rules clear","sidebarTitle":"clear","href":"/cli/db/config/allow-rules/clear"}]}]},{"title":"dev","url":"/local-development#turso-cli","href":"/cli/dev"},{"group":"group","pages":[{"title":"group list","sidebarTitle":"list","href":"/cli/group/list"},{"title":"group create","sidebarTitle":"create","href":"/cli/group/create"},{"title":"group update","sidebarTitle":"update","href":"/cli/group/update"},{"title":"group destroy","sidebarTitle":"destroy","href":"/cli/group/destroy"},{"title":"group transfer","sidebarTitle":"transfer","href":"/cli/group/transfer"},{"group":"tokens","pages":[{"title":"group tokens create","sidebarTitle":"create","href":"/cli/group/tokens/create"},{"title":"group tokens invalidate","sidebarTitle":"invalidate","href":"/cli/group/tokens/invalidate"}]},{"title":"group unarchive","sidebarTitle":"unarchive","href":"/cli/group/unarchive"},{"group":"aws-migration","pages":[{"title":"group aws-migration start","sidebarTitle":"start","href":"/cli/group/aws-migration/start"},{"title":"group aws-migration info","sidebarTitle":"info","href":"/cli/group/aws-migration/info"},{"title":"group aws-migration abort","sidebarTitle":"abort","href":"/cli/group/aws-migration/abort"}]}]},{"group":"org","pages":[{"title":"org switch","sidebarTitle":"switch","href":"/cli/org/switch"},{"title":"org list","sidebarTitle":"list","href":"/cli/org/list"},{"title":"org create","sidebarTitle":"create","href":"/cli/org/create"},{"title":"org billing","sidebarTitle":"billing","href":"/cli/org/billing"},{"group":"members","pages":[{"title":"org members list","sidebarTitle":"list","href":"/cli/org/members/list"},{"title":"org members invite","sidebarTitle":"invite","href":"/cli/org/members/invite"},{"title":"org members add","sidebarTitle":"add","href":"/cli/org/members/add"},{"title":"org members rm","sidebarTitle":"rm","href":"/cli/org/members/rm"}]},{"title":"destroy","href":"/cli/org/destroy"}]},{"group":"plan","pages":[{"title":"plan show","sidebarTitle":"show","href":"/cli/plan/show"},{"title":"plan select","sidebarTitle":"select","href":"/cli/plan/select"},{"title":"plan upgrade","sidebarTitle":"upgrade","href":"/cli/plan/upgrade"},{"group":"overages","pages":[{"title":"plan overages disable","sidebarTitle":"disable","href":"/cli/plan/overages/disable"},{"title":"plan overages enable","sidebarTitle":"enable","href":"/cli/plan/overages/enable"}]}]}]}]},{"group":"API Reference","pages":[{"sidebarTitle":"Introduction","title":"Turso Platform API","href":"/api-reference/introduction"},{"title":"Quickstart","href":"/api-reference/quickstart"},{"title":"Authentication","href":"/api-reference/authentication"},{"title":"Errors","href":"/api-reference/response-codes"},{"group":"Resources","pages":[{"group":"Databases","icon":"database","pages":[{"sidebarTitle":"List","openapi":"GET /v1/organizations/{organizationSlug}/databases","title":"List Databases","href":"/api-reference/databases/list"},{"sidebarTitle":"Create","openapi":"POST /v1/organizations/{organizationSlug}/databases","title":"Create Database","href":"/api-reference/databases/create"},{"title":"Upload Database","sidebarTitle":"Upload","api":"POST https://{database_hostname}/v1/upload","href":"/api-reference/databases/upload"},{"sidebarTitle":"Retrieve","openapi":"GET /v1/organizations/{organizationSlug}/databases/{databaseName}","title":"Retrieve Database","href":"/api-reference/databases/retrieve"},{"sidebarTitle":"Retrieve Configuration","openapi":"GET /v1/organizations/{organizationSlug}/databases/{databaseName}/configuration","title":"Retrieve Database Configuration","href":"/api-reference/databases/configuration"},{"sidebarTitle":"Update Configuration","openapi":"PATCH /v1/organizations/{organizationSlug}/databases/{databaseName}/configuration","title":"Update Database Configuration","href":"/api-reference/databases/update-configuration"},{"sidebarTitle":"Usage","openapi":"GET /v1/organizations/{organizationSlug}/databases/{databaseName}/usage","title":"Retrieve Database Usage","description":"Fetch activity usage for a database in a given time period.","href":"/api-reference/databases/usage"},{"sidebarTitle":"Stats","openapi":"GET /v1/organizations/{organizationSlug}/databases/{databaseName}/stats","title":"Retrieve Database Stats","href":"/api-reference/databases/stats"},{"sidebarTitle":"Delete","openapi":"DELETE /v1/organizations/{organizationSlug}/databases/{databaseName}","title":"Delete Database","description":"Delete a database belonging to the organization or user.","href":"/api-reference/databases/delete"},{"sidebarTitle":"List Deleted","openapi":"GET /v3/organizations/{organizationId}/databases","title":"List Deleted Databases","href":"/api-reference/databases/list-deleted"},{"sidebarTitle":"Restore","openapi":"POST /v3/organizations/{organizationId}/databases/{databaseId}/restore","title":"Restore Database","href":"/api-reference/databases/restore"},{"sidebarTitle":"List Instances","openapi":"GET /v1/organizations/{organizationSlug}/databases/{databaseName}/instances","title":"List Database Instances","href":"/api-reference/databases/list-instances"},{"sidebarTitle":"Retrieve Instance","openapi":"GET /v1/organizations/{organizationSlug}/databases/{databaseName}/instances/{instanceName}","title":"Retrieve Database Instance","href":"/api-reference/databases/retrieve-instance"},{"sidebarTitle":"Create Token","openapi":"POST /v1/organizations/{organizationSlug}/databases/{databaseName}/auth/tokens","title":"Generate Database Auth Token","href":"/api-reference/databases/create-token"},{"sidebarTitle":"Invalidate Tokens","openapi":"POST /v1/organizations/{organizationSlug}/databases/{databaseName}/auth/rotate","title":"Invalidate All Database Auth Tokens","href":"/api-reference/databases/invalidate-tokens"}]},{"group":"Groups","icon":"sitemap","pages":[{"sidebarTitle":"List","openapi":"GET /v1/organizations/{organizationSlug}/groups","title":"List Groups","href":"/api-reference/groups/list"},{"sidebarTitle":"Create","openapi":"POST /v1/organizations/{organizationSlug}/groups","title":"Create Group","href":"/api-reference/groups/create"},{"sidebarTitle":"Retrieve","openapi":"GET /v1/organizations/{organizationSlug}/groups/{groupName}","title":"Retrieve Group","href":"/api-reference/groups/retrieve"},{"sidebarTitle":"Retrieve Configuration","openapi":"GET /v1/organizations/{organizationSlug}/groups/{groupName}/configuration","title":"Retrieve Group Configuration","href":"/api-reference/groups/configuration"},{"sidebarTitle":"Update Configuration","openapi":"PATCH /v1/organizations/{organizationSlug}/groups/{groupName}/configuration","title":"Update Group Configuration","href":"/api-reference/groups/update-configuration"},{"sidebarTitle":"Delete","openapi":"DELETE /v1/organizations/{organizationSlug}/groups/{groupName}","title":"Delete Group","href":"/api-reference/groups/delete"},{"sidebarTitle":"List Deleted","openapi":"GET /v3/organizations/{organizationId}/deleted-groups","title":"List Deleted Groups","href":"/api-reference/groups/list-deleted"},{"sidebarTitle":"Restore","openapi":"POST /v3/organizations/{organizationId}/groups/{groupId}/restore","title":"Restore Group","href":"/api-reference/groups/restore"},{"sidebarTitle":"Transfer","openapi":"POST /v1/organizations/{organizationSlug}/groups/{groupName}/transfer","title":"Transfer Group","href":"/api-reference/groups/transfer"},{"sidebarTitle":"Unarchive","openapi":"POST /v1/organizations/{organizationSlug}/groups/{groupName}/unarchive","title":"Unarchive Group","href":"/api-reference/groups/unarchive"},{"sidebarTitle":"Create Token","openapi":"POST /v1/organizations/{organizationSlug}/groups/{groupName}/auth/tokens","title":"Create Group Auth Token","href":"/api-reference/groups/create-token"},{"sidebarTitle":"Invalidate Tokens","openapi":"POST /v1/organizations/{organizationSlug}/groups/{groupName}/auth/rotate","title":"Invalidate All Group Auth Tokens","href":"/api-reference/groups/invalidate-tokens"}]},{"group":"Locations","icon":"location-dot","pages":[{"sidebarTitle":"List","openapi":"GET /v1/locations","title":"List Locations","href":"/api-reference/locations/list"},{"title":"Closest Region","sidebarTitle":"Closest Region","api":"GET https://region.turso.io","href":"/api-reference/locations/closest-region"}]},{"group":"Organizations","icon":"user-group","pages":[{"sidebarTitle":"List","openapi":"GET /v1/organizations","title":"List Organizations","href":"/api-reference/organizations/list"},{"sidebarTitle":"Retrieve","openapi":"GET /v1/organizations/{organizationSlug}","title":"Retrieve Organization","href":"/api-reference/organizations/retrieve"},{"sidebarTitle":"Update","openapi":"PATCH /v1/organizations/{organizationSlug}","title":"Update Organization","href":"/api-reference/organizations/update"},{"sidebarTitle":"Plans","openapi":"GET /v1/organizations/{organizationSlug}/plans","title":"List Plans","href":"/api-reference/organizations/plans"},{"sidebarTitle":"Current Subscription","openapi":"GET /v1/organizations/{organizationSlug}/subscription","title":"Current Subscription","href":"/api-reference/organizations/subscription"},{"sidebarTitle":"Invoices","openapi":"GET /v1/organizations/{organizationSlug}/invoices","title":"List Invoices","href":"/api-reference/organizations/invoices"},{"sidebarTitle":"Current Usage","openapi":"GET /v1/organizations/{organizationSlug}/usage","title":"Organization Usage","href":"/api-reference/organizations/usage"}]},{"group":"User","icon":"circle-user","pages":[{"sidebarTitle":"Get Current User","openapi":"GET /v1/user","title":"Get Current User","href":"/api-reference/user/get-current"}]},{"group":"Members","icon":"user","pages":[{"sidebarTitle":"List","openapi":"GET /v1/organizations/{organizationSlug}/members","title":"List Members","href":"/api-reference/organizations/members/list"},{"sidebarTitle":"Retrieve","openapi":"GET /v1/organizations/{organizationSlug}/members/{username}","title":"Retrieve Member","href":"/api-reference/organizations/members/retrieve"},{"sidebarTitle":"Add","openapi":"POST /v1/organizations/{organizationSlug}/members","title":"Add Member","href":"/api-reference/organizations/members/add"},{"sidebarTitle":"Update","openapi":"PATCH /v1/organizations/{organizationSlug}/members/{username}","title":"Update Member Role","href":"/api-reference/organizations/members/update"},{"sidebarTitle":"Remove","openapi":"DELETE /v1/organizations/{organizationSlug}/members/{username}","title":"Remove Member","href":"/api-reference/organizations/members/remove"}]},{"group":"Invites","icon":"envelope","pages":[{"sidebarTitle":"List","openapi":"GET /v2/organizations/{organizationSlug}/invites","title":"List Invites","href":"/api-reference/organizations/invites/list-v2"},{"title":"Create Invite","openapi":"POST /v2/organizations/{organizationSlug}/invites","href":"/api-reference/organizations/invites/create-v2"},{"sidebarTitle":"Delete Invite","openapi":"DELETE /v2/organizations/{organizationSlug}/invites/{email}","title":"Delete Invite","href":"/api-reference/organizations/invites/delete-v2"}]},{"group":"Audit Logs","icon":"list","pages":[{"sidebarTitle":"List","openapi":"GET /v1/organizations/{organizationSlug}/audit-logs","title":"List Audit Logs","href":"/api-reference/audit-logs/list"}]},{"group":"API Tokens","icon":"key","pages":[{"sidebarTitle":"Create","openapi":"POST /v1/auth/api-tokens/{tokenName}","title":"Create API Token","href":"/api-reference/tokens/create"},{"sidebarTitle":"Validate","openapi":"GET /v1/auth/validate","title":"Validate API Token","href":"/api-reference/tokens/validate"},{"sidebarTitle":"List","openapi":"GET /v1/auth/api-tokens","title":"List API Tokens","href":"/api-reference/tokens/list"},{"sidebarTitle":"Revoke","openapi":"DELETE /v1/auth/api-tokens/{tokenName}","title":"Revoke API Token","href":"/api-reference/tokens/revoke"},{"sidebarTitle":"List (Organization)","openapi":"GET /v1/organizations/{organizationSlug}/api-tokens","title":"List Organization API Tokens","href":"/api-reference/tokens/list-organization"},{"sidebarTitle":"Revoke (Organization)","openapi":"DELETE /v1/organizations/{organizationSlug}/api-tokens/{tokenId}","title":"Revoke Organization API Token","href":"/api-reference/tokens/revoke-organization"}]}]}]},{"group":"Integrations","pages":[{"title":"MCP (AI agents)","href":"/integrations/mcp"},{"title":"Vercel","href":"/integrations/vercel"}]}]},{"tab":"AgentFS (beta)","pages":[{"title":"AgentFS (beta)","href":"/agentfs/introduction"}]}]},"title":"Retrieve Database Stats - Turso","buildId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","deploymentId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-WRhTSUDL.js","utils-ChMov4Kr.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-_REmC2bI.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Bp6nVRCu.js","snippetPresets-DZadmXoU.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CY2WdoTl.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-DwYG-Q4l.js","shallow-BXQIGwv4.js","getApiPlaygroundDisplay-CK5nK5B9.js","CodeSnippet-TH4a2aGW.js","CodeSnippets-DwsQiOFS.js","Page-R3M_BF4L.js","getPastedJson-DD7kUzi_.js","icon-holE3QoJ.js","MethodPill-DUW0T8us.js","DuplicateIcon-CI_p4be-.js","createIcon-BdbRvavb.js","DynamicMarkdown-DN96a4Ur.js","SectionHeading-SCu36A9d.js","axios-vUo_bRtp.js","Markdown-CCeGv-zI.js","clsx-BGBGWFTt.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-Cv_O2fky.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-2C5OB2eV.js"]}