Filtros de pesquisa (v3)

Opcionalmente, uma pesquisa de vagas pode incluir um ou mais filtros JobQuery que restringem a pesquisa seguindo critérios diferentes, como local, empresas, remuneração e muito mais. Os campos JobQuery estão marcados na referência de JobQuery.

Local

A pesquisa por local permite especificar um raio ou uma área geográfica onde pesquisar.

Consulte Pesquisa baseada em local para mais informações.

Categoria da vaga

Retorne vagas pertencentes a uma categoria específica, conforme identificado pela Cloud Talent Solution. As categorias são predefinidas e incluem, por exemplo, ACCOUNTING_AND_FINANCE e EDUCATION. Todas as categorias são determinadas pelos modelos do Cloud Talent Solution e são recomendadas para uso em termos de atributos baseados em categorias. Para uma lista completa, consulte a página de referência de JobCategory.

Java

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


/** Search on category filter. */
public static void categoryFilterSearch(String companyName, List<String> categories)
    throws IOException, InterruptedException {
  // Make sure to set the requestMetadata the same as the associated search request
  RequestMetadata requestMetadata =
      new RequestMetadata()
          // Make sure to hash your userID
          .setUserId("HashedUserId")
          // Make sure to hash the sessionID
          .setSessionId("HashedSessionID")
          // Domain of the website where the search is conducted
          .setDomain("www.google.com");

  JobQuery jobQuery = new JobQuery().setJobCategories(categories);
  if (companyName != null) {
    jobQuery.setCompanyNames(Arrays.asList(companyName));
  }

  SearchJobsRequest searchJobsRequest =
      new SearchJobsRequest()
          .setRequestMetadata(requestMetadata)
          .setJobQuery(jobQuery) // Set the actual search term as defined in the jobQurey
          .setSearchMode("JOB_SEARCH"); // Set the search mode to a regular search

  SearchJobsResponse searchJobsResponse =
      talentSolutionClient
          .projects()
          .jobs()
          .search(DEFAULT_PROJECT_ID, searchJobsRequest)
          .execute();
  Thread.sleep(1000);

  System.out.printf("Category search jobs results: %s\n", searchJobsResponse);
}

Python

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.

def category_search(client_service, company_name, categories):
    request_metadata = {
        'user_id': 'HashedUserId',
        'session_id': 'HashedSessionId',
        'domain': 'www.google.com'
    }
    job_query = {'job_categories': categories}
    if company_name is not None:
        job_query.update({'company_names': [company_name]})
    request = {
        'search_mode': 'JOB_SEARCH',
        'request_metadata': request_metadata,
        'job_query': job_query,
    }

    response = client_service.projects().jobs().search(
        parent=parent, body=request).execute()
    print(response)

C#

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


public static void CategoryFilterSearch(string companyName, List<String> categories)
{
    RequestMetadata requestMetadata = new RequestMetadata()
    {
        // Make sure to hash your userID
        UserId = "HashedUserId",
        // Make sure to hash the sessionID
        SessionId = "HashedSessionId",
        // Domain of the website where the search is conducted
        Domain = "www.google.com"
    };

    JobQuery jobQuery = new JobQuery()
    {
        JobCategories = categories
    };

    if (companyName != null)
    {
        jobQuery.CompanyNames = new List<string>
        {
            companyName
        };
    }

    SearchJobsRequest searchJobRequest = new SearchJobsRequest()
    {
        RequestMetadata = requestMetadata,
        JobQuery = jobQuery,
        SearchMode = "JOB_SEARCH"
    };

    SearchJobsResponse searchJobsResponse = jobServiceClient.Projects.Jobs.Search(searchJobRequest, parent).Execute();

    Console.WriteLine("Jobs category searched: " + ToJsonString(searchJobsResponse));
}

Go

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


// categoryFilterSearch searches for jobs on category filter.
func categoryFilterSearch(w io.Writer, projectID, companyName string, categories []string) (*talent.SearchJobsResponse, error) {
	ctx := context.Background()

	client, err := google.DefaultClient(ctx, talent.CloudPlatformScope)
	if err != nil {
		return nil, fmt.Errorf("google.DefaultClient: %v", err)
	}
	// Create the jobs service client.
	service, err := talent.New(client)
	if err != nil {
		return nil, fmt.Errorf("talent.New: %v", err)
	}

	jobQuery := &talent.JobQuery{
		JobCategories: categories,
	}
	if companyName != "" {
		jobQuery.CompanyNames = []string{companyName}
	}

	parent := "projects/" + projectID
	req := &talent.SearchJobsRequest{
		// Make sure to set the RequestMetadata the same as the associated
		// search request.
		RequestMetadata: &talent.RequestMetadata{
			// Make sure to hash your userID.
			UserId: "HashedUsrId",
			// Make sure to hash the sessionID.
			SessionId: "HashedSessionId",
			// Domain of the website where the search is conducted.
			Domain: "www.googlesample.com",
		},
		// Set the actual search term as defined in the jobQuery.
		JobQuery: jobQuery,
		// Set the search mode to a regular search.
		SearchMode: "JOB_SEARCH",
	}
	resp, err := service.Projects.Jobs.Search(parent, req).Do()
	if err != nil {
		return nil, fmt.Errorf("failed to search for jobs with categories %v: %v", categories, err)
	}

	fmt.Fprintln(w, "Jobs:")
	for _, j := range resp.MatchingJobs {
		fmt.Fprintf(w, "\t%q\n", j.Job.Name)
	}

	return resp, nil
}

Node.js

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


/**
 * Search on category filter.
 */
const categoryFilterSearch = async (
  jobServiceClient,
  companyName,
  categories
) => {
  try {
    const jobQuery = {
      jobCategories: categories,
    };

    if (companyName) {
      jobQuery.companyNames = [companyName];
    }

    const request = {
      parent: `projects/${PROJECT_ID}`,
      resource: {
        jobQuery: jobQuery,
        requestMetadata: REQUEST_META_DATA,
        searchMode: 'JOB_SEARCH',
      },
    };

    const result = await jobServiceClient.projects.jobs.search(request);

    console.log(JSON.stringify(result.data));
  } catch (e) {
    console.error(e);
    throw e;
  }
};

