Skip to main content

Official IBLead CLI — search, export and watch Google Maps leads from your terminal.

Project description

IBLead CLI

Official command-line client for the IBLead API — search, export and watch Google Maps leads directly from your terminal.

pip install iblead-cli
iblead login
iblead export run --country FR --category Restaurant --no-reviews -o out.csv

Why a CLI

  • One-liner exports. iblead export run launches an async export, polls the job, downloads the CSV — three API calls collapsed into one command.
  • Composable. Pipe CSV/JSON output into jq, csvkit, Airflow, cron, GitHub Actions. Scriptable from day one.
  • Zone search. Draw a rectangle or free polygon, save it as a WKT file, pass --bbox @zone.wkt to any search or export.
  • No web UI needed. All 25+ public API endpoints wrapped: search, lookup, export, watches, credits, categories, cities.

Install

pip install iblead-cli

Requires Python 3.9+.

Authenticate

Grab an API key from app.iblead.com/dashboard/api, then:

iblead login

The key is stored in ~/.config/iblead/credentials (chmod 600). You can also set IBLEAD_API_KEY as an env var — it takes precedence over the file.

Common commands

Search

iblead search --country FR --category Restaurant --has-email -n 50 -f csv > leads.csv
iblead search --bbox @paris.wkt --min-rating 4.5 -f table

Export (async, with polling + download)

# Simple export — blocks until the file lands on disk
iblead export run --country FR --category Restaurant --limit 5000 -o restos.csv

# Zone-based, no reviews (~50x smaller file)
iblead export run --country FR --bbox @idf.wkt --no-reviews -o idf.csv

# Fire and forget — print the job_id and exit
iblead export run --country FR --category Hotel --no-wait

# Check job status later
iblead export status <job_id> --watch
iblead export download <job_id> -o hotels.csv

Lookup

iblead lookup one "0x47e66e1f06e2b70d:0x40b82c3688c9460"
iblead lookup bulk --file ids.txt
cat ids.txt | iblead lookup bulk

Watches (saved searches)

iblead watch create --country FR --category Restaurant --has-email --auto-notify
iblead watch list
iblead watch new <watch_id>
iblead watch unlock <watch_id> --limit 100

Zone / polygon helpers (offline)

# Build a WKT rectangle
iblead zone rectangle --min-lat 48.85 --min-lon 2.33 --max-lat 48.87 --max-lon 2.36 > paris.wkt

# Validate a WKT polygon (4-1000 points, closed ring, coord bounds)
iblead zone validate paris.wkt

Account

iblead credits      # balance + daily export usage
iblead whoami       # account info

Metadata

iblead categories
iblead subcategories --category Restaurant
iblead countries
iblead cities --country FR --search paris

Output formats

  • --format json (default for most commands) — machine-readable
  • --format csv — flat CSV, nested fields JSON-encoded
  • --format table — terminal-friendly

Exit codes

Code Meaning
0 Success
1 Usage / client error
2 Auth failed (401)
3 Forbidden (403)
4 Insufficient credits
5 Rate limited (429)
6 Server error (5xx)
7 Other HTTP error

Handy for shell scripts:

iblead export run --country FR -o out.csv && echo "done" || echo "failed with $?"

Environment variables

Variable Purpose
IBLEAD_API_KEY API key (overrides the credentials file)
IBLEAD_API_URL Override API base URL (default: https://app.iblead.com/api/v1)

Configuration

File Purpose
~/.config/iblead/credentials Stored API key (chmod 600)

Links

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iblead_cli-1.0.0.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iblead_cli-1.0.0-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file iblead_cli-1.0.0.tar.gz.

File metadata

  • Download URL: iblead_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for iblead_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0cb853cb0d3b34118b8c1f4a2cced6a7536eba231728e22de2b4e593e98b00c3
MD5 23de585f2d670c710928c4e34eb97074
BLAKE2b-256 0a69041ea7f13a7ee9a61e1bba6bf57171380bbfb8cdac32db20616423780d71

See more details on using hashes here.

File details

Details for the file iblead_cli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: iblead_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for iblead_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2b5d1183b56bb58a4436104fdab2431aa4a2b7cee996db40f48a100dd74c7b1
MD5 dcc527ac25b824e41200c92e298a17a1
BLAKE2b-256 cb43c761c737cc4757f8f0097c62a0ec520342cbaaaa163d1680aac3e919150d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page