skillfed

fake-http-header

Generates random request fields for a http request header

fake-http-header v0.3.5 653.9K downloads/30d#5,532 on PyPI44
Permissive license MIT AGING released

What it is and what it does

fake-http-header is a lightweight Python package that generates random HTTP request headers designed to look like they come from real web browsers. It works by mapping browsers to default header values and emulating typical user behavior patterns. The package generates randomized user agents, accept-language fields, accept-encoding, accept types, and referrer URLs that appear plausible together—for instance, if you specify a domain code, it will pair that with matching language preferences and a corresponding referrer.

The primary use case is creating headers for web crawlers and automated HTTP requests. It provides a simple API: instantiate FakeHttpHeader with optional domain parameters, then call as_header_dict() to get a dictionary compatible with standard HTTP libraries. With no external dependencies and support for Python 3.6 and above, it installs and runs with minimal friction.

Use it for:

  • Write web scrapers that send realistic browser headers to avoid simple bot-detection filters
  • Test web applications by simulating requests from different geographic regions and browsers
  • Generate plausible HTTP headers for automated testing frameworks that need to mimic real client behavior
  • Populate header fields in security testing scenarios where realistic headers are needed

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Generates realistic-looking HTTP request headers with randomized user agents, accept languages, and referrer fields that mimic real browser behavior.

Yes, if you need to generate realistic HTTP headers for web scraping or testing. It has no dependencies, installs easily, carries a permissive MIT license, and has modest popularity. The aging maintenance status is a minor concern; verify that its browser and referrer pools remain effective for your use case.

Install

fake-http-header on PyPI

pip

pip install fake-http-header

uv

uv add fake-http-header

poetry

poetry add fake-http-header

Installing fake-http-header

Before you install

Low friction: pure Python wheel with no runtime dependencies. Maintenance is aging—last release was 2024-10-15, though the repository remains unarchived.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.

Quickstart

pip install fake-http-header

from fake_http_header import FakeHttpHeader

fake_header = FakeHttpHeader()
header_dict = fake_header.as_header_dict()

Verify before relying

  • How comprehensive is the pool of browser user agents and referrer domains covered by the package
  • Whether the generated headers pass modern bot-detection systems or are primarily useful for testing
  • Quality and frequency of maintenance relative to changes in real browser header formats

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance aging — 668 days since the last release
Last repo commit
First released
Downloads 653,930/month — #5,532 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: fake_http_header-0.3.5-py3-none-any.whl

Tags

random http header generatorfake user agentbrowser header emulationweb scraping headershttp request header faker
web-scrapingtestinghttp-headers

More WWW/HTTP packages