Function: useAuthorIdDiscovery()
useAuthorIdDiscovery(
name,options):UseQueryResult<{matches:AuthorIdMatch[];searchedName:string; },Error>
Defined in: web/lib/hooks/use-profile-autocomplete.ts:232
Hook for discovering external author IDs by name.
Parameters
name
string
Author name to search
options
UseAutocompleteOptions = {}
Hook options
Returns
UseQueryResult<{ matches: AuthorIdMatch[]; searchedName: string; }, Error>
Query result with potential author matches
Remarks
Requires authentication. Searches OpenAlex and Semantic Scholar to help users find their external author IDs.
Example
const { data, isLoading } = useAuthorIdDiscovery('Jane Smith');
data?.matches.map((m) => (
<div key={m.ids.openalex ?? m.ids.semanticScholar}>
{m.displayName} - {m.institution}
<p>Works: {m.worksCount}, Citations: {m.citedByCount}</p>
</div>
));