Skip to main content
Version: 1.13.x (Next)

API Request

The API Request component constructs and sends HTTP requests using URLs or curl commands:

  • URL mode: Enter one or more comma-separated URLs, and then select the method for the request to each URL.
  • curl mode: Enter the curl command to execute.

You can enable additional request options and fields in the component's parameters.

Returns a JSON object containing the response.

For provider-specific API components, see Bundles.

API Request parameters​

Some parameters are hidden by default in the visual editor. You can modify all component parameters through the component inspection panel that appears when you select a component.

NameDisplay NameInfo
modeModeInput parameter. Set the mode to either URL or curl.
urlsURLInput parameter. Enter one or more comma-separated URLs for the request.
curlcurlInput parameter. curl mode only. Enter a complete curl command. Other component parameters are populated from the command arguments.
methodMethodInput parameter. The HTTP method to use.
query_paramsQuery ParametersInput parameter. The query parameters to append to the URL.
bodyBodyInput parameter. The body to send with POST, PATCH, and PUT requests as a dictionary.
headersHeadersInput parameter. The headers to send with the request as a dictionary.
timeoutTimeoutInput parameter. The timeout to use for the request.
follow_redirectsFollow RedirectsInput parameter. Whether to follow HTTP redirects. Starting in Langflow version 1.7, the Follow Redirects parameter is disabled (false) by default to prevent SSRF bypass attacks where a public URL redirects to internal resources. Only enable redirects if you trust the target server. For more information, see SSRF protection environment variables.
save_to_fileSave to FileInput parameter. Whether to save the API response to a temporary file. Default: Disabled (false)
include_httpx_metadataInclude HTTPx MetadataInput parameter. Whether to include properties such as headers, status_​code, response_​headers, and redirection_​history in the output. Default: Disabled (false)

Was this page helpful?

Support
Search