# autocompleteOpenalex

**Identifier:** `openalex_autocompleteOpenalex`

**Provider:** [OpenAlex](https://kirha.com/providers/openalex.md)

Fast typeahead for quick name-to-ID resolution. Max 10 results.

## Run it with the CLI

```bash
kirha tools run openalex_autocompleteOpenalex \
  --input '{
    "query": "<query>"
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "openalex_autocompleteOpenalex",
  "input": {
    "query": "<query>"
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "entityType": {
      "enum": [
        "works",
        "authors",
        "sources",
        "institutions",
        "topics",
        "keywords",
        "funders",
        "publishers"
      ],
      "type": "string"
    },
    "query": {
      "type": "string"
    }
  },
  "required": [
    "query"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "results": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "citedByCount": {
            "type": "number"
          },
          "entityType": {
            "type": "string"
          },
          "externalId": {
            "type": "string"
          },
          "filterKey": {
            "description": "Use this filter key with the ID in searchOpenalexWorks",
            "type": "string"
          },
          "hint": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "worksCount": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "totalCount": {
      "type": "number"
    }
  },
  "required": [
    "context",
    "totalCount",
    "results"
  ],
  "type": "object"
}
```

## Related tools

Other OpenAlex tools that this tool refers to, or that refer to it.

- [`searchOpenalexWorks`](https://kirha.com/providers/openalex/searchOpenalexWorks.md)

-----

[All OpenAlex tools](https://kirha.com/providers/openalex.md) · [< Back to tools list](https://kirha.com/tools.md)