DEV Community

Cover image for I Built a Search API That Actually Understands YOUR Content (Not the Entire Internet)
Rafał Groń
Rafał Groń

Posted on

I Built a Search API That Actually Understands YOUR Content (Not the Entire Internet)

Here's the problem with most search solutions:

They either search the entire internet (like ChatGPT) or use exact keyword matching.

Neither knows about YOUR specific products, YOUR terminology, YOUR content.

So I built Queryra - a semantic search API that trains ONLY on YOUR data.


The ChatGPT Problem

ChatGPT is incredible for text generation. But for search? It has a fundamental flaw:

ChatGPT searches the ENTIRE INTERNET

When your user searches "laptop", ChatGPT might return:

  • Random laptops from across the web ❌
  • Generic laptop buying advice ❌
  • Products you don't even sell ❌

What you actually need:

  • Only YOUR laptops ✅
  • From YOUR database ✅
  • With YOUR product IDs ✅

ChatGPT doesn't know YOUR content. It's trained on billions of web pages - not your specific 500 products.


The Keyword Search Problem

Default WordPress/WooCommerce search is even worse:

User searches: "gift for girlfriend"

WordPress keyword search returns:

  • Posts with exact word "gift" ✅
  • Posts with exact word "girlfriend" ✅
  • But NOT "jewelry", "perfume", or "accessories" ❌

Why? Because it only matches exact words.


The Solution: Train AI on YOUR Database

Queryra works differently:

  1. You sync YOUR content (products, posts, articles)
  2. We train ONLY on YOUR data
  3. Search returns ONLY YOUR results with YOUR IDs

It's like having an AI assistant that ONLY knows about your business.


How It Works

Step 1: Sync Your Content (One-Time)

<?php
// Send YOUR products with YOUR database IDs
$products = [
    [
        'id' => 123,  // Your database ID
        'name' => 'Gaming Laptop',
        'description' => 'High-performance laptop for developers',
        'price' => 1299
    ],
    [
        'id' => 456,  // Your database ID
        'name' => 'Wireless Mouse',
        'description' => 'Ergonomic mouse for programming',
        'price' => 49
    ]
];

$ch = curl_init('https://queryra.com/api/v1/records/bulk');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'X-API-Key: your_api_key',
    'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($products));
curl_exec($ch);
Enter fullscreen mode Exit fullscreen mode

Step 2: Search Returns YOUR IDs

<?php
function search($query) {
    $url = 'https://queryra.com/api/v1/search?q=' . urlencode($query);

    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-API-Key: your_api_key']);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    $response = curl_exec($ch);
    return json_decode($response);
}

// User searches
$results = search('gift for girlfriend');

// API returns YOUR product IDs:
// [
//   {'id': 789, 'name': 'Necklace', 'relevance': 0.92},
//   {'id': 234, 'name': 'Perfume', 'relevance': 0.89},
//   {'id': 567, 'name': 'Ring', 'relevance': 0.85}
// ]

// Use YOUR IDs to fetch from YOUR database
// No need to change your database structure!
Enter fullscreen mode Exit fullscreen mode

Perfect for WordPress - you get back post IDs or product IDs you already have. No integration headaches.


Real Example

E-commerce Store

User searches: "gift for girlfriend"

Keyword search (default):

  • 0 results (those words not in any product) ❌

Queryra semantic search:

  • Jewelry ✅
  • Perfumes ✅
  • Accessories ✅
  • Skincare ✅

Even if "girlfriend" or "gift" aren't in any product description!


Why This Matters

You Keep Control

Feature ChatGPT Keyword Search Queryra
Searches Entire internet Your content YOUR content only
Returns Generic results Exact matches Your IDs + relevance
Understanding General knowledge Word matching Semantic meaning
Speed 2-5 seconds Fast <500ms
Your database Not integrated Built-in Returns YOUR IDs

Perfect for WordPress/WooCommerce

Don't want to code? Use the WordPress plugin:

WordPress Plugin (GitHub)

  • Install plugin
  • Enter API key
  • Click "Sync"
  • Done!

Your search now understands:

  • "laptop" = "notebook", "computer"
  • "cheap" = "affordable", "budget"
  • "gift" = related products

Download: github.com/GronRafal/queryra-wordpress-plugin

Docs: queryra.com/docs/wordpress-integration


Use Cases

1. E-commerce

User searches: "home office setup"
Finds: Desk, chair, monitor, keyboard (even without those exact words)

2. Knowledge Base

User searches: "reset password"
Finds: Login help, account recovery, authentication

3. Job Board

User searches: "remote developer"
Finds: "Work from home engineer", "distributed team"

4. Content Sites

User searches: "lose weight"
Finds: Fitness, diet, exercise, health content


Getting Started (5 Minutes)

1. Sign up (free)

queryra.com/signup

Free tier includes:

  • 100 records
  • 500 searches/month
  • No credit card required

2. Get API key

Dashboard → API Keys → Copy

3. Sync your content

4. Search

Replace your search endpoint with Queryra API.

You keep your database. You keep your IDs. Zero migration.


Pricing

FREE: 100 records, 500 searches/month

  • Small blogs
  • Testing

STARTER ($9/month): 500 records, 5,000 searches/month

  • Small stores
  • Growing sites

PRO ($29/month): 5,000 records, 25,000 searches/month

  • Medium businesses
  • E-commerce sites

BUSINESS ($99/month): 20,000 records, 100,000 searches/month

  • Large sites
  • Agencies

Full details: queryra.com/pricing


🎁 FOUNDERS CLUB (Limited to 100 Users)

If you're one of the first 100 users, you get 100 extra products forever:

200 products on free tier (instead of 100) - FOREVER
Early access to new features
Lifetime Founder badge on your account

Sign up now: queryra.com/signup

When we hit 100 users, this offer closes permanently.


Technical Details (Optional)

How does semantic search work?

Instead of matching exact words, we:

  1. Convert your content to vectors (numerical representations)
  2. Convert user queries to vectors
  3. Find similar vectors (cosine similarity)
  4. Return YOUR results with YOUR IDs

Tech stack: Python, FastAPI, SentenceTransformers, ChromaDB

Result: Fast (<500ms), accurate (understands meaning), YOUR data only.


Why I Built This

I was frustrated with WordPress search plugins. They either:

  • Cost $50+/month (Algolia)
  • Require complex self-hosting (Elasticsearch)
  • Use ChatGPT incorrectly (searching entire internet)

None of them actually solved the problem: semantic search trained on YOUR specific content at an affordable price.

So I built Queryra.


Try It Now

  1. Sign up: queryra.com/signup (free, no credit card)
  2. Sync 10 products: Test it out
  3. Search: See the difference
  4. Decide: Keep it or delete it

Takes 5 minutes. Zero risk.


Questions?

Drop a comment below or email: contact@queryra.com

I'd love to hear:

  • What are you building?
  • What search problems do you face?
  • Would this solve your problem?

Links

Thanks for reading! 🚀

Top comments (1)

Collapse
 
gronrafal profile image
Rafał Groń

👋 Hey! I'm the author. Happy to answer any questions about semantic search or the tech stack!