# Floki

> A simple HTML parser that enables search for nodes using CSS selectors

Source: https://talira.ai/catalog/floki-6mfb7d1w
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [developer tools / parsing / xml html](https://talira.ai/categories/developer-tools/parsing/xml-html)
- Licence: MIT[^2]
- Pricing: Free[^2]
- Free tier: yes[^2]
- Backed by: [Philip Sampaio](https://talira.ai/orgs/philip-sampaio.md)

Floki is an Elixir library that parses HTML into a tree of tuples and lets you query it with CSS selectors, then read text, attributes or raw HTML from the matching nodes. By default it uses a patched mochiweb_html parser written in Erlang, which needs no outside dependencies, and it can switch to the faster fast_html (lexbor) or html5ever parsers for large or tricky documents.

## Links

- GitHub: https://github.com/philss/floki
- Docs: https://hexdocs.pm/floki/

## Problems it solves

- find elements in an HTML page with CSS selectors from Elixir
- scrape data out of HTML in an Elixir app
- parse an HTML document in Elixir and read text and attributes

## Features

- CSS selector queries over parsed HTML
- text, attribute and raw HTML extraction
- pure Erlang parser by default
- optional fast_html and html5ever parsers

## Limitations

- The default mochiweb_html parser can be up to 20 times slower than the alternatives on big HTML documents, and differs from the HTML5 specification in some cases.[^1]

## Trust

Overall: 0.52 out of 1.
Signals: maintenance 0.63, adoption 0.67, momentum 0.36, community 0.82, backing 0.30, extensibility 0.00.

- last commit 26 days ago
- 5 commits in the last 90 days
- latest release v0.38.5 31 days ago
- 2.1k GitHub stars
- 110 contributors
- accepts sponsorship (Github)
- backed by Philip Sampaio

## Sources

[^1]: https://github.com/philss/floki/blob/main/README.md (checked 27 Nov 2026)
[^2]: https://github.com/philss/floki/blob/main/LICENSE (checked 27 Nov 2026)
