{"source":"landbruk","operation":"search_farms","description":"Individual farms (subsidy applicants) in a municipality, or one by organisation number. Signature: search_farms(municipality: string, optional, default None; org_number: string, optional, default None; production_code: string, optional, default None; year: integer, calendar year, optional, default None; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0).","signature":"search_farms(municipality: string, optional, default None; org_number: string, optional, default None; production_code: string, optional, default None; year: integer, calendar year, optional, default None; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0)","parameters":[{"name":"municipality","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Municipality name (\"Gloppen\") or number (\"4650\") of the farm's operating centre. Give this, org_number or both.","unit":null},{"name":"org_number","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"The applicant's nine-digit organisation number.","unit":null},{"name":"production_code","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Keep only farms reporting this code, e.g. \"p120\" (dairy cows, either count date), \"p120_vaar\", \"p242\" (barley) or \"p145\" (ewes). Codes are listed by list_production_codes.","unit":null},{"name":"year","type":"integer","schema":{"anyOf":[{"type":"integer"},{"type":"null"}]},"required":false,"default":null,"description":"Application year, 2017 or later (default: the latest complete year). Unit: calendar year.","unit":"calendar year"},{"name":"limit","type":"integer","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"default":25,"description":"Max farms to return, 1-500 (default 50). Unit: items. Through this API: default 25, maximum 100.","unit":"items"},{"name":"offset","type":"integer","schema":{"type":"integer"},"required":false,"default":0,"description":"Results to skip before the first one returned (default 0). Unit: items.","unit":"items"}],"json_get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/landbruk/search_farms?municipality={municipality}&org_number={org_number}&production_code={production_code}&year={year}&limit=25&offset=0","example_url":"https://allemannsdata.com/wiki/api/v1/kilder/landbruk/search_farms?municipality=Gloppen&production_code=p120","schema_scope":"#/data in the successful operation envelope","response_schema":{"type":"object","properties":{"year":{"type":"integer"},"count":{"type":"integer"},"returned":{"type":"integer"},"farms":{"type":"array","items":{"type":"object","properties":{"org_number":{"type":["string","null"]},"name":{"type":["string","null"]},"name_withheld":{"type":"boolean"},"kommunenr":{"type":"string"},"municipality":{"type":["string","null"]},"case_kommunenr":{"type":["string","null"]},"property_gnr_bnr_fnr":{"type":["string","null"]},"fully_cultivated_daa":{"type":["number","null"]},"surface_cultivated_daa":{"type":["number","null"]},"infield_pasture_daa":{"type":["number","null"]},"total_area_daa":{"type":["number","null"]},"total_subsidy_nok":{"type":["number","null"]},"production":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"category":{"type":"string","enum":["area","produce","animals","crops","pasture","forage_sales","heritage_breeds","organic","subsidy","other"]},"unit":{"type":["string","null"]},"count_date":{"type":["string","null"],"enum":["1 March","1 October",null]},"value":{"type":"number"}},"additionalProperties":false,"required":["code","label","category","unit","count_date","value"]}},"subsidies":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"amount_nok":{"type":"number"}},"additionalProperties":false,"required":["code","label","amount_nok"]}}},"additionalProperties":false,"required":["org_number","name","name_withheld","kommunenr","municipality","case_kommunenr","property_gnr_bnr_fnr","fully_cultivated_daa","surface_cultivated_daa","infield_pasture_daa","total_area_daa","total_subsidy_nok","production","subsidies"]}}},"additionalProperties":false,"required":["year","count","returned","farms"]},"response_schema_status":{"status":"declared","codegen_safe":true,"description":"Maintained response contract."},"entity_projection":{"status":"intentionally_none","entity_types":[],"description":"No stable cross-source entity projection is defined for this operation; entities is intentionally empty."},"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/landbruk/search_farms/schema","operation":"https://allemannsdata.com/wiki/api/v1/kilder/landbruk/search_farms","source":"https://allemannsdata.com/wiki/api/v1/kilder/landbruk","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"},"output_fields":["year","count","returned","farms","farms[].org_number","farms[].name","farms[].name_withheld","farms[].kommunenr","farms[].municipality","farms[].case_kommunenr","farms[].property_gnr_bnr_fnr","farms[].fully_cultivated_daa","farms[].surface_cultivated_daa","farms[].infield_pasture_daa","farms[].total_area_daa","farms[].total_subsidy_nok","farms[].production","farms[].production[].code","farms[].production[].label","farms[].production[].category","farms[].production[].unit","farms[].production[].count_date","farms[].production[].value","farms[].subsidies","farms[].subsidies[].code","farms[].subsidies[].label","farms[].subsidies[].amount_nok"],"output_fields_truncated":false,"canonical_field_aliases":{"name":["farms[].name","farms[].production[].label","farms[].subsidies[].label"],"identifier":["farms[].production[].code","farms[].subsidies[].code"]},"response_example":{"source":"landbruk","operation":"search_farms","parameters":{"municipality":"Gloppen","production_code":"p120","limit":25,"offset":0},"data":{"year":1,"count":1,"returned":1,"farms":[{"org_number":"example value","name":"Example","name_withheld":true,"kommunenr":"example value","municipality":"example value","case_kommunenr":"example value","property_gnr_bnr_fnr":"example value","fully_cultivated_daa":1.0,"surface_cultivated_daa":1.0,"infield_pasture_daa":1.0,"total_area_daa":1.0,"total_subsidy_nok":1.0,"production":[{"code":"example value","label":"Example","category":"area","unit":"example value","count_date":"1 March","value":1.0}],"subsidies":[{"code":"example value","label":"Example","amount_nok":1.0}]}]},"entities":[],"_meta":{"retrieved_at":"2026-01-15T12:00:00Z","language":"en","content_languages":["en"],"sources":[{"id":"landbruk","name":"Landbruksdirektoratet","description":"Farm subsidy applications (produksjons- og avl\u00f8sertilskudd) per farm and year since 2017: farms, cultivated area, animals by type (dairy cows, sheep, pigs, poultry), crop areas, organic production and subsidies per municipality. Names of sole proprietors and partnerships are withheld.","publisher":"Landbruksdirektoratet","license":"https://data.norge.no/nlod/en/2.0/","cache_ttl_seconds":3600,"documentation":"https://github.com/LandbruksdirektoratetGIT/opendata/tree/main/datasets/produksjon-og-avlosertilskudd"}]},"_provenance":{"data":{"source":"landbruk","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/landbruk"},"entities":{"source":"landbruk","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/landbruk","derived_from":"#/data","description":"Normalized projection of data."}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/landbruk/search_farms","source":"https://allemannsdata.com/wiki/api/v1/kilder/landbruk","wiki":"https://allemannsdata.com/wiki/kilder/landbruk/search_farms/","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"}}}
