Get Publication
Get Publication
Fetch and parse a single Bundesanzeiger filing by its publication_id (issued by list_company_publications). Returns parsed structured financials in integer cents plus a tri-state real_estate block. The deterministic HGB table parser runs first; compressed or unstructured filings fall back to OpenRouter when configured.
The publication_id is an HMAC-signed opaque token — tampered or malformed ids are rejected with a 422 before any upstream call is made.
A 365-day cache is checked first: if the publication content was previously fetched and stored, it is returned without contacting the upstream registry. Otherwise the publication detail page is fetched live (solving any CAPTCHA via the hybrid ONNX → CapSolver pipeline) and the result is persisted into the mirror.
Try it
Pricing
The credit cost depends on the extraction method:
- 10 credits when the deterministic parser handled the filing (full §266 Abs. 2 / Abs. 3 sheets).
- 50 credits when the OpenRouter fallback extracted a compressed or unstructured filing.
- 0 credits/refund when the publication id cannot be resolved, fetched, or parsed.
Endpoint
Examples
Synchronous request
curl -X POST https://api.skael.de/api/enrichments/get_publication \
-H "Authorization: Bearer eak_..." \
-H "Content-Type: application/json" \
-d '{"publication_id": "regpub_v1_eyJzb3VyY2UiOiJidW5kZXNhbnplaWdlciJ9_…"}'
Async with polling
# Step 1: queue the enrichment
curl -X POST https://api.skael.de/api/enrichments/get_publication \
-H "Authorization: Bearer eak_..." \
-d '{"publication_id": "regpub_v1_eyJzb3VyY2UiOiJidW5kZXNhbnplaWdlciJ9_…", "async": true}'
# → 202 {"id": 12345, "status": "queued"}
# Step 2: long-poll for completion
curl "https://api.skael.de/api/enrichments/12345?wait=true&wait_time=50" \
-H "Authorization: Bearer eak_..."
Async with webhook callback
curl -X POST https://api.skael.de/api/enrichments/get_publication \
-H "Authorization: Bearer eak_..." \
-d '{
"publication_id": "regpub_v1_eyJzb3VyY2UiOiJidW5kZXNhbnplaWdlciJ9_…",
"async": true,
"callback_url": "https://yourapp.com/webhook"
}'
Output Fields
Real-estate Detection
The financials.real_estate block is intentionally tri-state:
| Case |
has_real_estate |
grundstuecke_und_bauten |
Explicit Grundstücke und Bauten line item present |
true |
cents value |
| §266 Abs. 2 Sachanlagen breakdown without a Grundstücke line |
false |
0 |
| Ambiguous line item where real-estate ownership is not provable |
null |
null |
Mirror Cache Behavior
The _registry_meta object describes the freshness of the returned record and the work performed:
| Field |
Description |
source |
Provider used to fetch the publication (currently always bundesanzeiger) |
cache_hit |
true if the record was served from the mirror within the 365-day TTL |
freshness_days |
Days since the record was last fetched (0 on cache miss) |
scrape_duration_ms |
Wall-clock duration of the live scrape (0 on cache hit) |
extraction_method |
parser for deterministic parser output or ai for OpenRouter fallback |
ai_model |
OpenRouter model used for AI fallback; omitted for parser output |
captcha_solver.engine |
Solver that produced the accepted answer (onnx, capsolver, or null) |
captcha_solver.fallback_used |
true when CapSolver produced the accepted answer |
captcha_solver.confidence |
ONNX confidence score, or null for CapSolver/cache/no CAPTCHA |
captcha_solver.duration_ms |
Solver duration for the accepted answer, or null on cache/no CAPTCHA |
proxy_used |
Hostname of the residential proxy used for the live scrape |
Error Responses
Validation Error (422)
{
"message": "The publication id is invalid or has been tampered with.",
"errors": {
"publication_id": ["The publication id is invalid or has been tampered with."]
}
}
Publication Not Found (422)
When the publication id is well-formed and signed but no record exists in the mirror:
{
"id": 123,
"type": "get_publication",
"status": "failed",
"error_message": "Publication regpub_v1_eyJzb3VyY2UiOiJidW5kZXNhbnplaWdlciJ9_… not found in mirror — call list_company_publications first to populate it."
}
Typical Response Times
- Mirror cache hit: under 100 ms
- Live scrape, no CAPTCHA: 5-15 seconds
- Live scrape, CAPTCHA fallback: 15-45 seconds