# philss/floki

Floki is a simple HTML parser that enables search for nodes using CSS selectors.

Repository: https://github.com/philss/floki
Canonical: https://ross.abutalabs.com/products/floki
Homepage: https://hex.pm/packages/floki
Language: Elixir
License: MIT
License Family: permissive
Topics: elixir, html-parser, css-selector, floki, html5ever, fast-html, erlang, css-selectors
Last push: 2026-06-16T01:17:29+00:00

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

## Adoption (not part of the score)
Stars 2149, forks 163 (observed 2026-08-28T04:06:19.221472+00:00)

## What it is
Floki is an Elixir HTML parser that lets you search document nodes using CSS selectors. It supports multiple parsing backends (mochiweb_html, html5ever, fast_html) and can serialize nodes back to raw HTML.

## Use cases
- parse html documents in elixir
- find elements with css selectors
- scrape data from web pages
- extract links and attributes from html
- convert html fragments back to raw html
- query html in phoenix tests

## When to choose
- you're working in Elixir or Erlang and need HTML parsing
- you want CSS selector-based querying of HTML trees
- you need a pure-BEAM parser with optional fast native backends

## When to avoid
- you need a full browser or JavaScript execution for scraping
- you're parsing non-HTML markup like XML or JSON
- you need streaming parsing of very large documents

## Facets
- artifact type: library
- maturity: stable
- function: parser, web-scraping, developer-tools
- domain: parsers, web-development, crawlers
- platform: elixir, jvm
- tags: html-parsing, css-selectors, html5ever, fast-html, beam

## Member repositories
- philss/floki (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:19.221472+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-30T02:50:59.902337+00:00, confidence not recorded.
  - readme: https://github.com/philss/floki (fetched 2026-08-28T04:06:19.221472+00:00, sha 20216fcee06d)
  - homepage: https://hex.pm/packages/floki (fetched 2026-08-29T10:30:53.470151+00:00, sha 0ad8ccb09ce2)
  - site_page: https://hex.pm/docs (fetched 2026-08-29T10:30:53.481264+00:00, sha 3f449054c5e0)
  - site_page: https://hex.pm/about (fetched 2026-08-29T10:30:53.483180+00:00, sha 627eac420427)
  - site_page: https://hex.pm/docs/faq (fetched 2026-08-29T10:30:53.485055+00:00, sha 2914acf2582a)
  - site_page: https://hex.pm/pricing (fetched 2026-08-29T10:30:53.479164+00:00, sha b0a5082843ed)
- Data as of 2026-08-30T08:39:29.467469+00:00.
