---
title: "Relationships with many accounts"
method: GET
path: "/user/friendships/batch"
tags: ["Users"]
---

# Relationships with many accounts

`GET /user/friendships/batch`

## Request

- Base URL: `https://api.twittrapi.com`
- URL: `https://api.twittrapi.com/user/friendships/batch`
- Auth: API key in header `X-API-KEY`

Whether one account follows up to 50 others, and the other way round, in one request.

Billed one call per target handle (duplicates count once).

No simple format: with format=simple the response is the same as without it.

Reference: https://www.twittrapi.com/docs/reference/user-friendships-batch

## Query parameters

- `source_screen_name` string, required
- `target_screen_names` string[], required

## Response `200`

Built by the API: {"source_screen_name": "...", "relationships": [{"target_screen_name": "...", "relationship": {...}}], "errors": [...]}. relationship is the same object /user/friendships/show returns (source and target with following and followed_by). relationships keeps the order of target_screen_names. A handle that could not be looked up is listed in errors: [{"username": "...", "error": "upstream_error", "message": "..."}]; errors is left out when there are none.

- RawPassthrough: X's own JSON (raw format, the default), passed through unchanged. The shape is X's and can change; see https://www.twittrapi.com/docs/response-format.

## Other responses

- `400`: source_screen_name or target_screen_names is missing, or there are more than 50 targets.
- `401`: Missing or unknown API key. Not charged.
- `402`: No balance left, or the trial expired. Not charged. Top up in the dashboard.
- `403`: Key deactivated, or the endpoint is not in your plan (trial keys and account actions). Not charged.
- `422`: A handle is not 1 to 15 letters, digits or underscores.
- `429`: Rate limit for your key exceeded. Not charged. No Retry-After header: back off exponentially.
- `500`: Something failed on our side or between us and X. Refunded (400, 407, 408, 409 or a 5xx error are refunded). Retry with backoff.

---

[API](https://skmtc.dev/twittrapi/apis/twittrapi-api.md) · [All operations](https://skmtc.dev/twittrapi/apis/twittrapi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/twittrapi/apis/twittrapi-api/revisions/0618e38b54c2?raw)
