GET/desearch/facebook/hashtag/{tag}

    Retrieve Facebook Hashtag Posts

    Retrieve normalized public Meta Ad Library records for a keyword/hashtag. Organic Facebook hashtag search and Facebook trending are intentionally omitted until a reliable public surface exists. Billing metadata: successful billable responses include the `X-Desearch-Cost-Usd`, `X-Desearch-Usage-Count`, `X-Desearch-Service`, and `X-Desearch-Currency` headers. JSON object responses also include optional `cost_usd`, `usage_count`, `service`, and `currency` fields. Current prices are at https://desearch.ai/pricing. JSON arrays, text, and streaming responses keep their body shape and expose billing metadata only through headers.

    Base URL

    https://api.desearch.ai

    Implementation guidance

    Use Retrieve Facebook Hashtag Posts when your application needs search-grounded AI results without maintaining its own crawler, social-data pipeline, or retrieval infrastructure. Although this route is named hashtag posts, its public source is Meta Ad Library: it returns normalized ad records for a keyword or hashtag. Organic Facebook hashtag search and Facebook trending are intentionally omitted until a reliable public surface exists. Put the required tag string in the path without a # prefix. The page limit is controlled by optional count, accepting integer values 1 through 100 and defaulting to 20. A response may contain fewer records than that limit. Begin without the optional cursor. To fetch a subsequent ad-record page, reuse the returned x-desearch-next-cursor value unchanged as the cursor for the identical hashtag route and tag. The header is absent once the last page is reached. A token is usable for 24 hours; a different route's or target's token, an expired token, or any other invalid cursor is rejected with 422 before a search runs and is not billed. The 200 body is allowed to be either an array of FacebookPost records or a JSON object. In an ad record, distinguish url, which remains the Ad Library or post URL, from linkUrl, which is the ad landing destination taken from snapshot.link_url. headline comes from snapshot.title, and linkDescription from snapshot.link_description. For the call to action, cta uses snapshot.cta_text, or a type such as SHOP_NOW if the payload has no button text. These ad text and link fields are nullable strings. Publisher destinations appear in the platforms string array, for example FACEBOOK and INSTAGRAM; the array is empty if the payload lists none. The nullable active boolean reflects Ad Library's is_active value and is omitted when the Library supplies no value. endDate is omitted if no end date is given; when the source date is a Unix timestamp, it is converted to an ISO 8601 UTC string. Core nullable string properties also include id, text, and createTime. hashtags holds strings, and media holds FacebookMedia entries with nullable type, url, and thumbnail strings and nullable integer dimensions width and height. The record's author and stats can each be null. FacebookPostStats allows nullable integer totals for reactionCount, commentCount, shareCount, and viewCount; its nullable reactions object contains integer values by reaction type when Facebook shows a breakdown. Successful billable ad-record responses expose request cost in X-Desearch-Cost-Usd, usage in X-Desearch-Usage-Count, service in X-Desearch-Service, and currency in X-Desearch-Currency. Object bodies may also contain optional cost_usd, usage_count, service, and currency; list bodies carry billing only via headers. For posts from a particular page or profile, use Facebook profile posts. The Facebook API overview provides the route-family context. The endpoint returns structured data that can be consumed by agents, research tools, dashboards, and retrieval-augmented generation workflows. Keep the request focused on the minimum fields your workflow needs so responses remain fast and easy to validate.

    Send requests to GET /desearch/facebook/hashtag/{tag} with your Desearch API key in the authorization header. Treat the key as a server-side secret, validate all required parameters before sending the request, and handle non-2xx responses explicitly. Production integrations should use sensible timeouts, retry only transient failures with backoff, and record the response status and request identifier for troubleshooting.

    Test the example request below before integrating it into a larger workflow. Confirm that the returned fields, links, and timestamps meet your freshness requirements, then add schema validation at the application boundary. For agentic systems, preserve source URLs with the generated answer so users can inspect evidence and your application can avoid presenting unsupported claims.

    Path Parameters

    tagstringrequired

    Hashtag without #

    Query Parameters

    countinteger

    Maximum number of items to return. A page may hold fewer.

    Default: 20

    cursorstring

    Opaque pagination cursor. Omit it for the first page. For the next page, send the `x-desearch-next-cursor` response header from the previous page back unchanged, on the same route with the same target (username, tag, post, or search query). A cursor is valid for 24 hours. Any other value, including an expired cursor or one issued by a different route or target, returns 422 and is not charged.

    Responses

    200A list of normalized Facebook posts.
    301Moved Permanently
    304Not Modified
    401Unauthorized
    422Validation Error, or the `cursor` is not one this route issued for this target, or it has expired. An invalid cursor is rejected before any search runs and is not charged.
    429Too Many Requests
    500Internal Server Error
    Authorization

    Your API key is sent in the Authorization header.

    Request
    curl -X GET "https://api.desearch.ai/desearch/facebook/hashtag/bittensor" \
      -H "Authorization: YOUR_API_KEY" \
      -H "Content-Type: application/json"
    GET /desearch/facebook/hashtag/{tag}
    ResponseSchema
    [
      {
        "id": "1525856912919657",
        "url": "https://www.facebook.com/facebook/posts/1525856912919657",
        "text": "Post text",
        "createTime": "2026-05-01T10:00:00Z",
        "author": {
          "id": "123456789",
          "username": "facebook",
          "name": "Desearch AI",
          "url": "https://www.facebook.com/facebook",
          "avatar": "https://example.com/avatar.jpg",
          "verified": true,
          "bio": "Public search API",
          "category": "Software",
          "followers": 50000,
          "likes": 12000,
          "email": "hello@example.com",
          "phone": "+995 32 2 00 00 00",
          "website": "https://example.com",
          "address": "Tbilisi, Georgia"
        },
        "stats": {
          "reactionCount": 1200,
          "reactions": {
            "anger": 5,
            "haha": 30,
            "like": 1000,
            "love": 150,
            "sad": 5,
            "wow": 10
          },
          "commentCount": 80,
          "shareCount": 24,
          "viewCount": 10000
        },
        "media": [
          {
            "type": "photo",
            "url": "https://example.com/photo.jpg",
            "thumbnail": "https://example.com/thumb.jpg",
            "width": 1200,
            "height": 630
          }
        ],
        "hashtags": [
          "string"
        ],
        "linkUrl": "string",
        "cta": "string",
        "headline": "string",
        "linkDescription": "string",
        "endDate": "string",
        "active": true,
        "platforms": [
          "string"
        ]
      }
    ]
    Status codes200301304401422429500