API Request
Estimated reading: 2 minutes
The API Request component constructs and sends HTTP requests using URLs or curl commands:
1. URL mode: Enter one or more comma-separated URLs, and then select the method for the request to each URL.
2. curl mode: Enter the curl command to execute.
You can enable additional request options and fields in the component’s parameters. Most API Request component input parameters are hidden by default in the visual editor. You can toggle parameters through the Controls in the component’s header menu.
Returns a Data object containing the response.
Note: For provider-specific API components, see component’s header menu.
API Request Parameters
| Parameter | Description |
|---|---|
| Mode | Set the mode to either URL or curl. |
| URLs | Enter one or more comma-separated URLs for the request. |
| curl | curl mode only. Enter a complete curl command. Other component parameters are populated from the command arguments. |
| Method | The HTTP method to use. |
| Query Params | The query parameters to append to the URL. |
| Body | The body to send with POST, PATCH, and PUT requests as a dictionary. |
| Headers | The headers to send with the request as a dictionary. |
| Timeout | The timeout to use for the request. |
| Follow Redirects | Whether to follow HTTP redirects. The default is enabled (true). If disabled (false), HTTP redirects aren't followed. |
| Save to File | Whether to save the API response to a temporary file. Default: Disabled/false. |
| Include HTTPX Metadata | Whether to include properties such as headers, status_code, response_headers, and redirection_history in the output. Default: Disabled/false. |