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

# Quickstart

> Run your first research lookup in 5 minutes

## Prerequisites

1. [Create an account](https://rapportapi.com/auth/sign-up) — you'll get 3 free credits to try the API
2. Copy your API key from the [dashboard](https://rapportapi.com/home)

Your API key looks like `rapi_live_a1b2c3d4...` — keep it secret.

## 1. Submit a research request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.rapportapi.com/research \
    -H "Authorization: Bearer rapi_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "contact_data": {
        "email": "jane@example.com"
      }
    }'
  ```

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

  response = requests.post(
      "https://api.rapportapi.com/research",
      headers={
          "Authorization": "Bearer rapi_live_YOUR_API_KEY",
          "Content-Type": "application/json"
      },
      json={
          "contact_data": {
              "email": "jane@example.com"
          }
      }
  )

  data = response.json()
  print(f"Task ID: {data['task_id']}")
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.rapportapi.com/research", {
    method: "POST",
    headers: {
      "Authorization": "Bearer rapi_live_YOUR_API_KEY",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      contact_data: {
        email: "jane@example.com"
      }
    })
  });

  const data = await response.json();
  console.log(`Task ID: ${data.task_id}`);
  ```
</CodeGroup>

**Response** (202 Accepted):

```json theme={null}
{
  "task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "pending"
}
```

## 2. Poll for results

Research takes \~2-3 minutes. Poll every 4-5 seconds until `status` is `completed` or `failed`.

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.rapportapi.com/research/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
    -H "Authorization: Bearer rapi_live_YOUR_API_KEY"
  ```

  ```python Python theme={null}
  import time

  task_id = data["task_id"]

  while True:
      result = requests.get(
          f"https://api.rapportapi.com/research/{task_id}",
          headers={"Authorization": "Bearer rapi_live_YOUR_API_KEY"}
      )
      status = result.json()["status"]

      if status == "completed":
          report = result.json()
          break
      elif status == "failed":
          print(f"Error: {result.json().get('error')}")
          break

      time.sleep(5)
  ```

  ```javascript JavaScript theme={null}
  const taskId = data.task_id;

  const poll = async () => {
    while (true) {
      const result = await fetch(
        `https://api.rapportapi.com/research/${taskId}`,
        { headers: { "Authorization": "Bearer rapi_live_YOUR_API_KEY" } }
      );
      const body = await result.json();

      if (body.status === "completed") return body;
      if (body.status === "failed") throw new Error(body.error);

      await new Promise((r) => setTimeout(r, 5000));
    }
  };

  const report = await poll();
  ```
</CodeGroup>

## 3. Use the results

When `status` is `completed`, the response includes the full intelligence report:

```json theme={null}
{
  "task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "completed",
  "report_url": "https://rapportapi.com/report?id=a1b2c3d4...",
  "result": {
    "outreach_intelligence": {
      "icebreakers": [
        {
          "angle": "Marathon Runner",
          "opening_line": "I saw you just finished the Chicago Marathon — that's incredible! How long have you been running?",
          "why_effective": "Shows genuine interest in a personal achievement outside of work",
          "confidence": "HIGH"
        }
      ],
      "communication_style": "Direct and data-driven. Prefers concise messages with clear value propositions...",
      "topics_to_avoid": ["Politics", "Previous employer litigation"]
    },
    "professional": {
      "current_title": "VP of Sales",
      "current_company": "Acme Corp"
    },
    "personal": {
      "interests": ["Marathon running", "Youth coaching", "Italian cooking"],
      "hobbies": ["Photography", "Travel"]
    }
  }
}
```

<Tip>
  **Don't want to poll?** Provide a `callback_url` in your research request and we'll POST the results to your server when ready. See [Webhooks](/webhooks).
</Tip>

## What identifiers can I use?

You need at least one of these:

| Identifier              | Example                           | Notes                          |
| ----------------------- | --------------------------------- | ------------------------------ |
| `email`                 | `jane@example.com`                | Best starting point            |
| `linkedin_url`          | `https://linkedin.com/in/janedoe` | Unlocks LinkedIn post analysis |
| `full_name` + `company` | `"Jane Doe"` + `"Acme Corp"`      | Both required together         |

Additional fields (`phone`, `title`, `location`, `twitter_url`) improve enrichment quality but aren't required.

## Test mode

Add `"is_test": true` to your request to get a dummy completed response without using credits. This is useful for testing your integration end-to-end.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.rapportapi.com/research \
    -H "Authorization: Bearer rapi_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "contact_data": {
        "email": "test@example.com"
      },
      "is_test": true
    }'
  ```

  ```python Python theme={null}
  response = requests.post(
      "https://api.rapportapi.com/research",
      headers={
          "Authorization": "Bearer rapi_live_YOUR_API_KEY",
          "Content-Type": "application/json"
      },
      json={
          "contact_data": {
              "email": "test@example.com"
          },
          "is_test": True
      }
  )
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.rapportapi.com/research", {
    method: "POST",
    headers: {
      "Authorization": "Bearer rapi_live_YOUR_API_KEY",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      contact_data: {
        email: "test@example.com"
      },
      is_test: true
    })
  });
  ```
</CodeGroup>

The response returns immediately with `status: "completed"` and a `test-` prefixed task ID. Poll that task ID to get a realistic dummy intelligence report with sample icebreakers, professional info, and personal interests.

<Note>
  Test requests still require a valid API key for authentication, but no credits are deducted.
</Note>

## Next steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    API key management and security best practices.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/webhooks">
    Get notified when research completes instead of polling.
  </Card>

  <Card title="Credits" icon="coins" href="/credits">
    Understand how credits and billing work.
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Full request/response schema documentation.
  </Card>
</CardGroup>