Ruby

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de clientes do Cloud Talent Solution.

# project_id      = "Id of the project"
# company_name    = "The resource name of the company listing the job. The format is "projects/{project_id}/companies/{company_id}""
# categories      = "Array of categories which we want to search on"

require "google/apis/jobs_v3"
# Instantiate the client
jobs = Google::Apis::JobsV3
talent_solution_client = jobs::CloudTalentSolutionService.new
# @see
# https://developers.google.com/identity/protocols/application-default-credentials#callingruby
talent_solution_client.authorization = Google::Auth.get_application_default(
  "https://www.googleapis.com/auth/jobs"
)
# Make sure to set the request_metadata the same as the associated search request
request_metadata = jobs::RequestMetadata.new user_id:    "HashedUserId",
                                             session_id: "HashedSessionId",
                                             domain:     "http://careers.google.com"

# Perform a search for analyst  related jobs
job_query = jobs::JobQuery.new job_categories: Array.new(categories)
job_query.company_names = [company_name] unless company_name.nil?
search_jobs_request = jobs::SearchJobsRequest.new request_metadata: request_metadata,
                                                  job_query:        job_query,
                                                  search_mode:      "JOB_SEARCH"
search_jobs_response = talent_solution_client.search_jobs project_id, search_jobs_request
puts search_jobs_response.to_json
search_jobs_response

Tipo de emprego

Retorne vagas pertencentes a uma ou mais definições de tipo de emprego, como FULL_TIME ou VOLUNTEER. Para uma lista completa, consulte a página de referência de EmploymentType.

Java

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


/** Search on employment types. */
public static void employmentTypesSearch(String companyName, List<String> employmentTypes)
    throws IOException, InterruptedException {
  // Make sure to set the requestMetadata the same as the associated search request
  RequestMetadata requestMetadata =
      new RequestMetadata()
          // Make sure to hash your userID
          .setUserId("HashedUserId")
          // Make sure to hash the sessionID
          .setSessionId("HashedSessionID")
          // Domain of the website where the search is conducted
          .setDomain("www.google.com");

  JobQuery jobQuery = new JobQuery().setEmploymentTypes(employmentTypes);
  if (companyName != null) {
    jobQuery.setCompanyNames(Arrays.asList(companyName));
  }

  SearchJobsRequest searchJobsRequest =
      new SearchJobsRequest()
          .setRequestMetadata(requestMetadata)
          .setJobQuery(jobQuery) // Set the actual search term as defined in the jobQurey
          .setSearchMode("JOB_SEARCH"); // Set the search mode to a regular searchch

  SearchJobsResponse searchJobsResponse =
      talentSolutionClient
          .projects()
          .jobs()
          .search(DEFAULT_PROJECT_ID, searchJobsRequest)
          .execute();
  Thread.sleep(1000);

  System.out.printf("Employee type search jobs results: %s\n", searchJobsResponse);
}

Python

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.

def employment_types_search(client_service, company_name, employment_types):
    request_metadata = {
        'user_id': 'HashedUserId',
        'session_id': 'HashedSessionId',
        'domain': 'www.google.com'
    }
    job_query = {'employment_types': employment_types}
    if company_name is not None:
        job_query.update({'company_names': [company_name]})
    request = {
        'search_mode': 'JOB_SEARCH',
        'request_metadata': request_metadata,
        'job_query': job_query,
    }

    response = client_service.projects().jobs().search(
        parent=parent, body=request).execute()
    print(response)

C#

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


public static void EmploymentTypesSearch(string companyName, List<string> employmentTypes)
{
    RequestMetadata requestMetadata = new RequestMetadata()
    {
        // Make sure to hash your userID
        UserId = "HashedUserId",
        // Make sure to hash the sessionID
        SessionId = "HashedSessionId",
        // Domain of the website where the search is conducted
        Domain = "www.google.com"
    };

    JobQuery jobQuery = new JobQuery()
    {
        EmploymentTypes = employmentTypes
    };

    if (companyName != null)
    {
        jobQuery.CompanyNames = new List<string>
        {
            companyName
        };
    }

    SearchJobsRequest searchJobRequest = new SearchJobsRequest()
    {
        RequestMetadata = requestMetadata,
        JobQuery = jobQuery,
        SearchMode = "JOB_SEARCH"
    };

    SearchJobsResponse searchJobsResponse = jobServiceClient.Projects.Jobs.Search(searchJobRequest, parent).Execute();

    Console.WriteLine("Jobs employment type searched: " + ToJsonString(searchJobsResponse));
}

Go

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


// employmentTypesSearch searches for jobs on employment types.
func employmentTypesSearch(w io.Writer, projectID, companyName string, employmentTypes []string) (*talent.SearchJobsResponse, error) {
	ctx := context.Background()

	client, err := google.DefaultClient(ctx, talent.CloudPlatformScope)
	if err != nil {
		return nil, fmt.Errorf("google.DefaultClient: %v", err)
	}
	// Create the jobs service client.
	service, err := talent.New(client)
	if err != nil {
		return nil, fmt.Errorf("talent.New: %v", err)
	}

	jobQuery := &talent.JobQuery{
		EmploymentTypes: employmentTypes,
	}
	if companyName != "" {
		jobQuery.CompanyNames = []string{companyName}
	}

	parent := "projects/" + projectID
	req := &talent.SearchJobsRequest{
		// Make sure to set the RequestMetadata the same as the associated
		// search request.
		RequestMetadata: &talent.RequestMetadata{
			// Make sure to hash your userID.
			UserId: "HashedUsrId",
			// Make sure to hash the sessionID.
			SessionId: "HashedSessionId",
			// Domain of the website where the search is conducted.
			Domain: "www.googlesample.com",
		},
		// Set the actual search term as defined in the jobQuery.
		JobQuery: jobQuery,
		// Set the search mode to a regular search.
		SearchMode: "JOB_SEARCH",
	}
	resp, err := service.Projects.Jobs.Search(parent, req).Do()
	if err != nil {
		return nil, fmt.Errorf("failed to search for jobs with employment types %v: %v", employmentTypes, err)
	}

	fmt.Fprintln(w, "Jobs:")
	for _, j := range resp.MatchingJobs {
		fmt.Fprintf(w, "\t%q\n", j.Job.Name)
	}

	return resp, nil
}

