An optical semiconductor apparatus comprising: a package substrate that includes a recess being open on a top surface of the package substrate; an optical semiconductor device housed in the recess; a window member provided to cover an opening of the recess; and a sealing structure for sealing a space between the package substrate and the window member, wherein the sealing structure includes a first metal layer provided in a shape of a frame on the top surface of the package substrate, a second metal layer provided in a shape of a frame on an inner surface of the window member, and a metal bonding part provided between the first metal layer and the second metal layer, wherein: the sealing structure is configured such that an entirety of the second metal layer is positioned in a region where the first metal layer is provided, and the metal bonding part is positioned on both sides sandwiching the second metal layer , an outer dimension (w 11 ) of the first metal layer is larger than an outer dimension (w 21 ) of the second metal layer , and an inner dimension (w 12 ) of the first metal layer is smaller than an inner dimension (w 22 ) of the second metal layer , characterized in that an inner dimension difference (w 22 -w 12 ) between the first metal layer and the second metal layer being larger than an outer dimension difference (w 11 -w 21 ) between the first metal layer and the second metal layer . a package substrate that includes a recess being open on a top surface of the package substrate; an optical semiconductor device housed in the recess; a window member provided to cover an opening of the recess; and a sealing structure for sealing a space between the package substrate and the window member, wherein the sealing structure includes a first metal layer provided in a shape of a frame on the top surface of the package substrate, a second metal layer provided in a shape of a frame on an inner surface of the window member, and a metal bonding part provided between the first metal layer and the second metal layer, wherein: the sealing structure is configured such that an entirety of the second metal layer is positioned in a region where the first metal layer is provided, and the metal bonding part is positioned on both sides sandwiching the second metal layer , an outer dimension (w 11 ) of the first metal layer is larger than an outer dimension (w 21 ) of the second metal layer , and an inner dimension (w 12 ) of the first metal layer is smaller than an inner dimension (w 22 ) of the second metal layer , characterized in that an inner dimension difference (w 22 -w 12 ) between the first metal layer and the second metal layer being larger than an outer dimension difference (w 11 -w 21 ) between the first metal layer and the second metal layer . the sealing structure is configured such that an entirety of the second metal layer is positioned in a region where the first metal layer is provided, and the metal bonding part is positioned on both sides sandwiching the second metal layer , an outer dimension (w 11 ) of the first metal layer is larger than an outer dimension (w 21 ) of the second metal layer , and an inner dimension (w 12 ) of the first metal layer is smaller than an inner dimension (w 22 ) of the second metal layer , characterized in that an inner dimension difference (w 22 -w 12 ) between the first metal layer and the second metal layer being larger than an outer dimension difference (w 11 -w 21 ) between the first metal layer and the second metal layer . <EOS>