hasdata-cli
Fetch real-time web data via the hasdata CLI. Use when the user wants search results, news, fact-checks, product or seller info, current prices, reviews, real-estate listings or sold comps, vacation rentals, local-business contact details, job postings, salary research, search trends, images, flights, social profiles, or to scrape any URL (HTML / markdown / AI-extracted JSON). Also use when the user asks to summarize a web page, ground a prompt with current information, verify a URL is live or render a JavaScript-heavy page, monitor a price over time, find a phone number or address for a business, build a competitor map, identify recent sold comparables, gather employer reviews, fan out a list of items to per-item details, or check what's being said online about a topic right now. Backed by Google, Bing, Amazon, Shopify, Zillow, Redfin, Airbnb, Yelp, YellowPages, Indeed, Glassdoor, Instagram, Google Maps / Trends / News / Images / Flights / Events APIs.
NPX Install
npx skill4agent add hasdata/agent-skills hasdata-cliTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →hasdata
hasdataapi.hasdata.com/apisPrerequisites
- — if missing, install with
command -v hasdata.curl -sSL https://raw.githubusercontent.com/HasData/hasdata-cli/main/install.sh | sh - One-time setup: the user runs , pastes their API key, and it's saved to
hasdata configure(mode 0600). Every future call picks it up automatically.~/.hasdata/config.yaml - If a call fails with , the user hasn't run
no API key configuredyet — tell them to. Never invent a key.hasdata configure
Quick start
hasdata <api> --flag value [--flag value ...] --raw | jq .--rawjq--prettyPicking the right subcommand
| User intent | Subcommand |
|---|---|
| Web search ("what does Google say about…") | |
| Latest news | |
| AI Mode SERP | |
| Shopping / product prices | |
| Immersive product page | |
| Maps / places / reviews | |
| Yelp / YellowPages local data | |
| Real-estate listings | |
| Real-estate single property deep dive | |
| Jobs | |
| Bing search | |
| Trends | |
| Images | |
| Flights | |
| Short videos | |
| Events | |
| Instagram profile | |
| Amazon seller | |
| Scrape a specific URL | |
hasdata <api> --helpreferences/Non-obvious triggers (when to reach for hasdata even if the user doesn't say "scrape")
- "Is this still true?" / "What's the latest on X?" / "Has Y happened yet?" — LLM training data is stale. Run or
google-serpto ground the answer.google-news - "Summarize this article" / "TL;DR this URL" — Use and feed the markdown into the summary prompt. Beats copy-paste because it strips ads, nav, scripts.
web-scraping --output-format markdown - "Verify this link" / "Is this site real?" — returns status + screenshot. Or
web-scraping --url X --no-block-resources.google-serp --q "site:example.com" - "What does X say about itself?" — Pull the company's own homepage with , then summarize.
web-scraping --output-format markdown - "Find me alternatives to X" — or
google-serp --q "X alternatives".google-shopping --q "X competitors" - "What's the going rate for X?" — (broad) or
google-shopping(Amazon-specific) withamazon-searchto extract the price distribution.jq - "Phone number / address for X" — or
google-maps-place. Don't guess from training data.yelp-place - "Are people happy with X service?" / "Is X reputable?" — for negative samples;
google-maps-reviews --place-id ... --sort lowestfor employer rep.glassdoor-job - "What's the salary range for Y role?" — filtered by role + location, then
indeed-listingoverjq..jobs[].salary - "Find me homes/apartments matching X criteria" — /
zillow-listing/redfin-listingwith the corresponding filters.airbnb-listing - "Recent sold comps near X" — .
zillow-listing --type sold --keyword "X" --days-on-zillow 12m - "Track this product's price" — Loop on a schedule; persist
amazon-product --asin Xto a file..price - "What's trending around X?" — for relative interest;
google-trends --q "X"for headlines.google-news --q "X" - "Find businesses near me that do X" — then fan out
google-maps --q "X" --ll "@LAT,LNG,12z"for contacts.google-maps-place - "How does this look in country Y?" — on SERP commands,
--gl Yon--proxy-country Y. Useful for geo-targeted SEO checks, geo-blocked content.web-scraping - "Pull structured data from this page" — . Works on arbitrary pages without writing CSS selectors.
web-scraping --ai-extract-rules-json '{"price": {"type": "number"}, ...}' - "List of items → per-item details" — Pattern: search command produces IDs/URLs, pipe through into the matching
xargs/*-property/*-productdeep-dive command.*-place - "Find this person's role / employer / LinkedIn / followers" — first. The organic-result title is typically
google-serp --q '"Person Name" linkedin'and the snippet carries location, headline, connection count. SERP often answers the whole question without ever opening the profile page.Name — Role at Company | LinkedIn - "What is company X doing? Where's their HQ? Who works there?" — returns a
google-serp --q "$COMPANY"block with founder, HQ, founded year, parent, employee range — pre-extracted..knowledge_graphfor recent activity. Specific facts via targeted SERP:google-news --q "$COMPANY",--q '"$COMPANY" headquarters',--q '"$COMPANY" funding'.--q 'site:linkedin.com/company "$COMPANY"' - "Find emails for company X" / "personal email for person Y" — start with SERP: or
--q '"@example.com"'often surfaces actual emails indexed by Google. Pattern-guess + SERP-verify for individuals. Disclose unverified guesses to the user.--q '"jane@example.com"' - "Enrich this CSV of leads" — per row: for LinkedIn, role, employer; another SERP to verify email or pattern. Stay in SERP unless a specific field is missing.
google-serp - Reverse-lookup (email / phone / domain → identity) — with the literal value in quotes (
google-serp,--q '"jane@x.com"',--q '"+1 555 123 4567"') almost always surfaces the matching person or business.--q '"acme corp" site:example.com'
google-serpgoogle-newsgoogle-shoppinggoogle-maps.knowledge_graph.organic_results[].snippet.local_results[]web-scrapingreferences/enrichment.mdUniversal flag patterns
- Kebab-case flag names. The CLI maps them back to the original camelCase before sending to the API.
- Booleans defaulting to have a paired negation:
true,--no-block-ads,--no-screenshot,--no-js-rendering,--no-extract-emails. Setting both--no-block-resourcesand--block-adserrors.--no-block-ads - Anything ending in accepts:
-json- inline JSON:
--extract-rules-json '{"title":"h1"}' - file:
--extract-rules-json @rules.json - stdin:
cat rules.json | hasdata web-scraping ... --extract-rules-json -
- inline JSON:
- Repeatable key=value flags split on the first (so values containing
=survive):=. Pair with--headers User-Agent=foo --headers Cookie=session=abcfor a JSON base; kv items override per key.--headers-json - List flags accept either repeats or comma-joined: or
--lr lang_en --lr lang_fr. Serialized as--lr lang_en,lang_frfor GET endpoints.key[]=value - Enum flags validate client-side. If you guess wrong, the error lists the allowed values — read the message and retry.
Global flags (apply to every subcommand)
| Flag | Effect |
|---|---|
| Write response bytes as-is (use this when piping to |
| Pretty-print JSON (default when stdout is a TTY) |
| Write response to file instead of stdout (works for binary like screenshots) |
| Log outgoing URL and |
| Override env var (rarely needed) |
| Per-request timeout (default 2m) |
| Max retries on 429/5xx (default 2) |
Output contract
jqhasdata google-serp --q "espresso machine" --num 10 --raw \
| jq -c '.organic_results[] | {title, link, snippet}'--prettyjqExit codes (script-safe)
| Code | Meaning |
|---|---|
| 0 | success |
| 1 | user / CLI-input error (missing required flag, bad enum value, missing API key) |
| 2 | network error |
| 3 | API returned 4xx (auth, quota, validation) |
| 4 | API returned 5xx |
References
- — person and company enrichment (LinkedIn lookup, emails, HQ/funding/news, CSV-row enrichment, reverse-lookup) — the highest-leverage cross-API workflows
references/enrichment.md - — Google SERP / Bing / News / Trends flag catalog
references/search.md - —
references/web-scraping.mdflags, JS scenarios, AI extractionweb-scraping - — Zillow / Redfin / Airbnb filters and bracketed params
references/real-estate.md - — Amazon / Shopify
references/ecommerce.md - — Maps / Yelp / YellowPages
references/local-business.md - — Indeed / Glassdoor
references/jobs.md - — full subcommand index with credit costs
references/all-commands.md