Registry / workflow / apache-airflow-providers-http

apache-airflow-providers-http

JSON →
library6.0.5pypypi✓ verified 8d ago

The Apache Airflow HTTP Provider enables seamless integration with HTTP APIs within Airflow DAGs. It offers operators and hooks to send HTTP requests, handle responses, and poke API endpoints. Released independently from core Airflow, it adheres to Semantic Versioning and is currently at version 6.0.1.

pip install apache-airflow-providers-http
INSTALL
IMPORT
SIG · APACHE-AIRFLOW-PRO
A
apache-airflow-providers-http
workflowpythonv6.0.5
Install
26.6s avg
Import
5890ms
Disk
266MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v6.0.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 6.170s · 265.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 26.6s · import 5.610s · 265MB
266MB installed
● package 266MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

HttpOperator
from airflow.providers.http.operators.http import HttpOperator
from airflow.operators.http_operator import SimpleHttpOperator
Old `SimpleHttpOperator` (renamed to `HttpOperator`) from `airflow.operators.http_operator` is deprecated and removed in Airflow 2.x and later provider versions. Always use the provider-specific import path.
HttpSensor
from airflow.providers.http.sensors.http import HttpSensor
from airflow.sensors.http_sensor import HttpSensor
Similar to HttpOperator, always use the provider-specific import path for HttpSensor.
HttpHook
from airflow.providers.http.hooks.http import HttpHook

This quickstart demonstrates how to use `HttpOperator` to perform a GET request and `HttpSensor` to poll an endpoint until a condition is met. Ensure you configure an Airflow HTTP connection named `http_default` pointing to `httpbin.org` (or your target API) before running.

