# Phone spam reports

> POST /phone/reports counts consumer complaints to the FTC Do Not Call registry about a North American number: reports, days, subjects, states, robocall share.

`POST https://api.qelka.com/v1/phone/reports`

See how many consumers reported a North American phone number to the U.S. Federal Trade Commission (FTC) as an unwanted caller over the last 90 days of published data, with the subjects, states and robocall share of their complaints. Each lookup costs 1 credit, reported or not; numbers outside the North American Numbering Plan, errors and test keys are never billed.

> **Warning: Reports are unverified**
>
> The FTC does not check these complaints, and a caller can display a number that is not theirs (spoofing). Show a count as "N consumers reported this number to the FTC", never as proof that whoever holds the number is a scammer.

## Request

Send a number of the North American Numbering Plan (NANP), the `+1` numbering plan shared by the United States, Canada and much of the Caribbean. The request log keeps only the country code and the last two digits of the number.

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `phone` | string | Yes | none | The phone number, 1 to 64 characters, in E.164 (`+12025550143`) or national format (`(202) 555-0143`). |
| `country` | string | No | `US` | ISO 3166-1 alpha-2 country used to read a number written without `+1`. |
| `fresh` | boolean | No | `false` | Accepted so that every endpoint takes the same fields. Answers are never cached, so it changes nothing here. |

```bash title="cURL"
curl https://api.qelka.com/v1/phone/reports \
  --max-time 10 \
  -H "Authorization: Bearer $QELKA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phone": "+1 202-555-0143"}'
```
```javascript title="Node.js"
const response = await fetch('https://api.qelka.com/v1/phone/reports', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ phone: '+1 202-555-0143' }),
  signal: AbortSignal.timeout(10_000),
})
const result = await response.json()
console.log(result)
```
```python title="Python"
import os

import requests

api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
    "https://api.qelka.com/v1/phone/reports",
    headers={"Authorization": f"Bearer {api_key}"},
    json={"phone": "+1 202-555-0143"},
    timeout=10,
)
result = response.json()
print(result)
```
```php title="PHP"
<?php
$ch = curl_init('https://api.qelka.com/v1/phone/reports');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('QELKA_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode(['phone' => '+1 202-555-0143']),
    CURLOPT_TIMEOUT => 10,
]);
$result = json_decode(curl_exec($ch), true);
print_r($result);
```
```go title="Go"
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
	"os"
	"time"
)

func main() {
	payload, _ := json.Marshal(map[string]any{"phone": "+1 202-555-0143"})
	request, _ := http.NewRequest(http.MethodPost, "https://api.qelka.com/v1/phone/reports", bytes.NewReader(payload))
	request.Header.Set("Authorization", "Bearer "+os.Getenv("QELKA_API_KEY"))
	request.Header.Set("Content-Type", "application/json")

	client := &http.Client{Timeout: 10 * time.Second}
	response, err := client.Do(request)
	if err != nil {
		panic(err)
	}
	defer response.Body.Close()

	var result map[string]any
	if err := json.NewDecoder(response.Body).Decode(&result); err != nil {
		panic(err)
	}
	fmt.Println(result)
}
```
```ruby title="Ruby"
require 'json'
require 'net/http'

uri = URI('https://api.qelka.com/v1/phone/reports')
request = Net::HTTP::Post.new(uri)
request['Authorization'] = "Bearer #{ENV.fetch('QELKA_API_KEY')}"
request['Content-Type'] = 'application/json'
request.body = JSON.generate({ phone: '+1 202-555-0143' })

response = Net::HTTP.start(uri.host, uri.port, use_ssl: true, read_timeout: 10) do |http|
  http.request(request)
end
result = JSON.parse(response.body)
puts result
```

## Response

Every number that can be read gets a `200`. Read `status` first: `reported`, `not_reported` or `unsupported`.

