API docs

Reference · Business search

Find businesses in an area, with emails

POST /api/v1/search

Finds businesses of one kind in a place (for example dentists in Austin, TX) and the best email for each: the business email or the owner's, checked. It runs in rounds until it has target emails that work (or searched the whole area). Poll GET /api/v1/lists/{listId} or set webhookUrl (event search.completed).

Owner emails: only owners the business names on its own website. For businesses in Vermont, Oregon and Connecticut we deliver owner emails only when the website prints them.

Credits: 1 credit per delivered email that Works. Businesses without a website, and emails we could not confirm, are free. With brief: true, plus 0.5 credits per summary.

Body (JSON)

NameTypeRequiredWhat it is
categorystringyesWhat kind of business, e.g. "dentist", "roofing contractor", "yoga studio".
locationstringyesCity, county, state or ZIP / post code.
country"US" · "CA" · "GB" · "AU" · "NZ" · "IE" · "DE" · "AT" · "CH" · "FR" · "ES" · "IT" · "NL" · "BE" · "LU" · "PT" · "DK" · "SE" · "FI" · "PL" · "CZ" · "MX"yesCountry of the location.
mode"target" · "all"target: stop at target emails that work. all: search the whole area (up to creditLimit). default "target"
targetintegerHow many emails that work you want (mode "target"). default 25
creditLimitnumbermode "all": stop when this many credits are used (default: until your credits run out).
role"any" · "best" · "owner" · "marketing" · "sales"any: the business email (info@, office@ …). best: the owner when the business names one on its own website, else the business email. owner: only owners named on the business's own website. default "any"
briefbooleanAlso write a short company summary and a first line for each business. default false
webhookUrlstringPublic https URL we POST the result to when the job is done (see the webhooks guide).
webhookSecretstringOptional: sign this webhook with your own secret instead of the account signing secret.

Example request

Shell
curl -X POST "https://moleman.io/api/v1/search" \
  -H "Authorization: Bearer $MOLEMAN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"category":"dentist","location":"Austin, TX","country":"US","target":25}'

Example answer

JSON
{
  "runId": 55,
  "listId": 380,
  "jobId": 984,
  "livemode": true,
  "run": {
    "status": "running",
    "delivered": 0,
    "creditsUsed": 0
  },
  "pollUrl": "/api/v1/lists/380"
}

Errors

StatusCodeWhen
401missing_api_keyThe request has no API key.
401invalid_api_keyThe API key is not one of ours (a typo, a cut-off copy, or a key from another account that was deleted).
401revoked_api_keyThe API key was revoked on the API page. Revoking takes effect at once.
429rate_limitedMore than 120 requests in one minute with this key.
500server_errorSomething broke on our side. Nothing was charged for it.
400invalid_requestA parameter is missing, has the wrong type or is out of range. details lists every problem with its path.
400invalid_jsonThe body is not valid JSON.
409idempotency_in_progressA request with the same Idempotency-Key is still running.
422idempotency_key_reusedThe Idempotency-Key was already used in the last 24 hours with a different request.
402insufficient_creditsThe account has fewer credits than this request could use at most. We hold the maximum while the job runs and give back what it does not use.
404place_not_foundWe could not find the place you searched in.
503search_unavailableBusiness search is not available right now.
400invalid_webhook_urlThe webhook URL is not a public https address (private networks and other schemes are refused).