API Data
API data components fetch content from web endpoints and external services.
API Request
This component makes HTTP requests using URLs or cURL commands.
To use this component in a flow, connect the Data output to a component that accepts the input. For example, connect the API Request component to a Chat Output component.
In the API component's URLs field, enter the endpoint for your request. This example uses
https://dummy-json.mock.beeceptor.com/posts
, which is a list of technology blog posts.In the Method field, enter the type of request. This example uses GET to retrieve a list of blog posts. The component also supports POST, PATCH, PUT, and DELETE.
Optionally, enable the Use cURL button to create a field for pasting curl requests. The equivalent call in this example is
curl -v https://dummy-json.mock.beeceptor.com/posts
.Click Playground, and then click Run Flow. Your request returns a list of blog posts in the
result
field.
Inputs
urls
URLs
Enter one or more URLs, separated by commas.
curl
cURL
Paste a curl command to populate the dictionary fields for headers and body.
method
Method
The HTTP method to use.
use_curl
Use cURL
Enable cURL mode to populate fields from a cURL command.
query_params
Query Parameters
The query parameters to append to the URL.
body
Body
The body to send with the request as a dictionary (for POST
, PATCH
, PUT
).
headers
Headers
The headers to send with the request as a dictionary.
timeout
Timeout
The timeout to use for the request.
follow_redirects
Follow Redirects
Whether to follow http redirects.
save_to_file
Save to File
Save the API response to a temporary file
include_httpx_metadata
Include HTTPx Metadata
Include properties such as headers
, status_code
, response_headers
, and redirection_history
in the output.
Outputs
data
Data
The result of the API requests. Returns a Data object containing source URL and results.
dataframe
DataFrame
Converts the API response data into a tabular DataFrame format.
URL
This component fetches content from one or more URLs, processes the content, and returns it in various formats. It supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.
Inputs
urls
URLs
Enter one or more URLs. URLs are automatically validated and cleaned.
format
Output Format
Output Format. Use Text to extract text from the HTML, Raw HTML for the raw HTML content, or JSON to extract JSON from the HTML.
separator
Separator
Specify the separator to use between multiple outputs. Default for Text is \n
. Default for Raw HTML is \n<!-- Separator -->
.
clean_extra_whitespace
Clean Extra Whitespace
Whether to clean excessive blank lines in the text output. Only applies to Text
format.
Outputs
Webhook
This component defines a webhook trigger that runs a flow when it receives an HTTP POST request.
If the input is not valid JSON, the component wraps it in a payload
object so that it can be processed and still trigger the flow. The component does not require an API key.
Inputs
data
Payload
Receives a payload from external systems through HTTP POST requests.
curl
cURL
The cURL command template for making requests to this webhook.
endpoint
Endpoint
The endpoint URL where this webhook receives requests.
Outputs
output_data
Data
Outputs processed data from the webhook input, and returns an empty Data object if no input is provided. If the input is not valid JSON, the component wraps it in a payload
object.
Last updated