| Field | Type | Description |
|---|---|---|
| `id` | string | Identifier of this lookup: `lkp_` followed by 26 characters. |
| `object` | string | Always `phone_reports`. |
| `input` | string | The `phone` you sent, without surrounding spaces. |
| `status` | string | `reported` when at least one complaint names the number in the window, `not_reported` when none does, `unsupported` for a number outside the NANP. |
| `e164` | string or null | The number in E.164 format, such as `+12025550143`. |
| `reports` | integer | Complaints that name the number as the caller over the window. |
| `first_reported` | string or null | Day of the first complaint in the window, `YYYY-MM-DD` in Eastern time. |
| `last_reported` | string or null | Day of the latest complaint in the window, `YYYY-MM-DD` in Eastern time. |
| `days_reported` | integer | Days with at least one complaint. |
| `robocall_share` | number or null | Among the complaints that answered the question, the share saying the call was a recorded message or robocall, from 0 to 1. `null` when none answered. |
| `subjects` | array of objects | Up to 5 subjects, as consumers picked them in the FTC complaint form, most reported first. Complaints without a subject are left out. |
| `subjects.subject` | string | The subject, as the FTC publishes it. |
| `subjects.reports` | integer | Complaints with that subject. |
| `states` | array of objects | Up to 5 states the consumers reported from, most reported first. It is where the consumers were, not where the caller was. |
| `states.state` | string | USPS code of the state, such as `CA`. |
| `states.reports` | integer | Complaints from that state. |
| `timeline` | array of objects | Complaints per day, oldest first, for the days with at least one. |
| `timeline.day` | string | The day, `YYYY-MM-DD` in Eastern time. |
| `timeline.reports` | integer | Complaints that day. |
| `window` | object or null | The complaint days the loaded FTC data covers. `null` for an `unsupported` number, or until the data is loaded. |
| `window.from` | string | First day of the window, `YYYY-MM-DD`. |
| `window.to` | string | Last day of the window, `YYYY-MM-DD`. |
| `window.days` | integer | Days in the window. |
| `verified` | boolean | Always `false`: the FTC does not verify the complaints. |
| `credits_used` | integer | Credits debited for this call: 1 with a live key, `0` for an `unsupported` number or with a test key. |
| `cached` | boolean | Always `false`: the data changes every day, so answers are never cached. |

Test keys read a simulated data set in which `+1 202-555-0143` was reported 5 times and every other number has no reports. With a test key, the request in the Request section returns:

```json title="Response"
{
  "id": "lkp_01M85RP99BC7ZZVRF0NJSTPHST",
  "object": "phone_reports",
  "input": "+1 202-555-0143",
  "status": "reported",
  "e164": "+12025550143",
  "reports": 5,
  "first_reported": "2026-11-12",
  "last_reported": "2026-11-17",
  "days_reported": 2,
  "robocall_share": 0.8,
  "subjects": [
    { "subject": "Reducing your debt (credit cards, mortgage, student loans)", "reports": 3 },
    { "subject": "Other", "reports": 1 }
  ],
  "states": [
    { "state": "CA", "reports": 2 },
    { "state": "FL", "reports": 1 },
    { "state": "OH", "reports": 1 },
    { "state": "TX", "reports": 1 }
  ],
  "timeline": [
    { "day": "2026-11-12", "reports": 2 },
    { "day": "2026-11-17", "reports": 3 }
  ],
  "window": { "from": "2026-08-21", "to": "2026-11-18", "days": 90 },
  "verified": false,
  "credits_used": 0,
  "cached": false
}
```

## Act on the status

