> ## 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.

# Write Casts to Channel

> Step-by-step guide to posting casts and content to specific Farcaster channels using Neynar SDK. Learn channel mechanics, parent URL mapping, and how to write engaging content to community channels like memes, with complete code examples and best practices.

Channels are "subreddits inside Farcaster." Technically, a channel is a collection of casts that share a common parent\_url. For example, the [memes channel](https://warpcast.com/~/channel/memes) is a collection of casts that share the parent\_url `chain://eip155:1/erc721:0xfd8427165df67df6d7fd689ae67c8ebf56d9ca61`.

## How to Post to Farcaster Channels

Got a dank meme you want to share with Farcaster? This guide demonstrates how to use the Neynar SDK to post a cast to a channel.

Check out this [Getting started guide](/docs/getting-started-with-neynar) to learn how to set up your environment and get an API key.

Before all that, initialize Neynar client:

<CodeGroup>
  ```javascript Javascript theme={"system"}
  // npm i @neynar/nodejs-sdk
  import { NeynarAPIClient, Configuration } from "@neynar/nodejs-sdk";
  import { FeedType } from "@neynar/nodejs-sdk/build/api";

  // make sure to set your NEYNAR_API_KEY .env
  // don't have an API key yet? get one at neynar.com
  const config = new Configuration({
    apiKey:process.env.NEYNAR_API_KEY",
  });

  const client = new NeynarAPIClient(config);
  const signer = process.env.NEYNAR_SIGNER;
  ```
</CodeGroup>

Poast meme to memes channel

<Info>
  ### channel\_name to parent\_url mapping

  All parent\_url to channel\_name mappings can be found at this [Github repo](https://github.com/neynarxyz/farcaster-channels/blob/main/warpcast.json), along with other channel metadata.

  This repo is open source so feel free to submit PRs for additional channel data if you see anything missing.
</Info>

<CodeGroup>
  ```javascript Javascript theme={"system"}
  const memesChannelUrl =
    "chain://eip155:1/erc721:0xfd8427165df67df6d7fd689ae67c8ebf56d9ca61";
  const memeUrl = "https://i.imgur.com/cniMfvm.jpeg";
  const signerUuid =signer;
  const text="me irl";
  const embeds = [
    {
      url: memeUrl,
    },
  ];
  const replyTo = memesChannelUrl;

  const result = await client.publishCast({signerUuid, text,
    embeds,
    parent: replyTo,
  });
  ```
</CodeGroup>

Example output:

```json theme={"system"}
{
  hash: "0xccabe27a04b1a63a7a24a035b0ffc2a2629e1af1",
  author: {
    object: "user",
    fid: 4640,
    custody_address: "0x86dd7e4af49829b895d24ea2ab581c7c32e87332",
    username: "picture",
    display_name: "Picture",
    pfp_url: "https://lh3.googleusercontent.com/erYudyT5dg9E_esk8I1kqB4bUJjWAmlNu4VRnv9iUuq_by7QjoDtZzj_mjPqel4NYQnvqYr1R54m9Oxp9moHQkierpY8KcYLxyIJ",
    profile: {
      bio: [Object ...]
    },
    follower_count: 45,
    following_count: 124,
    verifications: [],
    active_status: "inactive"
  },
  text: "me irl"
}
```

There you go, make sure to share your good memes with the Farcaster!

<Frame>
  <img src="https://mintcdn.com/neynar/4PNY113y9N9T-r9z/images/docs/bf33b4d-image.png?fit=max&auto=format&n=4PNY113y9N9T-r9z&q=85&s=9408d574a61423a21953211d783b1a3b" alt="Meme posted to memes channel" width="623" height="479" data-path="images/docs/bf33b4d-image.png" />
</Frame>

<Info>
  ### Ready to start building?

  Get your subscription at [neynar.com](https://neynar.com) and reach out to us on [Slack](https://neynar.com/slack) with any questions!
</Info>
