Angular SSR State Extractor
Pricing
Pay per event
Angular SSR State Extractor
Extract the embedded serverApp-state JSON blob from any Angular Universal site. Decodes the proprietary HTML entity escape that breaks generic JSON parsers. Filter by request-key or dump full state. For OSINT, reverse-engineering, and dataset work.
Pricing
Pay per event
Rating
0.0
(0)
Developer
BowTiedRaccoon
Actor stats
0
Bookmarked
1
Total users
1
Monthly active users
a day ago
Last modified
Categories
Share
Angular SSR State Extractor (TransferState JSON)
Decode the embedded serverApp-state JSON blob from any Angular Universal site. Handles Angular's proprietary &q; / &a; / &l; / &g; HTML entity escape that breaks every generic JSON parser. Pure HTTP fetch — no browser needed.
Angular SSR Extractor Features
- Decodes
<script id="serverApp-state">blocks shipped by every Angular Universal SSR app. - Translates Angular's proprietary entity escape (
&q;→",&a;→&,&l;→<,&g;→>) so the payload is real JSON again. - Filters by
keyContainssubstring — pull just the request keys you care about, or dump the whole state. - Returns one dataset row per input URL.
not_foundanderrorrows still emit so you keep a clean 1:1 mapping. - Pure HTTP fetch via CheerioCrawler — no Chromium, no proxy by default. SSR state is in static HTML by definition.
- Custom script-element ID via
scriptIdfor sites that use a non-default state container.
Who Uses Angular SSR State Data?
- OSINT and competitive research — pull pre-rendered state without scraping the rendered DOM.
- Reverse-engineering teams — inspect the API contracts a single-page app actually loads, not what marketing claims.
- Dataset builders — extract structured records from Angular sites that don't expose a public API.
- QA and SEO auditors — verify what the SSR-rendered state actually contains versus what the client-rendered page eventually shows.
- Migration projects — snapshot SSR state across pages before swapping the framework underneath them.
How Angular SSR Extractor Works
- Pass in a list of Angular Universal page URLs. The actor caps at 15 per run by default to stay inside the Apify tester's 5-minute timeout.
- CoreCrawler fetches the static HTML over plain HTTP. No browser is needed because SSR state is in the response body.
- The NgTransferState shared-lib locates the
<script id="serverApp-state">element, decodes the entity escape, and parses the JSON. - Each row is filtered by
keyContains(or dumped in full whenreturnAllEntries=true) and emitted to the dataset as flat strings that round-trip through CSV / Excel.
Filter modes
returnAllEntries=false+keyContains='/users'—entriescontains state entries whose request-key includes/users.rawis null.returnAllEntries=true—entriescontains the matching subset (may be empty).rawcarries the full decoded state object.returnAllEntries=true+keyContains=''—entriesis the full state.rawmirrors it.
Input
{"urls": ["https://angular.dev/guide/ssr","https://example-angular-app.com/profile/123"],"maxItems": 5,"scriptId": "serverApp-state","keyContains": "/profile","returnAllEntries": false}
| Field | Type | Default | Description |
|---|---|---|---|
urls | array | required | Angular Universal page URLs to extract SSR state from. |
maxItems | integer | 5 | Hard cap on URLs per run. Range 1-15 (the tester's 5-min headroom). |
scriptId | string | serverApp-state | ID of the <script> element that holds the state. |
keyContains | string | "" | Only return entries whose request-key contains this substring. Empty = all entries (when returnAllEntries=true). |
returnAllEntries | boolean | false | When true, dump every state entry plus the full decoded state in raw. |
proxyConfiguration | object | none | Optional. Pure HTTP fetches usually don't need one. |
Angular SSR Extractor Output Fields
{"url": "https://angular.dev/guide/ssr","finalUrl": "https://angular.dev/guide/ssr","found": true,"stateKeyCount": 12,"entries": ["GET https://api.example.com/profile/123 :: {\"name\":\"Alice\",\"plan\":\"pro\"}"],"raw": null,"scriptId": "serverApp-state","status": "success","errorMsg": null,"extractedAt": "2026-04-30T12:00:00Z"}
| Field | Type | Description |
|---|---|---|
url | string | Input URL. |
finalUrl | string | URL after redirects (same as url when none). |
found | boolean | True when the script element and state were located. |
stateKeyCount | number | Total entries in the decoded state (before filtering). |
entries | array | Filtered (or full) list of entries, formatted as <requestKey> :: <body JSON> for CSV-friendly export. |
raw | object | Full decoded state object — only populated when returnAllEntries=true. |
scriptId | string | The script element ID that was decoded. |
status | string | success, not_found, or error. |
errorMsg | string | Error message on failure; null on success. |
extractedAt | string | ISO timestamp when the extraction ran. |
Pricing
Single DATA_RECORD event. Every URL bills the same — pure HTTP fetch plus a JSON decode.
| Event | Price |
|---|---|
| Actor start | $0.10 |
| Per URL processed | $0.001 |
| Volume | Cost |
|---|---|
| 100 URLs | $0.20 |
| 1,000 URLs | $1.10 |
| 10,000 URLs | $10.10 |
Limits
maxItemscaps at 15 per run, sized for the Apify tester's 5-minute timeout. Raise the actor timeout and override the cap for larger batches.- Some sites encrypt or split SSR state across multiple script elements. The default
scriptIdcovers most Angular Universal apps; pass a custom ID for sites that don't use the standard container. - A
not_foundstatus means the script element was missing, empty, or the JSON failed to parse. The actor still emits a row so the input list maps 1:1 to the output dataset. - Failed fetches (non-2xx, network errors) emit a row with
status=erroranderrorMsgset. - This actor does not render JavaScript. If a target site hydrates state purely client-side, the SSR state container will be empty.
Related Actors
- Structured Data Validator Pro — for non-Angular sites where you want JSON-LD, OG, and schema.org data instead.
- Sitemap Walker Pro — feed discovered URLs from any Angular SSR site straight into this actor.
- DNS Domain Audit — qualify the domains hosting the Angular apps you're auditing.
Need More Features?
Need decoding for a different framework's TransferState payload, post-processing rules, or a custom output shape? File an issue or get in touch.
Why Use Angular SSR Extractor?
- Handles the entity escape — Angular's proprietary
&q;/&a;/&l;/&g;substitutions break every generic JSON parser. The actor handles them so you don't have to. - No browser — pure HTTP fetch. Faster, cheaper, and harder to fingerprint than a Chromium-driven scraper. SSR state lives in the HTML by design; that's the point of SSR.
- 1:1 input/output — every URL produces exactly one dataset row, including failures. Dataset joins stay clean.
Built by OrbTop.