GitHub: Search users
GitHub search.searchUsers: arguments, response, policy and SDK examples.
← Search operations · Get started
Operation github.search_users
Provider route: GET /search/users. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/github with npm, or alter-sdk-github with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { GitHubIntegration } from "@alter-ai/github";
async function execute(input: Parameters<GitHubIntegration["search"]["searchUsers"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new GitHubIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.search.searchUsers(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_github import GitHubIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = GitHubIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.search.search_users(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Required within parent | Additional keys: not allowed |
query.q | string | Required within parent | |
query.sort | string | Optional | One of: followers, repositories, joined |
query.order | string | Optional | Default: desc One of: desc, asc |
query.per_page | integer | Optional | Default: 30 |
query.page | integer | Optional | Default: 1 |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
incomplete_results | boolean | Required within parent | |
items | array | Required within parent | |
items[] | Model | Each item | Expand Search users — response body — items item |
total_count | JSON | Required within parent | |
total_count (anyOf 1) | integer | Alternative | |
total_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: Search users — response body — items item
Schemas
Section titled “Schemas”Search users — response body — items item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | User Search Result Item |
avatar_url | string | Required within parent | Format: uri |
bio | JSON | Optional | |
bio (anyOf 1) | string | Alternative | |
bio (anyOf 2) | null | Alternative | |
blog | JSON | Optional | |
blog (anyOf 1) | string | Alternative | |
blog (anyOf 2) | null | Alternative | |
company | JSON | Optional | |
company (anyOf 1) | string | Alternative | |
company (anyOf 2) | null | Alternative | |
created_at | string | Optional | Format: date-time |
email | JSON | Optional | |
email (anyOf 1) | string | Alternative | Format: email |
email (anyOf 2) | null | Alternative | |
events_url | string | Required within parent | |
followers | JSON | Optional | |
followers (anyOf 1) | integer | Alternative | |
followers (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
followers_url | string | Required within parent | Format: uri |
following | JSON | Optional | |
following (anyOf 1) | integer | Alternative | |
following (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
following_url | string | Required within parent | |
gists_url | string | Required within parent | |
gravatar_id | JSON | Required within parent | |
gravatar_id (anyOf 1) | string | Alternative | |
gravatar_id (anyOf 2) | null | Alternative | |
hireable | JSON | Optional | |
hireable (anyOf 1) | boolean | Alternative | |
hireable (anyOf 2) | null | Alternative | |
html_url | string | Required within parent | Format: uri |
id | JSON | Required within parent | |
id (anyOf 1) | integer | Alternative | Format: int64 |
id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
location | JSON | Optional | |
location (anyOf 1) | string | Alternative | |
location (anyOf 2) | null | Alternative | |
login | string | Required within parent | |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | |
name (anyOf 2) | null | Alternative | |
node_id | string | Required within parent | |
organizations_url | string | Required within parent | Format: uri |
public_gists | JSON | Optional | |
public_gists (anyOf 1) | integer | Alternative | |
public_gists (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
public_repos | JSON | Optional | |
public_repos (anyOf 1) | integer | Alternative | |
public_repos (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
received_events_url | string | Required within parent | Format: uri |
repos_url | string | Required within parent | Format: uri |
score | JSON | Required within parent | |
score (anyOf 1) | number | Alternative | |
score (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
site_admin | boolean | Required within parent | |
starred_url | string | Required within parent | |
subscriptions_url | string | Required within parent | Format: uri |
suspended_at | JSON | Optional | |
suspended_at (anyOf 1) | string | Alternative | Format: date-time |
suspended_at (anyOf 2) | null | Alternative | |
text_matches | Model | Optional | Expand Search code — response body — items item text matches |
type | string | Required within parent | |
updated_at | string | Optional | Format: date-time |
url | string | Required within parent | Format: uri |
user_view_type | string | Optional |
Referenced models: Search code — response body — items item text matches
Search code — response body — items item text matches
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | array | Root | |
$[] | object | Each item | |
$[].fragment | string | Optional | |
$[].matches | array | Optional | |
$[].matches[] | object | Each item | |
$[].matches[].indices | array | Optional | |
$[].matches[].indices[] | JSON | Each item | |
$[].matches[].indices[] (anyOf 1) | integer | Alternative | |
$[].matches[].indices[] (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
$[].matches[].text | string | Optional | |
$[].object_type | JSON | Optional | |
$[].object_type (anyOf 1) | string | Alternative | |
$[].object_type (anyOf 2) | null | Alternative | |
$[].object_url | string | Optional | |
$[].property | string | Optional |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: github.search_users. Catalog operation: search/users. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Pinned headers: {"X-GitHub-Api-Version": "2026-03-10", "User-Agent": "Alter", "Accept": "application/vnd.github+json"}