Open wq9578 opened 2 months ago
@wq9578 if you're interested, i have a working prototype implementation for the "api" using laravel dusk within laravel zero as a cli application to interact with the handelsregister website.
Arguments:
language Language which is used for interaction with `Handelsregister`. [default: "DE"]
Options:
--state[=STATE] Select zero, one or more federal states to search in. If none are passed, the search will not be limited to a specific state. Valid codes are based on iso:code:3166:DE. (multiple values allowed)
--keywords[=KEYWORDS] Search for company or keywords.
--keywords-option[=KEYWORDS-OPTION] Select an option how `keywords` are treated; One of (all|any|exact). [default: "any"]
--keywords-match-similar If flag is set, similar matching keywords will be included in results.
--subsidiary-office[=SUBSIDIARY-OFFICE] Subsidiary / registered office.
--include-deleted If flag is set, search results will also include deleted companies.
--only-branches If flag is set, search only for branches in accordance with new law.
--register-type[=REGISTER-TYPE] Type of register (input value is language-dependent).
--register-number[=REGISTER-NUMBER] Company register number.
--register-court[=REGISTER-COURT] Register court (input value is language-dependent).
--legal-status[=LEGAL-STATUS] Company legal status (input value is language-dependent).
--country[=COUNTRY] Country where the company is located (input value is language-dependent).
--postal-code[=POSTAL-CODE] Postal code where the company is located.
--location[=LOCATION] Location/City where the company is located.
--street[=STREET] Street where the company is located.
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
--env[=ENV] The environment the command should run under
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
On a current Mac,
poetry
installed via Homebrew fails:A PHP implementation would be desirable to obtain structured information (SI) as well as the current (AD) and chronological excerpt (CD) for a given legal entity. With the Laravel framework, either Laravel's HTTP client powered by Guzzle might be used, or Laravel Dusk using a Selenium compatible driver if JavaScript is required. Unfortunately, this seems to be the case.
Both a request with
curl
(curl -d "registerArt_input=VR" -d "registerNummer=304" -d "registergericht_input=D2601" https://www.handelsregister.de/rp_web/erweitertesuche.xhtml
) as well as a request with Laravel's HTTP client (obtaining the cookie in a first request, then reusing this cookie requesting the extended search form) fails with the error message "session expired".Test using PHP Pest:
It's a shame that the German federal services don't offer a proper API. Also, a rate limit of 60 requests per hour is ridiculous for publicly available data.