Extract structured data from supported platforms via bdata pipelines. One call, clean JSON, no scraping logic. For unsupported URLs, hand off to scrape. To find target URLs first, hand off to search.
Setup gate (run first)
bash
if ! command -v bdata >/dev/null 2>&1; then echo "bdata CLI not installed — see bright-data-best-practices/references/cli-setup.md"elif ! bdata zones >/dev/null 2>&1; then echo "bdata not authenticated — run: bdata login (or: bdata login --device for SSH)"fi
Halt and route to skills/bright-data-best-practices/references/cli-setup.md if either check fails.
Supported pipeline types (verified 2026-04-19)
Always verify with bdata pipelines list before hardcoding names — they change. Current 43 types:
Full flag reference + full type table: references/flags.md [blocked].
Verification gate
JSON parses cleanly:jq . <output> returns 0 (or for --format ndjson, each line parses).
Record count matches expected. One URL usually = one record, but reviews/posts/comments pipelines return arrays sized by what the platform shows. Always check:
bash
jq 'length' out.json # top-level array count# ORjq 'if type == "array" then length else 1 end' out.json
No top-level error:
bash
jq -e 'if type == "object" then has("error") | not else true end' out.json \ || { echo "pipeline reported error"; exit 1; }
No per-record error: for array results, ensure no record has an error field:
bash
jq -e 'if type == "array" then map(has("error")) | any | not else true end' out.json \ || echo "WARN: one or more records have error fields"
Partial failures are silent — this check is non-optional.
Core fields present for the pipeline type (examples):
instagram_posts → .caption or .description + .url or .post_id
youtube_videos → .title + .video_id or .url
Spot-check with jq keys on the first record to learn the exact schema.
On failure: double --timeout and retry once. If still failing, bdata pipelines list to confirm the type name hasn't changed.
Red flags
Using bdata scrape on Amazon/LinkedIn/TikTok/etc. when bdata pipelines <type> returns structured fields in one call. Loses structure and costs more time.
Looping bdata pipelines for large jobs without rate-limiting — each call can trigger a long-running pipeline on the server. Cap parallelism at 2–3.
Claiming success without the record-count + per-record error check. Partial failures are silent in pipeline output.
Hardcoding pipeline type names (amazon_products with an s, linkedin_profile without _person_, etc.) — they're inconsistent across platforms. Always copy from bdata pipelines list.
Using a tight --timeout on pipelines that legitimately take 5–15 minutes (reviews, company employees, big post feeds). Default 600s is a floor for small inputs; raise for long ones.
Calling a keyword- or multi-arg pipeline (amazon_product_search, linkedin_people_search, google_maps_reviews, facebook_company_reviews, youtube_comments) with URL-only args — will fail with "Usage: ...". Always check bdata pipelines <type> error output when in doubt.
Passing a pages_to_search third arg to amazon_product_search — it's hardcoded to 1 by the CLI and extra args are ignored.
References
references/flags.md [blocked] — full pipelines flags + complete table of all 43 types with input shapes.