Examples

Same search in three languages, plus one MCP tools/call.

Set HOPMOEN_API_KEY first. These examples search active organizations in California with a page size of 2. Swap the filters.

curl

curl -s "https://app.hopmoen.com/v1/providers?state=CA&entity_type=Organization&page_size=2" \
  -H "Authorization: Bearer $HOPMOEN_API_KEY"

Python

import os
import requests

key = os.environ["HOPMOEN_API_KEY"]
response = requests.get(
    "https://app.hopmoen.com/v1/providers",
    params={"state": "CA", "entity_type": "Organization", "page_size": 2},
    headers={"Authorization": f"Bearer {key}"},
    timeout=60,
)
response.raise_for_status()
payload = response.json()
for row in payload["rows"]:
    print(row["npi"], row["provider_name"], row.get("city"))

JavaScript

const key = process.env.HOPMOEN_API_KEY;
const url = new URL("https://app.hopmoen.com/v1/providers");
url.searchParams.set("state", "CA");
url.searchParams.set("entity_type", "Organization");
url.searchParams.set("page_size", "2");
const response = await fetch(url, {
  headers: { Authorization: `Bearer ${key}` },
});
if (!response.ok) throw new Error(await response.text());
const payload = await response.json();
console.log(payload.total, payload.rows);

MCP tools/call

curl -s https://app.hopmoen.com/mcp \
  -H "Authorization: Bearer $HOPMOEN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "search_providers",
      "arguments": {"state": "CA", "entity_type": "Organization", "page_size": 2}
    }
  }'

structuredContent.rows is the provider list. The SSE form is the same body with Accept: application/json, text/event-stream, wrapped as event: message.