# symfony/dom-crawler

Eases DOM navigation for HTML and XML documents

Repository: https://github.com/symfony/dom-crawler
Canonical: https://ross.abutalabs.com/products/dom-crawler
Homepage: https://symfony.com/dom-crawler
Language: PHP
License: MIT
License Family: permissive
Topics: php, symfony, component, symfony-component
Last push: 2026-08-22T13:46:35+00:00

## Health v2 (maintenance only)
Score: 99/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 99, longevity 100
- inputs: {"age_days": 5671, "days_push": 11, "days_rel": 11, "gap_med": 0, "n_releases_24m": 46}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4027, forks 125 (observed 2026-08-28T04:08:32.679519+00:00)

## What it is
Symfony DomCrawler is a PHP component that eases DOM navigation for HTML and XML documents. It provides a Crawler class for querying and traversing DOM nodes, with specialized Link, Image, and Form classes for interacting with HTML elements.

## Use cases
- parse html from a web page in php
- extract links and images from html documents
- scrape data from html using css selectors or xpath
- traverse xml documents in php
- inspect forms and fill fields in functional tests
- query dom elements from an html string

## When to choose
- you need to read, filter, or traverse HTML/XML in a PHP project
- you are writing functional tests for a Symfony application
- you want a battle-tested parser with huge adoption and long-term support

## When to avoid
- you need to modify or re-dump HTML/XML - it is not designed for DOM manipulation
- you need a full headless browser or JavaScript rendering
- you are not working in PHP

## Facets
- artifact type: library
- maturity: stable
- function: parser, web-scraping, testing
- domain: web-development, parsers, developer-tools
- platform: php
- tags: dom-navigation, html-parsing, xml-parsing, css-selectors, xpath, symfony-component, crawler

## Member repositories
- symfony/dom-crawler (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:32.679519+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:23:53.263364+00:00, confidence not recorded.
  - readme: https://github.com/symfony/dom-crawler (fetched 2026-08-28T04:08:32.679519+00:00, sha c0c0d8bb6fe8)
  - homepage: https://symfony.com/dom-crawler (fetched 2026-08-29T09:16:34.569944+00:00, sha 82b5b7ac001f)
  - site_page: https://symfony.com/doc (fetched 2026-08-29T09:16:34.573099+00:00, sha 44889134f4fb)
  - site_page: https://symfony.com/doc/current/components/dom_crawler.html (fetched 2026-08-29T09:16:34.575684+00:00, sha 239e223d1018)
  - site_page: https://symfony.com/releases (fetched 2026-08-29T09:16:34.578370+00:00, sha f109a7a4a5da)
  - site_page: https://symfony.com/blog/category/releases (fetched 2026-08-29T09:16:34.580460+00:00, sha da84802d18f3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
