Skip to content
masterclass Buddy

Pydantic · Type Alias

HttpUrl

HttpUrl validates HTTP and HTTPS URLs. It requires a host and top-level domain, and limits the URL to 2083 characters.

Last updated

Syntax

class Model(BaseModel):
    url: HttpUrl

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • AnyUrl
  • AnyHttpUrl
  • FileUrl
  • PostgresDsn
  • MySQLDsn
  • MariaDBDsn
  • CockroachDsn
  • AmqpDsn

Source: Types/urls | Pydantic Docs. Checked 2026-11-03.