# searchOpenalexWorks

**Identifier:** `openalex_searchOpenalexWorks`

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

Search scholarly works across all disciplines and sources. Pass multiple values to "types" to search across them in one call (e.g., ["preprint", "article"]). Use searchOpenalexSources to find source IDs (e.g., ChemRxiv, bioRxiv, arXiv).

## Run it with the CLI

```bash
kirha tools run openalex_searchOpenalexWorks \
  --input '{}'
```

`--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_searchOpenalexWorks",
  "input": {}
}'
```

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": {
    "authorIds": {
      "description": "Author OpenAlex IDs from searchOpenalexAuthors",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "fromDate": {
      "description": "YYYY-MM-DD",
      "type": "string"
    },
    "institutionIds": {
      "description": "Institution OpenAlex IDs from searchOpenalexInstitutions",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "isOa": {
      "type": "boolean"
    },
    "isRetracted": {
      "type": "boolean"
    },
    "minCitations": {
      "minimum": 0,
      "type": "number"
    },
    "page": {
      "default": 1,
      "maximum": 500,
      "minimum": 1,
      "type": "number"
    },
    "perPage": {
      "default": 10,
      "maximum": 25,
      "minimum": 1,
      "type": "number"
    },
    "search": {
      "description": "Supports AND, OR, NOT, \"exact phrase\", wildcards (catalys*)",
      "type": "string"
    },
    "sort": {
      "enum": [
        "relevance",
        "cited_by_count",
        "publication_date",
        "publication_date_asc"
      ],
      "type": "string"
    },
    "sourceIds": {
      "description": "Source OpenAlex IDs, e.g. [S4393918830] for ChemRxiv",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "toDate": {
      "description": "YYYY-MM-DD",
      "type": "string"
    },
    "topicIds": {
      "description": "Topic OpenAlex IDs from searchOpenalexTopics",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "types": {
      "description": "Match any of these work types (OR)",
      "items": {
        "enum": [
          "article",
          "preprint",
          "book",
          "book-chapter",
          "dissertation",
          "dataset",
          "review",
          "report",
          "letter",
          "editorial",
          "grant",
          "software"
        ],
        "type": "string"
      },
      "type": "array"
    }
  },
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "ids": {
      "description": "Work IDs for use with getOpenalexWork",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "page": {
      "type": "number"
    },
    "totalCount": {
      "type": "number"
    },
    "works": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "abstract": {
            "description": "Capped at 4000 chars; getOpenalexWork returns the full text",
            "type": "string"
          },
          "authorCount": {
            "description": "OpenAlex lists return at most 100 authorships, so capped at 100",
            "type": "number"
          },
          "authors": {
            "description": "First 5 authors; getOpenalexWork returns up to 300",
            "items": {
              "additionalProperties": false,
              "properties": {
                "countries": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "id": {
                  "description": "For use with getOpenalexAuthor or getOpenalexAuthorWorks",
                  "type": "string"
                },
                "institutions": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "isCorresponding": {
                  "type": "boolean"
                },
                "name": {
                  "type": "string"
                },
                "orcid": {
                  "type": "string"
                },
                "position": {
                  "type": "string"
                }
              },
              "required": [
                "name"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "citedByCount": {
            "type": "number"
          },
          "doi": {
            "type": "string"
          },
          "fwci": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "isOa": {
            "type": "boolean"
          },
          "isRetracted": {
            "type": "boolean"
          },
          "keywords": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "language": {
            "type": "string"
          },
          "license": {
            "type": "string"
          },
          "oaStatus": {
            "type": "string"
          },
          "oaUrl": {
            "type": "string"
          },
          "pdfUrl": {
            "type": "string"
          },
          "publicationDate": {
            "type": "string"
          },
          "publicationYear": {
            "type": "number"
          },
          "referencedWorksCount": {
            "type": "number"
          },
          "sourceName": {
            "type": "string"
          },
          "sourceType": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "topicDomain": {
            "type": "string"
          },
          "topicField": {
            "type": "string"
          },
          "topicName": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "title"
        ],
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "context",
    "totalCount",
    "page",
    "ids",
    "works"
  ],
  "type": "object"
}
```

## Related tools

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

- [`searchOpenalexSources`](https://kirha.com/providers/openalex/searchOpenalexSources.md)
- [`getOpenalexAuthor`](https://kirha.com/providers/openalex/getOpenalexAuthor.md)
- [`searchOpenalexTopics`](https://kirha.com/providers/openalex/searchOpenalexTopics.md)
- [`searchOpenalexAuthors`](https://kirha.com/providers/openalex/searchOpenalexAuthors.md)
- [`searchOpenalexInstitutions`](https://kirha.com/providers/openalex/searchOpenalexInstitutions.md)
- [`getOpenalexWork`](https://kirha.com/providers/openalex/getOpenalexWork.md)
- [`getOpenalexAuthorWorks`](https://kirha.com/providers/openalex/getOpenalexAuthorWorks.md)
- [`autocompleteOpenalex`](https://kirha.com/providers/openalex/autocompleteOpenalex.md)

-----

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