> ## 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

> Get crates.io crate details by crate name or crate URL

**Price:** 10 credits

**⚠️ Common errors:** 412: Crate not found



## OpenAPI

````yaml /openapi/package-registries.json post /api/crates/packages
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:
    post:
      tags:
        - /crates
      summary: /crates/packages
      description: |-
        Get crates.io crate details by crate name or crate URL

        **Price:** 10 credits

        **⚠️ Common errors:** 412: Crate not found
      operationId: __api_crates_packages_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CratesPackagePayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CratesPackage'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CratesPackagePayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        package:
          type: string
          minLength: 1
      type: object
      required:
        - package
    CratesPackage:
      properties:
        '@type':
          type: string
          default: CratesPackage
        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: ''
        versions:
          items:
            $ref: '#/components/schemas/CratesVersion'
          type: array
          default: []
        category_details:
          items:
            $ref: '#/components/schemas/CratesCategory'
          type: array
          default: []
        keyword_details:
          items:
            $ref: '#/components/schemas/CratesKeyword'
          type: array
          default: []
      type: object
      required:
        - name
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    CratesVersion:
      properties:
        '@type':
          type: string
          default: CratesVersion
        id:
          anyOf:
            - type: integer
            - type: 'null'
        crate:
          type: string
          default: ''
        version:
          type: string
          default: ''
        download_count:
          type: integer
          default: 0
        license:
          anyOf:
            - type: string
            - type: 'null'
        features:
          additionalProperties:
            items:
              type: string
            type: array
          type: object
          default: {}
        is_yanked:
          type: boolean
          default: false
        yank_message:
          anyOf:
            - type: string
            - type: 'null'
        crate_size:
          anyOf:
            - type: integer
            - type: 'null'
        checksum:
          anyOf:
            - type: string
            - type: 'null'
        rust_version:
          anyOf:
            - type: string
            - type: 'null'
        edition:
          anyOf:
            - type: string
            - type: 'null'
        has_lib:
          type: boolean
          default: false
        bin_names:
          items:
            type: string
          type: array
          default: []
        homepage_url:
          anyOf:
            - type: string
            - type: 'null'
        documentation_url:
          anyOf:
            - type: string
            - type: 'null'
        repository_url:
          anyOf:
            - type: string
            - type: 'null'
        download_url:
          anyOf:
            - type: string
            - type: 'null'
        readme_url:
          anyOf:
            - type: string
            - type: 'null'
        code_line_count:
          anyOf:
            - type: integer
            - type: 'null'
        comment_line_count:
          anyOf:
            - type: integer
            - type: 'null'
        published_by:
          anyOf:
            - $ref: '#/components/schemas/CratesPublisher'
            - type: 'null'
        created_at:
          type: string
          default: ''
        updated_at:
          type: string
          default: ''
      type: object
    CratesCategory:
      properties:
        '@type':
          type: string
          default: CratesCategory
        id:
          type: string
          default: ''
        name:
          type: string
          default: ''
        slug:
          type: string
          default: ''
        crate_count:
          type: integer
          default: 0
        created_at:
          type: string
          default: ''
      type: object
    CratesKeyword:
      properties:
        '@type':
          type: string
          default: CratesKeyword
        id:
          type: string
          default: ''
        keyword:
          type: string
          default: ''
        crate_count:
          type: integer
          default: 0
        created_at:
          type: string
          default: ''
      type: object
    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
    CratesPublisher:
      properties:
        '@type':
          type: string
          default: CratesPublisher
        id:
          anyOf:
            - type: integer
            - type: 'null'
        login:
          type: string
          default: ''
        name:
          anyOf:
            - type: string
            - type: 'null'
        image:
          anyOf:
            - type: string
            - type: 'null'
        url:
          anyOf:
            - type: string
            - type: 'null'
        created_at:
          anyOf:
            - type: string
            - type: 'null'
      type: object
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````