Node.js

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


/**
 * Search on employment types.
 */
const employmentTypesSearch = async (
  jobServiceClient,
  companyName,
  employmentTypes
) => {
  try {
    const jobQuery = {
      employmentTypes: employmentTypes,
    };

    if (companyName) {
      jobQuery.companyNames = [companyName];
    }

    const request = {
      parent: `projects/${PROJECT_ID}`,
      resource: {
        jobQuery: jobQuery,
        requestMetadata: REQUEST_META_DATA,
        searchMode: 'JOB_SEARCH',
      },
    };

    const result = await jobServiceClient.projects.jobs.search(request);

    console.log(JSON.stringify(result.data));
  } catch (e) {
    console.error(e);
    throw e;
  }
};

Ruby

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de clientes do Cloud Talent Solution.

# project_id          = "Id of the project"
# company_name        = "The resource name of the company listing the job. The format is "projects/{project_id}/companies/{company_id}""
# employment_types    = "Array of employment types which we want to search on"

require "google/apis/jobs_v3"

# Instantiate the client
jobs = Google::Apis::JobsV3
talent_solution_client = jobs::CloudTalentSolutionService.new
# @see
# https://developers.google.com/identity/protocols/application-default-credentials#callingruby
talent_solution_client.authorization = Google::Auth.get_application_default(
  "https://www.googleapis.com/auth/jobs"
)
# Make sure to set the request_metadata the same as the associated search request
request_metadata = jobs::RequestMetadata.new user_id:    "HashedUserId",
                                             session_id: "HashedSessionId",
                                             domain:     "http://careers.google.com"

# Perform a search for analyst  related jobs
job_query = jobs::JobQuery.new employment_types: employment_types
job_query.company_names = [company_name] unless company_name.nil?
search_jobs_request = jobs::SearchJobsRequest.new request_metadata: request_metadata,
                                                  job_query:        job_query,
                                                  search_mode:      "JOB_SEARCH"
search_jobs_response = talent_solution_client.search_jobs project_id, search_jobs_request
puts search_jobs_response.to_json
search_jobs_response

Período

Restringe a pesquisa a vagas publicadas dentro do período especificado. Os valores aceitos estão listados na página de referência de publishTimeRange.

Java

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


/**
 * Search on date range. In JSON format, the Timestamp type is encoded as a string in the [RFC
 * 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is
 * "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" e.g. "2017-01-15T01:30:15.01Z"
 */
public static void dateRangeSearch(String companyName, String startTime, String endTime)
    throws IOException, InterruptedException {
  // Make sure to set the requestMetadata the same as the associated search request
  RequestMetadata requestMetadata =
      new RequestMetadata()
          // Make sure to hash your userID
          .setUserId("HashedUserId")
          // Make sure to hash the sessionID
          .setSessionId("HashedSessionID")
          // Domain of the website where the search is conducted
          .setDomain("www.google.com");

  TimestampRange timestampRange =
      new TimestampRange().setStartTime(startTime).setEndTime(endTime);

  JobQuery jobQuery = new JobQuery().setPublishTimeRange(timestampRange);
  // JobQuery jobQuery = new JobQuery().setPublishTimeRange(dateRange);

  if (companyName != null) {
    jobQuery.setCompanyNames(Arrays.asList(companyName));
  }

  SearchJobsRequest searchJobsRequest =
      new SearchJobsRequest()
          .setRequestMetadata(requestMetadata)
          .setJobQuery(jobQuery) // Set the actual search term as defined in the jobQurey
          .setSearchMode("JOB_SEARCH"); // Set the search mode to a regular search

  SearchJobsResponse searchJobsResponse =
      talentSolutionClient
          .projects()
          .jobs()
          .search(DEFAULT_PROJECT_ID, searchJobsRequest)
          .execute();
  Thread.sleep(1000);

  System.out.printf("Search results on jobs with a date range: %s\n", searchJobsResponse);
}

Python

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.

def date_range_search(client_service, company_name, date_range):
    request_metadata = {
        'user_id': 'HashedUserId',
        'session_id': 'HashedSessionId',
        'domain': 'www.google.com'
    }
    job_query = {'publish_time_range': date_range}
    if company_name is not None:
        job_query.update({'company_names': [company_name]})
    request = {
        'search_mode': 'JOB_SEARCH',
        'request_metadata': request_metadata,
        'job_query': job_query,
    }

    response = client_service.projects().jobs().search(
        parent=parent, body=request).execute()
    print(response)

C#

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


public static void DateRangeSearch(string companyName, string startTime, string endTime)
{
    RequestMetadata requestMetadata = new RequestMetadata()
    {
        // Make sure to hash your userID
        UserId = "HashedUserId",
        // Make sure to hash the sessionID
        SessionId = "HashedSessionId",
        // Domain of the website where the search is conducted
        Domain = "www.google.com"
    };

    TimestampRange timeStampRange = new TimestampRange()
    {
        StartTime = startTime,
        EndTime = endTime
    };

    JobQuery jobQuery = new JobQuery()
    {
        PublishTimeRange = timeStampRange
    };

    if (companyName != null)
    {
        jobQuery.CompanyNames = new List<string>
        {
            companyName
        };
    }

    SearchJobsRequest searchJobRequest = new SearchJobsRequest()
    {
        RequestMetadata = requestMetadata,
        JobQuery = jobQuery,
        SearchMode = "JOB_SEARCH"
    };

    SearchJobsResponse searchJobsResponse = jobServiceClient.Projects.Jobs.Search(searchJobRequest, parent).Execute();

    Console.WriteLine("Jobs date range searched: " + ToJsonString(searchJobsResponse));
}

