openalex-mcp-server
Ce que fait ce MCP
Searches and analyzes the OpenAlex academic research catalog, including works, authors, institutions, citations, topics, and publication trends.
Outils
Schéma d’entrée
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['entity_type', 'group_by'], 'properties': {'order': {'enum': ['count', 'key'], 'type': 'string', 'description': 'Sort order for groups. Omit or pass "count" (default) to return the top-N groups by count descending â\x80\x94 no further pages. Pass "key" to enumerate all distinct values in key-ascending order with cursor pagination. Use "key" only when you need a full traversal; most analysis calls want "count".'}, 'cursor': {'type': 'string', 'minLength': 1, 'description': 'Pagination cursor from a previous response. Only relevant when order is "key" â\x80\x94 count-descending results have no next page. Pass the next_cursor from the previous response to advance. Omit it on the first call â\x80\x94 an empty string is rejected, since a supplied-but-blank cursor is a caller mistake rather than a request for the first page.'}, 'filters': {'type': 'object', 'description': "Filter criteria (same syntax as openalex_search_entities filters). Narrows the population before aggregation. For full-text within filters, use abstract.search, title.search, or default.search â\x80\x94 there is no bare 'search' filter key. Example: group works by year filtered to a specific topic.", 'propertyNames': {'type': 'string'}, 'additionalProperties': {'type': 'string'}}, 'group_by': {'type': 'string', 'minLength': 1, 'description': 'Field to group by. Works examples: "publication_year", "type", "oa_status", "primary_topic.field.id", "authorships.institutions.country_code", "is_retracted". Authors: "last_known_institutions.country_code", "has_orcid". Sources: "type", "is_oa", "country_code". Not all fields support group_by â\x80\x94 call openalex_describe_fields(entity_type, "group_by") for the groupable set.'}, 'per_page': {'type': 'integer', 'default': 200, 'maximum': 200, 'minimum': 1, 'description': 'Maximum groups per page (1-200). Default 200 (the upstream cap). A real top-N knob when order is count (the default) â\x80\x94 reduce to return only the highest-count groups.'}, 'entity_type': {'enum': ['works', 'authors', 'sources', 'institutions', 'topics', 'keywords', 'publishers', 'funders'], 'type': 'string', 'description': 'Entity type to aggregate.'}, 'include_unknown': {'type': 'boolean', 'default': False, 'description': 'Add a group for entities with no value for the grouped field. Hidden by default. That group carries `is_unknown: true`; OpenAlex keys it -111 or -111.0 on numeric fields, "unknown" on text fields and under order "key", and an ID ending in /unknown on ID fields â\x80\x94 a sentinel, not a measured value. The key is not a filter value: passing -111 as a filter matches a numeric range, not the entities with no value. Boolean fields have no separate group â\x80\x94 a missing value counts as false.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['meta', 'groups', 'echo', 'totalCount']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'echo': {'type': 'string', 'description': 'Compact echo of the input criteria (entity_type, group_by, filters) â\x80\x94 surfaces what was actually requested when no groups are returned.'}, 'meta': {'type': 'object', 'required': ['count', 'groups_count', 'next_cursor'], 'properties': {'count': {'type': 'number', 'description': 'Total entities matching the filters (before grouping).'}, 'next_cursor': {'type': ['string', 'null'], 'description': 'Cursor for next page of groups. null if no more groups.'}, 'groups_count': {'type': ['number', 'null'], 'description': 'Number of groups on this page (max 200).'}}, 'description': 'Aggregation metadata.', 'additionalProperties': False}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['rate_limited', 'upstream_budget_exhausted', 'upstream_timeout', 'upstream_unavailable', 'upstream_unauthorized', 'upstream_forbidden', 'comma_in_filter_value', 'upstream_invalid_params', 'upstream_invalid_id_value', 'upstream_ungroupable_group_by', 'upstream_invalid_params_other', 'upstream_validation_failed', 'upstream_missing_group_by'], 'description': 'Machine-readable failure mode. Declared by this tool: `rate_limited`: OpenAlex throttled the request for exceeding its per-second ceiling (HTTP 429). `upstream_budget_exhausted`: The OpenAlex daily usage budget is spent (HTTP 429). `upstream_timeout`: OpenAlex did not respond within the request deadline. `upstream_unavailable`: OpenAlex was unreachable or unusable â\x80\x94 HTTP 503, a connection failure, or a body that was empty, HTML, or unparseable JSON. `upstream_unauthorized`: OpenAlex rejected the API key (HTTP 401). `upstream_forbidden`: OpenAlex denied access to the requested resource (HTTP 403). `comma_in_filter_value`: A filter value contains a comma, which collides with the OpenAlex filter separator. `upstream_invalid_params`: OpenAlex rejected an invalid group_by or filter field name (HTTP 400). `upstream_invalid_id_value`: An entity-ID filter received a value that is not an OpenAlex ID â\x80\x94 usually a name (HTTP 400). `upstream_ungroupable_group_by`: group_by targets a field OpenAlex cannot aggregate â\x80\x94 a raw date, a decimal score, a *.search operator, a field such as display_name, doi, or referenced_works, or a concept key on authors, which OpenAlex reports as an invalid OpenAlex ID (HTTP 400). `upstream_invalid_params_other`: OpenAlex rejected the request (HTTP 400) for a reason other than an invalid field name. `upstream_validation_failed`: OpenAlex rejected the request as semantically invalid (HTTP 422). `upstream_missing_group_by`: OpenAlex answered with its plain list shape, carrying no aggregation for the requested group_by. Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'budget': {'type': 'object', 'required': ['costUsd', 'remainingUsd', 'resetsInSeconds'], 'properties': {'costUsd': {'type': 'number', 'description': 'USD this call spent. Aggregation is priced far below paging the same entities, so a group_by is the cheap way to size a population before searching it.'}, 'remainingUsd': {'type': 'number', 'description': "USD left in today's OpenAlex budget after this call."}, 'resetsInSeconds': {'type': 'number', 'description': 'Seconds until the daily budget refills (midnight UTC).'}, 'prepaidRemainingUsd': {'type': 'number', 'description': 'USD left in the prepaid balance â\x80\x94 a separate pool OpenAlex draws on only after the daily allowance runs out, and which the daily reset does not refill. Add it to `remainingUsd` for the full spendable amount. Absent when the account holds no prepaid balance.'}}, 'description': 'What this call cost against the OpenAlex daily budget and what is left of it â\x80\x94 weigh `remainingUsd` against `costUsd` before enumerating every group with `order: "key"`. Absent when OpenAlex omitted the accounting headers.', 'additionalProperties': False}, 'groups': {'type': 'array', 'items': {'type': 'object', 'required': ['key', 'key_display_name', 'count'], 'properties': {'key': {'type': 'string', 'description': 'Group key (OpenAlex ID or raw value), exactly as OpenAlex returns it.'}, 'count': {'type': 'number', 'description': 'Number of entities in this group.'}, 'is_unknown': {'type': 'boolean', 'const': True, 'description': 'Present only on the group include_unknown adds for entities with no value; its key is an OpenAlex sentinel (-111, -111.0, unknown, or an ID ending in /unknown), not a measured value.'}, 'key_display_name': {'type': 'string', 'description': 'Human-readable group label as plain text, with HTML entities decoded and markup removed.'}}, 'description': 'A single aggregation group with its key, display label, and entity count.', 'additionalProperties': False}, 'description': 'Aggregation groups with counts.'}, 'notice': {'type': 'string', 'description': 'Guidance notice. Set when a first call returns no groups (recovery suggestions), when a `cursor` continuation returns none because the traversal is already finished, or when the page is full and more groups likely exist (truncation signal with narrowing advice). Absent otherwise.'}, 'totalCount': {'type': 'number', 'description': 'Total entities matching the filters before grouping (across all pages).'}}, 'additionalProperties': False}
Schéma d’entrée
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['entity_type', 'context'], 'properties': {'query': {'type': 'string', 'description': 'Optional partial or guessed field name to sort results by similarity. Pass the field you tried (e.g. "funder") to get the closest matches first. The complete field list is returned either way â\x80\x94 a query reorders it, it does not filter it, so a nested value\'s parent object (e.g. `summary_stats` for "h_index") is still reachable further down.'}, 'context': {'enum': ['filter', 'group_by', 'select'], 'type': 'string', 'description': 'Field usage context. "filter": fields accepted in the filter param. "group_by": fields accepted in group_by â\x80\x94 a subset of the filter set that leaves out what OpenAlex refuses to aggregate (raw dates, *.search operators, decimal scores, display_name, and external-ID fields among them). "select": fields accepted in select.'}, 'entity_type': {'enum': ['works', 'authors', 'sources', 'institutions', 'topics', 'keywords', 'publishers', 'funders'], 'type': 'string', 'description': 'OpenAlex entity type to list fields for.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['entity_type', 'context', 'fields', 'total']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'description': 'Machine-readable failure mode.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'total': {'type': 'number', 'description': 'Total number of valid fields for this entity_type + context.'}, 'fields': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Every valid field name for this entity_type + context â\x80\x94 the complete pool, ranked by similarity when `query` is provided. Never truncated, so this always holds `total` entries.'}, 'context': {'type': 'string', 'description': 'Context queried (filter, group_by, or select).'}, 'entity_type': {'type': 'string', 'description': 'Entity type queried.'}}, 'additionalProperties': False}
Schéma d’entrée
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['seed_id', 'direction'], 'properties': {'sort': {'type': 'string', 'description': 'Sort field. Prefix with "-" for descending. Comma-separate for a multi-key sort, applied left to right, with the "-" prefix set per key ("-publication_year,cited_by_count" sorts by year descending, then citations ascending). Common: "cited_by_count", "-publication_date". Default is OpenAlex relevance.'}, 'cursor': {'type': 'string', 'minLength': 1, 'description': 'Pagination cursor from a previous response. Pass to get the next page. Omit it on the first call â\x80\x94 an empty string is rejected, since a supplied-but-blank cursor is a caller mistake rather than a request for the first page.'}, 'select': {'type': 'array', 'items': {'type': 'string'}, 'description': 'OpenAlex work field names to return. Always returned: id, display_name. Defaults to the curated works select if omitted.'}, 'filters': {'type': 'object', 'description': 'Additional filters to narrow the graph, same syntax as openalex_search_entities. Example: publication_year=">2020", is_oa="true". Do not include cites/cited_by/related_to, nor an alias of one such as cited_works â\x80\x94 those keys are set by the `direction` parameter.', 'propertyNames': {'type': 'string'}, 'additionalProperties': {'type': 'string'}}, 'seed_id': {'type': 'string', 'minLength': 1, 'description': 'Seed work identifier. Accepts OpenAlex ID ("W2741809807"), DOI ("10.1038/nature12373" or full URL), or PMID ("12345678" or "https://pubmed.ncbi.nlm.nih.gov/12345678"). A PMCID is recognized too, bare or as a PubMed Central URL, but OpenAlex indexes no PMCIDs, so it resolves nothing â\x80\x94 pass the work\'s PMID or DOI instead. Use openalex_resolve_name first if you only have a title.'}, 'per_page': {'type': 'integer', 'default': 25, 'maximum': 100, 'minimum': 1, 'description': 'Results per page (1-100). Default 25.'}, 'direction': {'enum': ['cites', 'cited_by', 'related_to'], 'type': 'string', 'description': '"cites": works that cite seed_id (incoming citations). "cited_by": works that seed_id cites (its reference list). "related_to": OpenAlex algorithmically-related works (~8-30 typical, may be empty for less-cited seeds).'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['meta', 'results', 'echo', 'totalCount']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'echo': {'type': 'string', 'description': 'Compact echo of seed_id, direction, filters, sort â\x80\x94 surfaces what was actually queried when no edges are returned.'}, 'meta': {'type': 'object', 'required': ['count', 'per_page', 'next_cursor'], 'properties': {'count': {'type': 'number', 'description': 'Total edges from seed_id in this direction (across all pages).'}, 'per_page': {'type': 'number', 'description': 'Page size OpenAlex echoed for this request â\x80\x94 the requested per_page, not the number of records returned. A short or exhausted page carries fewer records than this.'}, 'next_cursor': {'type': ['string', 'null'], 'description': 'Cursor for next page. null if no more results.'}}, 'description': 'Result metadata including pagination.', 'additionalProperties': False}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['rate_limited', 'upstream_budget_exhausted', 'upstream_timeout', 'upstream_unavailable', 'upstream_unauthorized', 'upstream_forbidden', 'comma_in_filter_value', 'upstream_invalid_params', 'upstream_invalid_id_value', 'upstream_sort_requires_search', 'upstream_invalid_params_other', 'reserved_filter_key', 'entity_not_found'], 'description': 'Machine-readable failure mode. Declared by this tool: `rate_limited`: OpenAlex throttled the request for exceeding its per-second ceiling (HTTP 429). `upstream_budget_exhausted`: The OpenAlex daily usage budget is spent (HTTP 429). `upstream_timeout`: OpenAlex did not respond within the request deadline. `upstream_unavailable`: OpenAlex was unreachable or unusable â\x80\x94 HTTP 503, a connection failure, or a body that was empty, HTML, or unparseable JSON. `upstream_unauthorized`: OpenAlex rejected the API key (HTTP 401). `upstream_forbidden`: OpenAlex denied access to the requested resource (HTTP 403). `comma_in_filter_value`: A filter value contains a comma, which collides with the OpenAlex filter separator. `upstream_invalid_params`: OpenAlex rejected an invalid filter or sort field name (HTTP 400). `upstream_invalid_id_value`: An entity-ID filter received a value that is not an OpenAlex ID â\x80\x94 usually a name (HTTP 400). `upstream_sort_requires_search`: sort=-relevance_score was used but the citation-graph query has no active search (HTTP 400). `upstream_invalid_params_other`: OpenAlex rejected the request (HTTP 400) for a reason other than an invalid field name. `reserved_filter_key`: filters contains cites/cited_by/related_to, or an alias of one such as cited_works â\x80\x94 the direction parameter reserves those keys. `entity_not_found`: OpenAlex has no work matching the seed_id. Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'budget': {'type': 'object', 'required': ['costUsd', 'remainingUsd', 'resetsInSeconds'], 'properties': {'costUsd': {'type': 'number', 'description': 'USD this call spent, covering both upstream requests â\x80\x94 the seed validation lookup (unbilled) and the graph page itself.'}, 'remainingUsd': {'type': 'number', 'description': "USD left in today's OpenAlex budget after this call."}, 'resetsInSeconds': {'type': 'number', 'description': 'Seconds until the daily budget refills (midnight UTC).'}, 'prepaidRemainingUsd': {'type': 'number', 'description': 'USD left in the prepaid balance â\x80\x94 a separate pool OpenAlex draws on only after the daily allowance runs out, and which the daily reset does not refill. Add it to `remainingUsd` for the full spendable amount. Absent when the account holds no prepaid balance.'}}, 'description': 'What this call cost against the OpenAlex daily budget and what is left of it. Price a full walk before committing to it: `totalCount` ÷ `per_page` Ã\x97 `costUsd` against `remainingUsd`. Absent when OpenAlex omitted the accounting headers.', 'additionalProperties': False}, 'notice': {'type': 'string', 'description': 'Guidance when no edges are returned. A first call suggests verifying the seed_id, broadening filters, or trying a different direction; a `cursor` continuation says the walk is already past its last edge instead. Absent when results are present.'}, 'results': {'type': 'array', 'items': {'type': 'object', 'required': ['id', 'display_name'], 'properties': {'id': {'type': 'string', 'description': 'OpenAlex work ID.'}, 'display_name': {'type': ['string', 'null'], 'description': 'Work title. null when OpenAlex holds no title for the record (paratext works and other untitled entries) â\x80\x94 use `id` to identify it.'}}, 'description': 'A single OpenAlex work record on the citation graph. Additional fields vary by `select`.', 'additionalProperties': {}}, 'description': 'Works on the citation graph in this direction. Text values are plain text â\x80\x94 HTML entities decoded, HTML/JATS/MathML markup removed.'}, 'totalCount': {'type': 'number', 'description': 'Total edges from seed_id in this direction across all pages.'}}, 'additionalProperties': False}
Schéma d’entrée
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['query'], 'properties': {'query': {'type': 'string', 'minLength': 1, 'description': 'Name or partial name to resolve. Also accepts an identifier, bare or in URL form â\x80\x94 OpenAlex ID ("W2741809807", "F4320332161"), DOI ("10.1038/nature12373"), ORCID ("0000-0002-1825-0097"), ROR ("https://ror.org/00hx57361"), PMID ("12345678" or "https://pubmed.ncbi.nlm.nih.gov/12345678"), ISSN ("1234-5678") â\x80\x94 which resolves straight to that one record instead of running a name search. A keyword URL ("https://openalex.org/keywords/groundwater") resolves the same way; a bare keyword slug reads as a name and runs a name search, which finds it too. A PMCID ("PMC1234567" or a PubMed Central URL) is recognized but OpenAlex indexes no PMCIDs, so it resolves nothing â\x80\x94 pass the work\'s PMID or DOI instead.'}, 'filters': {'type': 'object', 'description': 'Narrow autocomplete results with filters. Example: restrict to a specific country or publication year range. Applies to name queries only â\x80\x94 an identifier already addresses a single record.', 'propertyNames': {'type': 'string'}, 'additionalProperties': {'type': 'string'}}, 'entity_type': {'enum': ['works', 'authors', 'sources', 'institutions', 'topics', 'keywords', 'publishers', 'funders'], 'type': 'string', 'description': 'Entity type to search. Omit for cross-entity search (useful when entity type is unknown). Not applied when `query` is an identifier â\x80\x94 an identifier determines its own entity type.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['results']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['rate_limited', 'upstream_budget_exhausted', 'upstream_timeout', 'upstream_unavailable', 'upstream_unauthorized', 'upstream_forbidden', 'comma_in_filter_value', 'upstream_invalid_params', 'upstream_invalid_id_value', 'query_too_long', 'upstream_invalid_params_other', 'upstream_validation_failed'], 'description': 'Machine-readable failure mode. Declared by this tool: `rate_limited`: OpenAlex throttled the autocomplete request for exceeding its per-second ceiling (HTTP 429). `upstream_budget_exhausted`: The OpenAlex daily usage budget is spent (HTTP 429). `upstream_timeout`: OpenAlex did not respond within the request deadline. `upstream_unavailable`: OpenAlex was unreachable or unusable â\x80\x94 HTTP 503, a connection failure, or a body that was empty, HTML, or unparseable JSON. `upstream_unauthorized`: OpenAlex rejected the API key (HTTP 401). `upstream_forbidden`: OpenAlex denied access to autocomplete (HTTP 403). `comma_in_filter_value`: A `filters` value contains a comma, which collides with the OpenAlex filter separator. `upstream_invalid_params`: OpenAlex rejected an invalid filter field name on the autocomplete query (HTTP 400). `upstream_invalid_id_value`: A `filters` entry expecting an entity ID received a value that is not an OpenAlex ID â\x80\x94 usually a name (HTTP 400). `query_too_long`: OpenAlex autocomplete failed (HTTP 500) on a `query` longer than the 1,000 characters it accepts when entity_type is set. `upstream_invalid_params_other`: OpenAlex rejected the autocomplete request (HTTP 400) for a reason other than an invalid field name. `upstream_validation_failed`: OpenAlex rejected the autocomplete request as semantically invalid (HTTP 422). Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'budget': {'type': 'object', 'required': ['costUsd', 'remainingUsd', 'resetsInSeconds'], 'properties': {'costUsd': {'type': 'number', 'description': 'USD this call spent. Autocomplete is priced at the floor â\x80\x94 resolving a name before filtering costs far less than the failed searches an ambiguous name causes.'}, 'remainingUsd': {'type': 'number', 'description': "USD left in today's OpenAlex budget after this call."}, 'resetsInSeconds': {'type': 'number', 'description': 'Seconds until the daily budget refills (midnight UTC).'}, 'prepaidRemainingUsd': {'type': 'number', 'description': 'USD left in the prepaid balance â\x80\x94 a separate pool OpenAlex draws on only after the daily allowance runs out, and which the daily reset does not refill. Add it to `remainingUsd` for the full spendable amount. Absent when the account holds no prepaid balance.'}}, 'description': 'What this call cost against the OpenAlex daily budget and what is left of it. Read `remainingUsd` here to size the search or traversal this resolution feeds. Absent when OpenAlex omitted the accounting headers.', 'additionalProperties': False}, 'notice': {'type': 'string', 'description': 'Guidance notice. Set when nothing matched (echoes the query and suggests corrections) or when an identifier query was passed name-search parameters that do not apply to it. Absent otherwise.'}, 'results': {'type': 'array', 'items': {'type': 'object', 'required': ['id', 'external_id', 'display_name', 'entity_type', 'cited_by_count', 'works_count', 'hint'], 'properties': {'id': {'type': 'string', 'description': 'OpenAlex ID.'}, 'hint': {'type': ['string', 'null'], 'description': 'Disambiguation context as plain text â\x80\x94 last institution (authors), host organization (sources), place or country (institutions); author names (works) from a name search, publication year from an identifier lookup. null when the record carries none.'}, 'entity_type': {'type': 'string', 'description': 'Entity type â\x80\x94 one of: work, author, source, institution, topic, keyword, publisher, funder.'}, 'external_id': {'type': ['string', 'null'], 'description': 'Canonical external ID (DOI, ORCID, ROR, ISSN).'}, 'works_count': {'type': ['number', 'null'], 'description': 'Associated works. null for works themselves.'}, 'display_name': {'type': ['string', 'null'], 'description': 'Human-readable name as plain text, with HTML entities decoded and markup removed. null only for an identifier lookup that landed on a record OpenAlex holds no title for (paratext works and other untitled entries) â\x80\x94 use `id` to identify it.'}, 'cited_by_count': {'type': 'number', 'description': 'Citation count (direct for works, aggregate for others).'}}, 'description': 'A single autocomplete match with its ID, name, entity type, activity stats, and a disambiguation hint.', 'additionalProperties': False}, 'description': 'Autocomplete matches, up to 10.'}}, 'additionalProperties': False}
Schéma d’entrée
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['entity_type'], 'properties': {'id': {'type': 'string', 'minLength': 1, 'description': 'Retrieve a single entity by ID. Supports: OpenAlex ID ("W2741809807"), DOI ("10.1038/nature12373"), ORCID ("0000-0002-1825-0097"), ROR ("https://ror.org/00hx57361"), PMID ("12345678" or "https://pubmed.ncbi.nlm.nih.gov/12345678"), ISSN ("1234-5678"). Keywords are identified by slug rather than a native ID â\x80\x94 pass either the slug ("groundwater") or the URL a search returns ("https://openalex.org/keywords/groundwater"). A PMCID is recognized too, bare ("PMC1234567") or as a PubMed Central URL, but OpenAlex indexes no PMCIDs, so it resolves nothing â\x80\x94 pass the work\'s PMID or DOI instead. When provided, `query`, `search_mode`, `filters`, `sort`, `sample`, and `seed` are not applied â\x80\x94 the returned record is the entity at that ID regardless of them, and the response `notice` names any you passed. `select` still applies: the curated per-entity-type default is returned unless you pass `select` (use `["*"]` for the complete record). To filter, drop `id` and search. Use openalex_resolve_name to find the ID if unknown.'}, 'page': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1, 'description': 'Page number (1-based) for semantic search, the one mode that paginates with `page` instead of `cursor`. Semantic search ranks a query-dependent candidate set whose size `meta.count` reports, so the last reachable page is ceil(meta.count / per_page) â\x80\x94 e.g. page 14 for a count of 70 with per_page=5. Passing it under any other search_mode is rejected.'}, 'seed': {'type': 'string', 'description': 'Deterministic seed for `sample`. Same seed + same filters = same results â\x80\x94 pass when reproducibility matters. Has no effect without `sample`, and a search that passes it alone is rejected.'}, 'sort': {'type': 'string', 'description': 'Sort field. Prefix with "-" for descending. Comma-separate for a multi-key sort, applied left to right, with the "-" prefix set per key ("-publication_year,cited_by_count" sorts by year descending, then citations ascending). Common: "cited_by_count", "-publication_date", "-relevance_score" (default when query present). Note: when combined with a keyword query, an explicit sort overrides relevance ranking entirely â\x80\x94 top results may be highly cited but only tangentially on-topic. Use "-relevance_score" or omit sort to keep the most relevant results first. "-relevance_score" requires an active search via "query" or a "filter:search" filter â\x80\x94 passing it without one will fail. Not combinable with `sample` â\x80\x94 a search passing both is rejected.'}, 'query': {'type': 'string', 'minLength': 1, 'description': 'Text search query. Supports boolean operators (AND, OR, NOT), quoted phrases ("exact match"), wildcards (machin*), fuzzy matching (machin~1), and proximity ("climate change"~5). Omit for filter-only queries â\x80\x94 an empty string is rejected, since a blank search is a mistake rather than a request for the whole catalog.'}, 'cursor': {'type': 'string', 'minLength': 1, 'description': 'Pagination cursor from a previous response. Pass to get the next page. Omit it on the first call â\x80\x94 an empty string is rejected, since a supplied-but-blank cursor is a caller mistake rather than a request for page 1. Keyword and exact modes only â\x80\x94 semantic search walks its candidates with `page`, and a `cursor` sent with it is rejected.'}, 'sample': {'type': 'integer', 'maximum': 100, 'minimum': 1, 'description': 'Return a random sample of this many entities matching the filters (1-100). Single page only â\x80\x94 neither `cursor` nor `page` pagination applies to sampling, and a search that passes either alongside it is rejected. Keyword and exact modes only: OpenAlex does not sample a semantic search, so `sample` with search_mode "semantic" is rejected. Cannot be combined with `sort` â\x80\x94 a sample has no order, and a search passing both is rejected. Overrides `per_page`. Useful for unbiased exploration: spot-checking filter correctness, stratified review prompts, or generating exploration sets without bias toward most-cited.'}, 'select': {'type': 'array', 'items': {'type': 'string'}, 'description': 'OpenAlex top-level field names to return. Always returned: `id`, `display_name` â\x80\x94 additional fields you list are appended. A curated default per entity type applies to both searches and single-entity (`id`) lookups; pass field names to override it, or `["*"]` to retrieve the complete record (every field). Only top-level fields project, so a nested value is requested by its parent object: bibliometrics (`h_index`, `i10_index`, `2yr_mean_citedness`) live under `summary_stats` on authors, sources, institutions, publishers, and funders, and naming a leaf returns that object. Invalid field names produce an error identifying the rejected field. Example: ["doi", "authorships", "primary_topic"].'}, 'filters': {'type': 'object', 'description': 'Filter criteria as field:value pairs. AND across fields (multiple keys). OR within field: pipe-separate ("us|gb"). NOT: prefix "!" ("!us"). Range: "2020-2024". Comparison: ">100", "<50". AND within same field: "+"-separate. Two keys that resolve to the same upstream field (an alias and its canonical name, e.g. `year` and `publication_year`) are both applied and AND\'d, so they narrow rather than override each other. Use OpenAlex IDs (not names) for entity filters â\x80\x94 resolve names first. Common keys: `openalex` (filter by entity ID, e.g. {"openalex": "W123|W456"}), `cites` (works citing a given work), `publication_year` (range "2020-2024"), `authorships.author.id`, `type`, `is_oa`.', 'propertyNames': {'type': 'string'}, 'additionalProperties': {'type': 'string'}}, 'per_page': {'type': 'integer', 'default': 25, 'maximum': 100, 'minimum': 1, 'description': 'Results per page (1-100). Default 25. Semantic search caps at 50 â\x80\x94 when search_mode="semantic", set per_page â\x89¤ 50 (also subject to a 1 req/sec rate limit upstream). The cap applies to searches only; an `id` lookup returns its one record regardless of both.'}, 'entity_type': {'enum': ['works', 'authors', 'sources', 'institutions', 'topics', 'keywords', 'publishers', 'funders'], 'type': 'string', 'description': 'Type of scholarly entity to search.'}, 'search_mode': {'enum': ['keyword', 'exact', 'semantic'], 'type': 'string', 'default': 'keyword', 'description': 'Search strategy. "keyword": stemmed full-text (default). "exact": no stemming, matches individual words (use quoted phrases for multi-word exact match). "semantic": AI embedding similarity over a query-dependent candidate set whose size `meta.count` reports, at ~1 req/sec, up to 50 per page, and paginated with `page` rather than `cursor`.'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['meta', 'results', 'echo', 'totalCount']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'echo': {'type': 'string', 'description': 'Compact echo of the criteria that actually ran (entity_type, query, filters, sort, search_mode) â\x80\x94 surfaces what was searched when results are empty. An `id` lookup echoes entity_type and id alone, because the search criteria are not applied on that path.'}, 'meta': {'type': 'object', 'required': ['count', 'per_page', 'next_cursor'], 'properties': {'count': {'type': 'number', 'description': 'Total results matching the query/filters. Under search_mode "semantic" it is instead the size of the ranked candidate set â\x80\x94 the most results `page` can reach â\x80\x94 not an exhaustive match total.'}, 'per_page': {'type': 'number', 'description': 'Page size OpenAlex echoed for this request â\x80\x94 the requested per_page, not the number of records returned. A short or exhausted page carries fewer records than this.'}, 'next_cursor': {'type': ['string', 'null'], 'description': 'Cursor for next page. null if no more results.'}}, 'description': 'Result metadata including pagination.', 'additionalProperties': False}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['semantic_per_page_cap', 'semantic_without_query', 'semantic_with_cursor', 'page_without_semantic', 'sample_with_cursor', 'sample_with_page', 'sample_with_semantic', 'sample_with_sort', 'seed_without_sample', 'entity_not_found', 'rate_limited', 'upstream_budget_exhausted', 'upstream_timeout', 'upstream_unavailable', 'upstream_unauthorized', 'upstream_forbidden', 'comma_in_filter_value', 'upstream_invalid_params', 'upstream_invalid_id_value', 'upstream_sort_requires_search', 'query_too_long', 'upstream_invalid_params_other', 'upstream_validation_failed'], 'description': 'Machine-readable failure mode. Declared by this tool: `semantic_per_page_cap`: A search (no `id`) set per_page above the semantic-search cap of 50. `semantic_without_query`: A search set search_mode to "semantic" without supplying the `query` it embeds. `semantic_with_cursor`: A search set search_mode to "semantic" and supplied `cursor`, which OpenAlex rejects on a semantic query. `page_without_semantic`: A search supplied `page` under a search_mode other than "semantic". `sample_with_cursor`: A search (no `id`) provided both `sample` and `cursor`. `sample_with_page`: A search (no `id`) provided both `sample` and `page`. `sample_with_semantic`: A search (no `id`) provided `sample` with search_mode "semantic", which OpenAlex does not sample â\x80\x94 it returns the same ranked candidates under every seed. `sample_with_sort`: A search (no `id`) provided both `sample` and `sort`, which OpenAlex refuses together. `seed_without_sample`: A search (no `id`) provided `seed` without `sample`. `entity_not_found`: Lookup by id matched no OpenAlex entity. `rate_limited`: OpenAlex throttled the request for exceeding its per-second ceiling (HTTP 429). `upstream_budget_exhausted`: The OpenAlex daily usage budget is spent (HTTP 429). `upstream_timeout`: OpenAlex did not respond within the request deadline. `upstream_unavailable`: OpenAlex was unreachable or unusable â\x80\x94 HTTP 503, a connection failure, or a body that was empty, HTML, or unparseable JSON. `upstream_unauthorized`: OpenAlex rejected the API key (HTTP 401). `upstream_forbidden`: OpenAlex denied access to the requested resource (HTTP 403). `comma_in_filter_value`: A filter value contains a comma, which collides with the OpenAlex filter separator. `upstream_invalid_params`: OpenAlex rejected an invalid filter, select, or sort field name (HTTP 400). `upstream_invalid_id_value`: An entity-ID filter received a value that is not an OpenAlex ID â\x80\x94 usually a name (HTTP 400). `upstream_sort_requires_search`: sort=-relevance_score was used without an active search (HTTP 400). `query_too_long`: OpenAlex rejected `query` as longer than the search length it accepts (HTTP 400). `upstream_invalid_params_other`: OpenAlex rejected the request (HTTP 400) for a reason other than an invalid field name. `upstream_validation_failed`: OpenAlex rejected the request as semantically invalid (HTTP 422). Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'budget': {'type': 'object', 'required': ['costUsd', 'remainingUsd', 'resetsInSeconds'], 'properties': {'costUsd': {'type': 'number', 'description': 'USD this call spent. 0 for an `id` lookup â\x80\x94 OpenAlex does not bill single-entity fetches, so batching known IDs beats paging a filtered list.'}, 'remainingUsd': {'type': 'number', 'description': "USD left in today's OpenAlex budget after this call."}, 'resetsInSeconds': {'type': 'number', 'description': 'Seconds until the daily budget refills (midnight UTC).'}, 'prepaidRemainingUsd': {'type': 'number', 'description': 'USD left in the prepaid balance â\x80\x94 a separate pool OpenAlex draws on only after the daily allowance runs out, and which the daily reset does not refill. Add it to `remainingUsd` for the full spendable amount. Absent when the account holds no prepaid balance.'}}, 'description': 'What this call cost against the OpenAlex daily budget and what is left of it. Price a full traversal before committing to it: `totalCount` ÷ `per_page` Ã\x97 `costUsd` against `remainingUsd`. Absent when OpenAlex omitted the accounting headers.', 'additionalProperties': False}, 'notice': {'type': 'string', 'description': 'Guidance notice. Set when a first call returns no results (echoes the criteria and suggests how to broaden), when a paginated call ran past its last page (says the traversal is finished instead of advising a broader query), when an `id` lookup was passed search criteria it does not apply (names them), and on every semantic search to disclose that `meta.count` is a candidate total rather than a match total. Absent otherwise.'}, 'results': {'type': 'array', 'items': {'type': 'object', 'required': ['id', 'display_name'], 'properties': {'id': {'type': 'string', 'description': 'OpenAlex ID (e.g., "W2741809807", "A1234567890").'}, 'display_name': {'type': ['string', 'null'], 'description': 'Entity name or work title. null when OpenAlex holds no title for the record (paratext works and other untitled entries) â\x80\x94 use `id` to identify it.'}}, 'description': 'A single OpenAlex entity record. `id` is always present and `display_name` is always returned (though it may be null); additional fields vary by entity_type and `select`.', 'additionalProperties': {}}, 'description': 'OpenAlex entity objects. Text values are plain text â\x80\x94 HTML entities decoded, HTML/JATS/MathML markup removed â\x80\x94 and an abstract arrives reconstructed as `abstract`. Additional fields depend on entity_type and select.'}, 'totalCount': {'type': 'number', 'description': 'Total results matching the query/filters across all pages.'}}, 'additionalProperties': False}
Modifications récentes des outils
Serveurs MCP similaires
osint
Provides source-cited US data and schemas for power systems, AI infrastructure, semiconductor production and trade, robotics, and…
Pubmed
Provides PubMed biomedical literature search and retrieval, including abstracts, full text where available, citation metadata, re…
Europepmc
Searches and retrieves biomedical literature from Europe PMC, including abstracts, full records, citations, publication metadata,…
Nasa
Provides NASA data and imagery for astronomy, asteroids, Mars rover photos, solar flares, coronal mass ejections, geomagnetic sto…
Nih Reporter
Searches and analyzes NIH-funded research projects, awards, publications, funding trends, expirations, investigators, organizatio…
Catalogueoflife
Provides taxonomic search and classification for species and higher taxa using the Catalogue of Life.
Chembl
Queries the ChEMBL drug-discovery database for molecules, mechanisms of action, indications, targets, and small-molecule bioactiv…
Biorxiv
Provides bioRxiv and medRxiv preprint metadata, publication status, and publisher lookups, alongside broader structured research …