{"source":"lottstift","operation":"search_allocations","description":"Search one published allocation list by recipient, organisation number or municipality. Signature: search_allocations(dataset_id: string, required; query: string, optional, default None; organization_id: string, optional, default None; municipality: string, optional, default None; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0).","signature":"search_allocations(dataset_id: string, required; query: string, optional, default None; organization_id: string, optional, default None; municipality: string, optional, default None; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0)","parameters":[{"name":"dataset_id","type":"string","schema":{"type":"string"},"required":true,"default":null,"description":"Identifier from list_datasets; each publication is queried separately.","unit":null},{"name":"query","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Literal recipient-name substring, case insensitive.","unit":null},{"name":"organization_id","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Nine-digit organisation number, optionally with spaces.","unit":null},{"name":"municipality","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Exact municipality name as published; not available in every spreadsheet.","unit":null},{"name":"limit","type":"integer","schema":{"maximum":100,"minimum":1,"type":"integer","default":25},"required":false,"default":25,"description":"Allocation rows per page, 1\u2013100. Unit: items. Through this API: default 25, maximum 100.","unit":"items"},{"name":"offset","type":"integer","schema":{"minimum":0,"type":"integer"},"required":false,"default":0,"description":"Rows to skip. Multiple projects for the same recipient remain separate. Unit: items.","unit":"items"}],"json_get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/lottstift/search_allocations?dataset_id={dataset_id}&query={query}&organization_id={organization_id}&municipality={municipality}&limit=25&offset=0","example_url":"https://allemannsdata.com/wiki/api/v1/kilder/lottstift/search_allocations?dataset_id=vat-2024-a88ff58f&municipality=Trondheim","schema_scope":"#/data in the successful operation envelope","response_schema":{"type":"object","properties":{"count":{"type":"integer"},"returned":{"type":"integer"},"allocations":{"type":"array","items":{"type":"object","properties":{"dataset_id":{"type":["string","null"]},"scheme":{"type":["string","null"]},"row_id":{"type":["string","null"]},"organization_id":{"type":["string","null"]},"name":{"type":["string","null"]},"municipality":{"type":["string","null"]},"county":{"type":["string","null"]},"category":{"type":["string","null"]},"outcome":{"type":["string","null"]},"facility":{"type":["string","null"]},"facility_id":{"type":["string","null"]},"description":{"type":["string","null"]},"note":{"type":["string","null"]},"organisation_type":{"type":["string","null"]},"applicant_org_nr":{"type":["string","null"]},"amount_column":{"type":["string","null"]},"year":{"type":"integer"},"amount_nok":{"type":["number","null"]},"supplementary_amount_nok":{"type":["number","null"]}},"additionalProperties":false}},"source":{"type":"object","properties":{"source_url":{"type":["string","null"]},"currency":{"type":["string","null"]},"funding_note":{"type":["string","null"]},"coverage_note":{"type":["string","null"]},"data_generated_at":{"type":["string","null"]},"first_transaction_date":{"type":["string","null"]},"last_transaction_date":{"type":["string","null"]},"dataset_id":{"type":["string","null"]},"scheme":{"type":["string","null"]},"name":{"type":["string","null"]},"amount_note":{"type":["string","null"]},"snapshot_refreshed_at":{"type":"string","format":"date-time"},"activity_count":{"type":"integer"},"year":{"type":"integer"},"has_municipality":{"type":"boolean"}},"additionalProperties":false},"dataset_id":{"type":["string","null"]},"total_amount_nok":{"type":["number","null"]},"missing_amount_rows":{"type":"integer"}},"additionalProperties":false},"response_schema_status":{"status":"declared","codegen_safe":true,"description":"Maintained response contract."},"entity_projection":{"status":"projected","entity_types":["organization"],"description":"Recognized records and stable operation identifiers are projected; an empty array means the successful payload contained no recognizable entity."},"error_contract":{"scope":"top-level HTTP error response; never part of a success payload","schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object"}},"additionalProperties":false,"required":["code","message","retryable"]},"suggestion":{"type":"string"},"_meta":{"type":"object","properties":{"retrieved_at":{"type":"string","format":"date-time"},"language":{"type":"string","const":"en"},"content_languages":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object"}}},"required":["retrieved_at","language","content_languages","sources"]},"_links":{"type":"object","properties":{"self":{"type":"string","format":"uri"},"api_index":{"type":"string","format":"uri"},"feedback":{"type":"string","format":"uri"}},"required":["self","api_index","feedback"],"additionalProperties":false}},"additionalProperties":false,"required":["error","suggestion","_meta","_links"]},"statuses":{"400":{"codes":["MISSING_PARAMETER","INVALID_PARAMETER","INVALID_REQUEST"],"retryable":false},"404":{"codes":["SOURCE_NOT_FOUND","OPERATION_NOT_FOUND","ENTITY_NOT_FOUND","ENDPOINT_NOT_FOUND"],"retryable":false},"405":{"codes":["METHOD_NOT_ALLOWED"],"retryable":false},"429":{"codes":["RATE_LIMITED","GATEWAY_RATE_LIMITED"],"retryable":true},"503":{"codes":["SOURCE_UNAVAILABLE"],"retryable":true},"500":{"codes":["INTERNAL_ERROR"],"retryable":false}}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/lottstift/search_allocations/schema","operation":"https://allemannsdata.com/wiki/api/v1/kilder/lottstift/search_allocations","source":"https://allemannsdata.com/wiki/api/v1/kilder/lottstift","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"},"output_fields":["count","returned","allocations","allocations[].dataset_id","allocations[].scheme","allocations[].row_id","allocations[].organization_id","allocations[].name","allocations[].municipality","allocations[].county","allocations[].category","allocations[].outcome","allocations[].facility","allocations[].facility_id","allocations[].description","allocations[].note","allocations[].organisation_type","allocations[].applicant_org_nr","allocations[].amount_column","allocations[].year","allocations[].amount_nok","allocations[].supplementary_amount_nok","source","source.source_url","source.currency","source.funding_note","source.coverage_note","source.data_generated_at","source.first_transaction_date","source.last_transaction_date"],"output_fields_truncated":true,"canonical_field_aliases":{"name":["allocations[].name","source.name"]},"temporal_conventions":{"timezone":"explicit_offset","join_guidance":"date-time fields are RFC 3339 with an explicit offset (Z, +00:00 or the Europe/Oslo offset); compare absolute instants, not clock text. date fields are calendar dates without a time zone.","datetime_fields":["source.snapshot_refreshed_at"]},"response_example":{"source":"lottstift","operation":"search_allocations","parameters":{"dataset_id":"vat-2024-a88ff58f","municipality":"Trondheim","limit":25,"offset":0},"data":{"count":1,"returned":1,"allocations":[{"dataset_id":"example-id","scheme":"example value","row_id":"example-id","organization_id":"example-id","name":"Example","municipality":"example value","county":"example value","category":"example value","outcome":"example value","facility":"example value","facility_id":"example-id","description":"example value","note":"example value","organisation_type":"example value","applicant_org_nr":"example value","amount_column":"example value","year":1,"amount_nok":1.0,"supplementary_amount_nok":1.0}],"source":{"source_url":"https://example.invalid/resource","currency":"example value","funding_note":"example value","coverage_note":"example value","data_generated_at":"example value","first_transaction_date":"2026-01-15","last_transaction_date":"2026-01-15","dataset_id":"example-id","scheme":"example value","name":"Example","amount_note":"example value","snapshot_refreshed_at":"2026-01-15T12:00:00Z","activity_count":1,"year":1,"has_municipality":true},"dataset_id":"example-id","total_amount_nok":1.0,"missing_amount_rows":1},"entities":[],"_meta":{"retrieved_at":"2026-01-15T12:00:00Z","language":"en","content_languages":["en"],"sources":[{"id":"lottstift","name":"Voluntary-sector allocations (Lottstift)","description":"Find VAT compensation for voluntary organizations and sports facilities, and allocations from Norsk Tipping's surplus. Search published spreadsheets by recipient, organization number or municipality and rank recipients. Published years vary by scheme; amounts are allocations or approvals, not necessarily payments. Older files and ledgers without recipient organization numbers are excluded.","publisher":"Lotteri- og stiftelsestilsynet","license":null,"cache_ttl_seconds":3600,"documentation":"https://lottstift.no/opne-data/"}]},"_provenance":{"data":{"source":"lottstift","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/lottstift"},"entities":{"source":"lottstift","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/lottstift","derived_from":"#/data","description":"Normalized projection of data."}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/lottstift/search_allocations","source":"https://allemannsdata.com/wiki/api/v1/kilder/lottstift","wiki":"https://allemannsdata.com/wiki/kilder/lottstift/search_allocations/","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"}}}