Go

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


///dateRangeSearch searches for jobs on date range.
// In JSON format, the Timestamp type is encoded as a string in the
// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
// e.g. "2017-01-15T01:30:15.01Z".
func dateRangeSearch(w io.Writer, projectID, companyName, startTime, endTime string) (*talent.SearchJobsResponse, error) {
	ctx := context.Background()

	client, err := google.DefaultClient(ctx, talent.CloudPlatformScope)
	if err != nil {
		return nil, fmt.Errorf("google.DefaultClient: %v", err)
	}
	// Create the jobs service client.
	service, err := talent.New(client)
	if err != nil {
		return nil, fmt.Errorf("talent.New: %v", err)
	}

	jobQuery := &talent.JobQuery{
		PublishTimeRange: &talent.TimestampRange{
			StartTime: startTime,
			EndTime:   endTime,
		},
	}
	if companyName != "" {
		jobQuery.CompanyNames = []string{companyName}
	}

	parent := "projects/" + projectID
	req := &talent.SearchJobsRequest{
		// Make sure to set the RequestMetadata the same as the associated
		// search request.
		RequestMetadata: &talent.RequestMetadata{
			// Make sure to hash your userID.
			UserId: "HashedUsrId",
			// Make sure to hash the sessionID.
			SessionId: "HashedSessionId",
			// Domain of the website where the search is conducted.
			Domain: "www.googlesample.com",
		},
		// Set the actual search term as defined in the jobQuery.
		JobQuery: jobQuery,
		// Set the search mode to a regular search.
		SearchMode: "JOB_SEARCH",
	}
	resp, err := service.Projects.Jobs.Search(parent, req).Do()
	if err != nil {
		return nil, fmt.Errorf("failed to search for jobs with date range [%s, %s]: %v", startTime, endTime, err)
	}

	fmt.Fprintln(w, "Jobs:")
	for _, j := range resp.MatchingJobs {
		fmt.Fprintf(w, "\t%q\n", j.Job.Name)
	}

	return resp, nil
}

Node.js

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


/**
 * Search on date range. In JSON format, the Timestamp type is encoded as a string in the [RFC
 * 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is
 * "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" e.g. "2017-01-15T01:30:15.01Z"
 */
const dateRangeSearch = async (
  jobServiceClient,
  companyName,
  startTime,
  endTime
) => {
  try {
    const jobQuery = {
      publishTimeRange: {
        startTime: startTime,
        endTime: endTime,
      },
    };

    if (companyName) {
      jobQuery.companyNames = [companyName];
    }

    const request = {
      parent: `projects/${PROJECT_ID}`,
      resource: {
        jobQuery: jobQuery,
        requestMetadata: REQUEST_META_DATA,
        searchMode: 'JOB_SEARCH',
      },
    };

    const result = await jobServiceClient.projects.jobs.search(request);

    console.log(JSON.stringify(result.data));
  } catch (e) {
    console.error(e);
    throw e;
  }
};

Ruby

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de clientes do Cloud Talent Solution.

# project_id      = "Id of the project"
# company_name    = "The resource name of the company listing the job. The format is "projects/{project_id}/companies/{company_id}""
# start_time      = "Start time of the date range we want to search on"
# end_time        = "End time of the date range we want to search on"

require "google/apis/jobs_v3"
# Instantiate the client
jobs = Google::Apis::JobsV3
talent_solution_client = jobs::CloudTalentSolutionService.new
# @see
# https://developers.google.com/identity/protocols/application-default-credentials#callingruby
talent_solution_client.authorization = Google::Auth.get_application_default(
  "https://www.googleapis.com/auth/jobs"
)
# Make sure to set the request_metadata the same as the associated search request
request_metadata = jobs::RequestMetadata.new user_id:    "HashedUserId",
                                             session_id: "HashedSessionId",
                                             domain:     "http://careers.google.com"

# Perform a search for analyst  related jobs
timestamp_range = jobs::TimestampRange.new start_time: start_time,
                                           end_time:   end_time
job_query = jobs::JobQuery.new publish_time_range: timestamp_range,
                               company_names:      [company_name]
search_jobs_request = jobs::SearchJobsRequest.new request_metadata: request_metadata,
                                                  job_query:        job_query,
                                                  search_mode:      "JOB_SEARCH"
search_jobs_response = talent_solution_client.search_jobs project_id, search_jobs_request

puts search_jobs_response.to_json
search_jobs_response

Código do idioma

Retorna vagas correspondentes ao código do idioma especificado, conforme determinado pelo campo languageCode das vagas. Esse campo especifica o idioma da postagem de vaga e não se refere aos requisitos de fluência do idioma.

Java

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


/** Search on language codes. */
public static void languageCodeSearch(String companyName, List<String> languageCodes)
    throws IOException, InterruptedException {
  // Make sure to set the requestMetadata the same as the associated search request
  RequestMetadata requestMetadata =
      new RequestMetadata()
          // Make sure to hash your userID
          .setUserId("HashedUserId")
          // Make sure to hash the sessionID
          .setSessionId("HashedSessionID")
          // Domain of the website where the search is conducted
          .setDomain("www.google.com");

  JobQuery jobQuery = new JobQuery().setLanguageCodes(languageCodes);
  if (companyName != null) {
    jobQuery.setCompanyNames(Arrays.asList(companyName));
  }

  SearchJobsRequest searchJobsRequest =
      new SearchJobsRequest()
          .setRequestMetadata(requestMetadata)
          .setJobQuery(jobQuery) // Set the actual search term as defined in the jobQurey
          .setSearchMode("JOB_SEARCH"); // Set the search mode to a regular search

  SearchJobsResponse searchJobsResponse =
      talentSolutionClient
          .projects()
          .jobs()
          .search(DEFAULT_PROJECT_ID, searchJobsRequest)
          .execute();
  Thread.sleep(1000);

  System.out.printf("Search results on jobs with a language code: %s\n", searchJobsResponse);
}

Python

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.

