Get started

    Quickstart

    Create an API key, check a license, and list a local market in a few minutes.


    1. Create an API key

    Sign in to the console, open API keys, and create a key. The full key is shown once, so copy it then.

    bash
    export ZUSE_KEY="zuse_sk_..."

    2. Check a license

    bash
    curl -G https://api.zuse.live/v2/licenses \
      -H "Authorization: Bearer $ZUSE_KEY" \
      --data-urlencode "name=Jane Doe" \
      -d jurisdiction=CA
    json
    {
      "data": [
        {
          "id": 48211,
          "person_id": 12821,
          "name": "JANE DOE",
          "profession": "veterinarian",
          "credential": "DVM",
          "jurisdiction": "CA",
          "license_number": "16364",
          "license_type": "Veterinarian",
          "status": "active",
          "is_active": true,
          "issued_on": "2018-07-06",
          "expires_on": "2027-08-31",
          "years_licensed": 8,
          "city": "LOS ANGELES",
          "state": "CA",
          "red_flags": [],
          "verify_url": "https://search.dca.ca.gov/",
          "match_score": 1.0
        }
      ],
      "pagination": { "limit": 10, "has_more": false, "next_cursor": null },
      "meta": {
        "outcome": "found",
        "note": null,
        "jurisdiction": "CA",
        "covered_jurisdictions": ["CA"],
        "board_verify_url": null
      },
      "billing": { "operation": "verify", "cost_usd": 0.02, "credit_remaining_usd": 9.98 }
    }

    3. List everyone licensed near a hospital

    bash
    curl -G https://api.zuse.live/v2/professionals \
      -H "Authorization: Bearer $ZUSE_KEY" \
      -d postal_code=90013 \
      -d radius_miles=10 \
      -d profession=veterinarian \
      -d limit=100

    pagination.total says how many people match. When pagination.has_more is true, send the same request again with cursor set to pagination.next_cursor to get the next page.

    4. Use it from code, with paging and retries

    Python

    python
    import os, time, random, requests
    
    API = "https://api.zuse.live/v2"
    HEADERS = {"Authorization": f"Bearer {os.environ['ZUSE_KEY']}"}
    
    def get(path, params):
        """GET with back-off: wait as long as the server asks, otherwise 0.5s, 1s, 2s..."""
        for attempt in range(5):
            resp = requests.get(f"{API}{path}", headers=HEADERS, params=params, timeout=15)
            if resp.status_code not in (429, 502, 503, 504):
                resp.raise_for_status()
                return resp.json()
            wait = float(resp.headers.get("Retry-After", 0)) or random.uniform(0, 0.5 * 2 ** attempt)
            if wait > 60:  # a daily limit: retrying now will not help
                resp.raise_for_status()
            time.sleep(wait)
        resp.raise_for_status()
    
    def everyone_near(postal_code, radius_miles, **filters):
        params = {"postal_code": postal_code, "radius_miles": radius_miles, "limit": 100, **filters}
        while True:
            page = get("/professionals", params)
            yield from page["data"]
            if not page["pagination"]["has_more"]:
                return
            params["cursor"] = page["pagination"]["next_cursor"]
    
    for person in everyone_near("90013", 10, profession="veterinarian"):
        print(person["name"], person["license_number"], person["distance_miles"])

    JavaScript

    javascript
    const API = "https://api.zuse.live/v2";
    const headers = { Authorization: `Bearer ${process.env.ZUSE_KEY}` };
    
    async function get(path, params) {
      for (let attempt = 0; attempt < 5; attempt++) {
        const resp = await fetch(`${API}${path}?${new URLSearchParams(params)}`, { headers });
        if (![429, 502, 503, 504].includes(resp.status)) {
          if (!resp.ok) throw new Error((await resp.json()).error.message);
          return resp.json();
        }
        const asked = Number(resp.headers.get("Retry-After"));
        const wait = asked || Math.random() * 0.5 * 2 ** attempt;
        if (wait > 60) throw new Error((await resp.json()).error.message);
        await new Promise((r) => setTimeout(r, wait * 1000));
      }
      throw new Error("Still failing after 5 tries");
    }

    Next steps