{"openapi":"3.1.0","info":{"title":"Apiverket.se API","version":"2026-02-15","description":"A unified REST API for Swedish public data. 280+ endpoints covering weather, transport, statistics, parliament, health, finance, environment, crime, tax, enforcement, migration, geology, archives, biodiversity, and 45+ government data sources through a single, consistent interface.\n\n## Authentication\nAll `/v1/*` endpoints require a Bearer token:\n```\nAuthorization: Bearer sk_test_demo\n```\n\n**Test mode** (`sk_test_*`): Returns curated sandbox data — no upstream calls, always available. Real company registry lookups/searches require a live key.\n\n**Live mode** (`sk_live_*`): Queries real government APIs with caching.\n\n## Quotas and limits\nDaily API quotas and minute limits apply per API key. Company search has an additional live daily limit per key: Free 20, Starter 100, Pro 500, Business 2,000 and Enterprise 10,000. Daily quotas reset at 00:00 UTC.\n\nFree includes **50 lifetime live company discovery credits per account**, shared across all its keys. These credits never renew; creating another key does not add credits. Paid tiers do not have this lifetime credit limit.\n\nCompany lookups do not spend search credits or the search daily quota. Free live keys have a separate lookup limit of 100/day per key; paid lookups use the regular daily API quota without a separate lookup limit. Both search and lookup use the regular daily API quota.\n\nTest mode returns example data and does not spend live daily quotas or discovery credits; minute limits still apply. Recorded 429 responses remain in request_count and error statistics but do not consume the daily API quota.\n\n## Response Envelope\nEvery response follows a consistent envelope:\n```json\n{\n  \"meta\": { \"request_id\", \"api_version\", \"mode\", \"sources\", \"warnings\", \"rate_limit\" },\n  \"data\": { ... }\n}\n```","contact":{"name":"Apiverket.se","url":"https://apiverket.se"}},"servers":[{"url":"https://apiverket.se","description":"Production"},{"url":"http://localhost:4000","description":"Local development"}],"security":[{"BearerAuth":[]}],"tags":[{"name":"VAT","description":"EU VAT number validation via VIES"},{"name":"Weather","description":"Swedish weather observations from SMHI"},{"name":"Rates","description":"Exchange rates and policy rate from Riksbanken"},{"name":"Statistics","description":"Industry statistics from SCB (Statistics Sweden)"},{"name":"Municipalities","description":"Municipal KPIs from Kolada"},{"name":"Jobs","description":"Job listings from JobTech (Arbetsförmedlingen)"},{"name":"Transport","description":"Train departures/arrivals from Trafikverket"},{"name":"Education","description":"School data from Skolverket"},{"name":"Health","description":"Diagnosis guidance and sick leave from Socialstyrelsen"},{"name":"Environment","description":"Protected areas from Naturvårdsverket"},{"name":"Crisis","description":"Crisis news and VMA alerts from Krisinformation.se"},{"name":"Parliament","description":"Members and documents from Riksdagen"},{"name":"Nutrition","description":"Food nutritional data from Livsmedelsverket"},{"name":"Library","description":"Book search from LIBRIS (National Library)"},{"name":"Transit","description":"Public transport departures from ResRobot"},{"name":"Police","description":"Police events from Polisen"},{"name":"Radio","description":"Channels and programs from Sveriges Radio"},{"name":"Traffic","description":"Traffic messages and areas from Sveriges Radio"},{"name":"Transport Statistics","description":"Transport statistics from Trafikanalys"},{"name":"Demographics","description":"DeSO-level demographics from SCB"},{"name":"Energy","description":"Electricity spot prices from Nord Pool"},{"name":"Bathing","description":"Bathing sites from Havs- och vattenmyndigheten"},{"name":"Heritage","description":"Cultural heritage from K-samsök (Riksantikvarieämbetet)"},{"name":"Public Health","description":"Public health indicators from Folkhälsomyndigheten"},{"name":"Hydrology","description":"Water levels and flow from SMHI"},{"name":"Names","description":"Swedish name statistics from SCB"},{"name":"Ocean","description":"Ocean observations from SMHI"},{"name":"Open Data","description":"Sweden's open data catalog (Dataportal.se)"},{"name":"Power Grid","description":"Real-time power grid status from Svenska kraftnät"},{"name":"Museum","description":"Museum collections from Digitalt Museum"},{"name":"Elections","description":"Election results from Valmyndigheten"},{"name":"Companies","description":"Company name search via SCB Företagsregister and organisation-number lookup via Bolagsverket"},{"name":"Social Insurance","description":"Sick leave statistics from Försäkringskassan"},{"name":"Account","description":"API key management, usage, and tier information"},{"name":"Air Quality","description":"Air quality monitoring from Naturvårdsverket"},{"name":"Pollen","description":"Pollen forecasts"},{"name":"Currencies","description":"Currency pair listings and historical rates"},{"name":"Population","description":"Population statistics from SCB"},{"name":"Prices","description":"Consumer and producer price indices from SCB"},{"name":"Labor","description":"Labor market statistics from SCB"},{"name":"Infrastructure","description":"EV chargers, bridges, cameras, traffic flow from Trafikverket"},{"name":"Wanted","description":"Wanted persons from Polisen"},{"name":"Questions","description":"Written questions from Riksdagen"},{"name":"Committee Reports","description":"Committee reports from Riksdagen"},{"name":"SOU","description":"Government investigations (SOU)"},{"name":"SFS","description":"Swedish law gazette (SFS)"},{"name":"Parental Leave","description":"Parental leave statistics from Försäkringskassan"},{"name":"Child Allowance","description":"Child allowance statistics from Försäkringskassan"},{"name":"Disability","description":"Disability benefit statistics from Försäkringskassan"},{"name":"Housing Allowance","description":"Housing allowance statistics from Försäkringskassan"},{"name":"Rehabilitation","description":"Rehabilitation statistics from Försäkringskassan"},{"name":"Work Injury","description":"Work injury statistics from Försäkringskassan"},{"name":"Pension","description":"Pension statistics from Försäkringskassan"},{"name":"Water Quality","description":"Water quality monitoring stations and measurements"},{"name":"Contaminated Sites","description":"Contaminated sites from Naturvårdsverket"},{"name":"Healthcare","description":"Healthcare wait times, care quality, disease registers"},{"name":"Tourism","description":"Tourism statistics from SCB/Tillväxtverket"},{"name":"GDP","description":"GDP data from SCB"},{"name":"Housing","description":"Housing prices and stock from SCB"},{"name":"Income","description":"Income statistics from SCB"},{"name":"Trade","description":"Import/export trade data from SCB"},{"name":"Education Statistics","description":"Education statistics by municipality from SCB"},{"name":"Crime","description":"Crime statistics from BRÅ"},{"name":"Observations","description":"SMHI generic weather observations"},{"name":"Climate","description":"Climate scenarios from SMHI"},{"name":"Road Conditions","description":"Road condition reports from Trafikverket"},{"name":"Financial Series","description":"Riksbanken time series data"},{"name":"Mortgage Rates","description":"Mortgage interest rates"},{"name":"Wages","description":"Wage statistics from SCB"},{"name":"Emissions","description":"Environmental emissions data from SCB"},{"name":"Public Finance","description":"Government budget and finance data from SCB"},{"name":"Money Supply","description":"M1/M2/M3 monetary aggregates from Riksbanken"},{"name":"Destinations","description":"Swedish tourism destinations from Visit Sweden"},{"name":"Taxonomy","description":"Swedish labour market taxonomy from JobTech (Arbetsförmedlingen)"},{"name":"Telecom","description":"Telecom operator lookup and wireless frequencies from PTS"},{"name":"Qualifications","description":"Professional qualifications from MYH (Myndigheten för yrkeshögskolan)"},{"name":"Tax","description":"Tax statistics and datasets from Skatteverket"},{"name":"Enforcement","description":"Debt, bankruptcy, and eviction statistics from Kronofogden"},{"name":"National Library","description":"Datasets and packages from Kungliga biblioteket (data.kb.se)"},{"name":"Historical Jobs","description":"Historical job listings from JobTech (Arbetsförmedlingen)"},{"name":"Education Match","description":"Education-to-occupation matching from MYH/UHR"},{"name":"Nobel","description":"Nobel Prize data (nobelprize.org)"},{"name":"Reference Rate","description":"Riksbanken reference rate (Referensränta)"},{"name":"Radar","description":"Weather radar imagery from SMHI"},{"name":"CPIF","description":"CPIF inflation index from SCB"},{"name":"Migration","description":"Immigration and emigration statistics from SCB/Migrationsverket"},{"name":"Geology","description":"Wells, boreholes, and groundwater data from SGU"},{"name":"Archives","description":"Archival record search from Riksarkivet"},{"name":"Energy Statistics","description":"Energy balance and production statistics from Energimyndigheten"},{"name":"Student Finance","description":"Student debt and disbursement statistics from CSN"},{"name":"Biodiversity","description":"Species and occurrence data from SBDI"},{"name":"Transport Analysis","description":"Transport statistics products from Trafikanalys"}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"Use `sk_test_demo` for curated sandbox data with no live upstream calls, or a `sk_live_*` key for real upstream data."}},"schemas":{"SourceMeta":{"type":"object","properties":{"agency":{"type":"string","example":"SMHI"},"fetched_at":{"type":"string","format":"date-time"},"cache_ttl":{"type":"integer","example":1800},"freshness":{"type":"string","enum":["live","cached"]},"table_id":{"type":"string","description":"Optional upstream table identifier for curated statistics endpoints.","example":"TAB638"},"table_title":{"type":"string","description":"Optional human-readable upstream table title.","example":"Population by municipality, age and sex"},"period":{"type":"string","description":"Optional period used for the upstream statistics query.","example":"2025"}}},"RateLimit":{"type":"object","properties":{"limit":{"type":"integer","example":100},"remaining":{"type":"integer","example":99},"reset":{"type":"integer","example":1700000000}}},"PaginationMeta":{"type":"object","description":"Pagination metadata included on list endpoints.","properties":{"total":{"type":"integer","description":"Total number of items matching the query","example":142},"offset":{"type":"integer","description":"Current offset (0-based)","example":0},"limit":{"type":"integer","description":"Page size used for this request","example":20},"has_more":{"type":"boolean","description":"Whether more items are available beyond this page","example":true}}},"ApiSuccessGuidance":{"type":"object","description":"Optional next-step guidance for discovery-to-lookup workflows.","properties":{"action":{"type":"string","enum":["lookup_by_org_number","lookup_train_station"]},"message":{"type":"string"},"next_endpoint":{"type":"string"},"cache_fields":{"type":"array","items":{"type":"string"}}}},"ApiMeta":{"type":"object","properties":{"request_id":{"type":"string","example":"req_abc123"},"api_version":{"type":"string","example":"2026-02-15"},"mode":{"type":"string","enum":["test","live"]},"sources":{"type":"array","items":{"$ref":"#/components/schemas/SourceMeta"}},"warnings":{"type":"array","items":{"type":"object"}},"rate_limit":{"$ref":"#/components/schemas/RateLimit"},"pagination":{"$ref":"#/components/schemas/PaginationMeta"},"guidance":{"$ref":"#/components/schemas/ApiSuccessGuidance"},"company_search_credits":{"type":"object","description":"Present on live Free company search responses. Shows account-wide lifetime discovery credit status and whether enforcement is active or in grace.","properties":{"limit":{"type":"integer","example":50},"used":{"type":"integer","example":12},"remaining":{"type":"integer","example":38},"enforcement":{"type":"string","enum":["active","grace"],"example":"active"},"rollout_at":{"type":"string","format":"date-time","example":"2026-09-06T00:00:00.000Z"},"grace_until":{"type":"string","format":"date-time","nullable":true,"example":"2026-10-06T00:00:00.000Z"}}}}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","not_found","rate_limit_error","source_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"},"source":{"type":"object","description":"Present on upstream source errors. Identifies which government data source is unavailable.","properties":{"name":{"type":"string","example":"digitaltmuseum"},"status":{"type":"string","enum":["unavailable","timeout","circuit_open"],"example":"timeout"},"upstream_status":{"type":"integer","example":503}}},"rate_limit":{"type":"object","description":"Present on 429 responses. Tells clients which quota was hit and when retrying is useful.","properties":{"scope":{"type":"string","enum":["global_per_minute","api_daily","company_search_daily","company_lookup_daily","company_search_credits","company_automation_cooldown"],"example":"company_search_daily"},"tier":{"type":"string","example":"starter"},"limit":{"type":"integer","example":100},"remaining":{"type":"integer","example":0},"reset_at":{"type":"string","format":"date-time","nullable":true,"description":"Omitted for lifetime quota errors that do not reset.","example":"2026-05-04T00:00:00.000Z"},"retry_after_seconds":{"type":"integer","nullable":true,"description":"Omitted for lifetime quota errors where retrying later will not help.","example":12345}}},"guidance":{"type":"object","description":"Human-readable recovery guidance for rate-limit and upstream source responses.","properties":{"action":{"type":"string","enum":["retry_after","pause_until_reset","retry_later","use_cached_data","use_company_search","add_required_query","use_station_signature","search_train_stations"],"example":"pause_until_reset"},"message":{"type":"string"},"diagnosis":{"type":"object","description":"Optional structured diagnosis for actionable recovery without exposing raw secrets or identifiers.","properties":{"problem":{"type":"string"},"likely_cause":{"type":"string"},"correct_workflow":{"type":"array","items":{"type":"string"}}}},"docs_url":{"type":"string","format":"uri"},"upgrade_url":{"type":"string","format":"uri"},"retry_after_seconds":{"type":"integer"},"retry_policy":{"type":"string","enum":["do_not_retry_before_reset"],"description":"Machine-readable instruction to avoid retrying before rate_limit.reset_at."},"reuse_cache":{"type":"boolean","description":"Whether clients should reuse cached data while requests are paused."}}},"help":{"type":"object","description":"Optional recovery hints for common not-found cases, such as a suggested endpoint or working examples.","properties":{"suggested_endpoint":{"type":"string","example":"/v1/weather/rainfall/current"},"examples":{"type":"array","items":{"type":"string"},"example":["/v1/weather/rainfall/current"]},"available_examples":{"type":"array","items":{"type":"string"},"example":["/v1/weather/rainfall/current"]},"docs_url":{"type":"string","format":"uri","example":"https://apiverket.se/docs"},"console_url":{"type":"string","format":"uri","example":"https://apiverket.se/console"}}},"endpoint_bucket":{"type":"string","example":"/v1/transport/trains/:station"},"suggestions":{"type":"array","description":"Privacy-safe runnable endpoint suggestions.","items":{"type":"object","properties":{"endpoint":{"type":"string"},"method":{"type":"string","enum":["GET"]},"description":{"type":"string"},"example":{"type":"string"}}}},"docs_url":{"type":"string"},"discovery_url":{"type":"string"},"request_id":{"type":"string"}}}}},"VatValidationData":{"type":"object","properties":{"valid":{"type":"boolean"},"country_code":{"type":"string","example":"SE"},"vat_number":{"type":"string","example":"556703614301"},"name":{"type":"string"},"address":{"type":"string"}}},"WeatherData":{"type":"object","properties":{"city":{"type":"string","example":"stockholm"},"temperature_c":{"type":"number","example":12.5},"wind_speed_ms":{"type":"number","example":3.2},"humidity_pct":{"type":"number","example":72},"station_name":{"type":"string"},"observed_at":{"type":"string","format":"date-time"}}},"ExchangeRatesData":{"type":"object","properties":{"eur_sek":{"type":"number","example":11.25},"usd_sek":{"type":"number","example":10.45},"policy_rate":{"type":"number","example":3.75},"date":{"type":"string","format":"date"}}},"IndustryStatsData":{"type":"object","properties":{"sni_code":{"type":"string","example":"62010"},"sni_description":{"type":"string"},"total_enterprises":{"type":"integer"},"size_distribution":{"type":"object","additionalProperties":{"type":"integer"}},"year":{"type":"string"},"source_table":{"type":"string"}}},"MunicipalityKpiData":{"type":"object","properties":{"municipality_id":{"type":"string","example":"0180"},"municipality_name":{"type":"string","example":"Stockholm"},"kpi_id":{"type":"string","example":"N00945"},"kpi_title":{"type":"string"},"period":{"type":"integer","example":2023},"value":{"type":"number"},"gender":{"type":"string"},"status":{"type":"string"}}},"JobSearchData":{"type":"object","properties":{"total":{"type":"integer"},"query":{"type":"string"},"listings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"headline":{"type":"string"},"employer_name":{"type":"string"},"municipality":{"type":"string"},"occupation":{"type":"string"},"description_snippet":{"type":"string"},"published":{"type":"string"},"deadline":{"type":"string"},"url":{"type":"string"}}}}}},"TrainStationData":{"type":"object","properties":{"station":{"type":"string","example":"Cst"},"station_name":{"type":"string","example":"Stockholm Central"},"departures":{"type":"array","items":{"$ref":"#/components/schemas/TrainAnnouncement"}},"arrivals":{"type":"array","items":{"$ref":"#/components/schemas/TrainAnnouncement"}}}},"TrainStationDirectoryEntry":{"type":"object","required":["signature","official_name"],"properties":{"signature":{"type":"string","description":"Canonical Trafikverket LocationSignature.","example":"Cst"},"official_name":{"type":"string","description":"Trafikverket AdvertisedLocationName.","example":"Stockholm Central"}}},"TrainStationSearchData":{"type":"object","required":["total","stations"],"properties":{"total":{"type":"integer","example":1},"stations":{"type":"array","items":{"$ref":"#/components/schemas/TrainStationDirectoryEntry"}}}},"TrainAnnouncement":{"type":"object","properties":{"train_id":{"type":"string"},"destination":{"type":"string"},"origin":{"type":"string"},"scheduled_time":{"type":"string","format":"date-time"},"estimated_time":{"type":"string","format":"date-time"},"actual_time":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["on_time","delayed","cancelled","departed"]},"delay_minutes":{"type":"integer"},"track":{"type":"string"},"operator":{"type":"string"}}},"SchoolSearchData":{"type":"object","properties":{"total":{"type":"integer"},"query":{"type":"string"},"schools":{"type":"array","items":{"$ref":"#/components/schemas/SchoolData"}}}},"SchoolData":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"municipality":{"type":"string"},"municipality_code":{"type":"string"},"principal":{"type":"string"},"status":{"type":"string"}}},"DiagnosisGuidanceData":{"type":"object","properties":{"diagnosis_code":{"type":"string","example":"M54"},"diagnosis_title":{"type":"string"},"recommendation":{"type":"string"},"max_sick_leave_days":{"type":"integer"},"typical_sick_leave":{"type":"string"},"functional_impact":{"type":"string"},"activity_limitations":{"type":"string"}}},"ProtectedAreaSearchData":{"type":"object","properties":{"total":{"type":"integer"},"areas":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"municipality":{"type":"string"},"area_hectares":{"type":"number"},"decision_date":{"type":"string"},"managing_authority":{"type":"string"}}}}}},"CrisisNewsSearchData":{"type":"object","properties":{"total":{"type":"integer"},"articles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"headline":{"type":"string"},"preamble":{"type":"string"},"body_text":{"type":"string"},"published":{"type":"string"},"updated":{"type":"string"},"url":{"type":"string"},"push_message":{"type":"string"},"is_test":{"type":"boolean"}}}}}},"VmaSearchData":{"type":"object","properties":{"total":{"type":"integer"},"alerts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"headline":{"type":"string"},"message":{"type":"string"},"published":{"type":"string"},"updated":{"type":"string"},"areas":{"type":"array","items":{"type":"object"}}}}}}},"ParliamentMemberSearchData":{"type":"object","properties":{"total":{"type":"integer"},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"party":{"type":"string"},"constituency":{"type":"string"},"birth_year":{"type":"integer"},"gender":{"type":"string"},"status":{"type":"string"}}}}}},"ParliamentDocumentSearchData":{"type":"object","properties":{"total":{"type":"integer"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"title":{"type":"string"},"date":{"type":"string"},"session":{"type":"string"},"document_number":{"type":"string"}}}}}},"FoodSearchData":{"type":"object","properties":{"total":{"type":"integer"},"foods":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"energy_kcal":{"type":"number"},"protein_g":{"type":"number"},"fat_g":{"type":"number"},"carbohydrates_g":{"type":"number"},"fiber_g":{"type":"number"},"food_group":{"type":"string"}}}}}},"LibrarySearchData":{"type":"object","properties":{"total":{"type":"integer"},"query":{"type":"string"},"books":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"authors":{"type":"array","items":{"type":"string"}},"year":{"type":"string"},"isbn":{"type":"string"},"publisher":{"type":"string"},"language":{"type":"string"}}}}}},"TransitDepartureSearchData":{"type":"object","properties":{"stop_name":{"type":"string"},"stop_id":{"type":"string"},"total":{"type":"integer"},"departures":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"stop_id":{"type":"string"},"stop_name":{"type":"string"},"direction":{"type":"string"},"time":{"type":"string"},"date":{"type":"string"},"track":{"type":"string"},"realtime_time":{"type":"string"},"operator":{"type":"string"}}}}}},"PoliceEventSearchData":{"type":"object","properties":{"total":{"type":"integer"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"datetime":{"type":"string"},"name":{"type":"string"},"summary":{"type":"string"},"url":{"type":"string"},"type":{"type":"string"},"location_name":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"}}}}}},"RadioChannelSearchData":{"type":"object","properties":{"total":{"type":"integer"},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"tagline":{"type":"string"},"color":{"type":"string"},"channel_type":{"type":"string"},"live_audio_url":{"type":"string"},"site_url":{"type":"string"}}}}}},"RadioProgramSearchData":{"type":"object","properties":{"total":{"type":"integer"},"programs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"channel_id":{"type":"integer"},"channel_name":{"type":"string"},"has_pod":{"type":"boolean"},"program_url":{"type":"string"}}}}}},"SickLeaveRecommendationData":{"type":"object","properties":{"id":{"type":"string"},"diagnosis_code":{"type":"string","example":"M54"},"diagnosis_title":{"type":"string"},"description":{"type":"string"},"sick_leave_recommendation":{"type":"string"},"functional_limitation":{"type":"string"},"activity_limitation":{"type":"string"},"rehabilitation_info":{"type":"string"},"prognosis":{"type":"string"},"last_updated":{"type":"string"}}},"TransportStatisticsSearchData":{"type":"object","properties":{"total":{"type":"integer"},"dataset":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}}}},"rows":{"type":"array","items":{"type":"object","additionalProperties":true}},"active_from":{"type":"string"}}}}},"TransportDatasetListData":{"type":"object","properties":{"total":{"type":"integer"},"datasets":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}}}}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"BadRequest":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"RateLimited":{"description":"Rate limit exceeded. Inspect Retry-After and error.rate_limit.scope to decide whether to back off briefly or pause until reset_at.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"CompanySourceCapacity":{"description":"Company supplier capacity is temporarily unavailable (source_capacity_unavailable). This is not a customer quota 429. Reuse cached data and retry with backoff after Retry-After; do not retry in parallel. Existing daily usage accounting still applies.","headers":{"Retry-After":{"description":"Minimum delay in seconds before retrying.","schema":{"type":"integer","example":2}},"Cache-Control":{"schema":{"type":"string","example":"no-store"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"SourceError":{"description":"Upstream government data source unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":{"type":"source_error","code":"source_unavailable","message":"DigitaltMuseum is temporarily unavailable. Try again later.","source":{"name":"digitaltmuseum","status":"unavailable","upstream_status":503},"guidance":{"action":"retry_later","message":"DigitaltMuseum did not respond successfully. Retry with backoff; Apiverket will serve cached data automatically when available.","docs_url":"https://apiverket.se/docs#errors","retry_after_seconds":300},"request_id":"req_abc123"}}}}}}},"paths":{"/v1/rates":{"get":{"operationId":"getExchangeRates","summary":"Get current exchange rates and policy rate","description":"Returns the latest EUR/SEK, USD/SEK exchange rates and the Riksbank policy rate.","tags":["Rates"],"responses":{"200":{"description":"Current exchange rates","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/ExchangeRatesData"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/rates/bonds":{"get":{"operationId":"getBondYields","summary":"Get government bond yields","description":"Returns current Swedish government bond yields (2Y, 5Y, 10Y) from Riksbanken.","tags":["Rates"],"responses":{"200":{"description":"Bond yields","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/rates/mortgage":{"get":{"operationId":"getMortgageRate","summary":"Current mortgage reference rate","description":"Returns Riksbanken's effective policy rate as a mortgage reference rate.","tags":["Mortgage Rates"],"responses":{"200":{"description":"Current mortgage reference rate","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","required":["rate","date","seriesId","description"],"properties":{"rate":{"type":"number"},"date":{"type":"string","format":"date"},"seriesId":{"type":"string"},"description":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/rates/mortgage/history":{"get":{"operationId":"getMortgageRateHistory","summary":"Get mortgage rate history","description":"Returns historical mortgage reference rate data from Riksbanken.","tags":["Mortgage Rates"],"parameters":[{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"Start date (YYYY-MM-DD)"},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"End date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Mortgage rate history","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/rates/reference":{"get":{"operationId":"getReferenceRates","summary":"Get current reference rates","description":"Returns current Riksbanken reference rates (Referensranta).","tags":["Reference Rate"],"responses":{"200":{"description":"Current reference rates","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/rates/reference/{key}":{"get":{"operationId":"getReferenceRate","summary":"Get a specific reference rate","description":"Returns a specific reference rate by key (e.g. 'referensranta').","tags":["Reference Rate"],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"},"description":"Rate key identifier"}],"responses":{"200":{"description":"Reference rate value","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/rates/reference/{key}/history":{"get":{"operationId":"getReferenceRateHistory","summary":"Get reference rate history","description":"Returns historical values for a specific reference rate.","tags":["Reference Rate"],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"},"description":"Rate key identifier"},{"name":"from","in":"query","schema":{"type":"string"},"description":"Start date (YYYY-MM-DD)"},{"name":"to","in":"query","schema":{"type":"string"},"description":"End date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Rate history","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/rates/treasury-bills":{"get":{"operationId":"getTreasuryBillRates","summary":"Get Treasury Bill rates","description":"Returns current Swedish Treasury Bill rates (1M, 3M, 6M) from Riksbanken.","tags":["Rates"],"responses":{"200":{"description":"Treasury bill rates","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/currencies":{"get":{"operationId":"listCurrencyPairs","summary":"List all available currency pairs","description":"Returns all available currency pairs with current rates.","tags":["Currencies"],"responses":{"200":{"description":"Currency pairs","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"pairs":{"type":"array","items":{"type":"object","properties":{"pair":{"type":"string"},"rate":{"type":"number"},"date":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/currencies/{pair}":{"get":{"operationId":"getCurrencyPair","summary":"Get exchange rate for a currency pair","description":"Returns the latest exchange rate for a specific currency pair from Riksbanken.","tags":["Currencies"],"parameters":[{"name":"pair","in":"path","required":true,"schema":{"type":"string"},"description":"Currency pair (e.g. GBP_SEK)","example":"GBP_SEK"}],"responses":{"200":{"description":"Currency pair rate","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/currencies/{pair}/history":{"get":{"operationId":"getCurrencyHistory","summary":"Get historical rates for a currency pair","description":"Returns historical exchange rates for the given currency pair.","tags":["Currencies"],"parameters":[{"name":"pair","in":"path","required":true,"schema":{"type":"string"},"description":"Currency pair (e.g. EUR/SEK)","example":"EUR/SEK"},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"Start date"},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"End date"}],"responses":{"200":{"description":"Historical rates","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"pair":{"type":"string"},"rates":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"rate":{"type":"number"}}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/statistics/industry/{sniCode}":{"get":{"operationId":"getIndustryStatistics","summary":"Get industry statistics by SNI code","description":"Returns enterprise count and size distribution for a given Swedish Standard Industrial Classification (SNI) code from SCB.","tags":["Statistics"],"parameters":[{"name":"sniCode","in":"path","required":true,"schema":{"type":"string"},"description":"SNI 2007 industry code (e.g. 62010 for software development)","example":"62010"}],"responses":{"200":{"description":"Industry statistics","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/IndustryStatsData"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/municipalities":{"get":{"operationId":"listMunicipalities","summary":"List all municipalities","description":"Lists all Swedish municipalities and regions from KOLADA.","tags":["Municipalities"],"parameters":[{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"minimum":1,"maximum":500},"description":"Page size"}],"responses":{"200":{"description":"Municipality list","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/municipalities/{id}":{"get":{"operationId":"getMunicipalityDetail","summary":"Municipality detail","description":"Returns detailed info for a specific municipality from Kolada.","tags":["Municipalities"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Municipality ID (e.g. 0180)","example":"0180"}],"responses":{"200":{"description":"Municipality detail","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"population":{"type":"integer"},"county":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/municipalities/{id}/kpi/{kpiId}":{"get":{"operationId":"getMunicipalityKpi","summary":"Get a KPI for a municipality","description":"Returns the latest value for a specific Kolada KPI for a given municipality. Municipality IDs are 4-digit codes (e.g. 0180 = Stockholm).","tags":["Municipalities"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Municipality code (4 digits, e.g. 0180)","example":"0180"},{"name":"kpiId","in":"path","required":true,"schema":{"type":"string"},"description":"Kolada KPI ID (e.g. N00945)","example":"N00945"}],"responses":{"200":{"description":"Municipal KPI value","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/MunicipalityKpiData"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/municipalities/kpi-groups":{"get":{"operationId":"getKpiGroups","summary":"List KPI groups","description":"Returns KPI groups (thematic groupings of KPIs) from Kolada.","tags":["Municipalities"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Search by group name"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"KPI groups","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/municipalities/kpis":{"get":{"operationId":"searchKpis","summary":"Search KPI definitions","description":"Searches for KPI definitions from KOLADA by title.","tags":["Municipalities"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"KPI name search (min 2 chars)"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":50},"description":"Page size"}],"responses":{"200":{"description":"KPI definitions","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/municipalities/municipality-groups":{"get":{"operationId":"getMunicipalityGroups","summary":"List municipality groups","description":"Returns municipality groups (e.g., SKR classification groups) from Kolada.","tags":["Municipalities"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Search by group name"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Municipality groups","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/municipalities/organizational-units":{"get":{"operationId":"getOrganizationalUnits","summary":"List organizational units","description":"Returns organizational units (regions, municipal companies, etc.) from Kolada.","tags":["Municipalities"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Search by name"},{"name":"municipality","in":"query","schema":{"type":"string"},"description":"Filter by municipality ID"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Organizational units","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/municipalities/ou-data":{"get":{"operationId":"getOuKpiData","summary":"Get KPI data for organizational units","description":"Returns KPI data for organizational units from Kolada.","tags":["Municipalities"],"parameters":[{"name":"ou","in":"query","required":true,"schema":{"type":"string"},"description":"Organizational unit ID"},{"name":"kpi","in":"query","required":true,"schema":{"type":"string"},"description":"KPI ID"},{"name":"year","in":"query","schema":{"type":"integer"},"description":"Year filter"}],"responses":{"200":{"description":"OU KPI data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/population":{"get":{"operationId":"getPopulationStats","summary":"National population statistics","description":"Returns national population statistics from SCB.","tags":["Population"],"responses":{"200":{"description":"Population data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total_population":{"type":"integer"},"year":{"type":"integer"},"change_from_previous_year":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/population/{municipalityCode}":{"get":{"operationId":"getPopulationByMunicipality","summary":"Population by municipality","description":"Returns population data for a specific municipality.","tags":["Population"],"parameters":[{"name":"municipalityCode","in":"path","required":true,"schema":{"type":"string"},"description":"Municipality code (e.g. 0180)","example":"0180"}],"responses":{"200":{"description":"Municipality population","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"municipality_code":{"type":"string"},"municipality_name":{"type":"string"},"population":{"type":"integer"},"year":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/population/pyramid":{"get":{"operationId":"getPopulationPyramid","summary":"Population pyramid by age and sex","description":"Returns population distribution by age group and sex.","tags":["Population"],"responses":{"200":{"description":"Population pyramid","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"year":{"type":"integer"},"groups":{"type":"array","items":{"type":"object","properties":{"age_group":{"type":"string"},"male":{"type":"integer"},"female":{"type":"integer"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/population/pyramid/{region}":{"get":{"operationId":"getRegionalPyramid","summary":"Get population pyramid by region","description":"Returns population pyramid (age x sex) for a specific region from SCB.","tags":["Population"],"parameters":[{"name":"region","in":"path","required":true,"schema":{"type":"string"},"description":"SCB region code (e.g. 01)"}],"responses":{"200":{"description":"Regional population pyramid","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/demographics/deso":{"get":{"operationId":"getDemographics","summary":"Get DeSO-level demographics by coordinates","description":"Returns demographic data (population, age distribution, education, foreign-born percentage) for the DeSO area at given coordinates.","tags":["Demographics"],"parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number"},"description":"Latitude","example":59.3293},{"name":"lon","in":"query","required":true,"schema":{"type":"number"},"description":"Longitude","example":18.0686}],"responses":{"200":{"description":"Demographics data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"area_name":{"type":"string"},"deso_code":{"type":"string"},"population":{"type":"integer"},"age_distribution":{"type":"array","items":{"type":"object","properties":{"range":{"type":"string"},"count":{"type":"integer"},"percentage":{"type":"number"}}}},"education_level":{"type":"array","items":{"type":"object","properties":{"level":{"type":"string"},"percentage":{"type":"number"}}}},"foreign_born_pct":{"type":"number"},"median_age":{"type":"number"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/prices/cpi":{"get":{"operationId":"getCpi","summary":"Consumer price index","description":"Returns consumer price index (CPI) data from SCB.","tags":["Prices"],"responses":{"200":{"description":"CPI data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"index":{"type":"number"},"period":{"type":"string"},"change_pct":{"type":"number"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/prices/cpi/history":{"get":{"operationId":"getCpiHistory","summary":"Get CPI history","description":"Returns Consumer Price Index time series from SCB.","tags":["Prices"],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string"},"description":"Start period (YYYY or YYYY-MM)"},{"name":"to","in":"query","required":true,"schema":{"type":"string"},"description":"End period (YYYY or YYYY-MM)"}],"responses":{"200":{"description":"CPI history","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/prices/cpif":{"get":{"operationId":"getCpif","summary":"Get current CPIF index","description":"Returns the latest CPIF (Consumer Price Index with Fixed interest rate) from SCB.","tags":["CPIF"],"responses":{"200":{"description":"Current CPIF value","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/prices/cpif/history":{"get":{"operationId":"getCpifHistory","summary":"Get CPIF history","description":"Returns historical CPIF values from SCB.","tags":["CPIF"],"parameters":[{"name":"from","in":"query","schema":{"type":"string"},"description":"Start period (e.g. 2020M01)"},{"name":"to","in":"query","schema":{"type":"string"},"description":"End period (e.g. 2026M01)"}],"responses":{"200":{"description":"CPIF history","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/prices/ppi":{"get":{"operationId":"getPpi","summary":"Producer price index","description":"Returns producer price index (PPI) data from SCB.","tags":["Prices"],"responses":{"200":{"description":"PPI data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"index":{"type":"number"},"period":{"type":"string"},"change_pct":{"type":"number"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/prices/ppi/history":{"get":{"operationId":"getPpiHistory","summary":"Get PPI history","description":"Returns Producer Price Index history from SCB.","tags":["Prices"],"parameters":[{"name":"from","in":"query","schema":{"type":"string"},"description":"Start period"},{"name":"to","in":"query","schema":{"type":"string"},"description":"End period"}],"responses":{"200":{"description":"PPI history","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/labor":{"get":{"operationId":"getLaborStats","summary":"Labor market statistics","description":"Returns labor market statistics from SCB — employment, unemployment rates.","tags":["Labor"],"responses":{"200":{"description":"Labor stats","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"employment_rate":{"type":"number"},"unemployment_rate":{"type":"number"},"period":{"type":"string"},"labor_force":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/labor/history":{"get":{"operationId":"getLaborHistory","summary":"Get labor market history","description":"Returns labor market time series (employment, unemployment) from SCB.","tags":["Labor"],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string"},"description":"Start period (YYYY or YYYY-MM)"},{"name":"to","in":"query","required":true,"schema":{"type":"string"},"description":"End period (YYYY or YYYY-MM)"}],"responses":{"200":{"description":"Labor market history","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/housing":{"get":{"operationId":"getHousingPrices","summary":"Housing price statistics","description":"Returns housing price statistics from SCB.","tags":["Housing"],"responses":{"200":{"description":"Housing prices","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"average_price_sek":{"type":"number"},"price_index":{"type":"number"},"period":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/housing/prices/{region}":{"get":{"operationId":"getRegionalHousingPrices","summary":"Get housing prices by region","description":"Returns housing prices for a specific region from SCB.","tags":["Housing"],"parameters":[{"name":"region","in":"path","required":true,"schema":{"type":"string"},"description":"SCB region code"}],"responses":{"200":{"description":"Regional housing prices","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/housing/stock":{"get":{"operationId":"getHousingStock","summary":"Housing stock data","description":"Returns housing stock data from SCB.","tags":["Housing"],"responses":{"200":{"description":"Housing stock","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total_dwellings":{"type":"integer"},"by_type":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"count":{"type":"integer"}}}},"year":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/housing/stock/{region}":{"get":{"operationId":"getRegionalHousingStock","summary":"Get housing stock by region","description":"Returns dwelling stock by type for a specific region from SCB.","tags":["Housing"],"parameters":[{"name":"region","in":"path","required":true,"schema":{"type":"string"},"description":"SCB region code"}],"responses":{"200":{"description":"Regional housing stock","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/income":{"get":{"operationId":"getIncomeStats","summary":"Income statistics","description":"Returns income statistics from SCB.","tags":["Income"],"parameters":[{"name":"year","in":"query","schema":{"type":"integer"},"description":"Filter by year"},{"name":"municipality","in":"query","schema":{"type":"string"},"description":"Filter by municipality"}],"responses":{"200":{"description":"Income stats","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"median_income_sek":{"type":"number"},"mean_income_sek":{"type":"number"},"year":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/income/{municipalityCode}":{"get":{"operationId":"getMunicipalityIncome","summary":"Get income data by municipality","description":"Returns income data for a specific municipality from SCB.","tags":["Income"],"parameters":[{"name":"municipalityCode","in":"path","required":true,"schema":{"type":"string"},"description":"SCB municipality code (e.g. 0180)"}],"responses":{"200":{"description":"Municipality income data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/trade":{"get":{"operationId":"getTradeData","summary":"Import/export trade data","description":"Returns import/export trade data from SCB.","tags":["Trade"],"parameters":[{"name":"year","in":"query","schema":{"type":"integer"},"description":"Filter by year"}],"responses":{"200":{"description":"Trade data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"exports_sek_millions":{"type":"number"},"imports_sek_millions":{"type":"number"},"trade_balance_sek_millions":{"type":"number"},"year":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/trade/partners":{"get":{"operationId":"getTradePartners","summary":"Get trade by partner country","description":"Returns Sweden's trade data broken down by partner country from SCB.","tags":["Trade"],"responses":{"200":{"description":"Trade partner data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/wages":{"get":{"operationId":"getWageStats","summary":"Wage statistics","description":"Returns wage statistics from SCB.","tags":["Wages"],"responses":{"200":{"description":"Wage stats","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"median_salary_sek":{"type":"number"},"mean_salary_sek":{"type":"number"},"year":{"type":"integer"},"by_sector":{"type":"array","items":{"type":"object","properties":{"sector":{"type":"string"},"median_sek":{"type":"number"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/wages/{industry}":{"get":{"operationId":"getWagesByIndustry","summary":"Get wages by industry","description":"Returns average monthly wages for a specific industry from SCB.","tags":["Wages"],"parameters":[{"name":"industry","in":"path","required":true,"schema":{"type":"string"},"description":"SNI 2007 industry code (e.g. J for ICT)"}],"responses":{"200":{"description":"Industry wages","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/public-finance":{"get":{"operationId":"getPublicFinanceData","summary":"Government budget/finance data","description":"Returns government budget and finance data from SCB/Ekonomistyrningsverket.","tags":["Public Finance"],"responses":{"200":{"description":"Public finance data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"revenue_sek_millions":{"type":"number"},"expenditure_sek_millions":{"type":"number"},"balance_sek_millions":{"type":"number"},"year":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/public-finance/{function}":{"get":{"operationId":"getPublicFinanceByFunction","summary":"Get spending by COFOG function","description":"Returns government spending for a specific COFOG function from SCB.","tags":["Public Finance"],"parameters":[{"name":"function","in":"path","required":true,"schema":{"type":"string"},"description":"COFOG function code (e.g. 07 for health)"}],"responses":{"200":{"description":"Function spending","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/money-supply":{"get":{"operationId":"getMoneySupply","summary":"M1/M2/M3 monetary aggregates","description":"Returns monetary aggregates (M1, M2, M3) from Riksbanken.","tags":["Money Supply"],"responses":{"200":{"description":"Money supply data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"m1":{"type":"number"},"m2":{"type":"number"},"m3":{"type":"number"},"period":{"type":"string"},"unit":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/money-supply/history":{"get":{"operationId":"getMoneySupplyHistory","summary":"Get money supply history","description":"Returns historical money supply data for a specific monetary aggregate from Riksbanken.","tags":["Money Supply"],"parameters":[{"name":"aggregate","in":"query","schema":{"type":"string","default":"M3","enum":["M1","M2","M3"]},"description":"Monetary aggregate"},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"Start date"},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"End date"}],"responses":{"200":{"description":"Money supply history","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/financial-series":{"get":{"operationId":"getFinancialSeries","summary":"Riksbanken time series","description":"Returns time series data from Riksbanken.","tags":["Financial Series"],"parameters":[{"name":"series","in":"query","required":true,"schema":{"type":"string"},"description":"Series ID"},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"Start date"},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"End date"}],"responses":{"200":{"description":"Financial series data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"series_id":{"type":"string"},"name":{"type":"string"},"values":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"value":{"type":"number"}}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/financial-series/{seriesId}":{"get":{"operationId":"getFinancialSeriesLatest","summary":"Get latest value for a series","description":"Returns the latest value for a specific Riksbanken financial data series.","tags":["Financial Series"],"parameters":[{"name":"seriesId","in":"path","required":true,"schema":{"type":"string"},"description":"Riksbanken series ID"}],"responses":{"200":{"description":"Latest series value","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/financial-series/{seriesId}/history":{"get":{"operationId":"getFinancialSeriesHistory","summary":"Get historical data for a series","description":"Returns historical data for a financial data series within a date range.","tags":["Financial Series"],"parameters":[{"name":"seriesId","in":"path","required":true,"schema":{"type":"string"},"description":"Riksbanken series ID"},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"Start date (YYYY-MM-DD)"},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"End date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Series history","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/transport/analysis/products":{"get":{"operationId":"getTransportAnalysisProducts","summary":"List transport statistics products","description":"Returns 50+ transport statistics products from Trafikanalys. Query products first, then fetch structure and data.","tags":["Transport Analysis"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Product listing","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/transport/analysis/products/{id}":{"get":{"operationId":"getTransportAnalysisProduct","summary":"Get product structure","description":"Returns the structure (dimensions, variables) of a specific transport statistics product.","tags":["Transport Analysis"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Product ID"}],"responses":{"200":{"description":"Product structure","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Product not found"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/transport/analysis/products/{id}/data":{"get":{"operationId":"getTransportAnalysisData","summary":"Get product data","description":"Retrieves data for a specific transport statistics product from Trafikanalys.","tags":["Transport Analysis"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Product ID"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Product data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Product not found"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/transport/ferries/{route}":{"get":{"operationId":"getFerryDepartures","summary":"Get ferry departures for a route","description":"Returns ferry departure data for a named route from Trafikverket.","tags":["Transport"],"parameters":[{"name":"route","in":"path","required":true,"schema":{"type":"string"},"description":"Ferry route name (e.g. Vaxholm-Rindo)"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Ferry departures","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/transport/ferry-routes":{"get":{"operationId":"getFerryRoutes","summary":"List ferry routes","description":"Returns ferry route metadata (route names, harbors) from Trafikverket.","tags":["Transport"],"parameters":[{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Ferry routes","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/transport/road-conditions":{"get":{"operationId":"getTransportRoadConditions","summary":"Get road condition reports","description":"Returns road condition data from Trafikverket, optionally filtered by region.","tags":["Transport"],"parameters":[{"name":"region","in":"query","schema":{"type":"string"},"description":"Filter by region"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Road conditions","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/transport/road-overview":{"get":{"operationId":"getRoadConditionOverview","summary":"Get county-level road overview","description":"Returns county-level road condition overview from Trafikverket.","tags":["Transport"],"parameters":[{"name":"county","in":"query","schema":{"type":"string"},"description":"County number filter"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Road overview","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/transport/statistics":{"get":{"operationId":"getTransportStatistics","summary":"Get transport statistics by dataset code","description":"Returns transport statistics from Trafikanalys for a given dataset code. Use the /datasets endpoint to discover available datasets.","tags":["Transport Statistics"],"parameters":[{"name":"dataset","in":"query","required":true,"schema":{"type":"string"},"description":"Dataset code (e.g. t10011 for bus statistics)","example":"t10011"}],"responses":{"200":{"description":"Transport statistics","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/TransportStatisticsSearchData"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/transport/statistics/datasets":{"get":{"operationId":"listTransportDatasets","summary":"List available transport datasets","description":"Returns a list of available transport statistics datasets from Trafikanalys with their codes and descriptions.","tags":["Transport Statistics"],"responses":{"200":{"description":"Available datasets","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/TransportDatasetListData"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/transport/traffic":{"get":{"operationId":"getTrafficSituations","summary":"Get traffic situations","description":"Returns live Trafikverket Datex II traffic situations for traffic messages, accidents and road work. Use type=olycka, type=vägarbete or type=hinder for supported Datex categories. For local views, provide lat, lon and radius_km together to filter on Datex coordinates, for example around Sundbyberg: lat=59.3613&lon=17.9711&radius_km=10. Records without coordinates are excluded when radius filtering is used. The region parameter is accepted for compatibility but is not a verified Datex live filter. For a simpler Sveriges Radio-based fallback for general local traffic information, use /v1/traffic/messages; for train disruptions use /v1/transport/train-messages.","tags":["Transport"],"parameters":[{"name":"type","in":"query","schema":{"type":"string"},"description":"Filter by supported Datex situation type: olycka, vägarbete or hinder"},{"name":"region","in":"query","schema":{"type":"string"},"description":"Accepted for compatibility; not a verified Datex live filter. Prefer lat, lon and radius_km for local traffic filtering."},{"name":"lat","in":"query","schema":{"type":"number","minimum":55,"maximum":70},"description":"Latitude for local radius filtering. Must be provided with lon and radius_km."},{"name":"lon","in":"query","schema":{"type":"number","minimum":10,"maximum":25},"description":"Longitude for local radius filtering. Must be provided with lat and radius_km."},{"name":"radius_km","in":"query","schema":{"type":"number","minimum":1,"maximum":100},"description":"Radius in kilometers for local traffic filtering. Must be provided with lat and lon."},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Traffic situations","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/transport/train-messages":{"get":{"operationId":"getTrainMessages","summary":"Get train disruption messages","description":"Returns train disruption messages from Trafikverket.","tags":["Transport"],"parameters":[{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Train messages","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/transport/stations":{"get":{"operationId":"searchTrainStations","summary":"List or search Trafikverket train stations","description":"Returns advertised Trafikverket train stations with canonical signatures and official names. Use the selected signature with the train departures endpoint.","tags":["Transport"],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":2,"maxLength":100},"description":"Optional station name or signature search term.","example":"central"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"minimum":0,"maximum":10000},"description":"Pagination offset."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size."}],"responses":{"200":{"description":"Canonical Trafikverket station directory","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/TrainStationSearchData"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/transport/trains/{station}":{"get":{"operationId":"getTrainDepartures","summary":"Get train departures and arrivals","description":"Returns upcoming train departures and arrivals for a station. Uses Trafikverket's API with real-time data.","tags":["Transport"],"parameters":[{"name":"station","in":"path","required":true,"schema":{"type":"string"},"description":"Trafikverket station signature or exact official station name","example":"Cst"}],"responses":{"200":{"description":"Train schedule","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/TrainStationData"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/infrastructure/bridges":{"get":{"operationId":"getBridges","summary":"Bridges","description":"Returns bridge data from Trafikverket.","tags":["Infrastructure"],"responses":{"200":{"description":"Bridges","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"bridges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"road_number":{"type":"string"},"county":{"type":"string"},"length_m":{"type":"number"},"year_built":{"type":"integer"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/infrastructure/cameras":{"get":{"operationId":"getTrafficCameras","summary":"Traffic cameras","description":"Returns traffic camera locations and info from Trafikverket.","tags":["Infrastructure"],"responses":{"200":{"description":"Traffic cameras","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"cameras":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"road_number":{"type":"string"},"county":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/infrastructure/ev-chargers":{"get":{"operationId":"getEvChargers","summary":"EV charging stations","description":"Returns nearby EV charging stations from Trafikverket/Nobil.","tags":["Infrastructure"],"parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number"},"description":"Latitude"},{"name":"lon","in":"query","required":true,"schema":{"type":"number"},"description":"Longitude"}],"responses":{"200":{"description":"EV chargers","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"chargers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"operator":{"type":"string"},"connector_types":{"type":"array","items":{"type":"string"}}}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/infrastructure/fuel-stations":{"get":{"operationId":"getFuelStations","summary":"Fuel stations","description":"Returns fuel station data from Trafikverket.","tags":["Infrastructure"],"responses":{"200":{"description":"Fuel stations","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"stations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"fuel_types":{"type":"array","items":{"type":"string"}}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/infrastructure/parking":{"get":{"operationId":"getParkingAreas","summary":"Parking areas","description":"Returns nearby parking areas from Trafikverket.","tags":["Infrastructure"],"parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number"},"description":"Latitude"},{"name":"lon","in":"query","required":true,"schema":{"type":"number"},"description":"Longitude"}],"responses":{"200":{"description":"Parking areas","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"areas":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"capacity":{"type":"integer"}}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/infrastructure/pavement":{"get":{"operationId":"getPavementCondition","summary":"Road pavement condition","description":"Returns road pavement condition data from Trafikverket.","tags":["Infrastructure"],"parameters":[{"name":"county","in":"query","schema":{"type":"string"},"description":"Filter by county number"},{"name":"road","in":"query","schema":{"type":"string"},"description":"Filter by road number (e.g. E4)"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Pavement condition","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"segments":{"type":"array","items":{"type":"object","properties":{"road_number":{"type":"string"},"county":{"type":"string"},"surface_type":{"type":"string"},"condition":{"type":"string"},"year_measured":{"type":"integer"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/infrastructure/rail-crossings":{"get":{"operationId":"getRailCrossings","summary":"Rail crossings","description":"Returns railroad crossing data from Trafikverket.","tags":["Infrastructure"],"parameters":[{"name":"county","in":"query","schema":{"type":"string"},"description":"Filter by county number"},{"name":"road","in":"query","schema":{"type":"string"},"description":"Filter by road number (e.g. E4)"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Rail crossings","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"crossings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"protection_type":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/infrastructure/rest-areas":{"get":{"operationId":"getRestAreas","summary":"Rest areas","description":"Returns rest area data from Trafikverket.","tags":["Infrastructure"],"responses":{"200":{"description":"Rest areas","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"areas":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"facilities":{"type":"array","items":{"type":"string"}}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/infrastructure/speed-limits":{"get":{"operationId":"getSpeedLimits","summary":"Speed limit zones","description":"Returns speed limit zone data from Trafikverket.","tags":["Infrastructure"],"parameters":[{"name":"county","in":"query","schema":{"type":"string"},"description":"Filter by county number"},{"name":"road","in":"query","schema":{"type":"string"},"description":"Filter by road number (e.g. E4)"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Speed limits","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"zones":{"type":"array","items":{"type":"object","properties":{"road_number":{"type":"string"},"county":{"type":"string"},"speed_limit_kmh":{"type":"integer"},"from_km":{"type":"number"},"to_km":{"type":"number"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/infrastructure/traffic-flow":{"get":{"operationId":"getTrafficFlow","summary":"Traffic flow data","description":"Returns TrafficFlow detector rates in vehicles/hour and average speed. vehicle_count and road_number are not provided in live mode.","tags":["Infrastructure"],"parameters":[{"name":"county","in":"query","schema":{"type":"string"},"description":"Filter by county number"},{"name":"road","in":"query","schema":{"type":"string"},"description":"Sandbox only. Live road filtering returns 400; use county."},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Traffic flow","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"measurements":{"type":"array","items":{"type":"object","properties":{"station_id":{"type":"string"},"road_number":{"type":"string"},"vehicles_per_hour":{"type":"integer"},"avg_speed_kmh":{"type":"number"},"timestamp":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/infrastructure/travel-times":{"get":{"operationId":"getTravelTimes","summary":"Travel time routes","description":"Returns travel time data for monitored road segments from Trafikverket.","tags":["Infrastructure"],"parameters":[{"name":"county","in":"query","schema":{"type":"string"},"description":"Filter by county number"},{"name":"road","in":"query","schema":{"type":"string"},"description":"Filter by road number (e.g. E4)"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Travel times","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"routes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"expected_minutes":{"type":"number"},"current_minutes":{"type":"number"},"status":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/transit/departures":{"get":{"operationId":"getTransitDepartures","summary":"Get public transport departures","description":"Returns upcoming departures from a public transport stop via ResRobot. Includes buses, trains, trams, and ferries.","tags":["Transit"],"parameters":[{"name":"stop","in":"query","required":true,"schema":{"type":"string"},"description":"Stop name or ID","example":"Stockholm City"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"minimum":1,"maximum":100},"description":"Max results to return"}],"responses":{"200":{"description":"Transit departures","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/TransitDepartureSearchData"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/transit/nearby":{"get":{"operationId":"getNearbyStops","summary":"Find nearby transit stops","description":"Finds public transit stops near a geographic coordinate in Sweden.","tags":["Transit"],"parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number","minimum":55,"maximum":70},"description":"Latitude"},{"name":"lon","in":"query","required":true,"schema":{"type":"number","minimum":10,"maximum":25},"description":"Longitude"},{"name":"radius","in":"query","schema":{"type":"integer","default":1000,"maximum":5000},"description":"Search radius in meters"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"minimum":1,"maximum":50},"description":"Max results"}],"responses":{"200":{"description":"Nearby stops","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/transit/stops/search":{"get":{"operationId":"searchTransitStops","summary":"Search transit stops by name","description":"Searches for Swedish public transit stops by name.","tags":["Transit"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Stop name search (min 2 chars)"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"minimum":1,"maximum":50},"description":"Max results"}],"responses":{"200":{"description":"Stop search results","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/transit/trip":{"get":{"operationId":"planTrip","summary":"Plan a transit trip","description":"Plans a trip between two Swedish public transit stops via ResRobot/Trafiklab.","tags":["Transit"],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string"},"description":"Origin stop ID"},{"name":"to","in":"query","required":true,"schema":{"type":"string"},"description":"Destination stop ID"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":5,"minimum":1,"maximum":10},"description":"Max results"}],"responses":{"200":{"description":"Trip plan","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/road-conditions":{"get":{"operationId":"getRoadConditions","summary":"Road condition reports","description":"Returns road condition reports from Trafikverket.","tags":["Road Conditions"],"parameters":[{"name":"region","in":"query","schema":{"type":"string"},"description":"Filter by region"}],"responses":{"200":{"description":"Road conditions","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"conditions":{"type":"array","items":{"type":"object","properties":{"road":{"type":"string"},"region":{"type":"string"},"condition":{"type":"string"},"warning":{"type":"string"},"updated":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/weather/{city}":{"get":{"operationId":"getWeather","summary":"Get current weather for a Swedish city","description":"Returns the latest weather observation from the nearest SMHI station for the given city.","tags":["Weather"],"parameters":[{"name":"city","in":"path","required":true,"schema":{"type":"string"},"description":"Swedish city name (e.g. stockholm, gothenburg, malmö)","example":"stockholm"}],"responses":{"200":{"description":"Current weather observation","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/WeatherData"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/weather/{city}/forecast":{"get":{"operationId":"getWeatherForecast","summary":"Get weather forecast for a city","description":"Returns weather forecast for a Swedish city from SMHI.","tags":["Weather"],"parameters":[{"name":"city","in":"path","required":true,"schema":{"type":"string"},"description":"Swedish city name","example":"stockholm"}],"responses":{"200":{"description":"Weather forecast","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/weather/climate/precipitation":{"get":{"operationId":"getClimatePrecipitation","summary":"Get historical precipitation data","description":"Returns historical average annual precipitation by decade for Sweden.","tags":["Climate"],"responses":{"200":{"description":"Climate precipitation data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"decades":{"type":"array","items":{"type":"object","properties":{"decade":{"type":"string"},"avg_precipitation_mm":{"type":"number"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/weather/climate/temperature":{"get":{"operationId":"getClimateTemperature","summary":"Get historical temperature data","description":"Returns historical average temperature by decade for Sweden (1900s-2020s).","tags":["Climate"],"responses":{"200":{"description":"Climate temperature data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"decades":{"type":"array","items":{"type":"object","properties":{"decade":{"type":"string"},"avg_temp_c":{"type":"number"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/weather/lightning/recent":{"get":{"operationId":"getRecentLightning","summary":"Get recent lightning strikes","description":"Returns lightning strikes from the last 24 hours across Sweden from SMHI.","tags":["Weather"],"parameters":[{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Recent lightning strikes","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"strikes":{"type":"array","items":{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"timestamp":{"type":"string"},"intensity_ka":{"type":"number"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/weather/lightning/summary":{"get":{"operationId":"getLightningSummary","summary":"Get lightning statistics summary","description":"Returns monthly lightning statistics for Sweden from SMHI.","tags":["Weather"],"parameters":[{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Lightning summary","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"months":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"strike_count":{"type":"integer"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/weather/observations/{paramId}/latest":{"get":{"operationId":"getAllLatestReadings","summary":"All latest readings","description":"Returns the latest readings from all stations for a given parameter.","tags":["Observations"],"parameters":[{"name":"paramId","in":"path","required":true,"schema":{"type":"integer"},"description":"Parameter ID"}],"responses":{"200":{"description":"Latest readings","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"parameter_id":{"type":"integer"},"readings":{"type":"array","items":{"type":"object","properties":{"station_id":{"type":"integer"},"station_name":{"type":"string"},"value":{"type":"number"},"timestamp":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/weather/observations/{paramId}/stations":{"get":{"operationId":"getStationsForParameter","summary":"Stations for parameter","description":"Returns stations that measure a specific SMHI observation parameter.","tags":["Observations"],"parameters":[{"name":"paramId","in":"path","required":true,"schema":{"type":"integer"},"description":"Parameter ID"}],"responses":{"200":{"description":"Stations for parameter","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"parameter_id":{"type":"integer"},"stations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/weather/observations/{paramId}/stations/{stationId}":{"get":{"operationId":"getSingleStationReading","summary":"Single station reading","description":"Returns the latest reading from a specific station for a given parameter.","tags":["Observations"],"parameters":[{"name":"paramId","in":"path","required":true,"schema":{"type":"integer"},"description":"Parameter ID"},{"name":"stationId","in":"path","required":true,"schema":{"type":"integer"},"description":"Station ID"}],"responses":{"200":{"description":"Station reading","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"parameter_id":{"type":"integer"},"station_id":{"type":"integer"},"station_name":{"type":"string"},"value":{"type":"number"},"unit":{"type":"string"},"timestamp":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/weather/observations/parameters":{"get":{"operationId":"listObservationParameters","summary":"List observation parameters","description":"Returns all available SMHI observation parameters.","tags":["Observations"],"responses":{"200":{"description":"Observation parameters","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"parameters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"unit":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/weather/radar":{"get":{"operationId":"getWeatherRadar","summary":"Get current weather radar","description":"Returns the latest weather radar composite image/data from SMHI.","tags":["Radar"],"parameters":[{"name":"format","in":"query","schema":{"type":"string","enum":["png","json"],"default":"json"},"description":"Response format"}],"responses":{"200":{"description":"Radar data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/weather/radar/history":{"get":{"operationId":"getWeatherRadarHistory","summary":"Get historical radar images","description":"Returns historical weather radar data from SMHI for a given time range.","tags":["Radar"],"parameters":[{"name":"from","in":"query","schema":{"type":"string"},"description":"Start time (ISO 8601)"},{"name":"to","in":"query","schema":{"type":"string"},"description":"End time (ISO 8601)"},{"name":"interval","in":"query","schema":{"type":"integer","default":15},"description":"Interval in minutes between frames"}],"responses":{"200":{"description":"Historical radar data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/weather/rainfall/current":{"get":{"operationId":"getCurrentRainfall","summary":"Get current rainfall data","description":"Returns latest rainfall (precipitation) data for all SMHI stations.","tags":["Weather"],"parameters":[{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Rainfall data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"stations":{"type":"array","items":{"type":"object","properties":{"station":{"type":"string"},"rainfall_mm":{"type":"number"},"period":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/weather/rainfall/stations/{id}":{"get":{"operationId":"getStationRainfall","summary":"Get rainfall for a specific station","description":"Returns rainfall data for a specific SMHI station.","tags":["Weather"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"SMHI station ID"}],"responses":{"200":{"description":"Station rainfall data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"station_id":{"type":"string"},"station_name":{"type":"string"},"rainfall_mm":{"type":"number"},"measured_at":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/weather/road/stations":{"get":{"operationId":"listRoadWeatherStations","summary":"List road weather stations","description":"Returns all road weather measurement stations from Trafikverket.","tags":["Weather"],"parameters":[{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Road weather stations","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"stations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"road_temp_c":{"type":"number"},"air_temp_c":{"type":"number"},"precipitation":{"type":"string"},"wind_speed_ms":{"type":"number"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/weather/road/stations/{id}":{"get":{"operationId":"getRoadWeatherStation","summary":"Get road weather for a station","description":"Returns readings for a specific road weather station from Trafikverket.","tags":["Weather"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Station ID"}],"responses":{"200":{"description":"Road weather station data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"station_id":{"type":"string"},"station_name":{"type":"string"},"road_temp_c":{"type":"number"},"air_temp_c":{"type":"number"},"precipitation":{"type":"string"},"wind_speed_ms":{"type":"number"},"measured_at":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/weather/warnings":{"get":{"operationId":"getWeatherWarnings","summary":"Get current weather warnings","description":"Returns current weather warnings from SMHI.","tags":["Weather"],"parameters":[{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"minimum":1,"maximum":200},"description":"Page size"}],"responses":{"200":{"description":"Weather warnings","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/air-quality/current":{"get":{"operationId":"getCurrentAirQuality","summary":"Get nearest station readings","description":"Returns current air quality readings from the nearest monitoring station to the given coordinates.","tags":["Air Quality"],"parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number"},"description":"Latitude"},{"name":"lon","in":"query","required":true,"schema":{"type":"number"},"description":"Longitude"}],"responses":{"200":{"description":"Current air quality","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"station":{"type":"string"},"readings":{"type":"array","items":{"type":"object","properties":{"parameter":{"type":"string"},"value":{"type":"number"},"unit":{"type":"string"},"timestamp":{"type":"string"}}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/air-quality/stations":{"get":{"operationId":"listAirQualityStations","summary":"List air quality monitoring stations","description":"Returns a list of air quality monitoring stations across Sweden.","tags":["Air Quality"],"responses":{"200":{"description":"Air quality stations","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"stations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"city":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/air-quality/stations/{stationId}":{"get":{"operationId":"getAirQualityStationReadings","summary":"Get readings for a station","description":"Returns latest air quality readings for a specific monitoring station.","tags":["Air Quality"],"parameters":[{"name":"stationId","in":"path","required":true,"schema":{"type":"string"},"description":"Station ID"}],"responses":{"200":{"description":"Station readings","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/pollen/forecast":{"get":{"operationId":"getPollenForecast","summary":"Get pollen forecast","description":"Returns current pollen forecast for Sweden.","tags":["Pollen"],"responses":{"200":{"description":"Pollen forecast","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"regions":{"type":"array","items":{"type":"object","properties":{"region":{"type":"string"},"date":{"type":"string"},"pollen_types":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"level":{"type":"string"},"description":{"type":"string"}}}}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/pollen/forecast/{type}":{"get":{"operationId":"getPollenForecastByType","summary":"Get pollen forecast by type","description":"Returns pollen forecast for a specific pollen type from SMHI.","tags":["Pollen"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"},"description":"Pollen type (e.g. birch, grass)"}],"responses":{"200":{"description":"Pollen forecast by type","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/social-insurance/child-allowance":{"get":{"operationId":"getChildAllowanceStats","summary":"Child allowance statistics","description":"Returns child allowance (barnbidrag) statistics from Försäkringskassan.","tags":["Child Allowance"],"responses":{"200":{"description":"Child allowance stats","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total_recipients":{"type":"integer"},"total_amount_sek":{"type":"number"},"year":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/social-insurance/disability":{"get":{"operationId":"getDisabilityStats","summary":"Disability benefit statistics","description":"Returns disability benefit (aktivitetsersättning/sjukersättning) statistics from Försäkringskassan.","tags":["Disability"],"responses":{"200":{"description":"Disability stats","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total_recipients":{"type":"integer"},"year":{"type":"integer"},"by_type":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"count":{"type":"integer"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/social-insurance/housing-allowance":{"get":{"operationId":"getHousingAllowanceStats","summary":"Housing allowance statistics","description":"Returns housing allowance (bostadsbidrag) statistics from Försäkringskassan.","tags":["Housing Allowance"],"responses":{"200":{"description":"Housing allowance stats","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total_recipients":{"type":"integer"},"total_amount_sek":{"type":"number"},"year":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/social-insurance/pension":{"get":{"operationId":"getPensionStats","summary":"Pension statistics","description":"Returns pension statistics from Försäkringskassan.","tags":["Pension"],"responses":{"200":{"description":"Pension stats","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total_recipients":{"type":"integer"},"average_amount_sek":{"type":"number"},"year":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/social-insurance/rehabilitation":{"get":{"operationId":"getRehabilitationStats","summary":"Rehabilitation statistics","description":"Returns rehabilitation (rehabiliteringspenning) statistics from Försäkringskassan.","tags":["Rehabilitation"],"responses":{"200":{"description":"Rehabilitation stats","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total_cases":{"type":"integer"},"year":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/social-insurance/sick-leave-stats":{"get":{"operationId":"getSickLeaveStats","summary":"Get stress-related sick leave statistics","description":"Returns F43 (stress-related) sick leave statistics from Försäkringskassan, optionally filtered by year or municipality.","tags":["Social Insurance"],"parameters":[{"name":"year","in":"query","schema":{"type":"integer"},"description":"Filter by year","example":2024},{"name":"municipality","in":"query","schema":{"type":"string"},"description":"Filter by municipality name","example":"Stockholm"}],"responses":{"200":{"description":"Sick leave statistics","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"rows":{"type":"array","items":{"type":"object","properties":{"year":{"type":"integer"},"quarter":{"type":"integer"},"county":{"type":"string"},"municipality":{"type":"string"},"total_cases":{"type":"integer"},"total_percentage":{"type":"number"},"female_cases":{"type":"integer"},"male_cases":{"type":"integer"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/social-insurance/work-injury":{"get":{"operationId":"getWorkInjuryStats","summary":"Work injury statistics","description":"Returns work injury (arbetsskadeförsäkring) statistics from Försäkringskassan.","tags":["Work Injury"],"responses":{"200":{"description":"Work injury stats","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total_cases":{"type":"integer"},"year":{"type":"integer"},"by_category":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"count":{"type":"integer"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/health/diagnoses/{code}":{"get":{"operationId":"getDiagnosisGuidance","summary":"Get diagnosis guidance by ICD-10 code","description":"Returns Socialstyrelsen's recommended sick leave guidance for a given ICD-10 diagnosis code.","tags":["Health"],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"},"description":"ICD-10 diagnosis code (e.g. M54, F32)","example":"M54"}],"responses":{"200":{"description":"Diagnosis guidance","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/DiagnosisGuidanceData"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/health/mortality":{"get":{"operationId":"getMortalityStats","summary":"Mortality statistics","description":"Returns mortality statistics from Socialstyrelsen.","tags":["Health"],"responses":{"200":{"description":"Mortality stats","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total_deaths":{"type":"integer"},"year":{"type":"integer"},"by_cause":{"type":"array","items":{"type":"object","properties":{"cause":{"type":"string"},"count":{"type":"integer"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/health/mortality/{causeCode}":{"get":{"operationId":"getMortalityByCause","summary":"Get mortality by cause","description":"Returns mortality data for a specific cause of death from SCB.","tags":["Health"],"parameters":[{"name":"causeCode","in":"path","required":true,"schema":{"type":"string"},"description":"ICD chapter code (e.g. IX)"}],"responses":{"200":{"description":"Cause-specific mortality","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/health/sick-leave-full":{"get":{"operationId":"getFullSickLeaveData","summary":"Full sick leave data by diagnosis","description":"Returns comprehensive sick leave data broken down by diagnosis from Försäkringskassan.","tags":["Health"],"responses":{"200":{"description":"Full sick leave data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total_cases":{"type":"integer"},"by_diagnosis":{"type":"array","items":{"type":"object","properties":{"diagnosis_code":{"type":"string"},"diagnosis_name":{"type":"string"},"cases":{"type":"integer"},"avg_days":{"type":"number"}}}},"year":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/health/sick-leave/{code}":{"get":{"operationId":"getSickLeaveRecommendation","summary":"Get sick leave recommendation by ICD-10 code","description":"Returns Socialstyrelsen FMB's insurance medicine recommendation for a given ICD-10 code, including functional limitations, activity limitations, and prognosis.","tags":["Health"],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"},"description":"ICD-10 diagnosis code (e.g. M54, F32, J06)","example":"M54"}],"responses":{"200":{"description":"Sick leave recommendation","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/SickLeaveRecommendationData"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/healthcare/care-quality":{"get":{"operationId":"getCareQuality","summary":"Care quality indicators","description":"Returns care quality (öppna jämförelser) indicators.","tags":["Healthcare"],"responses":{"200":{"description":"Care quality","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"indicators":{"type":"array","items":{"type":"object","properties":{"indicator":{"type":"string"},"region":{"type":"string"},"value":{"type":"number"},"year":{"type":"integer"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/healthcare/care-quality/{region}":{"get":{"operationId":"getRegionalCareQuality","summary":"Get care quality by region","description":"Returns care quality indicators for a specific region.","tags":["Healthcare"],"parameters":[{"name":"region","in":"path","required":true,"schema":{"type":"string"},"description":"Region name"}],"responses":{"200":{"description":"Regional care quality","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/healthcare/disease-registers":{"get":{"operationId":"getDiseaseRegisters","summary":"Disease register data","description":"Returns data from national disease/quality registers.","tags":["Healthcare"],"responses":{"200":{"description":"Disease register data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"registers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"entries":{"type":"integer"},"latest_year":{"type":"integer"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/healthcare/disease-registers/cancer":{"get":{"operationId":"getCancerStats","summary":"Get cancer incidence statistics","description":"Returns cancer incidence statistics from Socialstyrelsen.","tags":["Healthcare"],"responses":{"200":{"description":"Cancer statistics","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/healthcare/disease-registers/cancer/{type}":{"get":{"operationId":"getCancerTypeStats","summary":"Get cancer stats by type","description":"Returns cancer incidence statistics for a specific cancer type.","tags":["Healthcare"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"},"description":"Cancer type (e.g. breast, prostate, lung)"}],"responses":{"200":{"description":"Cancer type statistics","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/healthcare/wait-times":{"get":{"operationId":"getHealthcareWaitTimes","summary":"Healthcare wait times","description":"Returns healthcare wait times (vårdgaranti) data.","tags":["Healthcare"],"responses":{"200":{"description":"Wait times","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"regions":{"type":"array","items":{"type":"object","properties":{"region":{"type":"string"},"specialty":{"type":"string"},"median_wait_days":{"type":"integer"},"within_guarantee_pct":{"type":"number"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/healthcare/wait-times/{region}":{"get":{"operationId":"getRegionalWaitTimes","summary":"Get wait times by region","description":"Returns wait times for medical procedures in a specific healthcare region.","tags":["Healthcare"],"parameters":[{"name":"region","in":"path","required":true,"schema":{"type":"string"},"description":"Region name (e.g. Stockholm)"}],"responses":{"200":{"description":"Regional wait times","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/schools/{code}":{"get":{"operationId":"getSchool","summary":"Get school details by code","description":"Returns detailed information about a specific school unit identified by its Skolverket code.","tags":["Education"],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"},"description":"Skolverket school unit code","example":"10000001"}],"responses":{"200":{"description":"School details","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/SchoolData"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/schools/grades":{"get":{"operationId":"getSchoolGrades","summary":"Get school grades by municipality","description":"Returns school grade and merit data for a municipality.","tags":["Education"],"parameters":[{"name":"municipality","in":"query","required":true,"schema":{"type":"string"},"description":"Municipality name (min 2 chars)"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":50},"description":"Page size"}],"responses":{"200":{"description":"School grades","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/schools/search":{"get":{"operationId":"searchSchools","summary":"Search Swedish schools","description":"Search schools by name via Skolverket. Returns school code, name, type, municipality, and principal.","tags":["Education"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"School name to search for (min 2 characters)","example":"Stockholm"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"minimum":1,"maximum":100},"description":"Max results to return"}],"responses":{"200":{"description":"School search results","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/SchoolSearchData"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/education":{"get":{"operationId":"getEducationStats","summary":"Education statistics","description":"Returns education statistics from SCB.","tags":["Education Statistics"],"responses":{"200":{"description":"Education stats","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total_students":{"type":"integer"},"graduation_rate_pct":{"type":"number"},"year":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/education/{municipalityCode}":{"get":{"operationId":"getEducationByMunicipality","summary":"Education by municipality","description":"Returns education statistics for a specific municipality.","tags":["Education Statistics"],"parameters":[{"name":"municipalityCode","in":"path","required":true,"schema":{"type":"string"},"description":"Municipality code","example":"0180"}],"responses":{"200":{"description":"Municipality education stats","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"municipality_code":{"type":"string"},"municipality_name":{"type":"string"},"total_students":{"type":"integer"},"graduation_rate_pct":{"type":"number"},"year":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/education/match/autocomplete":{"get":{"operationId":"autocompleteEducationMatch","summary":"Autocomplete for education/occupation names","description":"Returns autocomplete suggestions for education or occupation names.","tags":["Education Match"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Partial search term"},{"name":"type","in":"query","schema":{"type":"string","enum":["education","occupation"]},"description":"Limit to education or occupation suggestions"}],"responses":{"200":{"description":"Autocomplete suggestions","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/education/match/by-education":{"get":{"operationId":"matchByEducation","summary":"Match occupations by education","description":"Returns occupations that match a given education SUSA ID from JobEd Connect.","tags":["Education Match"],"parameters":[{"name":"education_id","in":"query","required":true,"schema":{"type":"string"},"description":"Education SUSA ID"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Matching occupations","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/education/match/by-education-code":{"get":{"operationId":"matchByEducationCode","summary":"Match occupations by SUN education code","description":"Returns occupations that match a given SUN education code from JobEd Connect.","tags":["Education Match"],"parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string"},"description":"SUN education code"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Matching occupations","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/education/match/by-occupation":{"get":{"operationId":"matchByOccupation","summary":"Match educations by occupation","description":"Returns educations that match a given occupation ID from JobEd Connect.","tags":["Education Match"],"parameters":[{"name":"occupation_id","in":"query","required":true,"schema":{"type":"string"},"description":"Occupation ID (SSYK)"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Matching educations","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/education/match/educations":{"get":{"operationId":"getMatchEducations","summary":"List educations for matching","description":"Returns a list of educations available for occupation matching.","tags":["Education Match"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Search query"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Education list","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/education/match/educations/{id}":{"get":{"operationId":"getMatchEducation","summary":"Get a specific education","description":"Returns details of a specific education program by ID.","tags":["Education Match"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Education ID"}],"responses":{"200":{"description":"Education details","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/education/match/enriched-occupation":{"get":{"operationId":"getEnrichedOccupation","summary":"Get enriched occupation details","description":"Returns enriched occupation details including competencies and related educations from JobEd Connect.","tags":["Education Match"],"parameters":[{"name":"occupation_id","in":"query","required":true,"schema":{"type":"string"},"description":"Occupation ID (SSYK)"}],"responses":{"200":{"description":"Enriched occupation","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/education/match/match":{"get":{"operationId":"matchEducationToOccupation","summary":"Match education to occupations","description":"Returns occupations that match a given education, or educations that match a given occupation.","tags":["Education Match"],"parameters":[{"name":"education_id","in":"query","schema":{"type":"string"},"description":"Education ID to match against"},{"name":"occupation_id","in":"query","schema":{"type":"string"},"description":"Occupation ID to match against"}],"responses":{"200":{"description":"Match results","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/education/match/occupations":{"get":{"operationId":"getMatchOccupations","summary":"List occupations for matching","description":"Returns a list of occupations available for education matching.","tags":["Education Match"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Search query"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Occupation list","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/qualifications":{"get":{"operationId":"listQualifications","summary":"List professional qualifications","description":"Lists Swedish professional qualifications and certifications from the MYH Kvalifikationsdatabasen. Includes vocational qualifications, industry certifications, and competence proofs.","tags":["Qualifications"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Text search filter (name, organization, type)"}],"responses":{"200":{"description":"Qualification list","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"qualifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"organization":{"type":"string"},"level_seqf":{"type":"integer"},"decision_date":{"type":"string"},"status":{"type":"string"},"type":{"type":"string"},"proof_type":{"type":"string"}}}},"total":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/qualifications/{id}":{"get":{"operationId":"getQualificationDetail","summary":"Get qualification details","description":"Returns detailed information about a specific qualification, including learning outcomes, EQF/SeQF levels, occupation codes, and validity period.","tags":["Qualifications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Qualification UUID"}],"responses":{"200":{"description":"Qualification detail","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"qualification":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"organization":{"type":"string"},"level_seqf":{"type":"integer"},"level_eqf":{"type":"string"},"decision_date":{"type":"string"},"valid_until":{"type":"string"},"status":{"type":"string"},"type":{"type":"string"},"proof_type":{"type":"string"},"scope_unit":{"type":"string"},"scope":{"type":"integer"},"occupation_area":{"type":"string"},"occupation_code":{"type":"string"},"occupation_text":{"type":"string"},"learning_outcomes_knowledge":{"type":"string"},"learning_outcomes_skills":{"type":"string"}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/parliament/bills":{"get":{"operationId":"getParliamentBills","summary":"Legislative bills","description":"Returns legislative bills (propositioner) from Riksdagen.","tags":["Parliament"],"responses":{"200":{"description":"Bills","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"bills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"date":{"type":"string"},"status":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/parliament/bills/{id}":{"get":{"operationId":"getBillById","summary":"Get bill details","description":"Returns a single government bill (proposition) with full detail and status tracking from Riksdagen.","tags":["Parliament"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Bill identifier"}],"responses":{"200":{"description":"Bill details","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/parliament/calendar":{"get":{"operationId":"getParliamentCalendar","summary":"Get parliament calendar events","description":"Returns parliament calendar events (debates, votes) from Riksdagen.","tags":["Parliament"],"parameters":[{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"Start date (YYYY-MM-DD)"},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"End date (YYYY-MM-DD)"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":50},"description":"Page size"}],"responses":{"200":{"description":"Calendar events","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/parliament/committees":{"get":{"operationId":"getParliamentCommittees","summary":"Parliament committees","description":"Returns a list of parliament committees from Riksdagen.","tags":["Parliament"],"responses":{"200":{"description":"Committees","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"committees":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/parliament/committees/{id}":{"get":{"operationId":"getCommitteeDetail","summary":"Get committee details","description":"Returns committee details with members from Riksdagen.","tags":["Parliament"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Committee identifier"}],"responses":{"200":{"description":"Committee details","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/parliament/documents":{"get":{"operationId":"getParliamentDocuments","summary":"Search parliament documents","description":"Search Riksdag documents (motioner, propositioner, etc.) by type and session.","tags":["Parliament"],"parameters":[{"name":"type","in":"query","schema":{"type":"string"},"description":"Document type (e.g. mot = motion, prop = proposition)","example":"mot"},{"name":"session","in":"query","schema":{"type":"string"},"description":"Parliamentary session (e.g. 2024/25)","example":"2024/25"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"minimum":1,"maximum":100},"description":"Max results to return"}],"responses":{"200":{"description":"Parliament documents","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/ParliamentDocumentSearchData"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/parliament/interpellations":{"get":{"operationId":"getInterpellations","summary":"Interpellations search","description":"Searches interpellations in the Riksdagen.","tags":["Parliament"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Search query"}],"responses":{"200":{"description":"Interpellations","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"date":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/parliament/members":{"get":{"operationId":"getParliamentMembers","summary":"Search parliament members","description":"Returns current members of the Swedish Riksdag. Filter by political party.","tags":["Parliament"],"parameters":[{"name":"party","in":"query","schema":{"type":"string"},"description":"Party abbreviation (e.g. S, M, SD, C, V, KD, L, MP)","example":"S"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":349},"description":"Max results to return"}],"responses":{"200":{"description":"Parliament members","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/ParliamentMemberSearchData"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/parliament/members/{id}":{"get":{"operationId":"getParliamentMemberDetail","summary":"Member detail","description":"Returns detailed info about a specific parliament member.","tags":["Parliament"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Member ID"}],"responses":{"200":{"description":"Member detail","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"party":{"type":"string"},"constituency":{"type":"string"},"status":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/parliament/questions":{"get":{"operationId":"getWrittenQuestions","summary":"Written questions","description":"Returns written questions (skriftliga frågor) from Riksdagen.","tags":["Questions"],"responses":{"200":{"description":"Written questions","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"author":{"type":"string"},"party":{"type":"string"},"date":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/parliament/reports":{"get":{"operationId":"getCommitteeReports","summary":"Committee reports","description":"Returns committee reports (betänkanden) from Riksdagen.","tags":["Committee Reports"],"responses":{"200":{"description":"Committee reports","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"reports":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"committee":{"type":"string"},"date":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/parliament/sfs":{"get":{"operationId":"getSwedishLawGazette","summary":"Swedish law gazette (SFS)","description":"Returns laws from Svensk författningssamling (SFS).","tags":["SFS"],"responses":{"200":{"description":"SFS documents","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"laws":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"sfs_number":{"type":"string"},"date":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/parliament/sou":{"get":{"operationId":"getGovernmentInvestigations","summary":"Government investigations (SOU)","description":"Returns government investigations (Statens offentliga utredningar) from Riksdagen.","tags":["SOU"],"responses":{"200":{"description":"SOU documents","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"year":{"type":"integer"},"number":{"type":"integer"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/parliament/speeches":{"get":{"operationId":"searchParliamentSpeeches","summary":"Search parliament speeches","description":"Searches parliament speeches (anföranden) from Riksdagen, filterable by session and party.","tags":["Parliament"],"parameters":[{"name":"session","in":"query","schema":{"type":"string"},"description":"Parliamentary session (e.g. 2024/25)"},{"name":"party","in":"query","schema":{"type":"string"},"description":"Party abbreviation (e.g. S, M)"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"minimum":1,"maximum":50},"description":"Page size"}],"responses":{"200":{"description":"Speeches","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/parliament/votes":{"get":{"operationId":"searchParliamentVotes","summary":"Search parliament votes","description":"Searches parliament vote records from Riksdagen, filterable by session and party.","tags":["Parliament"],"parameters":[{"name":"session","in":"query","schema":{"type":"string"},"description":"Parliamentary session (e.g. 2024/25)"},{"name":"party","in":"query","schema":{"type":"string"},"description":"Party abbreviation (e.g. S, M)"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Vote records","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/parliament/voting-stats":{"get":{"operationId":"getVotingStats","summary":"Voting statistics","description":"Returns voting statistics from Riksdagen.","tags":["Parliament"],"responses":{"200":{"description":"Voting stats","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total_votes":{"type":"integer"},"period":{"type":"string"},"by_party":{"type":"array","items":{"type":"object","properties":{"party":{"type":"string"},"votes_yes":{"type":"integer"},"votes_no":{"type":"integer"},"abstained":{"type":"integer"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/parliament/voting-stats/party/{party}":{"get":{"operationId":"getPartyVotingPattern","summary":"Get party voting patterns","description":"Returns voting pattern statistics for a specific party, including cohesion rate and agreement rates with other parties.","tags":["Parliament"],"parameters":[{"name":"party","in":"path","required":true,"schema":{"type":"string"},"description":"Party abbreviation (e.g. S, M, SD)"}],"responses":{"200":{"description":"Party voting patterns","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/police/events":{"get":{"operationId":"getPoliceEvents","summary":"Get police events","description":"Returns recent police events from Polisen.se. Filter by event type and location.","tags":["Police"],"parameters":[{"name":"type","in":"query","schema":{"type":"string"},"description":"Event type filter (e.g. Trafikolycka, Stöld, Misshandel)","example":"Trafikolycka"},{"name":"location","in":"query","schema":{"type":"string"},"description":"Location name filter (e.g. Stockholm, Göteborg)","example":"Stockholm"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"minimum":1,"maximum":100},"description":"Max results to return"}],"responses":{"200":{"description":"Police events","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/PoliceEventSearchData"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/police/stations":{"get":{"operationId":"getPoliceStations","summary":"List police stations","description":"Returns police stations from Polisen, optionally filtered by location.","tags":["Police"],"parameters":[{"name":"location","in":"query","schema":{"type":"string"},"description":"Filter by location (e.g. Stockholm)"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Police stations","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/police/wanted":{"get":{"operationId":"getWantedPersons","summary":"Wanted persons list","description":"Returns the list of wanted persons from Polisen.","tags":["Wanted"],"responses":{"200":{"description":"Wanted persons","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"persons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"published":{"type":"string"},"url":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/police/wanted/search":{"get":{"operationId":"searchWantedPersons","summary":"Search wanted persons","description":"Searches wanted persons by name or crime type from Polisen.","tags":["Wanted"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Search term"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Wanted search results","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/crisis/news":{"get":{"operationId":"getCrisisNews","summary":"Get crisis news articles","description":"Returns recent crisis-related news from Krisinformation.se (MSB). Filter by number of days to look back.","tags":["Crisis"],"parameters":[{"name":"days","in":"query","schema":{"type":"integer","default":7,"minimum":1,"maximum":30},"description":"Number of days to look back"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"minimum":1,"maximum":100},"description":"Max results to return"}],"responses":{"200":{"description":"Crisis news articles","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/CrisisNewsSearchData"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/crisis/notices":{"get":{"operationId":"getCrisisNotices","summary":"Get official notices","description":"Returns official notices and advisories from Krisinformation (MSB).","tags":["Crisis"],"parameters":[{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"minimum":1,"maximum":50},"description":"Page size"}],"responses":{"200":{"description":"Crisis notices","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/crisis/vmas":{"get":{"operationId":"getVmaAlerts","summary":"Get active VMA emergency alerts","description":"Returns currently active Important Public Announcements (Viktigt Meddelande till Allmänheten) from Krisinformation.se.","tags":["Crisis"],"responses":{"200":{"description":"VMA alerts","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/VmaSearchData"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/elections/{year}":{"get":{"operationId":"getElectionResults","summary":"Get election results by year","description":"Returns Swedish election results from Valmyndigheten — parties, votes, percentages, and seats.","tags":["Elections"],"parameters":[{"name":"year","in":"path","required":true,"schema":{"type":"string"},"description":"Election year (4-digit)","example":"2022"},{"name":"type","in":"query","schema":{"type":"string","default":"R","enum":["R","K","L"]},"description":"Election type: R=riksdag, K=kommun, L=region"}],"responses":{"200":{"description":"Election results","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"election_type":{"type":"string"},"date":{"type":"string"},"eligible_voters":{"type":"integer"},"total_votes":{"type":"integer"},"turnout_pct":{"type":"number"},"parties":{"type":"array","items":{"type":"object","properties":{"party":{"type":"string"},"votes":{"type":"integer"},"percentage":{"type":"number"},"seats":{"type":"integer"}}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/elections/{year}/municipality/{code}":{"get":{"operationId":"getMunicipalityElectionResults","summary":"Municipality election results","description":"Returns election results for a specific municipality and year.","tags":["Elections"],"parameters":[{"name":"year","in":"path","required":true,"schema":{"type":"integer"},"description":"Election year","example":2022},{"name":"code","in":"path","required":true,"schema":{"type":"string"},"description":"Municipality code","example":"0180"}],"responses":{"200":{"description":"Municipality election results","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"municipality":{"type":"string"},"year":{"type":"integer"},"turnout_pct":{"type":"number"},"parties":{"type":"array","items":{"type":"object","properties":{"party":{"type":"string"},"votes":{"type":"integer"},"pct":{"type":"number"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/crime":{"get":{"operationId":"getCrimeSummary","summary":"National crime summary","description":"Returns national crime statistics summary from BRÅ.","tags":["Crime"],"responses":{"200":{"description":"Crime summary","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total_reported":{"type":"integer"},"year":{"type":"integer"},"per_capita":{"type":"number"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/crime/{region}":{"get":{"operationId":"getRegionalCrime","summary":"Regional crime data","description":"Returns crime statistics for a specific region.","tags":["Crime"],"parameters":[{"name":"region","in":"path","required":true,"schema":{"type":"string"},"description":"Region name or code"}],"responses":{"200":{"description":"Regional crime data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"region":{"type":"string"},"total_reported":{"type":"integer"},"year":{"type":"integer"},"per_capita":{"type":"number"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/crime/by-type":{"get":{"operationId":"getCrimeByType","summary":"Crime by type","description":"Returns crime statistics broken down by type from BRÅ.","tags":["Crime"],"responses":{"200":{"description":"Crime by type","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"year":{"type":"integer"},"types":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"count":{"type":"integer"},"change_pct":{"type":"number"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/tax":{"get":{"operationId":"getTaxOverview","summary":"Get tax data overview","description":"Returns an overview of available tax datasets from Skatteverket, including income tax, employer contributions, VAT, ROT/RUT, property tax, and name statistics.","tags":["Tax"],"responses":{"200":{"description":"Tax data overview","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/tax/datasets/{uuid}":{"get":{"operationId":"getTaxDataset","summary":"Query a specific tax dataset by UUID","description":"Queries a specific Skatteverket RowStore dataset by its UUID. Some dataset UUIDs are pending discovery (TODO).","tags":["Tax"],"parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string"},"description":"RowStore dataset UUID"},{"name":"_limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"_offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset for pagination"}],"responses":{"200":{"description":"Dataset rows","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/tax/employer":{"get":{"operationId":"getTaxEmployer","summary":"Get employer contribution statistics","description":"Returns employer social contribution statistics from Skatteverket.","tags":["Tax"],"parameters":[{"name":"year","in":"query","schema":{"type":"string"},"description":"Tax year"},{"name":"_limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"_offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset for pagination"}],"responses":{"200":{"description":"Employer contribution statistics","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/tax/income":{"get":{"operationId":"getTaxIncome","summary":"Get income tax statistics","description":"Returns income tax statistics from Skatteverket. Uses EntryScape RowStore pagination (_limit, _offset).","tags":["Tax"],"parameters":[{"name":"year","in":"query","schema":{"type":"string"},"description":"Tax year (e.g. 2024)"},{"name":"municipality","in":"query","schema":{"type":"string"},"description":"Municipality code"},{"name":"_limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"_offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset for pagination"}],"responses":{"200":{"description":"Income tax statistics","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/tax/names":{"get":{"operationId":"getTaxNames","summary":"Get name change statistics","description":"Returns name change statistics from Skatteverket.","tags":["Tax"],"parameters":[{"name":"year","in":"query","schema":{"type":"string"},"description":"Year"},{"name":"_limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"_offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset for pagination"}],"responses":{"200":{"description":"Name change statistics","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/tax/property":{"get":{"operationId":"getTaxProperty","summary":"Get property tax statistics","description":"Returns property tax (fastighetsskatt) statistics from Skatteverket.","tags":["Tax"],"parameters":[{"name":"year","in":"query","schema":{"type":"string"},"description":"Tax year"},{"name":"_limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"_offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset for pagination"}],"responses":{"200":{"description":"Property tax statistics","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/tax/rot-rut":{"get":{"operationId":"getTaxRotRut","summary":"Get ROT/RUT deduction statistics","description":"Returns ROT (renovation) and RUT (household services) tax deduction statistics from Skatteverket.","tags":["Tax"],"parameters":[{"name":"year","in":"query","schema":{"type":"string"},"description":"Tax year"},{"name":"_limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"_offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset for pagination"}],"responses":{"200":{"description":"ROT/RUT statistics","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/tax/tables":{"get":{"operationId":"getTaxTables","summary":"List available tax datasets","description":"Returns a list of available Skatteverket RowStore datasets with their UUIDs and descriptions.","tags":["Tax"],"responses":{"200":{"description":"Available tax datasets","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/tax/vat":{"get":{"operationId":"getTaxVat","summary":"Get VAT statistics","description":"Returns VAT (moms) statistics from Skatteverket.","tags":["Tax"],"parameters":[{"name":"year","in":"query","schema":{"type":"string"},"description":"Tax year"},{"name":"_limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"_offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset for pagination"}],"responses":{"200":{"description":"VAT statistics","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/enforcement":{"get":{"operationId":"getEnforcementOverview","summary":"Get enforcement data overview","description":"Returns an overview of available enforcement datasets from Kronofogden (Swedish Enforcement Authority).","tags":["Enforcement"],"responses":{"200":{"description":"Enforcement data overview","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/enforcement/bankruptcy":{"get":{"operationId":"getEnforcementBankruptcy","summary":"Get bankruptcy statistics","description":"Returns bankruptcy (konkurs) statistics from Kronofogden.","tags":["Enforcement"],"parameters":[{"name":"year","in":"query","schema":{"type":"string"},"description":"Year"},{"name":"_limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"_offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset for pagination"}],"responses":{"200":{"description":"Bankruptcy statistics","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/enforcement/debt":{"get":{"operationId":"getEnforcementDebt","summary":"Get debt statistics","description":"Returns debt enforcement statistics from Kronofogden. Uses EntryScape RowStore pagination (_limit, _offset).","tags":["Enforcement"],"parameters":[{"name":"year","in":"query","schema":{"type":"string"},"description":"Year"},{"name":"municipality","in":"query","schema":{"type":"string"},"description":"Municipality code"},{"name":"_limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"_offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset for pagination"}],"responses":{"200":{"description":"Debt statistics","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/enforcement/debt-relief":{"get":{"operationId":"getEnforcementDebtRelief","summary":"Get debt relief (skuldsanering) statistics","description":"Returns debt relief statistics from Kronofogden.","tags":["Enforcement"],"parameters":[{"name":"year","in":"query","schema":{"type":"string"},"description":"Year"},{"name":"_limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"_offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset for pagination"}],"responses":{"200":{"description":"Debt relief statistics","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/enforcement/evictions":{"get":{"operationId":"getEnforcementEvictions","summary":"Get eviction statistics","description":"Returns eviction (avhysning) statistics from Kronofogden.","tags":["Enforcement"],"parameters":[{"name":"year","in":"query","schema":{"type":"string"},"description":"Year"},{"name":"_limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"_offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset for pagination"}],"responses":{"200":{"description":"Eviction statistics","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/enforcement/subsistence":{"get":{"operationId":"getEnforcementSubsistence","summary":"Get subsistence level (forbehallsbelopp) data","description":"Returns current subsistence levels used by Kronofogden for debt enforcement calculations.","tags":["Enforcement"],"parameters":[{"name":"year","in":"query","schema":{"type":"string"},"description":"Year"}],"responses":{"200":{"description":"Subsistence levels","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/enforcement/wait-times":{"get":{"operationId":"getEnforcementWaitTimes","summary":"Get Kronofogden processing wait times","description":"Returns current processing wait times for different case types at Kronofogden.","tags":["Enforcement"],"responses":{"200":{"description":"Wait times by case type","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/jobs/historical/{id}":{"get":{"operationId":"getHistoricalJob","summary":"Get a specific historical job listing","description":"Returns details of a specific historical job listing by ID.","tags":["Historical Jobs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Job listing ID"}],"responses":{"200":{"description":"Historical job listing details","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/jobs/historical/search":{"get":{"operationId":"searchHistoricalJobs","summary":"Search historical job listings","description":"Searches the JobTech historical job listing archive from Arbetsformedlingen.","tags":["Historical Jobs"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Search query"},{"name":"from","in":"query","schema":{"type":"string"},"description":"Start date (YYYY-MM-DD)"},{"name":"to","in":"query","schema":{"type":"string"},"description":"End date (YYYY-MM-DD)"},{"name":"municipality","in":"query","schema":{"type":"string"},"description":"Municipality code"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Historical job listings","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/jobs/historical/stats":{"get":{"operationId":"getHistoricalJobStats","summary":"Get historical job listing statistics","description":"Returns aggregate statistics on historical job listings over time.","tags":["Historical Jobs"],"parameters":[{"name":"from","in":"query","schema":{"type":"string"},"description":"Start date (YYYY-MM-DD)"},{"name":"to","in":"query","schema":{"type":"string"},"description":"End date (YYYY-MM-DD)"},{"name":"occupation","in":"query","schema":{"type":"string"},"description":"Occupation code"}],"responses":{"200":{"description":"Job listing statistics","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/jobs/search":{"get":{"operationId":"searchJobs","summary":"Search job listings","description":"Search the Swedish job market via JobTech (Arbetsförmedlingen). Returns matching job listings with employer, location, and description.","tags":["Jobs"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Search query (min 2 characters)","example":"react developer"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"minimum":1,"maximum":100},"description":"Max results to return"}],"responses":{"200":{"description":"Job search results","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/JobSearchData"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/taxonomy/autocomplete":{"get":{"operationId":"taxonomyAutocomplete","summary":"Autocomplete taxonomy concepts","description":"Typeahead search across all taxonomy concepts. Returns matching occupations, skills, and other concepts as you type. Useful for building search UIs, job boards, and CV tools.","tags":["Taxonomy"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Text to autocomplete (minimum 1 character)"},{"name":"type","in":"query","schema":{"type":"string"},"description":"Restrict to a concept type (e.g., occupation-name, skill)"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"maximum":50},"description":"Max suggestions"}],"responses":{"200":{"description":"Autocomplete suggestions","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"query":{"type":"string"},"type":{"type":"string","nullable":true},"suggestions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"},"definition":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/taxonomy/concepts":{"get":{"operationId":"searchTaxonomyConcepts","summary":"Search taxonomy concepts","description":"Search concepts of a given type from the Swedish labour market taxonomy. Includes occupations, skills, SSYK codes, municipalities, regions, languages, and more.","tags":["Taxonomy"],"parameters":[{"name":"type","in":"query","required":true,"schema":{"type":"string"},"description":"Concept type (e.g., occupation-name, skill)"},{"name":"q","in":"query","schema":{"type":"string"},"description":"Text search query"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100},"description":"Max results"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"}],"responses":{"200":{"description":"Concept search results","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"type":{"type":"string"},"query":{"type":"string","nullable":true},"concepts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"},"definition":{"type":"string"}}}},"total":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/taxonomy/relations":{"get":{"operationId":"getTaxonomyRelations","summary":"Get concept relations","description":"Explore the taxonomy graph to find related concepts. For example, find essential skills for an occupation type, or broader/narrower categories. Supports 11 relation types including essential, broader, narrower, related, and substitutability.","tags":["Taxonomy"],"parameters":[{"name":"relation","in":"query","required":true,"schema":{"type":"string","enum":["broader","narrower","related","essential","optional","substitutability","close-match","exact-match","broad-match","possible-combination","unlikely-combination"]},"description":"Relation type"},{"name":"source_type","in":"query","required":true,"schema":{"type":"string"},"description":"Source concept type (e.g., occupation-name)"},{"name":"target_type","in":"query","required":true,"schema":{"type":"string"},"description":"Target concept type (e.g., skill)"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100},"description":"Max results"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"}],"responses":{"200":{"description":"Related concepts","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"relation":{"type":"string"},"source_type":{"type":"string"},"target_type":{"type":"string"},"concepts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"},"definition":{"type":"string"}}}},"total":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/taxonomy/types":{"get":{"operationId":"getTaxonomyConceptTypes","summary":"List taxonomy concept types","description":"Returns all available concept types from the JobTech Taxonomy (e.g., occupation-name, skill, ssyk-level-4, municipality).","tags":["Taxonomy"],"responses":{"200":{"description":"Concept type list","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"types":{"type":"array","items":{"type":"string"}},"total":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/library/books/{isbn}":{"get":{"operationId":"lookupIsbn","summary":"Look up a book by ISBN","description":"Looks up a book by ISBN in the Swedish national library catalog (LIBRIS).","tags":["Library"],"parameters":[{"name":"isbn","in":"path","required":true,"schema":{"type":"string"},"description":"ISBN-10 or ISBN-13"}],"responses":{"200":{"description":"Book details","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/library/search":{"get":{"operationId":"searchLibrary","summary":"Search the national library catalog","description":"Search LIBRIS, Sweden's national library catalog. Returns books with title, authors, ISBN, and publisher.","tags":["Library"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Search query (min 2 characters)","example":"Astrid Lindgren"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"minimum":1,"maximum":100},"description":"Max results to return"}],"responses":{"200":{"description":"Library search results","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/LibrarySearchData"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/national-library/datasets":{"get":{"operationId":"getNationalLibraryDatasets","summary":"List KB datasets","description":"Returns available datasets from Kungliga biblioteket (data.kb.se). Response uses JSON-LD format with @id, dcterms:title, etc.","tags":["National Library"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Search query"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Dataset list","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/national-library/datasets/{id}":{"get":{"operationId":"getNationalLibraryDataset","summary":"Get a specific KB dataset","description":"Returns metadata for a specific dataset from data.kb.se by its identifier.","tags":["National Library"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Dataset identifier"}],"responses":{"200":{"description":"Dataset metadata","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/national-library/packages/{id}":{"get":{"operationId":"getNationalLibraryPackage","summary":"Get a KB data package","description":"Returns a specific data package from data.kb.se.","tags":["National Library"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Package identifier"}],"responses":{"200":{"description":"Package details","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/national-library/search":{"get":{"operationId":"searchNationalLibrary","summary":"Search KB catalog","description":"Searches the Kungliga biblioteket catalog. Returns JSON-LD results with dcterms fields.","tags":["National Library"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Search query"},{"name":"type","in":"query","schema":{"type":"string"},"description":"Resource type filter"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/open-data/scb/tables":{"get":{"operationId":"listScbTables","summary":"List curated SCB/PxWeb tables","description":"Lists the curated SCB/PxWeb tables that back Apiverket REST endpoints, including examples and endpoint mappings.","tags":["Open Data"],"responses":{"200":{"description":"Curated SCB table registry","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"tables":{"type":"array","items":{"type":"object"}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/open-data/scb/tables/{tableId}":{"get":{"operationId":"getScbTable","summary":"Get curated SCB/PxWeb table metadata","description":"Returns curated metadata for a specific SCB/PxWeb table, including dimensions, default query, endpoint mappings, and runnable Apiverket examples.","tags":["Open Data"],"parameters":[{"name":"tableId","in":"path","required":true,"schema":{"type":"string"},"example":"TAB638"}],"responses":{"200":{"description":"SCB table metadata","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"table_id":{"type":"string"},"title":{"type":"string"},"source":{"type":"string"},"agency":{"type":"string"},"endpoint_names":{"type":"array","items":{"type":"string"}},"endpoints":{"type":"array","items":{"type":"string"}},"examples":{"type":"array","items":{"type":"string"}},"dimensions":{"type":"array","items":{"type":"object"}},"default_query":{"type":"object"},"docs":{"type":"object"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/open-data/search":{"get":{"operationId":"searchOpenData","summary":"Search Sweden's open data catalog","description":"Searches Dataportal.se for open datasets published by Swedish government agencies.","tags":["Open Data"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Search query","example":"trafik"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Open datasets","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"query":{"type":"string"},"datasets":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"publisher":{"type":"string"},"formats":{"type":"array","items":{"type":"string"}},"themes":{"type":"array","items":{"type":"string"}},"issued":{"type":"string"},"modified":{"type":"string"},"url":{"type":"string"}}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/archives/search":{"get":{"operationId":"searchArchives","summary":"Search archival records","description":"Searches 2M+ archival records from Riksarkivet (National Archives of Sweden). API is in beta (v1.0.0.8).","tags":["Archives"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Search query"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Archival records","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/archives/status":{"get":{"operationId":"getArchivesStatus","summary":"Get archives API status","description":"Returns the current status of the Riksarkivet search API.","tags":["Archives"],"responses":{"200":{"description":"API status","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/tourism":{"get":{"operationId":"getTourismStats","summary":"Tourism statistics","description":"Returns tourism statistics — guest nights, visitors, etc.","tags":["Tourism"],"parameters":[{"name":"year","in":"query","schema":{"type":"integer"},"description":"Filter by year"}],"responses":{"200":{"description":"Tourism stats","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"year":{"type":"integer"},"guest_nights":{"type":"integer"},"domestic_pct":{"type":"number"},"international_pct":{"type":"number"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/tourism/{region}":{"get":{"operationId":"getRegionalTourism","summary":"Get tourism data by region","description":"Returns tourism data (guest nights) for a specific region from SCB.","tags":["Tourism"],"parameters":[{"name":"region","in":"path","required":true,"schema":{"type":"string"},"description":"SCB region code (e.g. 01)"}],"responses":{"200":{"description":"Regional tourism data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/destinations":{"get":{"operationId":"searchDestinations","summary":"Search Swedish tourism destinations","description":"Search hotels, events, restaurants, attractions, and tours from Visit Sweden. Free public API, no key required upstream.","tags":["Destinations"],"parameters":[{"name":"type","in":"query","schema":{"type":"string","enum":["LodgingBusiness","Event","FoodEstablishment","Place","Trip"],"default":"Place"},"description":"Schema.org type filter"},{"name":"q","in":"query","schema":{"type":"string"},"description":"Text search query"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100},"description":"Max results"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"}],"responses":{"200":{"description":"Destination search results","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"type":{"type":"string"},"query":{"type":"string","nullable":true},"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"region":{"type":"string"},"latitude":{"type":"number","nullable":true},"longitude":{"type":"number","nullable":true},"url":{"type":"string","nullable":true}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/destinations/types":{"get":{"operationId":"getDestinationTypes","summary":"List available destination types","description":"Returns the 5 available Schema.org destination types with labels.","tags":["Destinations"],"responses":{"200":{"description":"Destination types","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"types":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/telecom/diarium/{caseId}":{"get":{"operationId":"lookupPtsDiarium","summary":"Look up PTS case","description":"Retrieves a case from the PTS public diarium (case registry). Returns case metadata and associated deeds/documents.","tags":["Telecom"],"parameters":[{"name":"caseId","in":"path","required":true,"schema":{"type":"string"},"description":"Case identifier (e.g., '06-1')"}],"responses":{"200":{"description":"Case details","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"case_record":{"type":"object","nullable":true,"properties":{"case_id":{"type":"integer"},"identifier":{"type":"string"},"title":{"type":"string"},"reg_date":{"type":"string"},"status":{"type":"string"},"deeds":{"type":"array","items":{"type":"object","properties":{"identifier":{"type":"string"},"doc_no":{"type":"integer"},"arrival_date":{"type":"string"},"title":{"type":"string"}}}}}},"query":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/telecom/operator":{"get":{"operationId":"lookupTelecomOperator","summary":"Look up telecom operator","description":"Identifies the telecom operator for a Swedish phone number using PTS data. Provide an area code and subscriber number.","tags":["Telecom"],"parameters":[{"name":"area_code","in":"query","required":true,"schema":{"type":"string"},"description":"Area code (e.g., '8' for Stockholm)"},{"name":"number","in":"query","required":true,"schema":{"type":"string"},"description":"Subscriber number (e.g., '6785500')"}],"responses":{"200":{"description":"Operator lookup result","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"operator":{"type":"object","nullable":true,"properties":{"number":{"type":"string"},"name":{"type":"string"}}},"query":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/telecom/wireless":{"get":{"operationId":"checkWirelessFrequency","summary":"Check wireless frequency availability","description":"Checks wireless audio frequency availability at a given location in Sweden. Returns available frequency bands and channels.","tags":["Telecom"],"parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number","minimum":55,"maximum":70},"description":"WGS84 latitude"},{"name":"lon","in":"query","required":true,"schema":{"type":"number","minimum":10,"maximum":25},"description":"WGS84 longitude"},{"name":"freq","in":"query","required":true,"schema":{"type":"integer"},"description":"Frequency in MHz"},{"name":"indoor","in":"query","schema":{"type":"boolean","default":false},"description":"Indoor use"}],"responses":{"200":{"description":"Frequency availability","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"frequencies":{"type":"array","items":{"type":"object","properties":{"is_free":{"type":"boolean"},"band":{"type":"string"},"low_frequency":{"type":"integer"},"high_frequency":{"type":"integer"},"first_channel":{"type":"integer"},"last_channel":{"type":"integer"},"block_date":{"type":"string","nullable":true}}}},"coordinates":{"type":"string"},"lat":{"type":"number"},"lon":{"type":"number"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/energy/electricity":{"get":{"operationId":"getElectricityPrices","summary":"Get electricity spot prices for all areas","description":"Returns hourly electricity spot prices from Nord Pool for all Swedish price areas (SE1-SE4).","tags":["Energy"],"parameters":[{"name":"date","in":"query","schema":{"type":"string","format":"date"},"description":"Date (YYYY-MM-DD, defaults to today)","example":"2026-03-07"}],"responses":{"200":{"description":"Electricity prices","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"areas":{"type":"object","additionalProperties":{"type":"object","properties":{"date":{"type":"string"},"area":{"type":"string"},"prices":{"type":"array","items":{"type":"object","properties":{"hour":{"type":"integer"},"price_sek_kwh":{"type":"number"},"price_eur_kwh":{"type":"number"},"level":{"type":"string","enum":["low","medium","high","peak"]}}}},"average_sek":{"type":"number"},"min_sek":{"type":"number"},"max_sek":{"type":"number"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/energy/electricity/{area}":{"get":{"operationId":"getElectricityPricesByArea","summary":"Get electricity prices for a specific area","description":"Returns hourly electricity prices for a specific Swedish price area (SE1, SE2, SE3, or SE4).","tags":["Energy"],"parameters":[{"name":"area","in":"path","required":true,"schema":{"type":"string","enum":["SE1","SE2","SE3","SE4"]},"description":"Price area"},{"name":"date","in":"query","schema":{"type":"string","format":"date"},"description":"Date (YYYY-MM-DD, defaults to today)"}],"responses":{"200":{"description":"Electricity prices for area","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"date":{"type":"string"},"area":{"type":"string"},"prices":{"type":"array","items":{"type":"object"}},"average_sek":{"type":"number"},"min_sek":{"type":"number"},"max_sek":{"type":"number"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/energy/statistics/balance":{"get":{"operationId":"getEnergyBalance","summary":"Get energy balance","description":"Returns Sweden's energy balance data from Energimyndigheten.","tags":["Energy Statistics"],"parameters":[{"name":"year","in":"query","schema":{"type":"string"},"description":"Year"}],"responses":{"200":{"description":"Energy balance data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/energy/statistics/electricity":{"get":{"operationId":"getElectricityProduction","summary":"Get electricity production","description":"Returns electricity production statistics by source from Energimyndigheten.","tags":["Energy Statistics"],"parameters":[{"name":"year","in":"query","schema":{"type":"string"},"description":"Year"}],"responses":{"200":{"description":"Electricity production data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/energy/statistics/renewable":{"get":{"operationId":"getEnergyRenewable","summary":"Get renewable energy share","description":"Returns the share of renewable energy in Sweden's total energy mix.","tags":["Energy Statistics"],"parameters":[{"name":"year","in":"query","schema":{"type":"string"},"description":"Year"}],"responses":{"200":{"description":"Renewable energy share","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/energy/statistics/tables":{"get":{"operationId":"getEnergyStatsTables","summary":"List available energy statistics tables","description":"Returns available energy statistics tables from Energimyndigheten (PxWeb API).","tags":["Energy Statistics"],"responses":{"200":{"description":"Table listing","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/biodiversity/name-match":{"get":{"operationId":"matchTaxonName","summary":"Taxonomic name matching","description":"Matches a scientific or common name to a canonical taxonomic name via SBDI.","tags":["Biodiversity"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Scientific or common name to match"}],"responses":{"200":{"description":"Name match result","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/biodiversity/occurrences":{"get":{"operationId":"getOccurrences","summary":"Get occurrence records","description":"Returns species occurrence (sighting) records from SBDI.","tags":["Biodiversity"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Scientific name"},{"name":"lat","in":"query","schema":{"type":"number"},"description":"Latitude for geographic filter"},{"name":"lon","in":"query","schema":{"type":"number"},"description":"Longitude for geographic filter"},{"name":"radius","in":"query","schema":{"type":"number"},"description":"Radius in km"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Occurrence records","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/biodiversity/species":{"get":{"operationId":"searchSpecies","summary":"Search species","description":"Searches the Swedish species database via SBDI (Atlas of Living Australia platform backend).","tags":["Biodiversity"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Species name (common or scientific)"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Species results","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/biodiversity/species-lists":{"get":{"operationId":"getSpeciesLists","summary":"Browse species lists","description":"Returns available species lists from SBDI.","tags":["Biodiversity"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Search by list name"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Species lists","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/biodiversity/species-lists/{id}":{"get":{"operationId":"getSpeciesListDetail","summary":"Get species list detail","description":"Returns details of a specific species list from SBDI.","tags":["Biodiversity"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Species list ID"}],"responses":{"200":{"description":"Species list detail","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/biodiversity/species-lists/{id}/items":{"get":{"operationId":"getSpeciesListItems","summary":"Get species list items","description":"Returns items (species) in a specific species list from SBDI.","tags":["Biodiversity"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Species list ID"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Species list items","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/geology/groundwater":{"get":{"operationId":"getGroundwaterOccurrences","summary":"Get groundwater occurrences","description":"Returns groundwater occurrence data from SGU via OGC API Features.","tags":["Geology"],"parameters":[{"name":"bbox","in":"query","schema":{"type":"string"},"description":"Bounding box (minLon,minLat,maxLon,maxLat)"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Groundwater occurrences","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/geology/groundwater/chemistry":{"get":{"operationId":"getGroundwaterChemistry","summary":"Get groundwater chemistry","description":"Returns groundwater chemistry analysis data from SGU.","tags":["Geology"],"parameters":[{"name":"station","in":"query","schema":{"type":"string"},"description":"Station ID"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Groundwater chemistry","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/geology/groundwater/levels":{"get":{"operationId":"getGroundwaterLevels","summary":"Get groundwater levels","description":"Returns groundwater level measurements from SGU monitoring stations.","tags":["Geology"],"parameters":[{"name":"station","in":"query","schema":{"type":"string"},"description":"Station ID"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Groundwater levels","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/geology/wells":{"get":{"operationId":"getGeologyWells","summary":"List wells and boreholes","description":"Returns wells and boreholes from SGU (Geological Survey of Sweden) via OGC API Features. Responses are GeoJSON-based.","tags":["Geology"],"parameters":[{"name":"bbox","in":"query","schema":{"type":"string"},"description":"Bounding box (minLon,minLat,maxLon,maxLat)"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Wells and boreholes","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/bathing/nearby":{"get":{"operationId":"getNearbyBathingSites","summary":"Find nearby bathing sites","description":"Returns bathing sites within a radius of given coordinates.","tags":["Bathing"],"parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number"},"description":"Latitude","example":59.3293},{"name":"lon","in":"query","required":true,"schema":{"type":"number"},"description":"Longitude","example":18.0686},{"name":"radius","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Search radius in km"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"minimum":1,"maximum":50},"description":"Max results"}],"responses":{"200":{"description":"Nearby bathing sites","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"sites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"municipality":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"distance_km":{"type":"number"}}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/bathing/sites":{"get":{"operationId":"getBathingSites","summary":"List bathing sites","description":"Returns bathing sites in Sweden, optionally filtered by municipality. Data from Havs- och vattenmyndigheten.","tags":["Bathing"],"parameters":[{"name":"municipality","in":"query","schema":{"type":"string"},"description":"Filter by municipality name","example":"Stockholm"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Bathing sites","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"sites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"municipality":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/heritage/search":{"get":{"operationId":"searchHeritage","summary":"Search cultural heritage objects","description":"Searches 12M+ cultural heritage objects from 45+ Swedish institutions via K-samsök (SOCH).","tags":["Heritage"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Search query","example":"viking"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Heritage objects","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"uri":{"type":"string"},"label":{"type":"string"},"organization":{"type":"string"},"service":{"type":"string"},"data_quality":{"type":"string"}}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/museum/search":{"get":{"operationId":"searchMuseum","summary":"Search museum collections","description":"Searches millions of digitized objects from Swedish museums via Digitalt Museum.","tags":["Museum"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Search query","example":"viking"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Museum objects","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"query":{"type":"string"},"objects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"owner":{"type":"string"},"description":{"type":"string"},"image_url":{"type":"string"}}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/nobel/laureates":{"get":{"operationId":"getNobelLaureates","summary":"List Nobel laureates","description":"Returns a list of Nobel Prize laureates. Supports filtering by category and country.","tags":["Nobel"],"parameters":[{"name":"category","in":"query","schema":{"type":"string","enum":["phy","che","med","lit","pea","eco"]},"description":"Prize category"},{"name":"country","in":"query","schema":{"type":"string"},"description":"Birth country"},{"name":"lang","in":"query","schema":{"type":"string","enum":["en","no","se"],"default":"en"},"description":"Response language"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Laureate list","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/nobel/laureates/{id}":{"get":{"operationId":"getNobelLaureate","summary":"Get a specific Nobel laureate","description":"Returns details of a specific Nobel laureate by ID.","tags":["Nobel"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Laureate ID"},{"name":"lang","in":"query","schema":{"type":"string","enum":["en","no","se"],"default":"en"},"description":"Response language"}],"responses":{"200":{"description":"Laureate details","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/nobel/prizes":{"get":{"operationId":"getNobelPrizes","summary":"List Nobel Prizes","description":"Returns a list of Nobel Prizes. The Nobel Prize API is trilingual (en/no/se).","tags":["Nobel"],"parameters":[{"name":"category","in":"query","schema":{"type":"string","enum":["phy","che","med","lit","pea","eco"]},"description":"Prize category"},{"name":"year","in":"query","schema":{"type":"integer"},"description":"Prize year"},{"name":"lang","in":"query","schema":{"type":"string","enum":["en","no","se"],"default":"en"},"description":"Response language"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Nobel Prize list","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/nobel/prizes/{category}/{year}":{"get":{"operationId":"getNobelPrize","summary":"Get a specific Nobel Prize","description":"Returns details of a specific Nobel Prize by category and year.","tags":["Nobel"],"parameters":[{"name":"category","in":"path","required":true,"schema":{"type":"string","enum":["phy","che","med","lit","pea","eco"]},"description":"Prize category"},{"name":"year","in":"path","required":true,"schema":{"type":"integer"},"description":"Prize year","example":2024},{"name":"lang","in":"query","schema":{"type":"string","enum":["en","no","se"],"default":"en"},"description":"Response language"}],"responses":{"200":{"description":"Nobel Prize details","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/nutrition/foods":{"get":{"operationId":"searchFoods","summary":"Search food nutritional data","description":"Search the Swedish food composition database (Livsmedelsverket). Returns energy, macronutrients, and food group.","tags":["Nutrition"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Food name to search for (min 2 characters)","example":"mjölk"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"minimum":1,"maximum":100},"description":"Max results to return"}],"responses":{"200":{"description":"Food search results","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/FoodSearchData"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/nutrition/foods/{id}":{"get":{"operationId":"getFoodDetail","summary":"Get food item details","description":"Returns a single food item with full nutrient profile from Livsmedelsverket.","tags":["Nutrition"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Food item ID"}],"responses":{"200":{"description":"Food item details","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/hydrology/stations":{"get":{"operationId":"listHydrologyStations","summary":"List hydrology measurement stations","description":"Returns SMHI water level, flow, and temperature measurement stations.","tags":["Hydrology"],"parameters":[{"name":"parameter","in":"query","schema":{"type":"string","default":"water_level","enum":["water_level","water_flow","water_temperature"]},"description":"Measurement parameter"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"minimum":1,"maximum":200},"description":"Page size"}],"responses":{"200":{"description":"Hydrology stations","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"parameter":{"type":"string"},"stations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"active":{"type":"boolean"},"owner":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/hydrology/stations/{stationId}":{"get":{"operationId":"getHydrologyStation","summary":"Get latest observation for a station","description":"Returns the latest water level, flow, or temperature observation for a specific SMHI station.","tags":["Hydrology"],"parameters":[{"name":"stationId","in":"path","required":true,"schema":{"type":"string"},"description":"Station ID","example":"2229"},{"name":"parameter","in":"query","schema":{"type":"string","default":"water_level","enum":["water_level","water_flow","water_temperature"]},"description":"Measurement parameter"}],"responses":{"200":{"description":"Station observation","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"station_id":{"type":"string"},"station_name":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"value":{"type":"number"},"unit":{"type":"string"},"measured_at":{"type":"string"},"quality":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/ocean/stations":{"get":{"operationId":"listOceanStations","summary":"List ocean observation stations","description":"Returns SMHI ocean measurement stations for sea temperature, sea level, or wave height.","tags":["Ocean"],"parameters":[{"name":"parameter","in":"query","schema":{"type":"string","default":"sea_temperature","enum":["sea_temperature","sea_level","wave_height"]},"description":"Measurement parameter"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"minimum":1,"maximum":200},"description":"Page size"}],"responses":{"200":{"description":"Ocean stations","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"parameter":{"type":"string"},"stations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"active":{"type":"boolean"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/ocean/stations/{stationId}":{"get":{"operationId":"getOceanStation","summary":"Get latest ocean observation for a station","description":"Returns the latest sea temperature, level, or wave height observation for a specific SMHI station.","tags":["Ocean"],"parameters":[{"name":"stationId","in":"path","required":true,"schema":{"type":"string"},"description":"Station ID","example":"33008"},{"name":"parameter","in":"query","schema":{"type":"string","default":"sea_temperature","enum":["sea_temperature","sea_level","wave_height"]},"description":"Measurement parameter"}],"responses":{"200":{"description":"Ocean observation","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"station_id":{"type":"string"},"station_name":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"parameter":{"type":"string"},"value":{"type":"number"},"unit":{"type":"string"},"measured_at":{"type":"string"},"quality":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/power-grid/status":{"get":{"operationId":"getPowerGridStatus","summary":"Get real-time power grid status","description":"Returns current Swedish power grid status from Svenska kraftnät — production by source, consumption, and net export.","tags":["Power Grid"],"responses":{"200":{"description":"Power grid status","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"timestamp":{"type":"string"},"total_production_mw":{"type":"number"},"total_consumption_mw":{"type":"number"},"nuclear_mw":{"type":"number"},"wind_mw":{"type":"number"},"hydro_mw":{"type":"number"},"thermal_mw":{"type":"number"},"net_export_mw":{"type":"number"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/contaminated-sites":{"get":{"operationId":"listContaminatedSites","summary":"List contaminated sites","description":"Lists contaminated sites from the EBH registry with pagination.","tags":["Contaminated Sites"],"parameters":[{"name":"municipality","in":"query","schema":{"type":"string"},"description":"Filter by municipality"},{"name":"risk_class","in":"query","schema":{"type":"integer","minimum":1,"maximum":4},"description":"Risk class filter (1-4)"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Contaminated sites","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/contaminated-sites/{id}":{"get":{"operationId":"getContaminatedSite","summary":"Get contaminated site details","description":"Returns detailed information about a specific contaminated site.","tags":["Contaminated Sites"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Site ID"}],"responses":{"200":{"description":"Site details","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/contaminated-sites/search":{"get":{"operationId":"searchContaminatedSites","summary":"Search contaminated sites","description":"Searches for contaminated sites, optionally filtered by municipality.","tags":["Contaminated Sites"],"parameters":[{"name":"municipality","in":"query","schema":{"type":"string"},"description":"Filter by municipality name"}],"responses":{"200":{"description":"Contaminated sites","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"sites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"municipality":{"type":"string"},"risk_class":{"type":"string"},"status":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/account/info":{"get":{"operationId":"getAccountInfo","summary":"Get API key info","description":"Returns account details for the authenticated API key — name, mode, tier, and rate limits. Daily and minute limits apply per API key. Free lifetime company discovery credits are shared per account, not allocated per key.","tags":["Account"],"responses":{"200":{"description":"Account info","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"key_name":{"type":"string"},"mode":{"type":"string","enum":["test","live"]},"tier":{"type":"string","enum":["free","starter","pro","business","enterprise"]},"limits":{"type":"object","properties":{"rate_limit_per_minute":{"type":"integer"},"daily_limit":{"type":"integer"},"company_search_daily_limit":{"type":"integer"},"company_search_credit_limit":{"type":"integer","description":"Free-only: 50 lifetime live company discovery credits per account, shared across its keys with no renewal. Paid tiers do not have this lifetime quota."},"company_search_credit_rollout_at":{"type":"string","format":"date-time","description":"Rollout date for Free company-search lifetime credits."},"company_search_credit_existing_grace_until":{"type":"string","format":"date-time","description":"Existing Free accounts created before rollout are not blocked by lifetime company-search credits until this date."},"company_lookup_daily_limit":{"type":"integer","description":"Free-only company lookup daily limit per API key. Paid tiers use the regular daily API quota."}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/account/tiers":{"get":{"operationId":"getAvailableTiers","summary":"List available pricing tiers","description":"Returns all available pricing tiers with their limits and prices.","tags":["Account"],"responses":{"200":{"description":"Available tiers","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tiers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"daily_limit":{"type":"integer"},"rate_limit_per_minute":{"type":"integer"},"company_search_daily_limit":{"type":"integer"},"company_search_credit_limit":{"type":"integer","description":"Free-only: 50 lifetime live company discovery credits per account, shared across its keys with no renewal. Paid tiers do not have this lifetime quota."},"company_search_credit_rollout_at":{"type":"string","format":"date-time"},"company_search_credit_existing_grace_until":{"type":"string","format":"date-time"},"company_lookup_daily_limit":{"type":"integer","description":"Free-only company lookup daily limit per API key. Paid tiers use the regular daily API quota."},"price_sek_per_month":{"type":"number"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/account/usage":{"get":{"operationId":"getAccountUsage","summary":"Get usage summary","description":"Returns usage for the authenticated API key: today's count, remaining daily quota, and daily breakdown. The exception is Free lifetime company discovery credits, which are shared across the account's keys and never renew.","tags":["Account"],"responses":{"200":{"description":"Usage summary","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tier":{"type":"string"},"daily_limit":{"type":"integer"},"rate_limit_per_minute":{"type":"integer"},"today_count":{"type":"integer","description":"Recorded attempts today, including recorded 429 responses."},"today_quota_count":{"type":"integer","description":"Requests counted toward the daily API quota. Excludes 429 responses recorded after the accounting rollout."},"today_remaining":{"type":"integer","description":"Daily limit minus today_quota_count, clamped to zero."},"company_search":{"type":"object","properties":{"daily_limit":{"type":"integer"},"today_requests":{"type":"integer"},"today_count":{"type":"integer"},"remaining":{"type":"integer"},"reset_at":{"type":"string","format":"date-time"},"credit_limit":{"type":"integer","nullable":true,"description":"Free-only: 50 lifetime live company discovery credits per account, shared across its keys with no renewal. Null for paid tiers."},"credits_used":{"type":"integer","nullable":true},"credits_remaining":{"type":"integer","nullable":true},"credit_enforcement":{"type":"string","enum":["active","grace"],"nullable":true},"credit_rollout_at":{"type":"string","format":"date-time","nullable":true},"credit_grace_until":{"type":"string","format":"date-time","nullable":true},"recent_429_count":{"type":"integer"},"last_rate_limited_at":{"type":"string"}}},"company_lookup":{"type":"object","description":"Free-only company lookup usage. Omitted for paid tiers, where lookup uses the regular daily API quota.","properties":{"daily_limit":{"type":"integer"},"today_requests":{"type":"integer"},"today_count":{"type":"integer"},"remaining":{"type":"integer"},"reset_at":{"type":"string","format":"date-time"},"recent_429_count":{"type":"integer"},"last_rate_limited_at":{"type":"string"}}},"current_month":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"request_count":{"type":"integer","description":"All recorded attempts, including recorded 429 responses."},"quota_count":{"type":"integer","description":"Daily quota consumption. Historical counts before the accounting rollout are unchanged."},"avg_latency_ms":{"type":"number"},"error_count":{"type":"integer"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/account/usage/endpoints":{"get":{"operationId":"getEndpointUsage","summary":"Get per-endpoint usage breakdown","description":"Returns usage breakdown by endpoint for a given date range.","tags":["Account"],"parameters":[{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"Start date (defaults to first of month)"},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"End date (defaults to today)"}],"responses":{"200":{"description":"Endpoint usage","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"endpoints":{"type":"array","items":{"type":"object","properties":{"endpoint":{"type":"string"},"count":{"type":"integer"},"avg_latency_ms":{"type":"number"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/companies/{orgNumber}":{"get":{"operationId":"getCompanyInfo","summary":"Get company by organisation number","description":"Looks up one exact Swedish organisation number via Bolagsverket with SCB Företagsregister enrichment/fallback for broader coverage. Use this endpoint when you already have the org number and need stable company registry fields such as legal name, legal form, address/care-of, active/deregistered state, registration/start dates, SNI codes, F-tax/VAT/employer status, visit address, revenue and employee classes, sector, ownership category, and export/import indicators. Fields can be null when the sources do not provide a value; raw source payloads, owner names, and workplace/CFAR detail rows are not exposed. This endpoint uses the regular API daily quota and minute limit per API key, not company-search credits or the company-search daily quota. Free live keys also have a separate limit of 100 company lookups/day per API key. Paid tiers have no separate lookup quota. To find an org number from a company name, first use GET /v1/companies/search and cache the returned org_number for future lookups. Test keys return curated sandbox companies only; use a live key for real organisations.","tags":["Companies"],"parameters":[{"name":"orgNumber","in":"path","required":true,"schema":{"type":"string"},"description":"10-digit Swedish organisation number. Hyphenated format is accepted.","example":"5560125790"}],"responses":{"200":{"description":"Company info","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"org_number":{"type":"string"},"name":{"type":"string"},"legal_form":{"type":"string"},"legal_form_code":{"type":"string","nullable":true},"status":{"type":"string"},"active":{"type":"boolean","nullable":true},"deregistered":{"type":"boolean","nullable":true},"registration_date":{"type":"string","nullable":true},"start_date":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"care_of":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"registration_country":{"type":"string","nullable":true},"municipality":{"type":"string","nullable":true},"county":{"type":"string","nullable":true},"employee_class":{"type":"string","nullable":true},"revenue_class":{"type":"string","nullable":true},"revenue_year":{"type":"string","nullable":true},"sector":{"type":"string","nullable":true},"sector_code":{"type":"string","nullable":true},"ownership_category":{"type":"string","nullable":true},"ownership_category_code":{"type":"string","nullable":true},"owner_country":{"type":"string","nullable":true},"owner_country_code":{"type":"string","nullable":true},"foreign_owned":{"type":"boolean","nullable":true},"export_import_status":{"type":"string","nullable":true},"export_class":{"type":"string","nullable":true},"import_class":{"type":"string","nullable":true},"advertising_opt_out":{"type":"boolean","nullable":true},"phone":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"visit_address":{"type":"string","nullable":true},"visit_postal_code":{"type":"string","nullable":true},"visit_city":{"type":"string","nullable":true},"public_private":{"type":"string","nullable":true},"f_tax":{"type":"boolean","nullable":true},"vat_registered":{"type":"boolean","nullable":true},"employer":{"type":"boolean","nullable":true},"workplace_count":{"type":"integer","nullable":true},"bolagsverket_status":{"type":"string","nullable":true},"tax_registration_status":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"sni_codes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"}}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"},"503":{"$ref":"#/components/responses/CompanySourceCapacity"}}}},"/v1/companies/search":{"get":{"operationId":"searchCompanies","summary":"Search companies by name","description":"Searches SCB Företagsregister by company name and returns matching companies with stable registry fields such as org_number, legal name, address, municipality, county, SNI codes, employee/revenue class, legal form, F-tax/VAT/employer status, and registration status. Use this endpoint for discovery/autocomplete when you do not know the organisation number. Company search uses the regular daily API quota and also has a separate live search limit per API key: free 20/day, starter 100/day, pro 500/day, business 2,000/day, enterprise 10,000/day. Free additionally has 50 lifetime live company discovery credits per account, shared across all its keys, with no renewal. Creating another key does not add credits. Sandbox searches and company lookups do not consume these credits. Daily limits reset at 00:00 UTC; the lifetime credit balance does not reset. For repeated enrichment, cache the returned org_number and call GET /v1/companies/{orgNumber}, which uses Bolagsverket with SCB enrichment/fallback and your regular API quota. Test keys search curated sandbox companies only; use a live key for real registry search.","tags":["Companies"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2},"description":"Company name search term (min 2 characters, substring match)"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100},"description":"Max results to return"}],"responses":{"200":{"description":"Company search results","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"query":{"type":"string"},"companies":{"type":"array","items":{"type":"object","properties":{"org_number":{"type":"string"},"name":{"type":"string"},"legal_form":{"type":"string"},"legal_form_code":{"type":"string","nullable":true},"status":{"type":"string"},"active":{"type":"boolean","nullable":true},"deregistered":{"type":"boolean","nullable":true},"city":{"type":"string"},"country":{"type":"string","nullable":true},"registration_country":{"type":"string","nullable":true},"municipality":{"type":"string"},"county":{"type":"string"},"sni_codes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"}}}},"employee_class":{"type":"string","nullable":true},"revenue_class":{"type":"string","nullable":true},"revenue_year":{"type":"string","nullable":true},"sector":{"type":"string","nullable":true},"sector_code":{"type":"string","nullable":true},"ownership_category":{"type":"string","nullable":true},"ownership_category_code":{"type":"string","nullable":true},"owner_country":{"type":"string","nullable":true},"owner_country_code":{"type":"string","nullable":true},"foreign_owned":{"type":"boolean","nullable":true},"export_import_status":{"type":"string","nullable":true},"export_class":{"type":"string","nullable":true},"import_class":{"type":"string","nullable":true},"advertising_opt_out":{"type":"boolean","nullable":true},"registration_date":{"type":"string","nullable":true},"start_date":{"type":"string","nullable":true},"f_tax":{"type":"boolean","nullable":true},"vat_registered":{"type":"boolean","nullable":true},"employer":{"type":"boolean","nullable":true}}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"},"503":{"$ref":"#/components/responses/CompanySourceCapacity"}}}},"/v1/environment/emissions":{"get":{"operationId":"getEmissionsData","summary":"CO2 emissions data","description":"Returns environmental emissions data from SCB/Naturvårdsverket.","tags":["Emissions"],"responses":{"200":{"description":"Emissions data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total_co2_tonnes":{"type":"number"},"year":{"type":"integer"},"by_sector":{"type":"array","items":{"type":"object","properties":{"sector":{"type":"string"},"co2_tonnes":{"type":"number"},"change_pct":{"type":"number"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/environment/emissions/history":{"get":{"operationId":"getEmissionsHistory","summary":"Get emissions history","description":"Returns greenhouse gas emissions history from SCB.","tags":["Emissions"],"parameters":[{"name":"from","in":"query","schema":{"type":"string"},"description":"Start year (default 2020)"},{"name":"to","in":"query","schema":{"type":"string"},"description":"End year (default 2024)"}],"responses":{"200":{"description":"Emissions history","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/environment/protected-areas":{"get":{"operationId":"getProtectedAreas","summary":"Search protected nature areas","description":"Returns protected areas (nature reserves, national parks, etc.) from Naturvårdsverket. Filter by municipality or type.","tags":["Environment"],"parameters":[{"name":"municipality","in":"query","schema":{"type":"string"},"description":"Filter by municipality name","example":"Stockholm"},{"name":"type","in":"query","schema":{"type":"string"},"description":"Filter by area type (e.g. Naturreservat, Nationalpark)"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"minimum":1,"maximum":100},"description":"Max results to return"}],"responses":{"200":{"description":"Protected areas","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/ProtectedAreaSearchData"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/gdp":{"get":{"operationId":"getGdpData","summary":"GDP data","description":"Returns GDP data from SCB.","tags":["GDP"],"parameters":[{"name":"year","in":"query","schema":{"type":"integer"},"description":"Filter by year"}],"responses":{"200":{"description":"GDP data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"gdp_sek_millions":{"type":"number"},"gdp_per_capita_sek":{"type":"number"},"growth_rate_pct":{"type":"number"},"year":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/gdp/history":{"get":{"operationId":"getGdpHistory","summary":"Get GDP history","description":"Returns quarterly GDP time series for Sweden from SCB.","tags":["GDP"],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string"},"description":"Start year (4 digits)"},{"name":"to","in":"query","required":true,"schema":{"type":"string"},"description":"End year (4 digits)"}],"responses":{"200":{"description":"GDP history","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/geo/elevation":{"get":{"operationId":"geoElevation","summary":"Get elevation data","description":"Returns elevation in meters above sea level for a WGS84 coordinate from Lantmäteriet Markhöjd Direkt.","tags":["Geography"],"parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"string"},"description":"WGS84 latitude within Sweden","example":"59.3293"},{"name":"lon","in":"query","required":true,"schema":{"type":"string"},"description":"WGS84 longitude within Sweden","example":"18.0686"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/geo/place-names/search":{"get":{"operationId":"geoPlaceNamesSearch","summary":"Search Swedish place names","description":"Returns official Swedish place names from Lantmäteriet Ortnamn Direkt.","tags":["Geography"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Place name query, at least 2 characters","example":"Stockholm"},{"name":"limit","in":"query","required":false,"schema":{"type":"string"},"description":"Maximum number of place names to return, 1 to 50","example":"5"},{"name":"municipality_code","in":"query","required":false,"schema":{"type":"string"},"description":"Four-digit municipality code","example":"0180"},{"name":"county_code","in":"query","required":false,"schema":{"type":"string"},"description":"Two-digit county code","example":"01"},{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"Lantmäteriet place-name type, for example Tätort or Bebyggelse","example":"Tätort"},{"name":"language","in":"query","required":false,"schema":{"type":"string"},"description":"Place-name language, for example Svenska","example":"Svenska"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/geo/place-names/references":{"get":{"operationId":"geoPlaceNamesReferences","summary":"Find Swedish place-name references","description":"Returns place-name ids and names from Lantmäteriet Ortnamn Direkt.","tags":["Geography"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Place name query, at least 2 characters","example":"Göteborg"},{"name":"limit","in":"query","required":false,"schema":{"type":"string"},"description":"Maximum number of references to return, 1 to 50","example":"5"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/geo/place-names/{id}":{"get":{"operationId":"geoPlaceName","summary":"Get Swedish place name by id","description":"Returns one official Swedish place name from Lantmäteriet Ortnamn Direkt.","tags":["Geography"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Lantmäteriet place-name id","example":"4104563"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/geo/municipalities":{"get":{"operationId":"geoMunicipalities","summary":"List Swedish municipalities","description":"Returns Swedish municipalities from Lantmäteriet Kommun, Län och Rike Direkt.","tags":["Geography"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"string"},"description":"Maximum number of municipalities to return, 1 to 290","example":"5"},{"name":"include_geometry","in":"query","required":false,"schema":{"type":"string"},"description":"Set to true to include raw GeoJSON geometry","example":"false"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/geo/municipalities/{code}":{"get":{"operationId":"geoMunicipality","summary":"Get Swedish municipality by code","description":"Returns one Swedish municipality by four-digit municipality code from Lantmäteriet.","tags":["Geography"],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"},"description":"Four-digit municipality code","example":"0180"},{"name":"include_geometry","in":"query","required":false,"schema":{"type":"string"},"description":"Set to true to include raw GeoJSON geometry","example":"false"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/geo/counties":{"get":{"operationId":"geoCounties","summary":"List Swedish counties","description":"Returns Swedish counties from Lantmäteriet Kommun, Län och Rike Direkt.","tags":["Geography"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"string"},"description":"Maximum number of counties to return, 1 to 21","example":"21"},{"name":"include_geometry","in":"query","required":false,"schema":{"type":"string"},"description":"Set to true to include raw GeoJSON geometry","example":"false"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/geo/counties/{code}":{"get":{"operationId":"geoCounty","summary":"Get Swedish county by code","description":"Returns one Swedish county by two-digit county code from Lantmäteriet.","tags":["Geography"],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"},"description":"Two-digit county code","example":"01"},{"name":"include_geometry","in":"query","required":false,"schema":{"type":"string"},"description":"Set to true to include raw GeoJSON geometry","example":"false"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/geo/country":{"get":{"operationId":"geoCountry","summary":"Get Sweden country boundary metadata","description":"Returns Sweden as an administrative country object from Lantmäteriet.","tags":["Geography"],"parameters":[{"name":"include_geometry","in":"query","required":false,"schema":{"type":"string"},"description":"Set to true to include raw GeoJSON geometry","example":"false"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/migration":{"get":{"operationId":"getMigrationOverview","summary":"Get migration statistics overview","description":"Returns an overview of immigration and emigration statistics from SCB.","tags":["Migration"],"parameters":[{"name":"year","in":"query","schema":{"type":"string"},"description":"Year"}],"responses":{"200":{"description":"Migration overview","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/migration/emigration":{"get":{"operationId":"getEmigration","summary":"Get emigration statistics","description":"Returns emigration statistics from SCB, broken down by destination country, age, and sex.","tags":["Migration"],"parameters":[{"name":"year","in":"query","schema":{"type":"string"},"description":"Year"},{"name":"country","in":"query","schema":{"type":"string"},"description":"Destination country code"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Emigration statistics","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/migration/immigration":{"get":{"operationId":"getImmigration","summary":"Get immigration statistics","description":"Returns immigration statistics from SCB, broken down by country of origin, age, and sex.","tags":["Migration"],"parameters":[{"name":"year","in":"query","schema":{"type":"string"},"description":"Year"},{"name":"country","in":"query","schema":{"type":"string"},"description":"Country of origin code"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Immigration statistics","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/names/search":{"get":{"operationId":"searchNames","summary":"Search Swedish name statistics","description":"Returns name frequency data from SCB — how many people in Sweden have a given first or last name.","tags":["Names"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Name to search for","example":"Erik"}],"responses":{"200":{"description":"Name statistics","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"query":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["firstname","lastname"]},"male_count":{"type":"integer"},"female_count":{"type":"integer"},"total_count":{"type":"integer"}}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/parental-leave":{"get":{"operationId":"getParentalLeaveStats","summary":"Parental leave statistics","description":"Returns parental leave statistics from Försäkringskassan.","tags":["Parental Leave"],"responses":{"200":{"description":"Parental leave stats","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total_days":{"type":"integer"},"by_gender":{"type":"object","properties":{"female_pct":{"type":"number"},"male_pct":{"type":"number"}}},"year":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/public-health/{indicator}":{"get":{"operationId":"getPublicHealthIndicator","summary":"Get public health data for an indicator","description":"Returns time-series data for a specific public health indicator, optionally filtered by region.","tags":["Public Health"],"parameters":[{"name":"indicator","in":"path","required":true,"schema":{"type":"string","enum":["life_expectancy","self_rated_health","smoking","obesity","physical_activity"]},"description":"Indicator code"},{"name":"region","in":"query","schema":{"type":"string","default":"00"},"description":"Region code (default: national)"}],"responses":{"200":{"description":"Health indicator data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"indicator":{"type":"string"},"description":{"type":"string"},"values":{"type":"array","items":{"type":"object","properties":{"region":{"type":"string"},"year":{"type":"string"},"value":{"type":"number","nullable":true},"gender":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/public-health/indicators":{"get":{"operationId":"listPublicHealthIndicators","summary":"List available public health indicators","description":"Returns available health indicators from Folkhälsomyndigheten (life_expectancy, self_rated_health, smoking, obesity, physical_activity).","tags":["Public Health"],"responses":{"200":{"description":"Health indicators","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"indicators":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/radio/channels":{"get":{"operationId":"getRadioChannels","summary":"List Sveriges Radio channels","description":"Returns a list of Sveriges Radio channels with live audio stream URLs.","tags":["Radio"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":10,"minimum":1,"maximum":100},"description":"Max results to return"}],"responses":{"200":{"description":"Radio channels","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/RadioChannelSearchData"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/radio/channels/{id}/now-playing":{"get":{"operationId":"getRadioNowPlaying","summary":"Get currently playing on a channel","description":"Returns what is currently playing on a Sveriges Radio channel.","tags":["Radio"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"SR channel ID"}],"responses":{"200":{"description":"Now playing","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/radio/channels/{id}/schedule":{"get":{"operationId":"getRadioSchedule","summary":"Get channel broadcast schedule","description":"Returns the broadcast schedule for a Sveriges Radio channel.","tags":["Radio"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"SR channel ID"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Channel schedule","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/radio/channels/{id}/song-history":{"get":{"operationId":"getRadioSongHistory","summary":"Get channel song playlist history","description":"Returns recent song playlist history for a Sveriges Radio channel.","tags":["Radio"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"SR channel ID"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"minimum":1,"maximum":50},"description":"Page size"}],"responses":{"200":{"description":"Song history","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/radio/programs":{"get":{"operationId":"searchRadioPrograms","summary":"Search Sveriges Radio programs","description":"Search radio programs by name. Returns program details including podcast availability.","tags":["Radio"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Program name to search for (min 2 characters)","example":"Ekot"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"minimum":1,"maximum":100},"description":"Max results to return"}],"responses":{"200":{"description":"Radio programs","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/RadioProgramSearchData"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/radio/programs/{id}/episodes":{"get":{"operationId":"getRadioEpisodes","summary":"Get program episodes","description":"Returns episodes for a Sveriges Radio program.","tags":["Radio"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"SR program ID"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"minimum":1,"maximum":50},"description":"Page size"}],"responses":{"200":{"description":"Program episodes","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/student-finance/debt":{"get":{"operationId":"getStudentDebt","summary":"Get student debt statistics","description":"Returns student debt statistics from CSN.","tags":["Student Finance"],"parameters":[{"name":"year","in":"query","schema":{"type":"string"},"description":"Year"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Student debt data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/student-finance/disbursements":{"get":{"operationId":"getStudentDisbursements","summary":"Get disbursement statistics","description":"Returns student finance disbursement statistics from CSN.","tags":["Student Finance"],"parameters":[{"name":"year","in":"query","schema":{"type":"string"},"description":"Year"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Page size"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Disbursement data","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/student-finance/tables":{"get":{"operationId":"getStudentFinanceTables","summary":"List available student finance tables","description":"Returns available statistics tables from CSN (PxWeb API).","tags":["Student Finance"],"responses":{"200":{"description":"Table listing","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/traffic/areas":{"get":{"operationId":"getTrafficAreas","summary":"Get traffic areas","description":"Returns traffic reporting areas used by Sveriges Radio.","tags":["Traffic"],"responses":{"200":{"description":"Traffic areas","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/traffic/messages":{"get":{"operationId":"getTrafficMessages","summary":"Get traffic messages","description":"Returns current traffic messages from Sveriges Radio's traffic service. Recommended for general traffic disruptions, accidents, road work and local traffic information.","tags":["Traffic"],"parameters":[{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Pagination offset"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Page size"}],"responses":{"200":{"description":"Traffic messages","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/vat/validate/{vatNumber}":{"get":{"operationId":"validateVat","summary":"Validate an EU VAT number","description":"Checks whether a VAT number is valid using the EU VIES service. Returns the registered company name and address when available.","tags":["VAT"],"parameters":[{"name":"vatNumber","in":"path","required":true,"schema":{"type":"string"},"description":"EU VAT number including country prefix (e.g. SE556703614301)","example":"SE556703614301"}],"responses":{"200":{"description":"VAT validation result","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"$ref":"#/components/schemas/VatValidationData"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/water-quality/search":{"get":{"operationId":"searchWaterQualityStations","summary":"Search water quality stations","description":"Searches for water quality stations by municipality name.","tags":["Water Quality"],"parameters":[{"name":"municipality","in":"query","required":true,"schema":{"type":"string"},"description":"Municipality name"}],"responses":{"200":{"description":"Station search results","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/water-quality/stations":{"get":{"operationId":"listWaterQualityStations","summary":"Water quality monitoring stations","description":"Returns a list of water quality monitoring stations.","tags":["Water Quality"],"responses":{"200":{"description":"Water quality stations","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"total":{"type":"integer"},"stations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"water_body":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/water-quality/stations/{id}":{"get":{"operationId":"getWaterQualityMeasurements","summary":"Station measurements","description":"Returns water quality measurements for a specific station.","tags":["Water Quality"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Station ID"}],"responses":{"200":{"description":"Station measurements","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object","properties":{"station_id":{"type":"string"},"station_name":{"type":"string"},"measurements":{"type":"array","items":{"type":"object","properties":{"parameter":{"type":"string"},"value":{"type":"number"},"unit":{"type":"string"},"date":{"type":"string"}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/kommun/municipalities":{"get":{"operationId":"kommunMunicipalities","summary":"List enabled municipal document gateways","description":"Lists municipality document sources enabled for the on-demand municipal meeting document gateway. Documents and extracted text are fetched at request time and are not persisted by Apiverket.","tags":["Municipal Documents"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/kommun/municipalities/{code}/meetings":{"get":{"operationId":"kommunMeetings","summary":"Discover municipal meetings on demand","description":"Forwards a bounded meeting-discovery request to the municipal document backend after Apiverket API-key authentication and quota checks.","tags":["Municipal Documents"],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"},"description":"Four-digit municipality code","example":"0184"},{"name":"from_date","in":"query","required":true,"schema":{"type":"string"},"description":"Start date (YYYY-MM-DD)","example":"2026-06-15"},{"name":"to_date","in":"query","required":true,"schema":{"type":"string"},"description":"End date (YYYY-MM-DD)","example":"2026-06-15"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/kommun/municipalities/{code}/documents":{"get":{"operationId":"kommunDocuments","summary":"List one municipal meeting's documents","description":"Lists document metadata and on-demand read/content links for one meeting identifier emitted by the municipal backend.","tags":["Municipal Documents"],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"},"description":"Four-digit municipality code","example":"0184"},{"name":"meeting_identifier","in":"query","required":true,"schema":{"type":"string"},"description":"Opaque meeting identifier returned by the meetings endpoint","example":"test"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/kommun/documents/{code}/text":{"get":{"operationId":"kommunDocumentText","summary":"Read a municipal PDF as page-cited text","description":"Fetches one municipal source PDF on demand through the backend parser and returns normalized page-aware text without storing document bytes or extracted text in Apiverket.","tags":["Municipal Documents"],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"},"description":"Four-digit municipality code","example":"0184"},{"name":"source_identifier","in":"query","required":true,"schema":{"type":"string"},"description":"Opaque source identifier returned by the documents endpoint","example":"test"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}},"/v1/kommun/documents/{code}/content":{"get":{"operationId":"kommunDocumentContent","summary":"Stream a municipal source PDF on demand","description":"Streams one municipal source PDF through Apiverket authentication and quota controls. The response is no-store and Apiverket does not persist document bytes.","tags":["Municipal Documents"],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"},"description":"Four-digit municipality code","example":"0184"},{"name":"source_identifier","in":"query","required":true,"schema":{"type":"string"},"description":"Opaque source identifier returned by the documents endpoint","example":"test"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ApiMeta"},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/SourceError"}}}}}}