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

# Search marketplace

<div className="inline-flex items-center gap-2 px-4 py-2 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg">
  <span className="text-base">🪙</span>
  <span className="text-sm font-medium text-yellow-900 dark:text-yellow-100"><span className="font-semibold">4 credits</span><span className="text-yellow-700 dark:text-yellow-300 ml-1">per request</span></span>
</div>

## Copy for AI

<div className="my-6 rounded-xl border border-gray-200 bg-gray-50 p-5 dark:border-gray-800 dark:bg-gray-900/40">
  <div className="min-w-0">
    <p className="text-base font-semibold text-gray-900 dark:text-gray-100">🤖 Why Code When AI Can Do It For You?</p>
    <p className="mt-1 text-sm text-gray-700 dark:text-gray-300">Stop writing code like it's 1970! Let AI do the heavy lifting - click the sparkles to copy a perfectly formatted prompt for ChatGPT, Claude, or your favorite AI assistant.</p>
  </div>

  <div className="mt-4">
    <button
      type="button"
      className="inline-flex items-center gap-2 rounded-md border border-emerald-300 bg-emerald-50 px-3 py-2 text-sm font-medium text-emerald-800 hover:bg-emerald-100 dark:border-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-100 dark:hover:bg-emerald-900/50"
      onClick={() => navigator.clipboard.writeText(`I need to call the following KeyAPI endpoint. Please generate a complete and directly runnable Python example based on the API information provided below.

## API Information

Endpoint: GET https://api.keyapi.ai/v1/facebook/marketplace_search
Summary: Search marketplace

Required Headers:
- Authorization: Bearer <YOUR_API_KEY>

Parameters:
- query (Required): No description. Example: pizza
- lat (Optional): No description.
- lng (Optional): No description.
- price_min (Optional): No description.
- price_max (Optional): No description.
- radius_km (Optional): No description.
- condition (Optional): Available values(multiple selections allowed): used_like_new used_good used_fair new. Example: used_like_new,used_good
- category (Optional): cars, boats etc. Example: cars
- cursor (Optional): No description.

## Code Requirements

- Use the Python \`requests\` library
- Provide a complete and directly runnable example
- Handle HTTP request errors, timeouts, and non-2xx responses
- Handle JSON parsing errors
- Prefer the Example values provided in the API information for sample parameters
- Keep the code simple and avoid unnecessary abstractions or complexity`)}
    >
      <span>✨</span>
      <span>Copy for AI</span>
    </button>
  </div>
</div>


## OpenAPI

````yaml /en/facebook.openapi.json get /v1/facebook/marketplace_search
openapi: 3.0.1
info:
  title: Facebook API English documentation
  description: >-
    The english reference documentation of the Facebook API includes the
    interface's purpose, parameter description, response status, and sample
    structure.
  version: 1.0.0
servers:
  - url: https://api.keyapi.ai
    description: Production-KeyAPI
security:
  - JWT Bearer: []
tags:
  - name: Pages
  - name: Prefiles
  - name: Groups
  - name: Posts and comments
  - name: Evebts
  - name: Ads Library
  - name: Search
  - name: Marketplace
  - name: Games
paths:
  /v1/facebook/marketplace_search:
    get:
      tags:
        - Marketplace
      summary: Search marketplace
      parameters:
        - name: query
          in: query
          description: ''
          required: true
          example: pizza
          schema:
            type: string
            example: pizza
        - name: lat
          in: query
          description: ''
          required: false
          schema:
            type: number
            default: 40.7128
        - name: lng
          in: query
          description: ''
          required: false
          schema:
            type: number
            default: -74.006
        - name: price_min
          in: query
          description: ''
          required: false
          schema:
            type: number
        - name: price_max
          in: query
          description: ''
          required: false
          schema:
            type: number
        - name: radius_km
          in: query
          description: ''
          required: false
          schema:
            type: number
        - name: condition
          in: query
          description: |-
            Available values(multiple selections allowed): 
            used_like_new
            used_good
            used_fair
            new
          required: false
          schema:
            type: string
            example: used_like_new,used_good
        - name: category
          in: query
          description: cars, boats etc
          required: false
          schema:
            type: string
            example: cars
        - name: cursor
          in: query
          description: ''
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example:
                code: 0
                message: success
                data:
                  results: []
                  cursor: >-
                    eyJwZyI6MCwiYjJjIjp7ImJyIjoiIiwiaXQiOjAsImhtc3IiOmZhbHNlLCJ0YmkiOjB9LCJjMmMiOnsiYnIiOiJBYnJueXZuMlNycXV6YU9KWnc5S0N4M1M2d1hSZjRVdnl6NWZNbGEzY2xqR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0X2FkIjowLCJwYWdlX29yZ2FuaWNfY291bnQiOjAsImJsZW5kZWRfb3JnYW5pY19pbmRleCI6MCwicmV0dXJuZWRfYWRfaW5kZXgiOjAsInRvdGFsX2luZGV4IjowfX0=
                requestId: 01e639d6-cfca-4291-868d-38c7315fe487
          headers: {}
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '402':
          $ref: '#/components/responses/402'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      deprecated: false
      security:
        - JWT Bearer: []
components:
  responses:
    '400':
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            example:
              code: 400
              data: null
              message: 'Missing required parameter: handle'
    '401':
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            example:
              code: 401
              data: null
              message: apiKey is null
    '402':
      description: Payment Required
      content:
        application/json:
          schema:
            type: object
            example:
              code: 402
              data: null
              message: apiKey quota is not enough
    '429':
      description: Too Many Requests
      content:
        application/json:
          schema:
            type: object
            example:
              code: 429
              data: null
              message: qps limit exceeded
    '500':
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            example:
              code: 500
              data: null
              message: Internal server error
  securitySchemes:
    JWT Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |-
        API key for authentication. Format: `sk_live_xxxxxxxxxxxxx`
        Get your API key from the [Dashboard](http://keyapi.ai/app/dashboard).

````