> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pubrio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 求人検索

> 企業、職種名、職能、職位、国、公開日で募集中の求人を検索し、Pubrio が各求人に付与する分類を読み取ります。

[求人検索](/jp/api-reference/endpoint/companies/job_search)は Pubrio が取得した募集中の求人を 1 件 1 行で返し、各行は掲載した企業に紐づいています。各行には元の求人情報（職種名、勤務地、URL、掲載日）に加え、Pubrio が職種名から導出する 3 つのフィールド `functions`、`seniority_rank`、`location_id` が含まれます。

```bash theme={null}
curl -X POST https://api.pubrio.com/companies/jobs/search \
  -H "pubrio-api-key: $PUBRIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "domains": ["stripe.com"],
    "seniority_ranks": [4, 5],
    "launch_dates": ["2026-08-01", "2026-08-31"],
    "per_page": 25
  }'
```

## 使いどころ

* **1 社の採用シグナル** — 企業を渡して、何を、どこで、どのレベルで採用しているかを読む。
* **役割ベースのプロスペクティング** — シニアのエンジニアや営業職を募集している企業を国単位で探し、各行の `domain_search_id` を使って[人物検索](/jp/api-reference/endpoint/people/search)へ進む。
* **増分同期** — 保存済みの最新取り込み日時を `created_at` に設定してポーリングする。

行ではなく集計が欲しい場合は[求人インサイト](/jp/api-reference/endpoint/companies/job_insights)を使ってください。企業が求人を出したときに通知が欲しい場合は、`signal_types: ["jobs"]` の[モニター](/jp/developer-guides/examples/tracking-job-postings)を作成してください。

## 企業で絞り込む

最も速い検索は企業を指定するものです。3 つの識別子はすべて同じレコードに解決され、混在させられます：

| キー              | 値                                             | 備考                                                   |
| --------------- | --------------------------------------------- | ---------------------------------------------------- |
| `domains`       | `["stripe.com"]`                              | `https://www.stripe.com/jobs` のような URL はドメインに正規化されます |
| `linkedin_urls` | `["https://www.linkedin.com/company/stripe"]` | 企業ページのみ                                              |
| `companies`     | `["5378845d-7726-4817-aba9-ced8c5f41dee"]`    | 以前のレスポンスの `domain_search_id`                         |

企業なしの検索も可能で — `{"locations": ["SG"], "seniority_ranks": [5]}` は動作します — ただしインデックス全体に対して件数を数えます。その場合 `total_entries` は概算で、非常に広いフィルターでは `is_timeout` が `true` になることがあります。

## フィルター

### テキスト

| キー             | 型          | 一致対象                                                                            |
| -------------- | ---------- | ------------------------------------------------------------------------------- |
| `titles`       | `string[]` | 職種名。単語単位で一致するため、`["engineer"]` は `Senior Software Engineer` も返します。列挙したいずれかの職種名。 |
| `search_term`  | `string`   | 求人タイトルに対する自由テキスト。                                                               |
| `search_terms` | `string[]` | 複数の自由テキスト。いずれかが一致すればよい。                                                         |

### 分類