def language_code_search(client_service, company_name, language_codes):
    request_metadata = {
        'user_id': 'HashedUserId',
        'session_id': 'HashedSessionId',
        'domain': 'www.google.com'
    }
    job_query = {'language_codes': language_codes}
    if company_name is not None:
        job_query.update({'company_names': [company_name]})
    request = {
        'search_mode': 'JOB_SEARCH',
        'request_metadata': request_metadata,
        'job_query': job_query,
    }

    response = client_service.projects().jobs().search(
        parent=parent, body=request).execute()
    print(response)

C#

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


public static void LanguageCodeSearch(string companyName, List<string> languageCodes)
{
    RequestMetadata requestMetadata = new RequestMetadata()
    {
        // Make sure to hash your userID
        UserId = "HashedUserId",
        // Make sure to hash the sessionID
        SessionId = "HashedSessionId",
        // Domain of the website where the search is conducted
        Domain = "www.google.com"
    };

    JobQuery jobQuery = new JobQuery()
    {
        LanguageCodes = languageCodes
    };

    if (companyName != null)
    {
        jobQuery.CompanyNames = new List<string>
        {
            companyName
        };
    }

    SearchJobsRequest searchJobRequest = new SearchJobsRequest()
    {
        RequestMetadata = requestMetadata,
        JobQuery = jobQuery,
        SearchMode = "JOB_SEARCH"
    };

    SearchJobsResponse searchJobsResponse = jobServiceClient.Projects.Jobs.Search(searchJobRequest, parent).Execute();

    Console.WriteLine("Jobs language codes searched: " + ToJsonString(searchJobsResponse));
}

Go

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


// languageCodeSearch searches for jobs on language code.
func languageCodeSearch(w io.Writer, projectID, companyName string, languageCodes []string) (*talent.SearchJobsResponse, error) {
	ctx := context.Background()

	client, err := google.DefaultClient(ctx, talent.CloudPlatformScope)
	if err != nil {
		return nil, fmt.Errorf("google.DefaultClient: %v", err)
	}
	// Create the jobs service client.
	service, err := talent.New(client)
	if err != nil {
		return nil, fmt.Errorf("talent.New: %v", err)
	}

	jobQuery := &talent.JobQuery{
		LanguageCodes: languageCodes,
	}
	if companyName != "" {
		jobQuery.CompanyNames = []string{companyName}
	}

	parent := "projects/" + projectID
	req := &talent.SearchJobsRequest{
		// Make sure to set the RequestMetadata the same as the associated
		// search request.
		RequestMetadata: &talent.RequestMetadata{
			// Make sure to hash your userID.
			UserId: "HashedUsrId",
			// Make sure to hash the sessionID.
			SessionId: "HashedSessionId",
			// Domain of the website where the search is conducted.
			Domain: "www.googlesample.com",
		},
		// Set the actual search term as defined in the jobQuery.
		JobQuery: jobQuery,
		// Set the search mode to a regular search.
		SearchMode: "JOB_SEARCH",
	}
	resp, err := service.Projects.Jobs.Search(parent, req).Do()
	if err != nil {
		return nil, fmt.Errorf("failed to search for jobs with languange codes %v: %v", languageCodes, err)
	}

	fmt.Fprintln(w, "Jobs:")
	for _, j := range resp.MatchingJobs {
		fmt.Fprintf(w, "\t%q\n", j.Job.Name)
	}

	return resp, nil
}

Node.js

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


/**
 * Search on language codes.
 */
const languageCodeSearch = async (
  jobServiceClient,
  companyName,
  languageCodes
) => {
  try {
    const jobQuery = {
      languageCodes: languageCodes,
    };

    if (companyName) {
      jobQuery.companyNames = [companyName];
    }

    const request = {
      parent: `projects/${PROJECT_ID}`,
      resource: {
        jobQuery: jobQuery,
        requestMetadata: REQUEST_META_DATA,
        searchMode: 'JOB_SEARCH',
      },
    };

    const result = await jobServiceClient.projects.jobs.search(request);

    console.log(JSON.stringify(result.data));
  } catch (e) {
    console.error(e);
    throw e;
  }
};

Ruby

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de clientes do Cloud Talent Solution.

# project_id        = "Id of the project"
# company_name      = "The resource name of the company listing the job. The format is "projects/{project_id}/companies/{company_id}""
# language_codes    = "Array of language codes which we want to search on"

require "google/apis/jobs_v3"

# Instantiate the client
jobs = Google::Apis::JobsV3
talent_solution_client = jobs::CloudTalentSolutionService.new
# @see
# https://developers.google.com/identity/protocols/application-default-credentials#callingruby
talent_solution_client.authorization = Google::Auth.get_application_default(
  "https://www.googleapis.com/auth/jobs"
)
# Make sure to set the request_metadata the same as the associated search request
request_metadata = jobs::RequestMetadata.new user_id:    "HashedUserId",
                                             session_id: "HashedSessionId",
                                             domain:     "http://careers.google.com"

# Perform a search for analyst  related jobs
job_query = jobs::JobQuery.new language_codes: language_codes,
                               company_names:  [company_name]
search_jobs_request = jobs::SearchJobsRequest.new request_metadata: request_metadata,
                                                  job_query:        job_query,
                                                  search_mode:      "JOB_SEARCH"
search_jobs_response = talent_solution_client.search_jobs project_id, search_jobs_request

puts search_jobs_response.to_json
search_jobs_response

Nome de exibição da empresa

Retorna vagas de empresas cujo displayName corresponde à string de texto fornecida. Observe que displayName é o nome legível por humanos da empresa (como "Google"), ao contrário de name, que é um ID gerado (como "empresas/80df2034-176e-44a8-b763-b5370f2463a5"). Consulte displayName da empresa para pesquisa de nome.

Aumente a precisão usando sugestões de preenchimento automático.

Java

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


