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

# /crates/packages/search

> Search crates.io Rust crates by query, category, keyword, owner, or letter

**Price:** 5 credits per 100 results



## OpenAPI

````yaml /openapi/package-registries.json post /api/crates/packages/search
openapi: 3.1.0
info:
  title: Any Site API
  description: >+
    Any Site API provides programmatic access to data from LinkedIn, Instagram,
    Twitter, and other platforms.


    ## Authentication


    All API endpoints require an `access-token` header with a valid API token.
    Tokens can be created in the [dashboard](https://app.anysite.io/).


    ## Pricing


    Each endpoint has a credit cost listed in its description. Credits are
    deducted from your token balance per request.

  version: 0.0.1
servers: []
security:
  - AccessToken: []
paths:
  /api/crates/packages/search:
    post:
      tags:
        - /crates
      summary: /crates/packages/search
      description: >-
        Search crates.io Rust crates by query, category, keyword, owner, or
        letter


        **Price:** 5 credits per 100 results
      operationId: __api_crates_packages_search_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CratesPackagesSearchPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CratesCrate'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CratesPackagesSearchPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        query:
          anyOf:
            - type: string
            - type: 'null'
        count:
          type: integer
          minimum: 1
        sort:
          $ref: '#/components/schemas/CratesSort'
          default: relevance
        category:
          anyOf:
            - type: string
            - type: 'null'
        keyword:
          anyOf:
            - type: string
            - type: 'null'
        all_keywords:
          anyOf:
            - type: string
            - type: 'null'
        user_id:
          anyOf:
            - type: integer
            - type: 'null'
        team_id:
          anyOf:
            - type: integer
            - type: 'null'
        letter:
          anyOf:
            - type: string
              maxLength: 1
              minLength: 1
            - type: 'null'
      type: object
      required:
        - count
    CratesCrate:
      properties:
        '@type':
          type: string
          default: CratesCrate
        name:
          type: string
        homepage_url:
          anyOf:
            - type: string
            - type: 'null'
        documentation_url:
          anyOf:
            - type: string
            - type: 'null'
        repository_url:
          anyOf:
            - type: string
            - type: 'null'
        download_count:
          type: integer
          default: 0
        recent_download_count:
          type: integer
          default: 0
        version_count:
          type: integer
          default: 0
        default_version:
          anyOf:
            - type: string
            - type: 'null'
        newest_version:
          anyOf:
            - type: string
            - type: 'null'
        max_version:
          anyOf:
            - type: string
            - type: 'null'
        max_stable_version:
          anyOf:
            - type: string
            - type: 'null'
        is_yanked:
          type: boolean
          default: false
        exact_match:
          anyOf:
            - type: boolean
            - type: 'null'
        keywords:
          items:
            type: string
          type: array
          default: []
        categories:
          items:
            type: string
          type: array
          default: []
        created_at:
          type: string
          default: ''
        updated_at:
          type: string
          default: ''
        web_url:
          type: string
          default: ''
      type: object
      required:
        - name
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    CratesSort:
      type: string
      enum:
        - relevance
        - downloads
        - recent-downloads
        - recent-updates
        - new
        - alpha
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````