> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neynar.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Getting started with the Neynar Farcaster API

# Introduction

Neynar provides APIs to easily interact with the [Farcaster](https://www.farcaster.xyz) decentralized social protocol. These APIs let you query user data, social graphs, and content (casts), enabling you to build decentralized social apps quickly.

## Core Concepts

Farcaster has a few key primitives you'll interact with via the Neynar API:

* **User** — Each user has a permanent **FID** (Farcaster ID) that identifies them. Profile details such as username, display name, bio, and linked accounts are stored on-chain and mapped to this FID.
* **Cast** — A unit of content posted to Farcaster, similar to a tweet on X. Each cast has a unique **hash** and may contain text, media, embeds, and metadata.
* **Social Graph** — The network of follower/following relationships between users.
* **Feeds** — Collections of casts, often based on a user’s social graph, channel membership, or other filters.

All data is open and decentralized, available on Farcaster hubs. Neynar abstracts away the complexity of querying these hubs.

## Base URL

All requests to the Neynar API must be made to:

```
https://api.neynar.com
```

HTTPS is required for all requests. HTTP requests will be rejected.

## Authentication

All API endpoints require an API key. Include the following header with every request:

<ParamField header="x-api-key" type="string" example="NEYNAR_API_KEY" required>
  Your Neynar API key as a string.
</ParamField>

You can obtain your API key from the [Developer Portal](https://dev.neynar.com) after signing up.

<Info>
  Neynar APIs support payment per API request via [x402](https://www.x402.org/). API requests missing an API key header will see an x402 error to pay per request.
</Info>

## Examples

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={"system"}
    fetch('https://api.neynar.com/v2/farcaster/user/bulk?fids=1', {
      method: 'GET',
      headers: {
        'x-api-key': 'insert-your-api-key',
        'Content-Type': 'application/json'
      }
    })
    .then(response => response.json())
    .then(data => console.log(data));
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X GET "https://api.neynar.com/v2/farcaster/user/bulk?fids=1" \
      -H "x-api-key: insert-your-api-key" \
      -H "Content-Type: application/json"
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={"system"}
    import requests

    api_key = "insert-your-api-key"

    headers = {
        "x-api-key": api_key,
        "Content-Type": "application/json"
    }

    response = requests.get("https://api.neynar.com/v2/farcaster/user/bulk?fids=1", headers=headers)
    data = response.json()
    print(data)
    ```
  </Tab>
</Tabs>
