Angular SSR State Extractor avatar

Angular SSR State Extractor

Pricing

Pay per event

Go to Apify Store
Angular SSR State Extractor

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

BowTiedRaccoon

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

a day ago

Last modified

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 keyContains substring — pull just the request keys you care about, or dump the whole state.
  • Returns one dataset row per input URL. not_found and error rows 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 scriptId for 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

  1. 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.
  2. CoreCrawler fetches the static HTML over plain HTTP. No browser is needed because SSR state is in the response body.
  3. The NgTransferState shared-lib locates the <script id="serverApp-state"> element, decodes the entity escape, and parses the JSON.
  4. Each row is filtered by keyContains (or dumped in full when returnAllEntries=true) and emitted to the dataset as flat strings that round-trip through CSV / Excel.

Filter modes

  • returnAllEntries=false + keyContains='/users'entries contains state entries whose request-key includes /users. raw is null.
  • returnAllEntries=trueentries contains the matching subset (may be empty). raw carries the full decoded state object.
  • returnAllEntries=true + keyContains=''entries is the full state. raw mirrors it.

Input

{
"urls": [
"https://angular.dev/guide/ssr",
"https://example-angular-app.com/profile/123"
],
"maxItems": 5,
"scriptId": "serverApp-state",
"keyContains": "/profile",
"returnAllEntries": false
}
FieldTypeDefaultDescription
urlsarrayrequiredAngular Universal page URLs to extract SSR state from.
maxItemsinteger5Hard cap on URLs per run. Range 1-15 (the tester's 5-min headroom).
scriptIdstringserverApp-stateID of the <script> element that holds the state.
keyContainsstring""Only return entries whose request-key contains this substring. Empty = all entries (when returnAllEntries=true).
returnAllEntriesbooleanfalseWhen true, dump every state entry plus the full decoded state in raw.
proxyConfigurationobjectnoneOptional. 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"
}
FieldTypeDescription
urlstringInput URL.
finalUrlstringURL after redirects (same as url when none).
foundbooleanTrue when the script element and state were located.
stateKeyCountnumberTotal entries in the decoded state (before filtering).
entriesarrayFiltered (or full) list of entries, formatted as <requestKey> :: <body JSON> for CSV-friendly export.
rawobjectFull decoded state object — only populated when returnAllEntries=true.
scriptIdstringThe script element ID that was decoded.
statusstringsuccess, not_found, or error.
errorMsgstringError message on failure; null on success.
extractedAtstringISO timestamp when the extraction ran.

Pricing

Single DATA_RECORD event. Every URL bills the same — pure HTTP fetch plus a JSON decode.

EventPrice
Actor start$0.10
Per URL processed$0.001
VolumeCost
100 URLs$0.20
1,000 URLs$1.10
10,000 URLs$10.10

Limits

  • maxItems caps 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 scriptId covers most Angular Universal apps; pass a custom ID for sites that don't use the standard container.
  • A not_found status 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=error and errorMsg set.
  • This actor does not render JavaScript. If a target site hydrates state purely client-side, the SSR state container will be empty.

  • 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.