HuluFlow · Scenario
Pipe extracts into your own system
Create a workflow, run it, then read dataset rows with the same API key.
The console and the API control the same workflows and datasets. Learn the console first; then use these calls when your own software must create runs or pull rows.
Developers comfortable with HTTP and curl. Non-developers can skip this page.
-
01 Create a key
Console → API keys → create. Copy the token starting with hulu_ (shown once). Export it as HULU_KEY in your shell. Every /api/v1 request needs header Authorization: Bearer $HULU_KEY.
If you get stuck: Session cookies used by the website login are not accepted on /api/v1. Missing or wrong keys return HTTP 401.
-
02 Discover fields
Create an empty paused workflow with POST /api/v1/workflows, then POST …/scrape-preview with a sample URL, mode, and requirement. Copy the field list you want into the scrape node config. Preview discovers fields; it does not write datasets.
If you get stuck: You need some workflow id you own for scrape-preview (auth + account scoping). Keeping it paused avoids accidental schedules while you experiment.
-
03 PUT the graph and run
PATCH the workflow with nodes and edges. Use edges [{from, to}]. Include scrape.fields already selected. POST …/run and wait until completion. On HTTP 502, read detail (string or object with node_runs) to see which node failed.
If you get stuck: Create/update save the graph freely; runs need remaining credits — HTTP 402 means the credit pool is exhausted.
-
04 Read rows
GET /api/v1/datasets to find ids, then GET /api/v1/datasets/{id}/rows?page=1&limit=50. For bulk download use GET …/export?format=csv|json (row cap applies).
If you get stuck: POST …/run already waits until finish. Use GET …/runs/{id} when you need to inspect a past run’s node outputs.
curl
Replace $ID and $DATASET_ID with values returned by earlier calls. The raw API token is shown once when you create a key — store it like a password.
export HULU_KEY=hulu_…
curl -X POST https://huluflow.com/api/v1/workflows \
-H "Authorization: Bearer $HULU_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Monitor","status":"paused","interval_minutes":1440,"graph":{"nodes":[],"edges":[]}}'
curl -X POST https://huluflow.com/api/v1/workflows/$ID/scrape-preview \
-H "Authorization: Bearer $HULU_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/list","mode":"list","requirement":"title, price, url"}'
curl -X PATCH https://huluflow.com/api/v1/workflows/$ID \
-H "Authorization: Bearer $HULU_KEY" \
-H "Content-Type: application/json" \
-d '{"graph":{"nodes":[{"id":"s1","type":"scrape","config":{"url":"https://example.com/list","mode":"list","fields":[{"name":"title","label":"title","type":"text"},{"name":"url","label":"url","type":"url"}]}},{"id":"st1","type":"store","config":{"dataset_name":"products","key_fields":["url"]}}],"edges":[{"from":"s1","to":"st1"}]}}'
curl -X POST https://huluflow.com/api/v1/workflows/$ID/run \
-H "Authorization: Bearer $HULU_KEY"
curl "https://huluflow.com/api/v1/datasets/$DATASET_ID/rows?page=1&limit=50" \
-H "Authorization: Bearer $HULU_KEY"
Credits and failures
If a run fails, open that run and read the failing node’s error and output — do not guess from the workflow list alone. URL generator caps at 500 URLs. Each scrape node defaults to 20 URLs per run (raise limit when you generate more pages). Credits are granted by plan and deducted by webpage requests. Out of credits → HTTP 402.
On failure, open that run’s node error — do not guess from the workflow list alone.
What next
Full status codes and field tables live in the API reference.