In any action involving a child in need of supervision, the records and files of the court may be sealed by court order issued on the court's own motion or on the petition of any party to the action after the termination or completion of the action in all respects, after the expiration of the time for all appeals and after the unconditional release of the child from the court's jurisdiction. After the records and files are sealed, inspection of them may thereafter be permitted by the court only on petition by the state's attorney, guardian, guardian ad litem, or attorney for the child who is the subject of the action or by the respondent parents or a court services officer. Before allowing inspection of sealed records and files, the court shall find that the inspection is in keeping with the best interests of the child.
SDCL 26-7A-114