# Method: projects.complete

- [HTTP request](https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#body.request_body)
- [Response body](https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#body.CompleteQueryResponse.SCHEMA_REPRESENTATION)
- [Authorization Scopes](https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#body.aspect)
- [CompletionScope](https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#CompletionScope)
- [CompletionType](https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#CompletionType)
- [CompletionResult](https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#CompletionResult)
  - [JSON representation](https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#CompletionResult.SCHEMA_REPRESENTATION)
- [Try it!](https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#try-it)

Completes the specified prefix with keyword suggestions. Intended for use by a job search auto-complete search box.

### HTTP request

`GET https://jobs.googleapis.com/v3p1beta1/{name=projects/*}:complete`

The URL uses [gRPC Transcoding](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. Resource name of project the completion is performed within. The format is "projects/{projectId}", for example, "projects/api-test-project". |

### Query parameters

| Parameters ||
|---|---|
| `query` | `string` Required. The query used to generate suggestions. The maximum number of allowed characters is 255. |
| `languageCodes` | `string` Optional. The list of languages of the query. This is the BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). For `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#CompletionType.ENUM_VALUES.JOB_TITLE` type, only open jobs with the same `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#body.QUERY_PARAMETERS.language_codes` are returned. For `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#CompletionType.ENUM_VALUES.COMPANY_NAME` type, only companies having open jobs with the same `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#body.QUERY_PARAMETERS.language_codes` are returned. For `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#CompletionType.ENUM_VALUES.COMBINED` type, only open jobs with the same `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#body.QUERY_PARAMETERS.language_codes` or companies having open jobs with the same `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#body.QUERY_PARAMETERS.language_codes` are returned. The maximum number of allowed characters is 255. |
| `pageSize` | `integer` Required. Completion result count. The maximum allowed page size is 10. |
| `companyName` | `string` Optional. If provided, restricts completion to specified company. The format is "projects/{projectId}/companies/{company_id}", for example, "projects/api-test-project/companies/foo". |
| `scope` | ``enum (`https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#CompletionScope`)`` Optional. The scope of the completion. The defaults is `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#CompletionScope.ENUM_VALUES.PUBLIC`. |
| `type` | ``enum (`https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#CompletionType`)`` Optional. The completion topic. The default is `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#CompletionType.ENUM_VALUES.COMBINED`. |
| `languageCode` | `string` Deprecated. Use `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#body.QUERY_PARAMETERS.language_codes` instead. Optional. The language of the query. This is the BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). For `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#CompletionType.ENUM_VALUES.JOB_TITLE` type, only open jobs with the same `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#body.QUERY_PARAMETERS.language_code` are returned. For `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#CompletionType.ENUM_VALUES.COMPANY_NAME` type, only companies having open jobs with the same `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#body.QUERY_PARAMETERS.language_code` are returned. For `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#CompletionType.ENUM_VALUES.COMBINED` type, only open jobs with the same `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#body.QUERY_PARAMETERS.language_code` or companies having open jobs with the same `https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#body.QUERY_PARAMETERS.language_code` are returned. The maximum number of allowed characters is 255. |

### Request body

The request body must be empty.

### Response body

If successful, the response body contains data with the following structure:
Output only.

Response of auto-complete query.

| JSON representation ||
|---|---|
| ``` { "completionResults": [ { object (`https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#CompletionResult`) } ], "metadata": { object (`https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/ResponseMetadata`) } } ``` |

| Fields ||
|---|---|
| `completionResults[]` | ``object (`https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#CompletionResult`)`` Results of the matching job/company candidates. |
| `metadata` | ``object (`https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/ResponseMetadata`)`` Additional information for the API invocation, such as the request tracking id. |

### Authorization Scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/jobs`
- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).

## CompletionScope

Enum to specify the scope of completion.

| Enums ||
|---|---|
| `COMPLETION_SCOPE_UNSPECIFIED` | Default value. |
| `TENANT` | Suggestions are based only on the data provided by the client. |
| `PUBLIC` | Suggestions are based on all jobs data in the system that's visible to the client |

## CompletionType

Enum to specify auto-completion topics.

| Enums ||
|---|---|
| `COMPLETION_TYPE_UNSPECIFIED` | Default value. |
| `JOB_TITLE` | Only suggest job titles. |
| `COMPANY_NAME` | Only suggest company names. |
| `COMBINED` | Suggest both job titles and company names. |

## CompletionResult

Output only.

Resource that represents completion results.

| JSON representation ||
|---|---|
| ``` { "suggestion": string, "type": enum (`https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#CompletionType`), "imageUri": string } ``` |

| Fields ||
|---|---|
| `suggestion` | `string` The suggestion for the query. |
| `type` | ``enum (`https://docs.cloud.google.com/talent-solution/job-search/v3/docs/reference/rest/v3p1beta1/projects/complete#CompletionType`)`` The completion topic. |
| `imageUri` | `string` The URI of the company image for \[CompletionType.COMPANY_NAME\]\[\]. |