Stay organized with collections
Save and categorize content based on your preferences.
Cloud Talent Solution provides autocomplete suggestions for job titles and
company names. Only active job postings and companies with at least one open
job are considered eligible for suggestion results. Once a new job or company
is added, it takes up to 48 hours for the information to be added to the
autocomplete result set.
To use autocomplete, call the complete method when the search bar is updated.
/** Auto completes job titles within given companyName. */publicstaticvoidjobTitleAutoComplete(StringcompanyName,Stringquery)throwsIOException{Completecomplete=talentSolutionClient.projects().complete(DEFAULT_PROJECT_ID).setQuery(query).setLanguageCode("en-US").setType("JOB_TITLE").setPageSize(10);if(companyName!=null){complete.setCompanyName(companyName);}CompleteQueryResponseresults=complete.execute();System.out.println(results);}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Autocomplete (v3)\n\nCloud Talent Solution provides autocomplete suggestions for job titles and\ncompany names. Only active job postings and companies with at least one open\njob are considered eligible for suggestion results. Once a new job or company\nis added, it takes up to 48 hours for the information to be added to the\nautocomplete result set.\n\nTo use autocomplete, call the [`complete`](/talent-solution/job-search/v3/docs/reference/rest/v3/projects/complete) method when the search bar is updated.\n**Note:** Language codes must be specified using the [BCP-47](https://tools.ietf.org/html/bcp47) identifier. For example: `en-US` or `zh-TW`. Do not use abbreviated language codes such as `en` or `zh`. \n\n### Java\n\n\nFor more on installing and creating a Cloud Talent Solution client, see\n[Cloud Talent Solution Client Libraries](/talent-solution/job-search/v3/docs/libraries). \n\n\n /** Auto completes job titles within given companyName. */\n public static void jobTitleAutoComplete(String companyName, String query) throws IOException {\n\n Complete complete =\n talentSolutionClient\n .projects()\n .complete(DEFAULT_PROJECT_ID)\n .setQuery(query)\n .setLanguageCode(\"en-US\")\n .setType(\"JOB_TITLE\")\n .setPageSize(10);\n if (companyName != null) {\n complete.setCompanyName(companyName);\n }\n\n CompleteQueryResponse results = complete.execute();\n\n System.out.println(results);\n }\n\n### Python\n\n\nFor more on installing and creating a Cloud Talent Solution client, see\n[Cloud Talent Solution Client Libraries](/talent-solution/job-search/v3/docs/libraries). \n\n def job_title_auto_complete(client_service, query, company_name):\n complete = client_service.projects().complete(\n name=name, query=query, languageCode=\"en-US\", type=\"JOB_TITLE\", pageSize=10\n )\n if company_name is not None:\n complete.companyName = company_name\n\n results = complete.execute()\n print(results)\n\n### Node.js\n\n\nFor more on installing and creating a Cloud Talent Solution client, see\n[Cloud Talent Solution Client Libraries](/talent-solution/job-search/v3/docs/libraries). \n\n\n const talent = require('https://cloud.google.com/nodejs/docs/reference/talent/latest/overview.html').v4;\n\n /**\n * Complete job title given partial text (autocomplete)\n *\n * @param projectId {string} Your Google Cloud Project ID\n * @param tenantId {string} Identifier of the TenantId\n */\n function sampleCompleteQuery(\n projectId,\n tenantId,\n query,\n numResults,\n languageCode\n ) {\n const client = new talent.https://cloud.google.com/nodejs/docs/reference/talent/latest/overview.html();\n // const projectId = 'Your Google Cloud Project ID';\n // const tenantId = 'Your Tenant ID (using tenancy is optional)';\n // const query = '[partially typed job title]';\n // const numResults = 5;\n // const languageCode = 'en-US';\n const formattedParent = client.tenantPath(projectId, tenantId);\n const languageCodes = [languageCode];\n const request = {\n parent: formattedParent,\n query: query,\n pageSize: numResults,\n languageCodes: languageCodes,\n };\n client\n .completeQuery(request)\n .then(responses =\u003e {\n const response = responses[0];\n for (const result of response.completionResults) {\n console.log(`Suggested title: ${result.suggestion}`);\n // Suggestion type is JOB_TITLE or COMPANY_TITLE\n console.log(`Suggestion type: ${https://cloud.google.com/nodejs/docs/reference/talent/latest/talent/protos.google.longrunning.operation.html.type}`);\n }\n })\n .catch(err =\u003e {\n console.error(err);\n });\n }\n\n\u003cbr /\u003e"]]