---
title: "By its FID and target FID"
method: GET
path: "/v1/linkById"
tags: ["Links"]
---

# By its FID and target FID

`GET /v1/linkById`

Lookup a link by its FID and target FID.

## Query parameters

- `fid` integer, required — Farcaster ID (FID). A unique identifier assigned to each user in the Farcaster network. This number is permanent and cannot be changed. FIDs are assigned sequentially when users register on the network.
- `target_fid` integer, required — Farcaster ID (FID). A unique identifier assigned to each user in the Farcaster network. This number is permanent and cannot be changed. FIDs are assigned sequentially when users register on the network.
- `link_type` 'follow', required — Defines the type of social connection between users. - follow: Establishes a following relationship where the user will receive updates from the target user in their feed

## Response `200`

The requested Link.

- LinkAdd
  - `hash` string, required
  - `hashScheme` 'HASH_SCHEME_BLAKE3', required — Type of hashing scheme used to produce a digest of MessageData. - HASH_SCHEME_BLAKE3: Default scheme for hashing MessageData
  - `signature` string, byte, required
  - `signatureScheme` 'SIGNATURE_SCHEME_ED25519' | 'SIGNATURE_SCHEME_EIP712', required — Type of signature scheme used to sign the Message hash - SIGNATURE_SCHEME_ED25519: Ed25519 signature (default) - SIGNATURE_SCHEME_EIP712: ECDSA signature using EIP-712 scheme
  - `signer` string, required
  - `data` object, required — Common properties shared by all Farcaster message types. These properties provide essential metadata about the message's origin, timing, and network context.
    - `type` 'MESSAGE_TYPE_CAST_ADD' | 'MESSAGE_TYPE_CAST_REMOVE' | 'MESSAGE_TYPE_REACTION_ADD' | 'MESSAGE_TYPE_REACTION_REMOVE' | 'MESSAGE_TYPE_LINK_ADD' | 'MESSAGE_TYPE_LINK_REMOVE' | 'MESSAGE_TYPE_VERIFICATION_ADD_ETH_ADDRESS' | 'MESSAGE_TYPE_VERIFICATION_REMOVE' | 'MESSAGE_TYPE_USER_DATA_ADD' | 'MESSAGE_TYPE_USERNAME_PROOF' | 'MESSAGE_TYPE_FRAME_ACTION', required — Type of the MessageBody. - MESSAGE_TYPE_CAST_ADD: Add a new Cast - MESSAGE_TYPE_CAST_REMOVE: Remove an existing Cast - MESSAGE_TYPE_REACTION_ADD: Add a Reaction to a Cast - MESSAGE_TYPE_REACTION_REMOVE: Remove a Reaction from a Cast - MESSAGE_TYPE_LINK_ADD: Add a new Link - MESSAGE_TYPE_LINK_REMOVE: Remove an existing Link - MESSAGE_TYPE_VERIFICATION_ADD_ETH_ADDRESS: Add a Verification of an Ethereum Address - MESSAGE_TYPE_VERIFICATION_REMOVE: Remove a Verification - MESSAGE_TYPE_USER_DATA_ADD: Add metadata about a user - MESSAGE_TYPE_USERNAME_PROOF: Add or replace a username proof - MESSAGE_TYPE_FRAME_ACTION: A Farcaster Frame action
    - `fid` integer, required — The unique identifier (FID) of the user who created this message. FIDs are assigned sequentially when users register on the network and cannot be changed.
    - `timestamp` integer, required — Seconds since Farcaster Epoch (2021-01-01T00:00:00Z). Used to order messages chronologically and determine the most recent state. Must be within 10 minutes of the current time when the message is created.
    - `network` 'FARCASTER_NETWORK_MAINNET' | 'FARCASTER_NETWORK_TESTNET' | 'FARCASTER_NETWORK_DEVNET', required — Farcaster network the message is intended for. - FARCASTER_NETWORK_MAINNET: Public primary network - FARCASTER_NETWORK_TESTNET: Public test network - FARCASTER_NETWORK_DEVNET: Private test network
    - `linkBody` LinkBody, required — Defines a social connection between users in the Farcaster network. Currently used to establish following relationships, allowing users to curate their content feed.
      - `type` 'follow', required — Defines the type of social connection between users. - follow: Establishes a following relationship where the user will receive updates from the target user in their feed
      - `displayTimestamp` integer — User-defined timestamp that preserves the original creation time when message.data.timestamp needs to be updated for compaction. Useful for maintaining chronological order in user feeds.
      - `targetFid` integer, required — Farcaster ID (FID). A unique identifier assigned to each user in the Farcaster network. This number is permanent and cannot be changed. FIDs are assigned sequentially when users register on the network.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.dev/neynar/apis/neynar-api.md) · [All operations](https://skmtc.dev/neynar/apis/neynar-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/neynar/neynar-api/revisions/dbb91bfb0d1a/schema)
