![Dynamic Input avatar](https://images.apifyusercontent.com/XrVzlfEi90jIal4mkuFN1a7ydLrgb3tPa4G_H1yVf0c/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9kYTNXNlZveDdyZ2JLM3RNMy9NcXdFcEcyeWZSaDRRTFlucy1pbnB1dF9waWMucG5n.webp)
Dynamic Input
Try for free
No credit card required
View all Actors![Dynamic Input](https://images.apifyusercontent.com/XrVzlfEi90jIal4mkuFN1a7ydLrgb3tPa4G_H1yVf0c/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9kYTNXNlZveDdyZ2JLM3RNMy9NcXdFcEcyeWZSaDRRTFlucy1pbnB1dF9waWMucG5n.webp)
![Dynamic Input](https://images.apifyusercontent.com/XrVzlfEi90jIal4mkuFN1a7ydLrgb3tPa4G_H1yVf0c/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9kYTNXNlZveDdyZ2JLM3RNMy9NcXdFcEcyeWZSaDRRTFlucy1pbnB1dF9waWMucG5n.webp)
Dynamic Input
useful-tools/dynamic-input
Try for free
No credit card required
Actor for calling other Actors with dynamic input
The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn more
1# Set API token
2API_TOKEN=<YOUR_API_TOKEN>
3
4# Prepare Actor input
5cat > input.json <<'EOF'
6{
7 "input": "// Available packages:\n// - Apify Actor - https://docs.apify.com/sdk/js/reference/class/Actor\n// - example:\n// await Actor.pushData({ my : 'data'});\n// - Axios - https://axios-http.com/\n// - example:\n// log.info(`Current IP is: ${(await Axios.get('https://ipinfo.io/json')).data.ip}`)\n// - Moment.js - https://momentjs.com/\n// - example:\n// log.info(`Tomorrow is: ${moment().add(1, 'day').toISOString()}`)\n\nconst waitTime = Math.ceil(5 + Math.random() * 10);\n\nreturn {\n minWaitTime: waitTime,\n maxWaitTime: waitTime + 2_000\n}",
8 "proxyConfiguration": {
9 "useApifyProxy": true
10 }
11}
12EOF
13
14# Run the Actor using an HTTP API
15# See the full API reference at https://docs.apify.com/api/v2
16curl "https://api.apify.com/v2/acts/useful-tools~dynamic-input/runs?token=$API_TOKEN" \
17 -X POST \
18 -d @input.json \
19 -H 'Content-Type: application/json'
Developer
Maintained by Community
Actor metrics
- 3 monthly users
- 3 stars
- 100.0% runs succeeded
- Created in Sep 2023
- Modified 4 months ago
Categories