{"source":"legemidler","operation":"search_medicines","description":"Search Norwegian medicines by name, active substance, manufacturer, ATC\ncode or item number. Signature: search_medicines(query: string, required; prescription_group: string, optional, default None; marketed_only: yes/no, optional, default False; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0).","signature":"search_medicines(query: string, required; prescription_group: string, optional, default None; marketed_only: yes/no, optional, default False; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0)","parameters":[{"name":"query","type":"string","schema":{"type":"string"},"required":true,"default":null,"description":"Case-insensitive text matched against brand and full name (\"Paracet\"), active substance in Norwegian or English (\"paracetamol\"), manufacturer and ATC code. A 6-digit item number (varenummer, e.g. \"224948\") finds the medicine that package belongs to.","unit":null},{"name":"prescription_group","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"enum":["A","B","C","CF","F","K",null]},"required":false,"default":null,"description":"Only this reseptgruppe: \"A\" (narcotics), \"B\" (habit-forming), \"C\" (other prescription), \"CF\" (non-prescription in some pack sizes), \"F\" (non-prescription) or \"K\" (food supplements).","unit":null},{"name":"marketed_only","type":"boolean","schema":{"type":"boolean"},"required":false,"default":false,"description":"Only medicines with at least one package on the market today (default false).","unit":null},{"name":"limit","type":"integer","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"default":25,"description":"Max medicines to return, 1-500 (default 25). 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); with limit, pages through every match. Unit: items.","unit":"items"}],"json_get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/legemidler/search_medicines?query={query}&prescription_group={prescription_group}&marketed_only=false&limit=25&offset=0","example_url":"https://allemannsdata.com/wiki/api/v1/kilder/legemidler/search_medicines?query=paracetamol&marketed_only=True","schema_scope":"#/data in the successful operation envelope","response_schema":{"type":"object","properties":{"as_of":{"type":["string","null"],"format":"date"},"count":{"type":"integer"},"returned":{"type":"integer"},"medicines":{"type":"array","items":{"type":"object","properties":{"medicine_id":{"type":"string"},"brand":{"type":["string","null"]},"name":{"type":["string","null"]},"atc_code":{"type":["string","null"]},"atc_name":{"type":["string","null"]},"form":{"type":["string","null"]},"prescription_group":{"type":["string","null"]},"product_type":{"type":["string","null"]},"manufacturer":{"type":["string","null"]},"substances":{"type":"array","items":{"type":"object","properties":{"substance":{"type":"string"},"substance_en":{"type":["string","null"]},"strength":{"type":["number","null"]},"unit":{"type":["string","null"]}},"additionalProperties":false,"required":["substance"]}},"status":{"type":"string","enum":["marketed","temporarily_unavailable","not_yet_marketed","deregistered"]},"package_count":{"type":"integer"}},"additionalProperties":false,"required":["medicine_id","package_count"]}}},"additionalProperties":false,"required":["as_of","count","returned","medicines"]},"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/legemidler/search_medicines/schema","operation":"https://allemannsdata.com/wiki/api/v1/kilder/legemidler/search_medicines","source":"https://allemannsdata.com/wiki/api/v1/kilder/legemidler","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"},"output_fields":["as_of","count","returned","medicines","medicines[].medicine_id","medicines[].brand","medicines[].name","medicines[].atc_code","medicines[].atc_name","medicines[].form","medicines[].prescription_group","medicines[].product_type","medicines[].manufacturer","medicines[].substances","medicines[].substances[].substance","medicines[].substances[].substance_en","medicines[].substances[].strength","medicines[].substances[].unit","medicines[].status","medicines[].package_count"],"output_fields_truncated":false,"canonical_field_aliases":{"name":["medicines[].name"]},"temporal_conventions":{"timezone":"calendar_dates","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.","date_fields":["as_of"]},"response_example":{"source":"legemidler","operation":"search_medicines","parameters":{"query":"paracetamol","marketed_only":true,"limit":25,"offset":0},"data":{"as_of":"2026-01-15","count":1,"returned":1,"medicines":[{"medicine_id":"example-id","brand":"example value","name":"Example","atc_code":"example value","atc_name":"Example","form":"example value","prescription_group":"example value","product_type":"example value","manufacturer":"example value","substances":[{"substance":"example value","substance_en":"example value","strength":1.0,"unit":"example value"}],"status":"marketed","package_count":1}]},"entities":[],"_meta":{"retrieved_at":"2026-01-15T12:00:00Z","language":"en","content_languages":["en"],"sources":[{"id":"legemidler","name":"Medicines (DMP FEST)","description":"Every medicine on the Norwegian market from DMP's open FEST catalogue: ATC code, active substances with strength, form, prescription group, manufacturer, and per package the item number, maximum retail price, marketing status and blue-prescription reimbursement.","publisher":"Direktoratet for medisinske produkter (DMP)","license":"https://data.norge.no/nlod/en/2.0/","cache_ttl_seconds":3600,"documentation":"https://www.dmp.no/om-oss/distribusjon-av-legemiddeldata/fest"}]},"_provenance":{"data":{"source":"legemidler","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/legemidler"},"entities":{"source":"legemidler","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/legemidler","derived_from":"#/data","description":"Normalized projection of data."}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/legemidler/search_medicines","source":"https://allemannsdata.com/wiki/api/v1/kilder/legemidler","wiki":"https://allemannsdata.com/wiki/kilder/legemidler/search_medicines/","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"}}}
