export type GetApiAktaProV1IndustrySearchArgs = {query: string, level?: string | undefined}; export type GetApiAktaProV1IndustrySearchOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Free endpoint to search industries, sectors, markets and niches by free text and return matching akta industry codes ranked by relevance. Use the codes in Company List Generation or Industry News for more precise market maps, screens and sector monitoring. Set level to l1, l2, l3, l4 or all to control taxonomy breadth. Returns code, industry_name and similarity. Optimized for AI agents with compact, structured output for reliable routing. * * GET /akta-pro/v1/industry/search */ export const getApiAktaProV1IndustrySearch = async (args: GetApiAktaProV1IndustrySearchArgs, options?: GetApiAktaProV1IndustrySearchOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.query != null) query.append("query", String(args.query)) if (args.level != null) query.append("level", String(args.level)) const url = `${baseUrl.replace(/\/+$/, '')}/akta-pro/v1/industry/search${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };