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

# Tines

> Tines のストーリーから HTTP Request アクションを使用して、Firecrawl の検索、スクレイピング、抽出、マップ、クロールを呼び出します

<Note>
  **Tines ドキュメント:** [HTTP Request アクション](https://www.tines.com/docs/actions/types/http-request/)、[認証情報](https://www.tines.com/docs/credentials/)

  Firecrawl のリアルタイムなウェブデータを Tines のストーリーに取り込みます
</Note>

<h2 id="overview">
  概要
</h2>

Tines のストーリーでは、HTTP Request アクションを使って任意の REST API を呼び出せます。このアクションのリクエスト先を Firecrawl API にすると、ストーリーからウェブの検索、ページのスクレイピングと Markdown への変換、構造化データの抽出、サイトのマップやクロールを実行し、その結果をストーリー内の次のアクションに渡せます。

<h2 id="quick-start">
  クイックスタート
</h2>

1. [Firecrawl APIキーを作成します](https://www.firecrawl.dev/app/api-keys)
2. Tinesで **認証情報** を開き、`firecrawl` という名前の **Text** 認証情報を作成して、値にキーを貼り付けます
3. ストーリーに **HTTP Request** アクションを追加し、以下のように構成します

キーを `<<CREDENTIAL.firecrawl>>` として参照すれば、アクションの構成にキーを直接記述せずに済みます。

<h2 id="scrape-a-page">
  ページをスクレイピングする
</h2>

このアクションはスクレイピングリクエストを送信し、ページを Markdown 形式で出力します：

```json theme={null}
{
  "url": "https://api.firecrawl.dev/v2/scrape",
  "method": "post",
  "content_type": "json",
  "headers": {
    "Authorization": "Bearer <<CREDENTIAL.firecrawl>>"
  },
  "payload": {
    "url": "https://example.com",
    "formats": ["markdown"],
    "integration": "_tines"
  }
}
```

`https://example.com` を、上流のイベントから取得した URL (例: `<<receive_event.body.url>>`) に置き換えてください。任意指定の `integration` フィールドは、Tines から送信されたリクエストであることを示すラベルです。

<h2 id="what-you-can-do">
  できること
</h2>

| 機能 | エンドポイント | ユースケース |
| - | - | - |
| **検索** | `POST /v2/search` | 後続のアクションに先立ち、質問やアラートに関連するソースを探す |
| **スクレイピング** | `POST /v2/scrape` | URL を Markdown または構造化 JSON に変換する |
| **抽出** | `json` フォーマットを指定した `POST /v2/scrape` | プロンプトとスキーマを使って、タイトルや商品詳細などのフィールドを抽出する |
| **マップ** | `POST /v2/map` | サイト内の URL を一覧で取得する |
| **クロール** | `POST /v2/crawl` | サイト全体のページを収集し、ポーリングで結果を取得する |

すべてのエンドポイントで、ベース URL `https://api.firecrawl.dev`、共通の `Authorization` ヘッダー、JSONボディを使用します。

<h2 id="search-the-web">
  ウェブを検索する
</h2>

```json theme={null}
{
  "url": "https://api.firecrawl.dev/v2/search",
  "method": "post",
  "content_type": "json",
  "headers": {
    "Authorization": "Bearer <<CREDENTIAL.firecrawl>>"
  },
  "payload": {
    "query": "firecrawl web scraping",
    "limit": 5,
    "sources": ["web"],
    "integration": "_tines"
  }
}
```

<h2 id="extract-structured-data">
  構造化データを抽出
</h2>

`formats` のエントリを `json` 型に設定し、プロンプトとJSONスキーマを指定します：

```json theme={null}
{
  "url": "https://api.firecrawl.dev/v2/scrape",
  "method": "post",
  "content_type": "json",
  "headers": {
    "Authorization": "Bearer <<CREDENTIAL.firecrawl>>"
  },
  "payload": {
    "url": "https://example.com",
    "formats": [
      {
        "type": "json",
        "prompt": "Extract the page title",
        "schema": {
          "type": "object",
          "properties": { "title": { "type": "string" } }
        }
      }
    ],
    "integration": "_tines"
  }
}
```

<h2 id="crawl-a-site">
  サイトをクロールする
</h2>

クロールは非同期で実行されます。1つのアクションでクロールを開始し、別のアクションで結果を取得します。

`POST /v2/crawl` で**クロールを開始**します：

```json theme={null}
{
  "url": "https://api.firecrawl.dev/v2/crawl",
  "method": "post",
  "content_type": "json",
  "headers": {
    "Authorization": "Bearer <<CREDENTIAL.firecrawl>>"
  },
  "payload": {
    "url": "https://example.com",
    "limit": 10,
    "integration": "_tines"
  }
}
```

レスポンスには `id` が含まれます。その `id` を指定してクロール結果を取得する2つ目の HTTP Request アクションで**ステータスを確認**し、`status` が `completed` になるまで繰り返します。

```json theme={null}
{
  "url": "https://api.firecrawl.dev/v2/crawl/<<start_crawl.body.id>>",
  "method": "get",
  "headers": {
    "Authorization": "Bearer <<CREDENTIAL.firecrawl>>"
  }
}
```

ここでの `start_crawl` は、クロールを開始したアクションの名前です。

<h2 id="resources">
  リソース
</h2>

* [Tines の HTTP Request アクション](https://www.tines.com/docs/actions/types/http-request/)
* [Tines の認証情報](https://www.tines.com/docs/credentials/)
* [Firecrawl API の概要](/ja/api-reference/v2-introduction)
* [Firecrawl のスクレイピングに関するドキュメント](/ja/features/scrape)
* [Firecrawl のクロールに関するドキュメント](/ja/features/crawl)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.