Fetch structured data from 40+ APIs via CLI for agents & RAG
hasdata CLI for real-time web data: SERP, maps, e-commerce, travel, jobs, and web scraping, one subcommand per API, script-safe exit codes.
Maintainer of this project? Claim this page to edit the listing.
0.2.1Add to Favorites
Why it matters
Pull real-time structured data from Google SERP, e-commerce platforms, real-estate sites, social media, and arbitrary web pages into LLM agents, RAG pipelines, and shell scripts without writing API integration code or managing dependencies.
Outcomes
What it gets done
Stream Google search results, Amazon products, and Zillow listings into vector stores for RAG ingestion
Expose web scraping and SERP APIs as shell tools for LangChain, CrewAI, and custom agent loops
Ground LLM prompts with fresh product pricing, news, reviews, and real-estate data at inference time
Build training datasets by piping parallel API calls into JSONL for fine-tuning and evals
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/ag-hasdata-cli | bash Overview
Hasdata
A CLI wrapping real-time web-data APIs - search, shopping, maps, real estate, travel, jobs, YouTube, and web scraping - one subcommand per API with script-safe exit codes. Use whenever an answer needs current, real-world data - search results, prices, listings, or scraped pages - rather than an LLM's stale training data.
What it does
The hasdata CLI wraps real-time web-data APIs behind one subcommand per API - flags, enums, and defaults are derived from the live schema at api.hasdata.com/apis. Coverage spans Google/Bing search (google-serp, bing-serp, google-news, google-trends, google-ai-mode), shopping (google-shopping, amazon-search/amazon-product, shopify-products), maps and local business (google-maps*, yelp-*, yellowpages-*), real estate (zillow-listing/redfin-listing and their -property deep-dive equivalents), travel (airbnb-*, booking-*, google-flights), jobs (indeed-*, glassdoor-*), YouTube (youtube-search-api, -video-api, -channel-api, -transcript-api), and generic web-scraping with JS rendering, proxies, markdown output, and AI-based structured extraction.
When to use - and when NOT to
Use it whenever an answer needs current, real-world data an LLM's training data can't have - "is this still true," "what's the going rate for X," "find homes matching these criteria," or "summarize this URL." The skill states a SERP-first principle: for any people/company/product enrichment intent, reach for google-serp/google-news/google-shopping/google-maps first, since Google has already extracted structured fields (.knowledge_graph, .organic_results[].snippet, .local_results[]); only escalate to web-scraping when SERP doesn't surface the needed field and the target's terms allow direct access. If a request matches one of these documented intents and hasdata isn't invoked, the skill warns the answer is probably a hallucinated, stale guess.
Inputs and outputs
Installation runs install.sh from the project's GitHub, then a one-time hasdata configure saves the API key to ~/.hasdata/config.yaml (mode 0600) - a "no API key configured" error means that step hasn't run, and the skill explicitly forbids inventing a key. Flags follow universal patterns: kebab-case names mapped to camelCase API params, boolean flags with a --no-X negation pair (setting both errors), *-json flags accepting inline JSON, an @file, or stdin (-), and list flags accepting either repeated flags or comma-joined values. Output is always JSON, piped through jq (--raw skips pretty-printing for piping; --pretty is for terminal reading), and exit codes are script-safe: 0 success, 1 CLI-input error, 2 network error, 3 API 4xx, 4 API 5xx.
hasdata google-serp --q "espresso machine" --num 10 --raw \
| jq -c '.organic_results[] | {title, link, snippet}'
Integrations
Each domain has a dedicated reference file (references/enrichment.md, search.md, web-scraping.md, real-estate.md, travel.md, ecommerce.md, local-business.md, jobs.md, youtube.md, all-commands.md) documenting exact flags and credit costs, with references/enrichment.md covering the highest-leverage cross-API workflows: LinkedIn/person lookup, company HQ/funding/news, CSV-row lead enrichment, and reverse lookup by email/phone/domain via quoted SERP queries.
Who it's for
Developers and agents automating data collection in scripts who need current search, e-commerce, travel, local-business, or scraped web data delivered as clean, script-parseable JSON rather than answering from stale training data or hand-writing scraper code per site.
Source README
hasdata
Use the hasdata CLI for real-time web data. One subcommand per API - flags, enums, defaults are derived from the live schema at api.hasdata.com/apis.
When to Use
Use this skill when:
- The user wants to use the HasData CLI.
- The user needs current web data from the command line.
- The user wants to automate data collection in scripts.
- The user wants to retrieve search, ecommerce, travel, or local business data.
- The user needs web-page scraping through the CLI.
Prerequisites
command -v hasdata- if missing, download the installer fromhttps://raw.githubusercontent.com/HasData/hasdata-cli/main/install.sh, inspect it, then run it locally withsh install.sh.- One-time setup: the user runs
hasdata configure, pastes their API key, and it's saved to~/.hasdata/config.yaml(mode 0600). Every future call picks it up automatically. - If a call fails with
no API key configured, the user hasn't runhasdata configureyet - tell them to. Never invent a key.
Quick start
hasdata <api> --flag value [--flag value ...] --raw | jq .
Always pass --raw when piping to jq (skips pretty-print and TTY detection). Use --pretty only for human-readable terminal output.
Picking the right subcommand
| User intent | Subcommand |
|---|---|
| Web search ("what does Google say about…") | google-serp (full features) or google-serp-light (cheap, single page) |
| Latest news | google-news |
| AI Mode SERP | google-ai-mode |
| Shopping / product prices | google-shopping (broad), amazon-search / amazon-product (Amazon), shopify-products (Shopify) |
| Immersive product page | google-immersive-product |
| Maps / places / reviews | google-maps, google-maps-place, google-maps-reviews, google-maps-photos, google-maps-posts |
| Yelp / YellowPages local data | yelp-search, yelp-place, yellowpages-search, yellowpages-place |
| Real-estate listings (homes for sale/rent/sold) | zillow-listing, redfin-listing |
| Real-estate single property deep dive | zillow-property, redfin-property |
| Travel - short-term rentals | airbnb-listing, airbnb-property |
| Travel - hotels / lodging | booking-search, booking-place |
| Travel - flights | google-flights |
| Jobs | indeed-listing, indeed-job, glassdoor-listing, glassdoor-job |
| Bing search | bing-serp |
| Trends | google-trends |
| Images | google-images |
| Short videos | google-short-videos |
| Events | google-events |
| YouTube search / video / channel / transcript | youtube-search-api, youtube-video-api, youtube-channel-api, youtube-transcript-api |
| Instagram profile | instagram-profile |
| Amazon seller | amazon-seller, amazon-seller-products |
| Scrape a specific URL | web-scraping - supports JS rendering, proxies, markdown output, AI extraction, screenshots |
For exact flags of a subcommand, run hasdata <api> --help or read the matching file in references/.
Non-obvious triggers (when to reach for hasdata even if the user doesn't say "scrape")
The user often won't ask for a SERP API or a scraper directly. Map these intents to the skill:
- "Is this still true?" / "What's the latest on X?" / "Has Y happened yet?" - LLM training data is stale. Run
google-serporgoogle-newsto ground the answer. - "Summarize this article" / "TL;DR this URL" - Use
web-scraping --output-format markdownand feed the markdown into the summary prompt. Beats copy-paste because it strips ads, nav, scripts. - "Verify this link" / "Is this site real?" -
web-scraping --url X --no-block-resourcesreturns status + screenshot. Orgoogle-serp --q "site:example.com". - "What does X say about itself?" - Pull the company's own homepage with
web-scraping --output-format markdown, then summarize. - "Find me alternatives to X" -
google-serp --q "X alternatives"orgoogle-shopping --q "X competitors". - "What's the going rate for X?" -
google-shopping(broad) oramazon-search(Amazon-specific) withjqto extract the price distribution. - "Phone number / address for X" -
google-maps-placeoryelp-place. Don't guess from training data. - "Are people happy with X service?" / "Is X reputable?" -
google-maps-reviews --place-id ... --sort lowestfor negative samples;glassdoor-jobfor employer rep. - "What's the salary range for Y role?" -
indeed-listingfiltered by role + location, thenjqover.jobs[].salary. - "Find me homes/apartments matching X criteria" -
zillow-listing/redfin-listing/airbnb-listingwith the corresponding filters. - "Recent sold comps near X" -
zillow-listing --type sold --keyword "X" --days-on-zillow 12m. - "Track this product's price" - Loop
amazon-product --asin Xon a schedule; persist.priceto a file. - "Summarize / cite this YouTube video" -
youtube-transcript-api --v-param VID --raw | jq -r '.transcript[].snippet'→ feed to the summary prompt. Beats title/thumbnail-based guesses. - "Find a hotel in $CITY for $DATES under $BUDGET" -
booking-search --keyword $CITY --check-in-date X --check-out-date Y --adults 2 --children 0 --rooms 1 --price-max $BUDGET --sort priceLowestFirst. For one specific property,booking-place --url ...returns the full room/rate matrix. - "What's this channel pushing lately?" -
youtube-channel-api --channel-id @handle --tab videos --raw | jq '.sections[].items[] | {title, publishedDate, views: .extractedViews}'. - "Does this business have an active offer / event?" -
google-maps-posts --place-id X --raw | jq '.posts[] | {postedAt, description, cta}'. Surfaces current promotions Google indexed. - "What's trending around X?" -
google-trends --q "X"for relative interest;google-news --q "X"for headlines. - "Find businesses near me that do X" -
google-maps --q "X" --ll "@LAT,LNG,12z"then fan outgoogle-maps-placefor contacts. - "How does this look in country Y?" -
--gl Yon SERP commands,--proxy-country Yonweb-scraping. Useful for geo-targeted SEO checks, geo-blocked content. - "Pull structured data from this page" -
web-scraping --ai-extract-rules-json '{"price": {"type": "number"}, ...}'. Works on arbitrary pages without writing CSS selectors. - "List of items → per-item details" - Pattern: search command produces IDs/URLs, pipe through
xargsinto the matching*-property/*-product/*-placedeep-dive command. - "Find this person's role / employer / LinkedIn / followers" -
google-serp --q '"Person Name" linkedin'first. The organic-result title is typicallyName — Role at Company | LinkedInand the snippet carries location, headline, connection count. SERP often answers the whole question without ever opening the profile page. - "What is company X doing? Where's their HQ? Who works there?" -
google-serp --q "$COMPANY"returns a.knowledge_graphblock with founder, HQ, founded year, parent, employee range - pre-extracted.google-news --q "$COMPANY"for recent activity. Specific facts via targeted SERP:--q '"$COMPANY" headquarters',--q '"$COMPANY" funding',--q 'site:linkedin.com/company "$COMPANY"'. - "Find public contact channels for company X" - start with SERP:
--q '"@example.com"'often surfaces publicly indexed business addresses. For personal emails or phone numbers, require a legitimate purpose, user authorization, and privacy-law/terms compliance; disclose unverified guesses. - "Enrich this CSV of leads" - per row:
google-serpfor LinkedIn, role, employer; another SERP to verify email or pattern. Stay in SERP unless a specific field is missing. - Reverse-lookup (email / phone / domain → identity) -
google-serpwith the literal value in quotes (--q '"jane@x.com"',--q '"+1 555 123 4567"',--q '"acme corp" site:example.com') almost always surfaces the matching person or business.
SERP-first principle: for any data-enrichment intent (people, companies, emails, products, places), reach for google-serp / google-news / google-shopping / google-maps first. They return Google's already-extracted structured fields (.knowledge_graph, .organic_results[].snippet, .local_results[], etc.) without direct access to the target site. Only escalate to web-scraping when SERP doesn't surface the specific field you need, the data is public or authorized, and the target's terms/access controls allow it. See references/enrichment.md.
If a user request matches one of the above and you don't invoke hasdata, you're probably hallucinating a stale answer.
Universal flag patterns
- Kebab-case flag names. The CLI maps them back to the original camelCase before sending to the API.
- Booleans defaulting to
truehave a paired negation:--no-block-ads,--no-screenshot,--no-js-rendering,--no-extract-emails,--no-block-resources. Setting both--block-adsand--no-block-adserrors. - Anything ending in
-jsonaccepts:- 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):--headers User-Agent=foo --headers Cookie=session=abc. Pair with--headers-jsonfor a JSON base; kv items override per key. - List flags accept either repeats or comma-joined:
--lr lang_en --lr lang_fror--lr lang_en,lang_fr. Serialized askey[]=valuefor GET endpoints. - 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 |
|---|---|
--raw |
Write response bytes as-is (use this when piping to jq) |
--pretty |
Pretty-print JSON (default when stdout is a TTY) |
-o, --output FILE |
Write response to file instead of stdout (works for binary like screenshots) |
--verbose |
Log outgoing URL and X-RateLimit-* headers to stderr |
--api-key KEY |
Override env var (rarely needed) |
--timeout DURATION |
Per-request timeout (default 2m) |
--retries N |
Max retries on 429/5xx (default 2) |
Output contract
Responses are JSON. Pipe through jq for extraction:
hasdata google-serp --q "espresso machine" --num 10 --raw \
| jq -c '.organic_results[] | {title, link, snippet}'
For real-estate / e-commerce results, the array shape is API-specific - read a single response with --pretty first to learn the schema, then write the jq filter.
Exit 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
references/enrichment.md- person and company enrichment (LinkedIn lookup, emails, HQ/funding/news, CSV-row enrichment, reverse-lookup) - the highest-leverage cross-API workflowsreferences/search.md- Google SERP / Bing / News / Trends flag catalogreferences/web-scraping.md-web-scrapingflags, JS scenarios, AI extractionreferences/real-estate.md- Zillow / Redfin filters and bracketed paramsreferences/travel.md- Airbnb / Booking / Google Flights (lodging + transport)references/ecommerce.md- Amazon / Shopifyreferences/local-business.md- Maps (search/place/reviews/photos/posts) / Yelp / YellowPagesreferences/jobs.md- Indeed / Glassdoorreferences/youtube.md- search / video / channel / transcriptreferences/all-commands.md- full subcommand index with credit costs
Limitations
- Requires access to HasData services and valid credentials.
- Data quality and available fields depend on the target website and extraction method used.
- Website changes can impact extraction results and may require adjustments to extraction logic.
- Rate limits, quotas, and account restrictions may apply depending on the endpoint and subscription plan.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.