/** Search on company display name. */
public static void companyDisplayNameSearch(String companyName, List<String> companyDisplayNames)
    throws IOException, InterruptedException {
  // Make sure to set the requestMetadata the same as the associated search request
  RequestMetadata requestMetadata =
      new RequestMetadata()
          // Make sure to hash your userID
          .setUserId("HashedUserId")
          // Make sure to hash the sessionID
          .setSessionId("HashedSessionID")
          // Domain of the website where the search is conducted
          .setDomain("www.google.com");

  JobQuery jobQuery = new JobQuery().setCompanyDisplayNames(companyDisplayNames);
  if (companyName != null) {
    jobQuery.setCompanyNames(Arrays.asList(companyName));
  }

  SearchJobsRequest searchJobsRequest =
      new SearchJobsRequest()
          .setRequestMetadata(requestMetadata)
          .setJobQuery(jobQuery) // Set the actual search term as defined in the jobQurey
          .setSearchMode("JOB_SEARCH"); // Set the search mode to a regular search

  SearchJobsResponse searchJobsResponse =
      talentSolutionClient
          .projects()
          .jobs()
          .search(DEFAULT_PROJECT_ID, searchJobsRequest)
          .execute();
  Thread.sleep(1000);

  System.out.printf("Search results by display name of company: %s\n", searchJobsResponse);
}

Python

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.

def company_display_name_search(client_service, company_name,
                                company_display_names):
    request_metadata = {
        'user_id': 'HashedUserId',
        'session_id': 'HashedSessionId',
        'domain': 'www.google.com'
    }
    job_query = {'company_display_names': company_display_names}
    if company_name is not None:
        job_query.update({'company_names': [company_name]})
    request = {
        'search_mode': 'JOB_SEARCH',
        'request_metadata': request_metadata,
        'job_query': job_query,
    }

    response = client_service.projects().jobs().search(
        parent=parent, body=request).execute()
    print(response)

C#

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


public static void CompanyDisplayNameSearch(string companyName, List<string> companyDisplayNames)
{
    RequestMetadata requestMetadata = new RequestMetadata()
    {
        // Make sure to hash your userID
        UserId = "HashedUserId",
        // Make sure to hash the sessionID
        SessionId = "HashedSessionId",
        // Domain of the website where the search is conducted
        Domain = "www.google.com"
    };

    JobQuery jobQuery = new JobQuery()
    {
        CompanyDisplayNames = companyDisplayNames
    };

    if (companyName != null)
    {
        jobQuery.CompanyNames = new List<string>
        {
            companyName
        };
    }

    SearchJobsRequest searchJobRequest = new SearchJobsRequest()
    {
        RequestMetadata = requestMetadata,
        JobQuery = jobQuery,
        SearchMode = "JOB_SEARCH"
    };

    SearchJobsResponse searchJobsResponse = jobServiceClient.Projects.Jobs.Search(searchJobRequest, parent).Execute();

    Console.WriteLine("Jobs company display names searched: " + ToJsonString(searchJobsResponse));
}

Go

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


// companyDisplayNameSearch searches for job on company display names.
func companyDisplayNameSearch(w io.Writer, projectID, companyName string, companyDisplayNames []string) (*talent.SearchJobsResponse, error) {
	ctx := context.Background()

	client, err := google.DefaultClient(ctx, talent.CloudPlatformScope)
	if err != nil {
		return nil, fmt.Errorf("google.DefaultClient: %v", err)
	}
	// Create the jobs service client.
	service, err := talent.New(client)
	if err != nil {
		return nil, fmt.Errorf("talent.New: %v", err)
	}

	jobQuery := &talent.JobQuery{
		CompanyDisplayNames: companyDisplayNames,
	}
	if companyName != "" {
		jobQuery.CompanyNames = []string{companyName}
	}

	parent := "projects/" + projectID
	req := &talent.SearchJobsRequest{
		// Make sure to set the RequestMetadata the same as the associated
		// search request.
		RequestMetadata: &talent.RequestMetadata{
			// Make sure to hash your userID.
			UserId: "HashedUsrId",
			// Make sure to hash the sessionID.
			SessionId: "HashedSessionId",
			// Domain of the website where the search is conducted.
			Domain: "www.googlesample.com",
		},
		// Set the actual search term as defined in the jobQuery.
		JobQuery: jobQuery,
		// Set the search mode to a regular search.
		SearchMode: "JOB_SEARCH",
	}
	resp, err := service.Projects.Jobs.Search(parent, req).Do()
	if err != nil {
		return nil, fmt.Errorf("failed to search for jobs with company display names %v: %v", companyDisplayNames, err)
	}

	fmt.Fprintln(w, "Jobs:")
	for _, j := range resp.MatchingJobs {
		fmt.Fprintf(w, "\t%q\n", j.Job.Name)
	}

	return resp, nil
}

Node.js

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


/**
 * Search on company display name.
 */
const companyDisplayNameSearch = async (
  jobServiceClient,
  companyName,
  companyDisplayNames
) => {
  try {
    const jobQuery = {
      companyDisplayNames: companyDisplayNames,
    };

    if (companyName) {
      jobQuery.companyNames = [companyName];
    }

    const request = {
      parent: `projects/${PROJECT_ID}`,
      resource: {
        jobQuery: jobQuery,
        requestMetadata: REQUEST_META_DATA,
        searchMode: 'JOB_SEARCH',
      },
    };

    const result = await jobServiceClient.projects.jobs.search(request);

    console.log(JSON.stringify(result.data));
  } catch (e) {
    console.error(e);
    throw e;
  }
};

Ruby

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de clientes do Cloud Talent Solution.

# project_id              = "Id of the project"
# company_display_names   = "Array of company display names which we want to search on"

require "google/apis/jobs_v3"

# Instantiate the client
jobs = Google::Apis::JobsV3
talent_solution_client = jobs::CloudTalentSolutionService.new
# @see https://developers.google.com/identity/protocols/application-default-credentials#callingruby
talent_solution_client.authorization = Google::Auth.get_application_default(
  "https://www.googleapis.com/auth/jobs"
)
# Make sure to set the request_metadata the same as the associated search request
request_metadata = jobs::RequestMetadata.new user_id:    "HashedUserId",
                                             session_id: "HashedSessionId",
                                             domain:     "http://careers.google.com"
