Searches for jobs using the provided SearchJobsRequest. This call constrains the visibility of jobs present in the database, and only returns jobs that the caller has permission to search against.

Scopes

You will need authorization for at least one of the following scopes to make a valid call:

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

If unset, the scope for this method defaults to https://www.googleapis.com/auth/cloud-platform. You can set the scope for this method like this: jobs4 --scope <scope> projects tenants-jobs-search ...

Required Scalar Argument

  • <parent> (string)
    • Required. The resource name of the tenant to search within. The format is "projects/{project_id}/tenants/{tenant_id}". For example, "projects/foo/tenants/bar".

Required Request Value

The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.

For example, a structure like this:

SearchJobsRequest:
  custom-ranking-info:
    importance-level: string
    ranking-expression: string
  disable-keyword-match: boolean
  diversification-level: string
  enable-broadening: boolean
  job-query:
    commute-filter:
      allow-imprecise-addresses: boolean
      commute-method: string
      departure-time:
        hours: integer
        minutes: integer
        nanos: integer
        seconds: integer
      road-traffic: string
      start-coordinates:
        latitude: number
        longitude: number
      travel-duration: string
    companies: [string]
    company-display-names: [string]
    compensation-filter:
      include-jobs-with-unspecified-compensation-range: boolean
      range:
        max-compensation:
          currency-code: string
          nanos: integer
          units: string
        min-compensation:
          currency-code: string
          nanos: integer
          units: string
      type: string
      units: [string]
    custom-attribute-filter: string
    disable-spell-check: boolean
    employment-types: [string]
    excluded-jobs: [string]
    job-categories: [string]
    language-codes: [string]
    publish-time-range:
      end-time: string
      start-time: string
    query: string
    query-language-code: string
  job-view: string
  keyword-match-mode: string
  max-page-size: integer
  offset: integer
  order-by: string
  page-token: string
  request-metadata:
    allow-missing-ids: boolean
    device-info:
      device-type: string
      id: string
    domain: string
    session-id: string
    user-id: string
  search-mode: string

