Оригинал формы запроса https://service.nalog.ru/inn-my.do
$ composer require dezinger/request-inn
use Dezinger\RequestINN\RequestINN;
$requestINN = new RequestINN();
$captcha = $requestINN->getCaptcha();
use Dezinger\RequestINN\RequestINN;
$data = [
'c' => 'innMy',
'fam' => '',
'nam' => '',
'otch' => '',
'bdate' => '',
'bplace' => '',
'doctype' => 21,
'docno' => '',
'docdt' => '',
'captcha' => '',
'captchaToken' => ''
];
$requestINN = new RequestINN();
if ($requestINN->isValid($data)) {
$inn = $requestINN->getINN();
} else {
$errors = $requestINN->getErrors();
}