# Perform a search for analyst  related jobs
job_query = jobs::JobQuery.new company_display_names: Array.new(company_display_names)
search_jobs_request = jobs::SearchJobsRequest.new request_metadata: request_metadata,
                                                  job_query:        job_query,
                                                  search_mode:      "JOB_SEARCH"
search_jobs_response = talent_solution_client.search_jobs project_id, search_jobs_request

puts search_jobs_response.to_json
search_jobs_response

Deslocamento diário

A pesquisa por deslocamento permite especificar um tempo máximo de direção ou trânsito para retornar vagas. Especifique a hora do dia para usar os dados de tráfego.

Saiba mais na página de referência de Pesquisa por deslocamento diário.

Remuneração

Filtra resultados da pesquisa com base em valores de remuneração. O compensationFilter é semelhante a:

"compensationFilter": {
  "type": enum(FilterType),
  "units": [
    enum(CompensationUnit)
  ],
  "range": {
    object(CompensationRange)
  },
  "includeJobWithUnspecifiedCompensationRange": boolean,
}

Onde:

  • type é obrigatório e especifica os campos para pesquisa. Por exemplo, para procurar vagas que pagam qualquer valor a cada hora, especifique UNIT_ONLY aqui e HOURLY na lista compensationUnits.

  • units é uma lista de enumerações de frequência de pagamento, como HOURLY e MONTHLY. Consulte a página de referência de CompensationUnit para uma lista completa.

  • range especifica os valores mínimo e máximo que devem ser retornados, no currencyCode especificado, que é um código de moeda de 3 letras (em inglês) e na frequência de pagamento especificada. Deixe currencyCode em branco para retornar todas as vagas, independentemente da moeda. Por exemplo, use esse filtro para procurar vagas que paguem entre 10,50 e 15 dólares por hora.

Java

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


/** Search on compensation. */
public static void compensationSearch(String companyName)
    throws IOException, InterruptedException {
  // Make sure to set the requestMetadata the same as the associated search request
  RequestMetadata requestMetadata =
      new RequestMetadata()
          // Make sure to hash your userID
          .setUserId("HashedUserId")
          // Make sure to hash the sessionID
          .setSessionId("HashedSessionID")
          // Domain of the website where the search is conducted
          .setDomain("www.google.com");

  // Search jobs that pay between 10.50 and 15 USD per hour
  JobQuery jobQuery =
      new JobQuery()
          .setCompensationFilter(
              new CompensationFilter()
                  .setType("UNIT_AND_AMOUNT")
                  .setUnits(Arrays.asList("HOURLY"))
                  .setRange(
                      new CompensationRange()
                          .setMaxCompensation(new Money().setCurrencyCode("USD").setUnits(15L))
                          .setMinCompensation(
                              new Money()
                                  .setCurrencyCode("USD")
                                  .setUnits(10L)
                                  .setNanos(500000000))));
  if (companyName != null) {
    jobQuery.setCompanyNames(Arrays.asList(companyName));
  }

  SearchJobsRequest searchJobsRequest =
      new SearchJobsRequest()
          .setRequestMetadata(requestMetadata)
          .setJobQuery(jobQuery) // Set the actual search term as defined in the jobQurey
          .setSearchMode("JOB_SEARCH"); // Set the search mode to a regular search

  SearchJobsResponse searchJobsResponse =
      talentSolutionClient
          .projects()
          .jobs()
          .search(DEFAULT_PROJECT_ID, searchJobsRequest)
          .execute();
  Thread.sleep(1000);

  System.out.printf("Search results by compensation: %s\n", searchJobsResponse);
}

Python

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.

def compensation_search(client_service, company_name):
    request_metadata = {
        'user_id': 'HashedUserId',
        'session_id': 'HashedSessionId',
        'domain': 'www.google.com'
    }
    compensation_range = {
        'max_compensation': {
            'currency_code': 'USD',
            'units': 15
        },
        'min_compensation': {
            'currency_code': 'USD',
            'units': 10,
            'nanos': 500000000
        }
    }
    compensation_filter = {
        'type': 'UNIT_AND_AMOUNT',
        'units': ['HOURLY'],
        'range': compensation_range
    }
    job_query = {'compensation_filter': compensation_filter}
    if company_name is not None:
        job_query.update({'company_names': [company_name]})
    request = {
        'search_mode': 'JOB_SEARCH',
        'request_metadata': request_metadata,
        'job_query': job_query,
    }

    response = client_service.projects().jobs().search(
        parent=parent, body=request).execute()
    print(response)

C#

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


public static void CompensationSearch(string companyName)
{
    RequestMetadata requestMetadata = new RequestMetadata()
    {
        // Make sure to hash your userID
        UserId = "HashedUserId",
        // Make sure to hash the sessionID
        SessionId = "HashedSessionId",
        // Domain of the website where the search is conducted
        Domain = "www.google.com"
    };

    JobQuery jobQuery = new JobQuery()
    {
        CompensationFilter = new CompensationFilter()
        {
            Type = "UNIT_AND_AMOUNT",
            Units = new List<string> { "HOURLY" },
            Range = new CompensationRange()
            {
                MaxCompensation = new Money()
                {
                    CurrencyCode = "USD",
                    Units = 15L
                },
                MinCompensation = new Money()
                {
                    CurrencyCode = "USD",
                    Units = 10L,
                    Nanos = 500000000
                }
            }
        }
    };

    if (companyName != null)
    {
        jobQuery.CompanyNames = new List<string>
        {
            companyName
        };
    }

    SearchJobsRequest searchJobRequest = new SearchJobsRequest()
    {
        RequestMetadata = requestMetadata,
        JobQuery = jobQuery,
        SearchMode = "JOB_SEARCH"
    };

    SearchJobsResponse searchJobsResponse = jobServiceClient.Projects.Jobs.Search(searchJobRequest, parent).Execute();

    Console.WriteLine("Jobs compensation searched: " + ToJsonString(searchJobsResponse));
}