| `status` | What it means | What to do | Billed |
|---|---|---|---|
| `reported` | At least one consumer complaint names the number in the window. | Show the count as what it is: "5 consumers reported this number to the FTC", with `first_reported` and `last_reported`. Let your user decide; never label the number or its holder. | Yes |
| `not_reported` | No complaint names the number in the window. | Show nothing, or "No reports in the last 90 days". It does not mean the number is safe, only that nobody filed a complaint in that time. | Yes |
| `unsupported` | The number is outside the NANP, which the FTC data does not cover. | Do not show a result. Use the [phone API](https://qelka.com/docs/api-reference/phone) to validate the number instead. | No |

## Show reports fairly

A report says what a consumer wrote to the FTC, not who called. The FTC states that it does not verify the information in the complaints, and caller ID can be spoofed, so the number on a complaint may belong to someone who never made the call. `verified` is always `false` to carry that into your code.

`states` tells you where the consumers who complained were, never where the caller is. `subjects` are the categories consumers picked in the FTC form, as published.

## Where the data comes from

The data is the [Do Not Call Reported Calls Data](https://www.ftc.gov/policy-notices/open-government/data-sets/do-not-call-data) of the FTC, a work of the U.S. Government in the public domain. Each complaint gives the number consumers reported, the day the complaint was created, the subject the consumer picked, whether the call was a recorded message or robocall, and the consumer's state.

We read the complaints through the FTC's Do Not Call complaints API, add each day once the FTC has published it in full, and keep the last 90 days. A complaint counts for a number only when the number follows the NANP format (`NPA-NXX-XXXX`).

The same data feeds the free [spam number check](https://qelka.com/tools/spam-number-check) and the list of [numbers reported to the FTC, day by day](https://qelka.com/daily). See the [data sources page](https://qelka.com/data-sources).

## Examples

### Check a number nobody reported

With a test key, any number other than `+1 202-555-0143` has no reports. The window is the same, and the lists are empty.

```bash title="cURL"
curl https://api.qelka.com/v1/phone/reports \
  --max-time 10 \
  -H "Authorization: Bearer $QELKA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phone": "+1 415-555-0100"}'
```
```javascript title="Node.js"
const response = await fetch('https://api.qelka.com/v1/phone/reports', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ phone: '+1 415-555-0100' }),
  signal: AbortSignal.timeout(10_000),
})
const result = await response.json()
console.log(result)
```
```python title="Python"
import os

import requests

api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
    "https://api.qelka.com/v1/phone/reports",
    headers={"Authorization": f"Bearer {api_key}"},
    json={"phone": "+1 415-555-0100"},
    timeout=10,
)
result = response.json()
print(result)
```

```json title="Response"
{
  "id": "lkp_01M8714HKHXKY9Z7XJZXGZDWJ1",
  "object": "phone_reports",
  "input": "+1 415-555-0100",
  "status": "not_reported",
  "e164": "+14155550100",
  "reports": 0,
  "first_reported": null,
  "last_reported": null,
  "days_reported": 0,
  "robocall_share": null,
  "subjects": [],
  "states": [],
  "timeline": [],
  "window": { "from": "2026-08-21", "to": "2026-11-18", "days": 90 },
  "verified": false,
  "credits_used": 0,
  "cached": false
}
```

### Handle a number outside North America

A UK number is outside the NANP. The answer is a `200` with `status: "unsupported"`, `window: null` and `credits_used: 0`, with a live key as with a test key.

```bash title="cURL"
curl https://api.qelka.com/v1/phone/reports \
  --max-time 10 \
  -H "Authorization: Bearer $QELKA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phone": "+44 20 7946 0958"}'
```
```javascript title="Node.js"
const response = await fetch('https://api.qelka.com/v1/phone/reports', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ phone: '+44 20 7946 0958' }),
  signal: AbortSignal.timeout(10_000),
})
const result = await response.json()
console.log(result)
```
```python title="Python"
import os

import requests

api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
    "https://api.qelka.com/v1/phone/reports",
    headers={"Authorization": f"Bearer {api_key}"},
    json={"phone": "+44 20 7946 0958"},
    timeout=10,
)
result = response.json()
print(result)
```

```json title="Response"
{
  "id": "lkp_01M8714JGTAGJJGN7QRGYPWEPE",
  "object": "phone_reports",
  "input": "+44 20 7946 0958",
  "status": "unsupported",
  "e164": "+442079460958",
  "reports": 0,
  "first_reported": null,
  "last_reported": null,
  "days_reported": 0,
  "robocall_share": null,
  "subjects": [],
  "states": [],
  "timeline": [],
  "window": null,
  "verified": false,
  "credits_used": 0,
  "cached": false
}
```

## Errors

| Status | Type | When |
|---|---|---|
| 400 | [invalid_request](https://qelka.com/docs/errors#invalid_request) | `phone` is missing, empty or longer than 64 characters, `country` is not two letters, the body is not a JSON object, or it has a field the request table does not list |
| 401 | [invalid_api_key](https://qelka.com/docs/errors#invalid_api_key) | The key is missing, unknown or revoked |
| 402 | [insufficient_credits](https://qelka.com/docs/errors#insufficient_credits) | Your balance is less than 1 credit (live keys only) |
| 403 | [forbidden](https://qelka.com/docs/errors#forbidden) | The key is restricted to other endpoints |
| 405 | [invalid_request](https://qelka.com/docs/errors#invalid_request) | The method is not `POST` |
| 422 | [unprocessable_input](https://qelka.com/docs/errors#unprocessable_input) | `phone` is not a phone number, or it is a `+1` number that does not follow the NANP format |
| 429 | [rate_limited](https://qelka.com/docs/errors#rate_limited) | Too many requests: wait `Retry-After` seconds |
| 500 | [internal_error](https://qelka.com/docs/errors#internal_error) | Unexpected error on our side: retry with backoff |

No error is billed. A number without complaints is not an error: it is a `200` with `status: "not_reported"`, and it does not mean the number is safe.

## Related

- [Phone spam reports API](https://qelka.com/products/phone-reports)
- Free tool: [Spam number check](https://qelka.com/tools/spam-number-check)
- [Phone numbers reported to the FTC, day by day](https://qelka.com/daily)
- [Phone validation](https://qelka.com/docs/api-reference/phone): line type, carrier and format of any number
- [Batch](https://qelka.com/docs/api-reference/batch): up to 100 numbers in one call, each item with `type: "phone_reports"`
- [Errors](https://qelka.com/docs/errors), [Test mode](https://qelka.com/docs/test-mode)