| キー                | 型           | 一致対象                                                                                                                                   |
| ----------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `functions`       | `string[]`  | 職種名から導出した職能スラッグ：`engineering`、`sales`、`marketing`、`finance`、`product_management` など。列挙したいずれかのスラッグ。[職能](/jp/api-reference/enums#職能)を参照。 |
| `seniority_ranks` | `integer[]` | `1` ジュニア · `2` シニア · `3` マネージャー · `4` ディレクター · `5` エグゼクティブ。[職位ティア](/jp/api-reference/enums#職位ティア)を参照。                                  |

<Warning>
  この 2 つは不正な入力に対する挙動が異なります。未知の `functions` スラッグは**0 件**を返します。1–5 以外の `seniority_ranks` 値は**無視**され全件を返します。どちらもエラーにはなりません。
</Warning>

### 日付

| キー             | 型                 | 一致対象                                                                                                            |
| -------------- | ----------------- | --------------------------------------------------------------------------------------------------------------- |
| `launch_dates` | `[from, to]`      | 求人の公開日 — 掲載元が `posting_date` を提供していればそれ、なければ Pubrio が最初に見つけた日。日付境界は UTC で、求人インサイトと一致するため、**デフォルトはこちらを使ってください。** |
| `posted_dates` | `[from, to]`      | `posting_date` のみ。日付境界はワークスペースのタイムゾーンに従います。                                                                     |
| `created_at`   | 日付または ISO タイムスタンプ | この時刻以降に取り込まれたもの（UTC）。増分ポーリングでは保存済みの最新行の `created_at` をそのまま渡してください。                                              |

どちらのウィンドウも両端含みです。`launch_dates` に要素を 1 つだけ渡すと、その 1 日に一致します。

### 勤務地

| キー                  | 型           | 一致対象                                                                                                                             |
| ------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `locations`         | `string[]`  | 求人の国、ISO alpha-2。                                                                                                                |
| `exclude_locations` | `string[]`  | 除外する求人の国。                                                                                                                        |
| `location_ids`      | `integer[]` | Pubrio の `location_id` による求人の国。[Locations](/jp/api-reference/endpoint/locations/locations) エンドポイントと各行の `location_id` が持つ番号と同じです。 |
| `company_locations` | `string[]`  | **企業本社**の国。求人の勤務地とは異なる場合があります。                                                                                                   |

### ページングと並び順

| キー                   | デフォルト   | 備考                                                           |
| -------------------- | ------- | ------------------------------------------------------------ |
| `per_page`           | 25      | プランの `max_search_per_page` が上限。                              |
| `page`               | 1       | `max_search_page` が上限。レスポンスの `total_display_pages` が上限を示します。 |
| `is_ascending_order` | `false` | 行は `created_at` の新しい順。`true` で古い順になります。                      |

## 行の例

```json theme={null}
{
  "job_id": "4418496a-6a4f-4432-8910-50153e9ba27c",
  "job_search_id": "4418496a-6a4f-4432-8910-50153e9ba27c",
  "created_at": "2026-08-30T00:02:52.531Z",
  "last_modified": "2026-09-01T16:08:09.324Z",
  "title": "Finance and Strategy Partner",
  "job_url": "https://www.linkedin.com/jobs/view/4460586030",
  "location": "United States",
  "location_id": 357,
  "country": "United States",
  "country_code": "US",
  "posting_date": "2026-08-29",
  "source_type": "linkedin",
  "functions": ["consulting"],
  "seniority_rank": 5,
  "base_salary": null,
  "experience_requirement": null,
  "education_requirement": null,
  "employment_type": null,
  "companies": {
    "domain_search_id": "5378845d-7726-4817-aba9-ced8c5f41dee",
    "company_name": "Stripe",
    "linkedin_name": "stripe",
    "country_code": "US",
    "company_url": "https://stripe.com/",
    "domain": "stripe.com",
    "logo_url": "https://buckets.pubrio.com/company-logo/....jpg"
  }
}
```

* 職種名を分類できない場合、`functions` は `null`、`seniority_rank` は `0` です。そのままフィルターしてかまいません — 未分類の行は単に一致しないだけです。
* `posting_date` は掲載元の日付、`created_at` は Pubrio が最初に求人を見つけた日時で、デフォルトのソートキーです。
* `job_id` と `job_search_id` は同じ値で、どちらも[求人ルックアップ](/jp/api-reference/endpoint/companies/job_lookup)に渡せます。

### 結果を信用する前に `metadata` を読む

```json theme={null}
"metadata": {
  "profile": null,
  "filters": { "domains": ["stripe.com"], "seniority_ranks": [4, 5], "per_page": 25, "language": "en" },
  "ignored_fields": []
}
```

`ignored_fields` には、エンドポイントが認識できなかったボディキーが列挙されます。`"seniorty_ranks"` のようなタイポはリクエストを失敗させず、黙って検索を広げます。自動化する処理では、この配列が空であることを必ず確認してください。

## レシピ

<Tabs>
  <Tab title="直近 30 日のシニアエンジニア採用">
    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST https://api.pubrio.com/companies/jobs/search \
        -H "pubrio-api-key: $PUBRIO_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "domains": ["stripe.com", "adyen.com", "checkout.com"],
          "functions": ["engineering", "data_science"],
          "seniority_ranks": [3, 4, 5],
          "launch_dates": ["2026-08-05", "2026-09-04"],
          "per_page": 25
        }'
      ```

      ```python Python theme={null}
      import os, requests

      r = requests.post(
          "https://api.pubrio.com/companies/jobs/search",
          headers={"pubrio-api-key": os.environ["PUBRIO_API_KEY"], "Content-Type": "application/json"},
          json={
              "domains": ["stripe.com", "adyen.com", "checkout.com"],
              "functions": ["engineering", "data_science"],
              "seniority_ranks": [3, 4, 5],
              "launch_dates": ["2026-08-05", "2026-09-04"],
              "per_page": 25,
          },
      )
      body = r.json()
      assert body["metadata"]["ignored_fields"] == []
      for job in body["data"]["jobs"]:
          print(job["companies"]["company_name"], "-", job["title"], job["seniority_rank"])
      ```
    </CodeGroup>
  </Tab>

  <Tab title="シンガポールで営業リーダーを採用中の企業">
    ```bash cURL theme={null}
    curl -X POST https://api.pubrio.com/companies/jobs/search \
      -H "pubrio-api-key: $PUBRIO_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "locations": ["SG"],
        "functions": ["sales", "business_development"],
        "seniority_ranks": [4, 5],
        "launch_dates": ["2026-08-01", "2026-09-04"],
        "per_page": 25
      }'
    ```

    行を `companies.domain_search_id` でグループ化してください — 企業ごとが見込み客で、その id は[人物検索](/jp/api-reference/endpoint/people/search)の `companies` にそのまま渡せます。
  </Tab>

  <Tab title="増分同期">
    ```python Python theme={null}
    import os, requests

    API = "https://api.pubrio.com/companies/jobs/search"
    HEADERS = {"pubrio-api-key": os.environ["PUBRIO_API_KEY"]}

    def sync(domains, since):
        """`since`（ISO タイムスタンプ）以降に取り込まれた求人をすべて取得し、新しいカーソルを返す。"""
        newest = since
        page = 1
        while True:
            body = requests.post(API, headers=HEADERS, json={
                "domains": domains, "created_at": since, "page": page, "per_page": 25,
            }).json()
            rows = body["data"]["jobs"]
            if not rows:
                break
            for job in rows:  # 新しい順
                newest = max(newest, job["created_at"])
                print(job["job_id"], job["title"])  # ここで自分のストアに upsert する
            if page >= body["data"]["pagination"]["total_display_pages"]:
                break
            page += 1
        return newest

    cursor = sync(["stripe.com"], "2026-09-01T00:00:00Z")
    # `cursor` を保存し、次回の実行で `since` として渡す
    ```

    カーソルは保存済みの最新行の完全な `created_at` なので、次回再配信されるのはその 1 行だけです。`job_id` で upsert してください。行は新しい順に届くため、取り込みの多い日でもカーソルがプランのページ上限を超えることはありません。
  </Tab>
</Tabs>

## 関連

<CardGroup cols={2}>
  <Card title="求人検索リファレンス" icon="code" href="/jp/api-reference/endpoint/companies/job_search">
    すべてのパラメーターとレスポンスフィールド。
  </Card>

  <Card title="求人インサイト" icon="chart-column" href="/jp/api-reference/endpoint/companies/job_insights">
    1 社の職能、職位、国、週ごとの件数。
  </Card>

  <Card title="列挙値と定数" icon="list" href="/jp/api-reference/enums">
    職位ティアと職能の全語彙。
  </Card>

  <Card title="モニターで求人を追跡" icon="bell" href="/jp/developer-guides/examples/tracking-job-postings">
    ポーリングの代わりに Webhook を受け取る。
  </Card>
</CardGroup>
