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

# Search the web (v2)

> Perform a web search and return results using the v2 API



## OpenAPI

````yaml https://api.weblinq.dev/doc post /v2/web/search
openapi: 3.0.0
info:
  version: 1.0.0
  title: WebLinq API
  description: WebLinq API for web scraping, search, and content extraction
servers:
  - url: https://api.weblinq.dev
    description: Production API Server
  - url: http://localhost:8787
    description: Local Development Server
security: []
paths:
  /v2/web/search:
    post:
      tags:
        - Web v2
      summary: Search the web (v2)
      description: Perform a web search and return results using the v2 API
      requestBody:
        description: Search parameters
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                  minLength: 1
                  maxLength: 500
                limit:
                  type: number
                  minimum: 1
                  maximum: 20
                  default: 10
              required:
                - query
      responses:
        '200':
          description: Search completed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      results:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            title:
                              type: string
                            url:
                              type: string
                              format: uri
                            snippet:
                              type: string
                            favicon:
                              type: string
                            publishedDate:
                              type: string
                          required:
                            - id
                            - title
                            - url
                            - snippet
                      metadata:
                        type: object
                        properties:
                          query:
                            type: string
                          totalResults:
                            type: number
                          searchTime:
                            type: number
                          timestamp:
                            type: string
                          requestId:
                            type: string
                        required:
                          - query
                          - totalResults
                          - searchTime
                          - timestamp
                    required:
                      - results
                      - metadata
                  creditsCost:
                    type: number
                    description: Credits consumed by this operation
                  requestId:
                    type: string
                    format: uuid
                    description: Unique request identifier for tracing
                  timestamp:
                    type: string
                    format: date-time
                    description: ISO timestamp when the response was generated
                required:
                  - success
                  - data
                  - requestId
                  - timestamp
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      code:
                        type: string
                      requestId:
                        type: string
                        format: uuid
                    required:
                      - message
                      - code
                required:
                  - success
                  - error
                example:
                  success: false
                  error:
                    message: Authentication required
                    code: UNAUTHORIZED
                    requestId: bf68e5de-f6ef-479f-9328-6d3f48d5b7d4
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: object
                    properties:
                      issues:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                            path:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                            message:
                              type: string
                          required:
                            - code
                            - path
                      name:
                        type: string
                    required:
                      - issues
                      - name
                    example:
                      issues:
                        - code: invalid_type
                          expected: string
                          received: undefined
                          path:
                            - query
                          message: Required
                      name: ZodError
                required:
                  - success
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      code:
                        type: string
                      requestId:
                        type: string
                        format: uuid
                    required:
                      - message
                      - code
                required:
                  - success
                  - error
                example:
                  success: false
                  error:
                    message: Authentication required
                    code: UNAUTHORIZED
                    requestId: bf68e5de-f6ef-479f-9328-6d3f48d5b7d4
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Enter your API token or session token

````