from __future__ import annotations import pendulum from airflow.models.dag import DAG from airflow.providers.http.operators.http import HttpOperator from airflow.providers.http.sensors.http import HttpSensor # NOTE: You need to create an HTTP connection in Airflow UI # Admin -> Connections -> + New Record # Conn Id: http_default # Conn Type: HTTP # Host: httpbin.org # For HTTPS, see the 'Configuring HTTPS is counter-intuitive' warning. with DAG( dag_id="http_example_dag", start_date=pendulum.datetime(2023, 1, 1, tz="UTC"), catchup=False, schedule=None, tags=["http", "example"], ) as dag: # Use HttpOperator to make a GET request http_get_task = HttpOperator( task_id="http_get_request", http_conn_id="http_default", method="GET", endpoint="get", # This will resolve to httpbin.org/get data={"param1": "value1", "param2": "value2"}, response_check=lambda response: "param1" in response.text, log_response=True, ) # Use HttpSensor to wait for a specific response http_sensor_task = HttpSensor( task_id="http_sensor_check", http_conn_id="http_default", endpoint="status/200", # This will resolve to httpbin.org/status/200 response_check=lambda response: response.status_code == 200, poke_interval=5, timeout=60, ) http_get_task >> http_sensor_task
Debug
Known issues
breakingProvider versions 2.0.0 and above (including 6.0.1) require Airflow 2.1.0+. This is due to the removal of the `apply_default` decorator in core Airflow. Installing a newer provider version with an older Airflow might automatically upgrade Airflow, requiring a manual `airflow upgrade db`.
fix
Upgrade Apache Airflow to at least version 2.1.0 before installing or upgrading `apache-airflow-providers-http`. For provider 6.0.1, Airflow >=2.11.0 is required.
affects: Provider >=2.0.0, Airflow <2.1.0
breakingProvider versions 3.0.0 and above require Airflow 2.2+. This aligns with the Apache Airflow providers support policy.
fix
Ensure your Apache Airflow installation is at least version 2.2.0. For provider 6.0.1, Airflow >=2.11.0 is required.
affects: Provider >=3.0.0, Airflow <2.2.0
breakingFrom provider version 4.0.0, `TCP_KEEPALIVE` is enabled by default for `HttpOperator`, `HttpSensor`, and `HttpHook`. This prevents firewalls from closing long-running, inactive connections.
fix
If this change affects existing deployments (e.g., due to network policies), you can disable it by setting `tcp_keep_alive=False` or configure keep-alive parameters using `tcp_keep_alive_*` arguments in the operator/hook/sensor constructors.
affects: Provider >=4.0.0
gotchaConfiguring HTTPS via the `HttpOperator` can be counter-intuitive due to historical implementation. The operator defaults to `http` protocol.
fix
To use HTTPS, your connection URI should look like `http://your_host:443/https`, and the specific URL path should be passed via the `endpoint` parameter. Alternatively, you can percent-encode the `https://` prefix in the host: `http://https%3a%2f%2fyour_host:443/`.
affects: All versions
gotchaWhen using `HttpOperator` with pagination, all API responses are stored in memory and returned as a single result. This can lead to high memory and CPU consumption for large datasets.
fix
Utilize the `response_filter` parameter to process and reduce the response size before it's stored, or implement custom logic to handle pagination and data processing in smaller chunks outside the operator's direct memory management.
affects: All versions
gotchaThe minimum required Apache Airflow version for `apache-airflow-providers-http` 6.0.1 is 2.11.0.
fix
Ensure your Airflow environment is running version 2.11.0 or newer to guarantee compatibility and access to all features.
affects: Provider 6.0.1
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'airflow.providers.http'
The 'apache-airflow-providers-http' package is not installed in the environment.
fix
pip install apache-airflow-providers-http
ImportError: cannot import name 'HttpHook' from 'airflow.providers.http.hooks.http'
The 'HttpHook' class has been moved or renamed in the 'airflow.providers.http' package.
fix
from airflow.providers.http.hooks.http import HttpHook
AttributeError: module 'airflow.providers.http.operators.http' has no attribute 'SimpleHttpOperator'
The 'SimpleHttpOperator' class is not available in the 'airflow.providers.http.operators.http' module.
fix
from airflow.providers.http.operators.http import SimpleHttpOperator
ModuleNotFoundError: No module named 'airflow.providers.http.operators.http'
This error occurs when the `apache-airflow-providers-http` package is not installed in your Airflow environment, or if you are trying to import an operator/hook from an incorrect or deprecated path.
fix
First, ensure the provider package is installed: `pip install apache-airflow-providers-http`. Then, make sure you are using the correct import path for modern Airflow (2.x and later): `from airflow.providers.http.operators.http import SimpleHttpOperator` or `from airflow.providers.http.hooks.http import HttpHook`.
AirflowException: The conn_id 'my_http_connection' isn't defined
This error indicates that the HTTP connection ID specified in your `SimpleHttpOperator` or `HttpHook` (e.g., 'my_http_connection') has not been configured in your Airflow environment's Connections UI or via environment variables.
fix
Define the HTTP connection in Airflow. Go to Admin -> Connections in the Airflow UI, click '+', set 'Conn Id' to 'my_http_connection' (or whatever you named it), 'Conn Type' to 'HTTP', and provide the 'Host' (base URL) and any necessary 'Login' or 'Password' details.
Upgrade
Version history
6.0.5latest on PyPI · released Jul 28, 2026
Audit
Dependencies
apache-airflowrequiredCore Airflow is required for running DAGs and tasks. Version >=2.11.0 is required for this provider version.
apache-airflow-providers-common-compatrequiredProvides compatibility layers for cross-provider functionalities. Version >=1.12.0 is required.
requestsrequiredHTTP client library used by the provider. Version >=2.32.0,<3 is required.
requests-toolbeltrequiredAdditional tools for the requests library. Version >=1.0.0 is required.
aiohttprequiredAsynchronous HTTP client/server framework, used for deferrable operators. Version >=3.12.14 is required.
asgirefrequiredASGI specification utilities, conditional on Python version (>=2.3.0 for <3.14, >=3.11.1 for >=3.14).
Agent activity
31 hits · last 30 days
node
28
Resources
apache-airflow-providers-http — pip install apache-airflow-providers-http · libregistry