{"openapi":"3.1.2","info":{"title":"meteoblue Accounting API","description":"# Overview\n\nThe meteoblue Accounting API provides programmatic access to\nAPI usage statistics and credit consumption for your account. It\nenables users to monitor usage, retrieve accounting information,\nand integrate consumption data into internal dashboards, reporting\nsystems, or automated workflows.","version":"1.0.0","x-logo":{"url":"https://static.meteoblue.com/assets/images/logo/meteoblue_logo_v2.0.png","backgroundColor":"hsl(210deg, 40%, 98%)","altText":"meteoblue","href":"https://docs.meteoblue.com/en/weather-apis/introduction/overview"}},"tags":[{"name":"Accounting API"}],"servers":[{"url":"https://my.meteoblue.com"}],"security":[{"apikey":[]}],"paths":{"/account/usage":{"parameters":[{"name":"date_start","in":"query","schema":{"type":"string","format":"date","examples":["2026-01-01"],"pattern":"\\d\\d\\d\\d-\\d\\d-\\d\\d"},"description":"Start date of the usage statistics, in the format yyyy-mm-dd."},{"name":"date_end","in":"query","schema":{"type":"string","format":"date","examples":["2026-01-02"],"pattern":"\\d\\d\\d\\d-\\d\\d-\\d\\d"},"description":"End date of the usage statistics, in the format yyyy-mm-dd."},{"name":"type","in":"query","schema":{"type":"string","examples":["current","basic-1h","package","history","maps","measurement","dataset"]},"description":"Filter the usage statistics by request type."},{"name":"page","in":"query","schema":{"type":"integer","default":1,"examples":[1]},"description":"Page number of the results, starting at 1."},{"name":"per","in":"query","schema":{"type":"integer","default":10,"examples":[10]},"description":"Number of entries to return per page."}],"get":{"tags":["Accounting API"],"summary":"Get Account usage","description":"Retrieves API usage statistics and accounting information\nfor the authenticated account, including API usage statistics\nthat can be filtered by date range.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"request_date":{"type":"string","format":"date","pattern":"\\d\\d\\d\\d-\\d\\d-\\d\\d"},"request_type":{"type":"string","examples":["current","basic-1h","package","history","maps","measurement","dataset"],"minLength":1},"request_count":{"type":"integer","minimum":0},"request_credits":{"type":"integer","minimum":0}},"required":["request_date","request_type","request_count","request_credits"]}},"metadata":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"page":{"type":"integer","minimum":1},"per":{"type":"integer","minimum":1}},"required":["total","page","per"]}},"required":["items","metadata"]}}}},"400":{"$ref":"#/components/responses/error-response","description":"Bad Request"},"401":{"$ref":"#/components/responses/error-response","description":"Unauthorized"},"403":{"$ref":"#/components/responses/error-response","description":"Forbidden"},"429":{"$ref":"#/components/responses/error-response","description":"Too Many Requests"}},"x-codeSamples":[{"lang":"JavaScript","source":"fetch(\"https://my.meteoblue.com/account/usage?start=2026-01-01&end=2026-01-02&apikey=YOUR_APIKEY\")\n.then(res => res.json())\n.then(console.log);"},{"lang":"Python","source":"import requests\n\nurl = f\"https://my.meteoblue.com/account/usage?start=2026-01-01&end=2026-01-02&apikey=YOUR_APIKEY\"\nresponse = requests.get(url)\nprint(response.json())"},{"lang":"Shell","source":"curl \"https://my.meteoblue.com/account/usage?start=2026-01-01&end=2026-01-02&apikey=YOUR_APIKEY\""},{"lang":"Java","source":"import java.net.*;\nimport java.io.*;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String url = \"https://my.meteoblue.com/account/usage?start=2026-01-01&end=2026-01-02&apikey=YOUR_APIKEY\";\n        HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();\n        conn.setRequestMethod(\"GET\");\n\n        try (BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {\n            String line;\n            while ((line = in.readLine()) != null) {\n                System.out.println(line);\n            }\n        }\n    }\n}"}]}}},"components":{"responses":{"error-response":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean","const":true,"description":"Flag indicating that an error has occurred."},"error_message":{"type":"string","description":"Message describing the error."}},"required":["error","error_message"]},"examples":{"Error Message Example":{"summary":"Example Error","description":"Example of a possible error message","value":{"error":true,"error_message":"Message describing the error."}}}}}}},"headers":{"accounting-header":{"schema":{"type":"integer","examples":[0],"minimum":0},"description":"The total number of credits which were accounted from the user of the apikey for the made request."}},"securitySchemes":{"apikey":{"description":"A meteoblue API access key","type":"apiKey","name":"apikey","in":"query"}}}}