can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.

  • -r .custom-ranking-info importance-level=amet
    • Required. Controls over how important the score of CustomRankingInfo.ranking_expression gets applied to job's final ranking position. An error is thrown if not specified.
  • ranking-expression=erat

    • Required. Controls over how job documents get ranked on top of existing relevance score (determined by API algorithm). A combination of the ranking expression and relevance score is used to determine job's final ranking position. The syntax for this expression is a subset of Google SQL syntax. Supported operators are: +, -, *, /, where the left and right side of the operator is either a numeric Job.custom_attributes key, integer/double value or an expression that can be evaluated to a number. Parenthesis are supported to adjust calculation precedence. The expression must be < 200 characters in length. The expression is considered invalid for a job if the expression references custom attributes that are not populated on the job or if the expression results in a divide by zero. If an expression is invalid for a job, that job is demoted to the end of the results. Sample ranking expression (year + 25) * 0.25 - (freshness / 0.5)
  • .. disable-keyword-match=true

    • This field is deprecated. Please use SearchJobsRequest.keyword_match_mode going forward. To migrate, disable_keyword_match set to false maps to KeywordMatchMode.KEYWORD_MATCH_ALL, and disable_keyword_match set to true maps to KeywordMatchMode.KEYWORD_MATCH_DISABLED. If SearchJobsRequest.keyword_match_mode is set, this field is ignored. Controls whether to disable exact keyword match on Job.title, Job.description, Job.company_display_name, Job.addresses, Job.qualifications. When disable keyword match is turned off, a keyword match returns jobs that do not match given category filters when there are matching keywords. For example, for the query "program manager," a result is returned even if the job posting has the title "software developer," which doesn't fall into "program manager" ontology, but does have "program manager" appearing in its description. For queries like "cloud" that don't contain title or location specific ontology, jobs with "cloud" keyword matches are returned regardless of this flag's value. Use Company.keyword_searchable_job_custom_attributes if company-specific globally matched custom field/attribute string values are needed. Enabling keyword match improves recall of subsequent search requests. Defaults to false.
  • diversification-level=erat
    • Controls whether highly similar jobs are returned next to each other in the search results. Jobs are identified as highly similar based on their titles, job categories, and locations. Highly similar results are clustered so that only one representative job of the cluster is displayed to the job seeker higher up in the results, with the other jobs being displayed lower down in the results. Defaults to DiversificationLevel.SIMPLE if no value is specified.
  • enable-broadening=false
    • Controls whether to broaden the search when it produces sparse results. Broadened queries append results to the end of the matching results list. Defaults to false.
  • job-query.commute-filter allow-imprecise-addresses=true
    • If true, jobs without street level addresses may also be returned. For city level addresses, the city center is used. For state and coarser level addresses, text matching is used. If this field is set to false or isn't specified, only jobs that include street level addresses will be returned by commute search.
  • commute-method=lorem
    • Required. The method of transportation to calculate the commute time for.
  • departure-time hours=79
    • Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.
  • minutes=24
    • Minutes of hour of day. Must be from 0 to 59.
  • nanos=97
    • Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
  • seconds=79

    • Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.
  • .. road-traffic=sit

    • Specifies the traffic density to use when calculating commute time.
  • start-coordinates latitude=0.9343576145104524
    • The latitude in degrees. It must be in the range [-90.0, +90.0].
  • longitude=0.7179078569204367

    • The longitude in degrees. It must be in the range [-180.0, +180.0].
  • .. travel-duration=et

    • Required. The maximum travel time in seconds. The maximum allowed value is 3600s (one hour). Format is 123s.
  • .. companies=gubergren

    • This filter specifies the company entities to search against. If a value isn't specified, jobs are searched for against all companies. If multiple values are specified, jobs are searched against the companies specified. The format is "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For example, "projects/foo/tenants/bar/companies/baz". At most 20 company filters are allowed.
    • Each invocation of this argument appends the given value to the array.
  • company-display-names=justo
    • This filter specifies the company Company.display_name of the jobs to search against. The company name must match the value exactly. Alternatively, the value being searched for can be wrapped in different match operators. SUBSTRING_MATCH([value]) The company name must contain a case insensitive substring match of the value. Using this function may increase latency. Sample Value: SUBSTRING_MATCH(google) MULTI_WORD_TOKEN_MATCH([value]) The value will be treated as a multi word token and the company name must contain a case insensitive match of the value. Using this function may increase latency. Sample Value: MULTI_WORD_TOKEN_MATCH(google) If a value isn't specified, jobs within the search results are associated with any company. If multiple values are specified, jobs within the search results may be associated with any of the specified companies. At most 20 company display name filters are allowed.
    • Each invocation of this argument appends the given value to the array.
  • compensation-filter include-jobs-with-unspecified-compensation-range=true
    • If set to true, jobs with unspecified compensation range fields are included.
  • range.max-compensation currency-code=consetetur
    • The three-letter currency code defined in ISO 4217.
  • nanos=3
    • Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If units is positive, nanos must be positive or zero. If units is zero, nanos can be positive, zero, or negative. If units is negative, nanos must be negative or zero. For example $-1.75 is represented as units=-1 and nanos=-750,000,000.
  • units=aliquyam

    • The whole units of the amount. For example if currencyCode is &#34;USD&#34;, then 1 unit is one US dollar.
  • ..min-compensation currency-code=eos

    • The three-letter currency code defined in ISO 4217.
  • nanos=24
    • Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If units is positive, nanos must be positive or zero. If units is zero, nanos can be positive, zero, or negative. If units is negative, nanos must be negative or zero. For example $-1.75 is represented as units=-1 and nanos=-750,000,000.
  • units=dolores

    • The whole units of the amount. For example if currencyCode is &#34;USD&#34;, then 1 unit is one US dollar.
  • ... type=consetetur

    • Required. Type of filter.
  • units=gubergren

    • Required. Specify desired base compensation entry&#39;s CompensationInfo.CompensationUnit.
    • Each invocation of this argument appends the given value to the array.
  • .. custom-attribute-filter=dolor

    • This filter specifies a structured syntax to match against the Job.custom_attributes marked as filterable. The syntax for this expression is a subset of SQL syntax. Supported operators are: =, !=, &lt;, &lt;=, &gt;, and &gt;= where the left of the operator is a custom field key and the right of the operator is a number or a quoted string. You must escape backslash (\) and quote (\") characters. Supported functions are LOWER([field_name]) to perform a case insensitive match and EMPTY([field_name]) to filter on the existence of a key. Boolean expressions (AND/OR/NOT) are supported up to 3 levels of nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 comparisons or functions are allowed in the expression. The expression must be < 10000 bytes in length. Sample Query: (LOWER(driving_license)=&#34;class \&#34;a\&#34;&#34; OR EMPTY(driving_license)) AND driving_years &gt; 10
  • disable-spell-check=true
    • This flag controls the spell-check feature. If false, the service attempts to correct a misspelled query, for example, "enginee" is corrected to "engineer". Defaults to false: a spell check is performed.
  • employment-types=amet.
    • The employment type filter specifies the employment type of jobs to search against, such as EmploymentType.FULL_TIME. If a value isn't specified, jobs in the search results includes any employment type. If multiple values are specified, jobs in the search results include any of the specified employment types.
    • Each invocation of this argument appends the given value to the array.
  • excluded-jobs=ipsum
    • This filter specifies a list of job names to be excluded during search. At most 400 excluded job names are allowed.
    • Each invocation of this argument appends the given value to the array.
  • job-categories=lorem
    • The category filter specifies the categories of jobs to search against. See JobCategory for more information. If a value isn't specified, jobs from any category are searched against. If multiple values are specified, jobs from any of the specified categories are searched against.
    • Each invocation of this argument appends the given value to the array.
  • language-codes=accusam
    • This filter specifies the locale of jobs to search against, for example, "en-US". If a value isn't specified, the search results can contain jobs in any locale. Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn". For more information, see Tags for Identifying Languages. At most 10 language code filters are allowed.
    • Each invocation of this argument appends the given value to the array.
  • publish-time-range end-time=gubergren
    • End of the period (exclusive).
  • start-time=sadipscing

    • Begin of the period (inclusive).
  • .. query=at

    • The query string that matches against the job title, description, and location fields. The maximum number of allowed characters is 255.
  • query-language-code=sit

    • The language code of query. For example, "en-US". This field helps to better interpret the query. If a value isn't specified, the query language code is automatically detected, which may not be accurate. Language code should be in BCP-47 format, such as "en-US" or "sr-Latn". For more information, see Tags for Identifying Languages.
  • .. job-view=duo

    • The desired job attributes returned for jobs in the search response. Defaults to JobView.JOB_VIEW_SMALL if no value is specified.
  • keyword-match-mode=sit
    • Controls what keyword match options to use. If both keyword_match_mode and disable_keyword_match are set, keyword_match_mode will take precedence. Defaults to KeywordMatchMode.KEYWORD_MATCH_ALL if no value is specified.
  • max-page-size=18
    • A limit on the number of jobs returned in the search results. Increasing this value above the default value of 10 can increase search response time. The value can be between 1 and 100.
  • offset=79
    • An integer that specifies the current offset (that is, starting result location, amongst the jobs deemed by the API as relevant) in search results. This field is only considered if page_token is unset. The maximum allowed value is 5000. Otherwise an error is thrown. For example, 0 means to return results starting from the first matching job, and 10 means to return from the 11th job. This can be used for pagination, (for example, pageSize = 10 and offset = 10 means to return from the second page).
  • order-by=rebum.
    • The criteria determining how search results are sorted. Default is &#34;relevance desc&#34;. Supported options are: * &#34;relevance desc&#34;: By relevance descending, as determined by the API algorithms. Relevance thresholding of query results is only available with this ordering. * &#34;posting_publish_time desc&#34;: By Job.posting_publish_time descending. * &#34;posting_update_time desc&#34;: By Job.posting_update_time descending. * &#34;title&#34;: By Job.title ascending. * &#34;title desc&#34;: By Job.title descending. * &#34;annualized_base_compensation&#34;: By job's CompensationInfo.annualized_base_compensation_range ascending. Jobs whose annualized base compensation is unspecified are put at the end of search results. * &#34;annualized_base_compensation desc&#34;: By job's CompensationInfo.annualized_base_compensation_range descending. Jobs whose annualized base compensation is unspecified are put at the end of search results. * &#34;annualized_total_compensation&#34;: By job's CompensationInfo.annualized_total_compensation_range ascending. Jobs whose annualized base compensation is unspecified are put at the end of search results. * &#34;annualized_total_compensation desc&#34;: By job's CompensationInfo.annualized_total_compensation_range descending. Jobs whose annualized base compensation is unspecified are put at the end of search results. * &#34;custom_ranking desc&#34;: By the relevance score adjusted to the SearchJobsRequest.CustomRankingInfo.ranking_expression with weight factor assigned by SearchJobsRequest.CustomRankingInfo.importance_level in descending order. * Location sorting: Use the special syntax to order jobs by distance: &#34;distance_from(&#39;Hawaii&#39;)&#34;: Order by distance from Hawaii. &#34;distance_from(19.89, 155.5)&#34;: Order by distance from a coordinate. &#34;distance_from(&#39;Hawaii&#39;), distance_from(&#39;Puerto Rico&#39;)&#34;: Order by multiple locations. See details below. &#34;distance_from(&#39;Hawaii&#39;), distance_from(19.89, 155.5)&#34;: Order by multiple locations. See details below. The string can have a maximum of 256 characters. When multiple distance centers are provided, a job that is close to any of the distance centers would have a high rank. When a job has multiple locations, the job location closest to one of the distance centers will be used. Jobs that don't have locations will be ranked at the bottom. Distance is calculated with a precision of 11.3 meters (37.4 feet). Diversification strategy is still applied unless explicitly disabled in diversification_level.
  • page-token=dolor
    • The token specifying the current offset within search results. See SearchJobsResponse.next_page_token for an explanation of how to obtain the next set of query results.
  • request-metadata allow-missing-ids=false
    • Only set when any of domain, session_id and user_id isn't available for some reason. It is highly recommended not to set this field and provide accurate domain, session_id and user_id for the best service experience.
  • device-info device-type=amet.
    • Type of the device.
  • id=no

    • A device-specific ID. The ID must be a unique identifier that distinguishes the device from other devices.
  • .. domain=nonumy

    • Required if allow_missing_ids is unset or false. The client-defined scope or source of the service call, which typically is the domain on which the service has been implemented and is currently being run. For example, if the service is being run by client Foo, Inc., on job board www.foo.com and career site www.bar.com, then this field is set to "foo.com" for use on the job board, and "bar.com" for use on the career site. Note that any improvements to the model for a particular tenant site rely on this field being set correctly to a unique domain. The maximum number of allowed characters is 255.
  • session-id=sed
    • Required if allow_missing_ids is unset or false. A unique session identification string. A session is defined as the duration of an end user's interaction with the service over a certain period. Obfuscate this field for privacy concerns before providing it to the service. Note that any improvements to the model for a particular tenant site rely on this field being set correctly to a unique session ID. The maximum number of allowed characters is 255.
  • user-id=kasd

    • Required if allow_missing_ids is unset or false. A unique user identification string, as determined by the client. To have the strongest positive impact on search quality make sure the client-level is unique. Obfuscate this field for privacy concerns before providing it to the service. Note that any improvements to the model for a particular tenant site rely on this field being set correctly to a unique user ID. The maximum number of allowed characters is 255.
  • .. search-mode=lorem

    • Mode of a search. Defaults to SearchMode.JOB_SEARCH.

About Cursors

The cursor position is key to comfortably set complex nested structures. The following rules apply:

  • The cursor position is always set relative to the current one, unless the field name starts with the . character. Fields can be nested such as in -r f.s.o .
  • The cursor position is set relative to the top-level structure if it starts with ., e.g. -r .s.s
  • You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify -r struct.sub_struct=bar.
  • You can move the cursor one level up by using ... Each additional . moves it up one additional level. E.g. ... would go three levels up.

Optional Output Flags

The method's return value a JSON encoded structure, which will be written to standard output by default.

  • -o out
    • out specifies the destination to which to write the server's result to. It will be a JSON-encoded structure. The destination may be - to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.

Optional General Properties

The following properties can configure any call, and are not specific to this method.

  • -p $-xgafv=string

    • V1 error format.
  • -p access-token=string

    • OAuth access token.
  • -p alt=string

    • Data format for response.
  • -p callback=string

    • JSONP
  • -p fields=string

    • Selector specifying which fields to include in a partial response.
  • -p key=string

    • API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  • -p oauth-token=string

    • OAuth 2.0 token for the current user.
  • -p pretty-print=boolean

    • Returns response with indentations and line breaks.
  • -p quota-user=string

    • Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
  • -p upload-type=string

    • Legacy upload protocol for media (e.g. "media", "multipart").
  • -p upload-protocol=string

    • Upload protocol for media (e.g. "raw", "multipart").