APIリファレンス
エクスポート
エクスポートは、フィルターに一致するすべてのリードを1つのファイルにまとめます。ページ送りでは大きすぎる取得に使います。作成したら、statusがreadyになるまで取得を繰り返し、urlからダウンロードします。エクスポートは1アカウントあたり1時間に10回まで作成できます。
typeをconversationsにすると、ファイルにはリードの代わりにアカウントのすべてのDMの会話が入り、それぞれにリードと最初からのすべてのメッセージが含まれます。AIアシスタントや自分のコードでDMをまとめて分析し、どの書き出しに返信が来るか、どの返答でリードの反論を乗り越えられるかを確かめるためのものです。GemleadはすべてのDMの独自コピーを編集や削除も含めてXと同期しているため、ファイルはXを呼び出さずにこのコピーから作成され、1 500件の会話が1分以内に用意できます。
エクスポートオブジェクト
バックグラウンドで作成されるリードまたは会話のファイル。ページネーションでは時間がかかりすぎる大量の取得に使います。
属性
- idstringエクスポートの一意の識別子。
- objectstring常に
exportです。 - typestringファイルの中身。リード、またはメッセージ付きの会話です。
leadsconversations - statusstringファイルの作成中は
processing、その後はreadyまたはfailedです。リンクが無効になるとexpiredになります。processingreadyfailedexpired - formatstringファイルの形式。リードは
csvまたはjsonl、会話はjsonlまたはmarkdownです。csvjsonlmarkdown - filtersobject
- row_countintegerファイルに含まれるリードまたは会話の数。ファイルの作成中に増えていきます。最大でリード100 000件、または会話20 000件です。
- total_countintegerまたはnullフィルターなしの会話のエクスポートで、ファイルに入る会話の数。作成の開始時に数えます。それ以外は
nullです。 - urlstringまたはnull準備ができたファイルのダウンロード先。24時間、
expires_atまで有効です。 - expires_atstringまたはnull
urlが使えなくなる日時。ISO 8601形式です。 - created_atstringエクスポートが作成された日時。ISO 8601形式です。
エクスポートオブジェクト
{
"id": "e4TnW8yHqA",
"object": "export",
"type": "leads",
"status": "ready",
"format": "csv",
"filters": {
"hot": true,
"persona": "lvWBPnytpS"
},
"row_count": 2134,
"total_count": null,
"url": "https://parsefiles.back4app.com/7Hn2kQ9xWm4LpR8tV3bZc6YdF1sJ0aUe/5f1c9e2b7a4d8c3e6f0b9a2d1c4e7f8a_gemlead-leads-e4TnW8yHqA.csv",
"expires_at": "2026-11-07T07:45:12.904Z",
"created_at": "2026-11-06T07:45:12.904Z"
}エクスポートを作成
リードまたは会話のファイルの作成を開始します。すぐにprocessingのエクスポートが返ります。
ボディパラメーター
- typestringエクスポートする対象。デフォルトは
leadsです。leadsconversations - formatstringファイルの形式。リードは
csvまたはjsonlで、デフォルトはcsvです。会話はjsonlまたはmarkdownで、デフォルトはjsonlです。csvjsonlmarkdown - filtersobject
戻り値
ステータスがprocessingのエクスポートオブジェクト。HTTPステータスは202です。
エラー
- 必須パラメーターがありません。
paramにその名前が入ります。 - APIが受け付けない値のパラメーターがあります。
paramにその名前が入ります。 - このアカウントで、過去1時間に10回を超えるエクスポートがありました。
POST/v1/ exports
curl -X POST https://gemlead.ai/api/v1/exports \
-H "Authorization: Bearer $GEMLEAD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"format": "csv",
"filters": {
"hot": true,
"persona": "lvWBPnytpS"
}
}'レスポンス202
{
"id": "e4TnW8yHqA",
"object": "export",
"type": "leads",
"status": "processing",
"format": "csv",
"filters": {
"hot": true,
"persona": "lvWBPnytpS"
},
"row_count": 0,
"total_count": null,
"url": null,
"expires_at": null,
"created_at": "2026-11-06T07:45:12.904Z"
}エクスポートを一覧表示
エクスポートを新しい順に返します。
クエリパラメーター
- limitinteger返すオブジェクトの数。1から100まで指定でき、デフォルトは25です。
- cursorstring次のページを取得するための、前のページの
next_cursor。ページネーションを参照してください。
戻り値
エクスポートオブジェクトのリスト。
GET/v1/ exports
curl https://gemlead.ai/api/v1/exports \
-H "Authorization: Bearer $GEMLEAD_API_KEY"レスポンス200
{
"object": "list",
"data": [
{
"id": "e4TnW8yHqA",
"object": "export",
"type": "leads",
"status": "ready",
"format": "csv",
"filters": {
"hot": true,
"persona": "lvWBPnytpS"
},
"row_count": 2134,
"total_count": null,
"url": "https://parsefiles.back4app.com/7Hn2kQ9xWm4LpR8tV3bZc6YdF1sJ0aUe/5f1c9e2b7a4d8c3e6f0b9a2d1c4e7f8a_gemlead-leads-e4TnW8yHqA.csv",
"expires_at": "2026-11-07T07:45:12.904Z",
"created_at": "2026-11-06T07:45:12.904Z"
}
],
"has_more": false,
"next_cursor": null
}エクスポートを取得
エクスポートを返します。statusがreadyになるまで数秒ごとに取得し、その後urlからダウンロードします。
パスパラメーター
- idstring必須エクスポートのID。
戻り値
エラー
- キーのアカウントに、このIDのエクスポートはありません。
GET/v1/ exports/ :id
curl https://gemlead.ai/api/v1/exports/e4TnW8yHqA \
-H "Authorization: Bearer $GEMLEAD_API_KEY"レスポンス200
{
"id": "e4TnW8yHqA",
"object": "export",
"type": "leads",
"status": "ready",
"format": "csv",
"filters": {
"hot": true,
"persona": "lvWBPnytpS"
},
"row_count": 2134,
"total_count": null,
"url": "https://parsefiles.back4app.com/7Hn2kQ9xWm4LpR8tV3bZc6YdF1sJ0aUe/5f1c9e2b7a4d8c3e6f0b9a2d1c4e7f8a_gemlead-leads-e4TnW8yHqA.csv",
"expires_at": "2026-11-07T07:45:12.904Z",
"created_at": "2026-11-06T07:45:12.904Z"
}ファイル内の会話
会話のjsonlファイルの各行。最新の会話から順に並びます。スレッド全体、リード、historyを含む会話オブジェクトです。markdownファイルにも同じ内容が、会話ごとに1つのトランスクリプトとして入ります。
属性
- idstring会話の一意の識別子。
- objectstring常に
conversationです。 - lead_idstring会話の相手のリード。
- profileobjectリードオブジェクトと同じ形式の、リードのXプロフィール。
- personaobjectまたはnullリードのペルソナ。
- columnobjectまたはnull会話ボードで会話が置かれている列。
- unreadbooleanリードの最後のメッセージが未読の場合はtrue。
- messages_countinteger
messages内のメッセージ数。 - first_message_atstringまたはnull最初のメッセージが送信された日時。ISO 8601形式です。
- last_message_atstringまたはnull最後のメッセージが送信された日時。ISO 8601形式です。
- last_messageobjectまたはnull最後のメッセージ。
- leadobjectまたはnullスコア、ステータス、ペルソナ、キャンペーンを含むリードオブジェクト。
- historystring
messagesがスレッド全体の場合はcomplete。長いスレッドについてGemleadが最新のメッセージしか保持しておらず、残りをまだXから一度読み込んでいない間はrecentです。completerecent - messagesobjectsの配列スレッドのすべてのメッセージ。古い順で、方向、テキスト、日時、メディア、リアクションを含みます。メディアのリンクは24時間有効です。
ファイル内の会話
{
"id": "msgOtJ8dvT",
"object": "conversation",
"lead_id": "msgOtJ8dvT",
"profile": {
"x_user_id": "1460283925",
"username": "jane_builds",
"name": "Jane Doe",
"bio": "Runs a paid trading community. Daily setups, no hype.",
"followers_count": 12400,
"following_count": 380,
"location": "Austin, TX",
"website": "https://janedoe.com",
"profile_image_url": "https://pbs.twimg.com/profile_images/1460283925/jane_400x400.jpg",
"verified": true,
"url": "https://x.com/jane_builds"
},
"unread": false,
"last_message_at": "2026-11-06T08:12:44.000Z",
"messages_count": 1,
"last_message": {
"id": "1985321409876543210",
"object": "message",
"direction": "inbound",
"text": "Yes, I want to charge for my Discord. How does it work?",
"created_at": "2026-11-06T08:12:44.000Z",
"media": [],
"reactions": [],
"encrypted": false,
"reply_to_message_id": null
},
"persona": {
"id": "lvWBPnytpS",
"name": "Tipsters"
},
"column": {
"id": "q7m2xk4p",
"name": "Interested"
},
"first_message_at": "2026-11-06T08:12:44.000Z",
"lead": {
"id": "msgOtJ8dvT",
"object": "lead",
"profile": {
"x_user_id": "1460283925",
"username": "jane_builds",
"name": "Jane Doe",
"bio": "Runs a paid trading community. Daily setups, no hype.",
"followers_count": 12400,
"following_count": 380,
"location": "Austin, TX",
"website": "https://janedoe.com",
"profile_image_url": "https://pbs.twimg.com/profile_images/1460283925/jane_400x400.jpg",
"verified": true,
"url": "https://x.com/jane_builds"
},
"score": 86,
"score_reason": "Runs a paid trading community and asks how to collect payments for it.",
"hot": true,
"status": "scored",
"persona": {
"id": "lvWBPnytpS",
"name": "Tipsters"
},
"campaign": null,
"conversation_id": null,
"locked_to": null,
"found_at": "2026-11-05T14:02:11.482Z",
"scored_at": "2026-11-05T14:03:40.117Z",
"updated_at": "2026-11-05T14:03:40.117Z",
"metadata": {}
},
"history": "complete",
"messages": [
{
"id": "1985321409876543210",
"object": "message",
"direction": "inbound",
"text": "Yes, I want to charge for my Discord. How does it work?",
"created_at": "2026-11-06T08:12:44.000Z",
"media": [],
"reactions": [],
"encrypted": false,
"reply_to_message_id": null
}
]
}