Go

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


// compensationSearch searches for job on compensation.
func compensationSearch(w io.Writer, projectID, companyName string) (*talent.SearchJobsResponse, error) {
	ctx := context.Background()

	client, err := google.DefaultClient(ctx, talent.CloudPlatformScope)
	if err != nil {
		return nil, fmt.Errorf("google.DefaultClient: %v", err)
	}
	// Create the jobs service client.
	service, err := talent.New(client)
	if err != nil {
		return nil, fmt.Errorf("talent.New: %v", err)
	}

	jobQuery := &talent.JobQuery{
		CompensationFilter: &talent.CompensationFilter{
			Type:  "UNIT_AND_AMOUNT",
			Units: []string{"HOURLY"},
			Range: &talent.CompensationRange{
				MaxCompensation: &talent.Money{
					Units:        15,
					CurrencyCode: "USD",
				},
				MinCompensation: &talent.Money{
					Units:        10,
					CurrencyCode: "USD",
					Nanos:        500000000,
				},
			},
		},
	}
	if companyName != "" {
		jobQuery.CompanyNames = []string{companyName}
	}

	parent := "projects/" + projectID
	req := &talent.SearchJobsRequest{
		// Make sure to set the RequestMetadata the same as the associated
		// search request.
		RequestMetadata: &talent.RequestMetadata{
			// Make sure to hash your userID.
			UserId: "HashedUsrId",
			// Make sure to hash the sessionID.
			SessionId: "HashedSessionId",
			// Domain of the website where the search is conducted.
			Domain: "www.googlesample.com",
		},
		// Set the actual search term as defined in the jobQuery.
		JobQuery: jobQuery,
		// Set the search mode to a regular search.
		SearchMode: "JOB_SEARCH",
	}
	resp, err := service.Projects.Jobs.Search(parent, req).Do()
	if err != nil {
		return nil, fmt.Errorf("failed to search for jobs with compensation: %v", err)
	}

	fmt.Fprintln(w, "Jobs:")
	for _, j := range resp.MatchingJobs {
		fmt.Fprintf(w, "\t%q\n", j.Job.Name)
	}

	return resp, nil
}

Node.js

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de cliente do Cloud Talent Solution.


/**
 * Search on compensation.
 */
const compensationSearch = async (jobServiceClient, companyName) => {
  try {
    const compensationRange = {
      maxCompensation: {currencyCode: 'USD', units: 15},
      minCompensation: {currencyCode: 'USD', units: 10, nanos: 500000000},
    };

    const compensationFilter = {
      type: 'UNIT_AND_AMOUNT',
      units: ['HOURLY'],
      range: compensationRange,
    };

    const jobQuery = {compensationFilter: compensationFilter};

    if (companyName) {
      jobQuery.companyNames = [companyName];
    }

    const request = {
      parent: `projects/${PROJECT_ID}`,
      resource: {
        jobQuery: jobQuery,
        requestMetadata: REQUEST_META_DATA,
        searchMode: 'JOB_SEARCH',
      },
    };

    const result = await jobServiceClient.projects.jobs.search(request);

    console.log(JSON.stringify(result.data));
  } catch (e) {
    console.error(e);
    throw e;
  }
};

Ruby

Para mais informações sobre a instalação e criação de um cliente do Cloud Talent Solution, consulte Bibliotecas de clientes do Cloud Talent Solution.

# project_id        = "Id of the project"
# company_name      = "The resource name of the company listing the job. The format is "projects/{project_id}/companies/{company_id}""
# min_unit          = "Min value of the compensation range we want to search on"
# max_unit          = "Max value of the compensation range we want to search on"

require "google/apis/jobs_v3"
# Instantiate the client
jobs = Google::Apis::JobsV3
talent_solution_client = jobs::CloudTalentSolutionService.new
# @see https://developers.google.com/identity/protocols/application-default-credentials#callingruby
talent_solution_client.authorization = Google::Auth.get_application_default(
  "https://www.googleapis.com/auth/jobs"
)
# Make sure to set the request_metadata the same as the associated search request
request_metadata = jobs::RequestMetadata.new user_id:    "HashedUserId",
                                             session_id: "HashedSessionId",
                                             domain:     "http://careers.google.com"
# Search jobs that pay between min_unit and max_unit (USD/hour)
compensation_range = jobs::CompensationRange.new max_compensation: (
                                                   jobs::Money.new currency_code: "USD",
                                                                   units:         max_unit,
                                                                   nanos:         500_000_000
                                                 ),
                                                 min_compensation: (
                                                   jobs::Money.new currency_code: "USD",
                                                                   units:         min_unit,
                                                                   nanos:         0
                                                 )
compensation_filter = jobs::CompensationFilter.new type:  "UNIT_AND_AMOUNT",
                                                   units: ["HOURLY"],
                                                   range: compensation_range
# Perform a search for analyst  related jobs
job_query = jobs::JobQuery.new compensation_filter: compensation_filter,
                               company_names:       [company_name]

search_jobs_request = jobs::SearchJobsRequest.new request_metadata: request_metadata,
                                                  job_query:        job_query,
                                                  search_mode:      "JOB_SEARCH"
search_jobs_response = talent_solution_client.search_jobs project_id, search_jobs_request

puts search_jobs_response.to_json
search_jobs_response
Observação: o campo nanos espera unidades nano, que são 10^-9. Há 1.000.000.000 de nanos em uma unidade.

  • includeJobWithUnspecifiedCompensationRange especifica se é necessário incluir vagas sem informações de remuneração. O padrão é falso e não retorna vagas sem valores de remuneração.

Código do idioma da consulta

query_language_code especifica o idioma da string de consulta no formato BCP-47, por exemplo, "en-US". Se ficar em branco, o padrão será inglês dos EUA. Este campo não está relacionado a languageCode, que especifica o idioma das listas de vagas retornadas. Consulte a documentação de JobQuery para detalhes. Exemplo de código:

   "jobQuery":
   {"query":"general", "query_language_code":"fr-FR"}}