Users

Relationships with many accounts

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

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

Query parameters

source_screen_namestring required

The account to compare with the others, with or without @.

target_screen_namesstring[] required

Handles separated by commas, with or without @. At most 50. Duplicates are dropped.

Response

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 required

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.

Changes

No recorded changes to this operation across all 1 revision of this API.