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

# बुकमार्क्स लुकअप

> अपनी बुकमार्क की गई पोस्ट्स प्राप्त करें

export const Button = ({href, children}) => {
  return <div className="not-prose group">
    <a href={href}>
      <button className="flex items-center space-x-2.5 py-1 px-4 bg-primary-dark dark:bg-white text-white dark:text-gray-950 rounded-full group-hover:opacity-[0.9] font-medium">
        <span>
          {children}
        </span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

यह गाइड आपको X API का उपयोग करके अपनी बुकमार्क की गई पोस्ट्स प्राप्त करने का तरीका बताती है।

<Note>
  **पूर्वापेक्षाएँ**

  शुरू करने से पहले, आपके पास ये होने चाहिए:

  * एक स्वीकृत App के साथ [डेवलपर खाता](https://developer.x.com/en/portal/petition/essential/basic-info)
  * `bookmark.read` स्कोप वाला User Access Token (OAuth 2.0 PKCE)
</Note>

***

<div id="get-your-bookmarks">
  ## अपने बुकमार्क प्राप्त करें
</div>

<Steps>
  <Step title="अपनी उपयोगकर्ता ID प्राप्त करें">
    आपको अपने प्रमाणीकृत उपयोगकर्ता की ID चाहिए। आप इसे `/2/users/me` एंडपॉइंट का उपयोग करके या [user lookup endpoint](/hi/x-api/users/lookup/introduction) से ढूंढ सकते हैं।
  </Step>

  <Step title="अपने बुकमार्क का अनुरोध करें">
    <CodeGroup dropdown>
      ```bash cURL theme={null}
      curl "https://api.x.com/2/users/2244994945/bookmarks?\
      tweet.fields=created_at,public_metrics,author_id&\
      max_results=10" \
        -H "Authorization: Bearer $USER_ACCESS_TOKEN"
      ```

      ```python Python SDK theme={null}
      from xdk import Client

      client = Client(bearer_token="YOUR_USER_ACCESS_TOKEN")

      # पेजिनेशन के साथ बुकमार्क की गई पोस्ट्स प्राप्त करें
      for page in client.bookmarks.get(
          "2244994945",
          tweet_fields=["created_at", "public_metrics", "author_id"],
          max_results=10
      ):
          for post in page.data:
              print(f"{post.text[:50]}... - Likes: {post.public_metrics.like_count}")
      ```

      ```javascript JavaScript SDK theme={null}
      import { Client } from "@xdevplatform/xdk";

      const client = new Client({ accessToken: "YOUR_USER_ACCESS_TOKEN" });

      // पेजिनेशन के साथ बुकमार्क की गई पोस्ट्स प्राप्त करें
      const paginator = client.bookmarks.get("2244994945", {
        tweetFields: ["created_at", "public_metrics", "author_id"],
        maxResults: 10,
      });

      for await (const page of paginator) {
        page.data?.forEach((post) => {
          console.log(`${post.text?.slice(0, 50)}... - Likes: ${post.public_metrics?.like_count}`);
        });
      }
      ```
    </CodeGroup>
  </Step>

  <Step title="रिस्पॉन्स की समीक्षा करें">
    ```json theme={null}
    {
      "data": [
        {
          "id": "1501258597237342208",
          "text": "Have you built a project using the X API you'd like to share with the community? We'd love to hear from you!",
          "created_at": "2024-01-15T10:30:00.000Z",
          "author_id": "2244994945",
          "public_metrics": {
            "retweet_count": 15,
            "reply_count": 8,
            "like_count": 89,
            "quote_count": 3
          }
        },
        {
          "id": "1501258542258348032",
          "text": "This is just one way developer innovation helps make X a better place...",
          "created_at": "2024-01-15T09:15:00.000Z",
          "author_id": "2244994945",
          "public_metrics": {
            "retweet_count": 22,
            "reply_count": 5,
            "like_count": 156,
            "quote_count": 7
          }
        }
      ],
      "meta": {
        "result_count": 2,
        "next_token": "7140dibdnow9c7btw4539n0vybdnx19ylpayqf16fjt4l"
      }
    }
    ```
  </Step>
</Steps>

***

<div id="include-author-information">
  ## लेखक की जानकारी शामिल करें
</div>

पोस्ट के लेखकों का डेटा पाने के लिए expansions का उपयोग करें:

<CodeGroup dropdown>
  ```bash cURL theme={null}
  curl "https://api.x.com/2/users/2244994945/bookmarks?\
  tweet.fields=created_at,author_id&\
  expansions=author_id&\
  user.fields=username,verified" \
    -H "Authorization: Bearer $USER_ACCESS_TOKEN"
  ```

  ```python Python SDK theme={null}
  from xdk import Client

  client = Client(bearer_token="YOUR_USER_ACCESS_TOKEN")

  # लेखक की जानकारी के साथ बुकमार्क पाएं
  for page in client.bookmarks.get(
      "2244994945",
      tweet_fields=["created_at", "author_id"],
      expansions=["author_id"],
      user_fields=["username", "verified"]
  ):
      for post in page.data:
          print(f"{post.text[:50]}...")
      # लेखक की जानकारी page.includes.users में होती है
  ```

  ```javascript JavaScript SDK theme={null}
  import { Client } from "@xdevplatform/xdk";

  const client = new Client({ accessToken: "YOUR_USER_ACCESS_TOKEN" });

  // लेखक की जानकारी के साथ बुकमार्क पाएं
  const paginator = client.bookmarks.get("2244994945", {
    tweetFields: ["created_at", "author_id"],
    expansions: ["author_id"],
    userFields: ["username", "verified"],
  });

  for await (const page of paginator) {
    page.data?.forEach((post) => {
      console.log(`${post.text?.slice(0, 50)}...`);
    });
    // लेखक की जानकारी page.includes?.users में होती है
  }
  ```
</CodeGroup>

***

<div id="required-scopes">
  ## आवश्यक स्कोप
</div>

OAuth 2.0 PKCE का उपयोग करते समय, आपके access token में ये स्कोप होने चाहिए:

| Scope           | विवरण                                     |
| :-------------- | :---------------------------------------- |
| `bookmark.read` | बुकमार्क पढ़ें                            |
| `tweet.read`    | पोस्ट डेटा पढ़ें                          |
| `users.read`    | उपयोगकर्ता डेटा पढ़ें (expansions के लिए) |

***

<div id="next-steps">
  ## अगले चरण
</div>

<CardGroup cols={2}>
  <Card title="बुकमार्क प्रबंधित करें" icon="bookmark" href="/hi/x-api/posts/bookmarks/quickstart/manage-bookmarks">
    बुकमार्क जोड़ें और हटाएँ
  </Card>

  <Card title="API संदर्भ" icon="code" href="/hi/x-api/posts/get-users-bookmarks">
    एंडपॉइंट का पूरा दस्तावेज़ीकरण
  </Card>
</CardGroup>
