Quickstart
Quickstart guide for Hianime
What is Hianime?
Hianime is an unofficial Node.js/TypeScript library that scrapes publicly available pages on hianime.to to retrieve anime data such as popular lists, TV shows, titles, and other metadata. It is a personal project intended for learning and tooling.What you can scrape
- Most popular lists and other discovery feeds
- TV shows and other category pages
- Title pages and basic metadata (e.g., synopsis, genres, type)
- Pagination info (page, totalPage, hasNextPage)
- Episode lists and language availability (sub/dub) when exposed on page
How it works (high level)
- Makes HTTP requests to public pages on hianime.to and parses the HTML.
- Selectors and structures can change; version changes on the site may break scraping until updated.
- Some pages may apply anti-bot measures; set realistic headers, add delays, and backoff on errors.
Core concepts
- Pagination: Responses include
page
,totalPage
, andhasNextPage
. Use these to paginate safely. - IDs: Items may have a human-readable
id
(often a path) and a numericdataId
used internally by the site. - Language counts:
language.sub
/language.dub
are counts reported by the site and may be strings. - Types:
type
values (e.g., “TV”, “Movie”) reflect site labels and can vary by entry.
Usage guidelines
- Add rate limiting and retries with exponential backoff to avoid stressing the site.
- Send a realistic User-Agent and required headers where necessary.
- Expect occasional breaking changes; handle errors and validate outputs.
- Use only for educational/personal purposes and abide by the site’s Terms of Service.
Not affiliated with, endorsed by, or sponsored by HiAnime or any third‑party
streaming service This library only scrapes publicly accessible pages; use for
educational/personal purposes Respect the website’s Terms of Service and
robots.txt Do not download, redistribute, or commercialize copyrighted content
Site structure may change at any time and break the scraper.
Important Notes
- Rate limiting: Add delays between requests to avoid overwhelming the server
- Error handling: Always wrap API calls in try-catch blocks
- Respect ToS: Use this library responsibly and respect HiAnime’s terms of service
- Site changes: The scraper may break if the site structure changes