# glim.sh Twitter User Relationship Lookup

> glim.sh Twitter User Relationship Lookup is a paid API for AI agents from glim.sh, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Checks the follow relationship between two Twitter/X users, returning whether one follows or is followed by the other.

## Facts

- Endpoint: POST https://glim.sh/api/v1/twitter/users/relationship
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/glim-sh-twitter-user-relationship-lookup-a6edc6c2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Mh8SB36uS-_9FcuPFKPby

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability glim-sh-twitter-user-relationship-lookup-a6edc6c2 -d '<json body>'
```

Example prompt: Can you check whether @elonmusk follows @jack back on Twitter — does he follow them, and does @jack follow him?

## When to prefer this

Use this endpoint when you need to quickly determine the directional follow relationship between two specific Twitter/X users without managing Twitter API keys or building a scraping pipeline. Ideal for social graph analysis, influencer research, or verifying mutual follows at $0.001 per call.

## Known failure modes

- Invalid or nonexistent Twitter username returns an error
- Private/suspended accounts may not return relationship data
- Rate limits or upstream Twitter API downtime may cause failures
- Missing required user identifiers result in bad request errors
- Payment failure (402) if USDC balance is insufficient

## How this service works

Check follow relationship

## Output

A JSON object with a 'data' field containing 'following' (boolean indicating if the source user follows the target) and 'followed_by' (boolean indicating if the target follows the source back).

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "type": "object",
     "properties": {
      "source": {
       "type": "string",
       "description": "Source user ID or username"
      },
      "target": {
       "type": "string",
       "description": "Target user ID or username"
      }
     },
     "required": [
      "source",
      "target"
     ]
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "data": {
       "type": "object",
       "properties": {
        "following": {
         "type": "boolean"
        },
        "followed_by": {
         "type": "boolean"
        }
       },
       "required": [
        "following",
        "followed_by"
       ]
      }
     },
     "required": [
      "data"
     ]
    }
   },
   "required": [
    "type"
   ]
  }
 },
 "required": [
  "input"
 ]
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "following": false,
   "followed_by": true
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/glim-sh-twitter-user-relationship-lookup-a6edc6c2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from glim.sh](https://www.zero.xyz/host/glim.sh/llms.txt)
