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

# Fetch Search Posts

> This endpoint retrieves information about Facebook Posts based on a specified search query and a location_uid. Use the end_cursor parameter to retrieve additional posts data if needed.



## OpenAPI

````yaml /openapi/facebook.openapi.json get /v1/data/facebook/fetch_search_posts
openapi: 3.0.0
info:
  title: agntdata Facebook API
  description: >-
    Unlock Facebook data effortlessly with our powerful scraping tools. Extract
    page names, URLs, contact info, likes, followers, posts, comments,
    Marketplace listings, and meta ads metrics. Perfect for market research,
    trend analysis, and optimizing marketing strategies.
  version: 1.0.0
  contact:
    name: agntdata
    url: https://agntdata.dev
servers:
  - url: https://api.agntdata.dev
    description: agntdata API
security:
  - ApiKeyAuth: []
tags:
  - name: Facebook Marketplace Listings
    description: ''
  - name: Facebook Posts Details
    description: ''
  - name: Facebook Search
    description: >-
      The Facebook Search API group provides a comprehensive set of endpoints to
      perform various types of searches across Facebook data, including posts,
      pages, people, and places. These endpoints enable users to retrieve
      targeted information based on specific query parameters and filters such
      as location, user identifiers, and other relevant attributes.
  - name: Meta Ads Library Search
    description: >-
      The Meta Ads Library Search allows you to search and retrieve detailed
      information from Meta’s Ad Library, providing insights into active and
      inactive ad campaigns across Facebook and Instagram. This tool is ideal
      for marketing analysis, competitor research, and understanding ad
      strategies.
  - name: Facebook Pages Details/Posts
    description: ''
  - name: 'Facebook Groups Details/Posts '
    description: ''
  - name: Facebook Download Media
    description: >-
      Download media (images, videos, audio) from Facebook URLs. Returns file
      size in MB and media type.
paths:
  /v1/data/facebook/fetch_search_posts:
    get:
      tags:
        - Facebook Search
      summary: Fetch Search Posts
      description: >-
        This endpoint retrieves information about Facebook Posts based on a
        specified search query and a location_uid. Use the end_cursor parameter
        to retrieve additional posts data if needed.
      operationId: Fetch_Search_Posts
      parameters:
        - name: start_time
          in: query
          required: false
          schema:
            type: string
        - name: recent_posts
          in: query
          required: false
          schema:
            type: boolean
        - name: end_time
          in: query
          required: false
          schema:
            type: string
        - name: query
          in: query
          required: true
          schema:
            type: string
            default: amsterdam
        - name: end_cursor
          in: query
          required: false
          schema:
            type: string
        - name: location_uid
          in: query
          required: false
          schema:
            type: number
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Get_facebook_fetch_search_posts_Response'
        '400':
          description: Bad request
        '401':
          description: Unauthorized - invalid API key
        '429':
          description: Rate limit exceeded
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Get_facebook_fetch_search_posts_Response:
      type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Bearer token. Pass your agntdata API key as: Authorization: Bearer
        agnt_live_...

````