Search

The Search API allows you to discover and filter microIP-enriched assets based on various criteria. This guide covers search functionality and filtering options.

Search Assets

Search for assets with microIP licenses using various filters and criteria.

curl -X GET https://api.ipto.ai/search \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "machine learning",
    "category": "code",
    "quality": "premium",
    "min_price": 0.1,
    "max_price": 1.0,
    "tags": ["python", "tensorflow"],
    "page": 1,
    "limit": 10
  }'

Request Parameters

ParameterTypeRequiredDescription
queryStringYesSearch query string
categoryStringNoAsset category filter
qualityStringNoQuality level filter
min_priceNumberNoMinimum price in SOL
max_priceNumberNoMaximum price in SOL
tagsArrayNoArray of tags to filter by
pageIntegerNoPage number (default: 1)
limitIntegerNoItems per page (default: 10)

Response

[
  {
    "name": "Machine Learning Model",
    "description": "Advanced ML model for image recognition",
    "file_url": "https://storage.ipto.ai/assets/123",
    "metadata": {
      "file_name": "model.py",
      "file_size": 1024000,
      "file_type": "py",
      "mime_type": "text/x-python",
      "created_at": "2024-03-21T10:00:00Z",
      "last_modified": "2024-03-21T10:00:00Z"
    },
    "created_at": "2024-03-21T10:00:00Z",
    "owner_id": "user_123",
    "is_public": true,
    "micro_ip": {
      "name": "Machine Learning Model",
      "description": "Advanced ML model for image recognition",
      "long_summary": "A state-of-the-art machine learning model...",
      "tags": ["python", "tensorflow", "machine-learning"],
      "category": "code",
      "questions": [
        "What problem does this solve?",
        "How is it implemented?",
        "What are the key features?"
      ],
      "quality": "premium",
      "on_chain_id": "0x123...",
      "created_at": "2024-03-21T10:00:00Z",
      "updated_at": "2024-03-21T10:00:00Z",
      "price": 0.5,
      "license_type": "standard"
    },
    "total_earnings": 10.5,
    "total_views": 100,
    "total_downloads": 21,
    "is_verified": true
  }
  // ... more results
]

Asset Categories

Available categories for filtering:

CategoryDescription
codeSoftware code and scripts
designDesign files and assets
documentText documents and PDFs
audioAudio files and music
videoVideo content
imageImages and graphics
datasetData sets and collections
otherOther types of assets

Quality Levels

Available quality levels for filtering:

LevelDescription
premiumHigh-quality, well-documented assets
standardGood quality with basic documentation
basicBasic quality with minimal documentation

Search Tips

  1. Use specific keywords in your query
  2. Combine multiple filters for better results
  3. Use tags to find related assets
  4. Set price ranges to find affordable assets
  5. Filter by quality for better reliability

Error Responses

Invalid Category

{
  "detail": "Invalid category specified"
}

Invalid Quality Level

{
  "detail": "Invalid quality level specified"
}

Invalid Price Range

{
  "detail": "Invalid price range specified"
}

Best Practices

  1. Start with broad searches and narrow down
  2. Use relevant tags for better results
  3. Check asset quality before purchasing
  4. Review asset documentation
  5. Consider price vs. value