TL;DR: MobileAPI's AI Query endpoint lets you search 27,805+ devices using plain English instead of structured parameters. Ask questions like "top 5 phones with the best camera under $800" and get ranked, filtered results in JSON. Available on the Enterprise plan at 3 credits per request.
TL;DR: MobileAPI's AI Query endpoint lets you search 27,805+ devices using plain English instead of structured parameters. Ask questions like "top 5 phones with the best camera under $800" and get ranked, filtered results in JSON. Available on the Enterprise plan at 3 credits per request.
By MobileAPI Team | Last updated: March 2026
Table of Contents
- What Are AI-Powered Device Queries?
- Example Queries That Just Work
- How It Works Under the Hood
- Getting Started: Python and JavaScript Examples
- AI Query vs Structured Search: When to Use Each
- Integration Patterns
- Enterprise Plan Details
- FAQ
- Key Takeaways
What Are AI-Powered Device Queries?
Traditional device APIs force you to think in parameters. You construct filters for brand, RAM, price range, and release year, then chain them together and hope the combination returns what you need. AI-powered queries flip that model entirely.
With the MobileAPI /devices/ai-query/ endpoint, you write a question in plain English. The API interprets your intent, applies the right filters, and returns ranked results -- all in a single request. No parameter documentation to memorize, no trial-and-error filter combinations.
This matters because device data is inherently complex. A single smartphone has dozens of specification fields across network, display, platform, memory, cameras, battery, and more. Translating a product question into the right combination of structured filters takes time and domain knowledge. Natural language removes that barrier.
Example Queries That Just Work
The AI Query endpoint handles a wide range of question styles. Here are queries you can send today, exactly as written:
"Top 5 phones with the best camera under $800" Returns five devices ranked by camera specifications with pricing below $800. The API understands that "best camera" means sorting by megapixel count, sensor size, and feature set -- not just a single number.
"Latest Samsung phones with 5G and at least 8GB RAM" Combines a brand filter, connectivity requirement, and minimum RAM threshold. The API interprets "latest" as sorting by release date descending.
"Phones with the longest battery life released in 2026" Filters to 2026 releases and ranks by battery capacity. The interpretation layer understands that "longest battery life" maps to milliamp-hour ratings and efficiency data.
"Compare iPhone 17 Pro and Galaxy S26 Ultra specs" Returns both devices side by side with their full specification sets. The API recognizes this as a comparison request and structures the response accordingly.
These queries would each require multiple structured API calls, careful parameter selection, and post-processing logic. With the AI Query endpoint, it is one request and one response.
How It Works Under the Hood
The AI Query endpoint processes your request through four stages:
1. Query Parsing. Your natural language input is analyzed for intent. The system identifies what you are looking for (devices, comparisons, rankings), any constraints (price caps, brand filters, minimum specs), and how results should be ordered.
2. Interpretation. The parsed query maps to MobileAPI's specification schema. "Best camera" becomes a sort across camera resolution, sensor type, and feature count. "Latest" becomes a descending sort on release date. The response includes an interpretation field so you can verify how the API understood your question.
3. Filter Application. Structured filters are generated and applied against the full database of 27,805+ devices across 200+ brands. The filters_applied field in the response shows exactly which filters were used.
4. Ranked Results. Matching devices are scored and ranked according to your query intent. The order_by field indicates the ranking logic. Results come back as standard MobileAPI device objects, fully compatible with the rest of the API.
Here is what a response looks like:
{
"query": "Get top 5 devices with most RAM",
"interpretation": "Found 5 devices matching your criteria",
"filters_applied": {},
"order_by": "-hardware",
"devices": [
{
"id": 11423,
"device_name": "ASUS ROG Phone 9 Pro",
"manufacturer": "Asus",
"device_type": "phone",
"main_image_b64": "..."
}
]
}
The interpretation field is your debugging tool. If results look unexpected, check the interpretation to see how the API read your query and adjust your wording.
Getting Started: Python and JavaScript Examples
Python
import requests
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.mobileapi.dev"
def ai_query(question):
"""Search devices using natural language."""
response = requests.get(
f"{BASE_URL}/devices/ai-query/",
headers={"Authorization": f"Bearer {API_KEY}"},
params={"query": question}
)
response.raise_for_status()
return response.json()
# Find the best camera phones under $800
results = ai_query("Top 5 phones with the best camera under $800")
print(f"Interpretation: {results['interpretation']}")
print(f"Ordered by: {results['order_by']}")
for device in results["devices"]:
print(f" - {device['device_name']} (ID: {device['id']})")
JavaScript (Node.js)
const API_KEY = "YOUR_API_KEY";
const BASE_URL = "https://api.mobileapi.dev";
async function aiQuery(question) {
const params = new URLSearchParams({ query: question });
const response = await fetch(
`${BASE_URL}/devices/ai-query/?${params}`,
{
headers: { Authorization: `Bearer ${API_KEY}` },
}
);
if (!response.ok) {
throw new Error(`API error: ${response.status}`);
}
return response.json();
}
// Find 2026 phones with the longest battery life
const results = await aiQuery(
"Phones with the longest battery life released in 2026"
);
console.log(`Interpretation: ${results.interpretation}`);
console.log(`Ordered by: ${results.order_by}`);
results.devices.forEach((device) => {
console.log(` - ${device.device_name} (ID: ${device.id})`);
});
Both examples use Bearer token authentication, which follows RFC 6750. You can also authenticate with a header using Token YOUR_API_KEY or pass the key as a query parameter with ?key=YOUR_API_KEY. See the full API documentation for details on all authentication methods.
AI Query vs Structured Search: When to Use Each
The AI Query endpoint is powerful, but it is not always the right tool. Here is when each approach makes sense:
| Criteria | AI Query | Structured Search |
|---|---|---|
| Best for | Exploratory searches, complex multi-criteria questions | Known device lookups, integration pipelines |
| User type | Non-technical users, support agents, analysts | Developers, automated systems |
| Query complexity | Handles multi-faceted questions in one request | Requires manual filter construction |
| Cost | 3 credits per request | 1 credit per request |
| Rate limit | 10 requests/hour/IP | Up to 100 requests/second (Enterprise) |
| Predictability | Results may vary with phrasing | Deterministic, identical inputs yield identical outputs |
| Volume suitability | Low to moderate query volumes | High-volume, batch processing |
| Plan requirement | Enterprise only | All plans (Free, Pro, Enterprise) |
Use AI queries when the person writing the query does not know the exact parameter names or values. Customer support chatbots, internal product research tools, and analyst dashboards all benefit from natural language input.
Use structured search when you know the device name, model number, or exact filter criteria. Automated pipelines, nightly data syncs, and price comparison engines should use structured endpoints for their predictability and lower credit cost.
Many teams use both. A support chatbot might use AI queries for customer-facing searches and structured endpoints for backend data enrichment. The two approaches complement each other.
Integration Patterns
Customer Support Chatbots
Connect the AI Query endpoint to your chatbot platform so support agents or end users can ask device questions in plain language. A customer types "which Samsung phones have wireless charging and cost under $500" and gets an instant, accurate answer without the agent needing to search manually.
def handle_customer_question(user_message):
"""Route device questions to MobileAPI."""
results = ai_query(user_message)
if not results["devices"]:
return "I couldn't find devices matching that description."
device_list = "\n".join(
f"- {d['device_name']}" for d in results["devices"]
)
return f"Here are the devices I found:\n{device_list}"
Internal Dashboards
Product teams and buyers need quick answers about the device landscape. Embed an AI query search bar in your internal tools. A product manager can type "phones released this quarter with OLED displays over 6.5 inches" and get results without learning the API's filter syntax.
E-Commerce Product Discovery
Power your storefront's search with natural language. Customers searching "best phone for photography under $1000" get relevant, ranked results instead of a keyword mismatch. This is especially effective for comparison sites and marketplaces where users browse with intent but not specific model names.
Trade-In and Resale Platforms
Support agents processing trade-ins can quickly look up devices. "Samsung phone with 128GB storage from 2024" narrows the field immediately, even when the customer does not know the exact model name.
Enterprise Plan Details
The AI Query endpoint is exclusive to the Enterprise plan. Here is what the Enterprise tier includes:
Unlimited API requests. No monthly caps on standard endpoints. AI queries are included in your unlimited allocation.
Custom rate limits. Default rate limits go up to 100 requests per second. Need more? Enterprise agreements support custom limits tailored to your traffic patterns.
Daily data updates. While the Free plan gets monthly updates and Pro gets weekly, Enterprise customers receive daily data refreshes. New devices, updated pricing, and revised specifications land in the API within 24 hours.
Dedicated 24/7 support. A dedicated support channel with guaranteed response times, not just priority email.
99.9% SLA. A contractual uptime guarantee backed by service credits.
AI Query specifics. Each AI query costs 3 credits. The rate limit for the AI endpoint is 10 requests per hour per IP address. For most use cases -- chatbots, dashboards, support tools -- this is more than sufficient. If your application needs a higher AI query rate limit, contact the team to discuss a custom configuration.
Enterprise pricing is custom. Reach out to the team to discuss your use case and volume requirements.
FAQ
Can I use the AI Query endpoint on the Free or Pro plan?
No. The AI Query endpoint requires an Enterprise plan. Requests from Free or Pro API keys return a 403 (Permission Denied) error. All other endpoints -- search, autocomplete, manufacturer filters, and specification lookups -- are available on every plan.
How accurate is the natural language interpretation?
The interpretation layer handles a broad range of phrasing styles. Simple queries like "phones with 12GB RAM" are interpreted with high accuracy. Complex or ambiguous queries may produce unexpected filter combinations. Always check the interpretation and filters_applied fields in the response to verify the API understood your intent. If results seem off, rephrase the query to be more specific.
Does the AI Query endpoint support languages other than English?
Currently, the endpoint is optimized for English-language queries. Queries in other languages may work for simple requests but are not officially supported. Non-English support is on the roadmap.
How does the 3-credit cost compare to building the same query with structured endpoints?
A complex exploratory query might require 3 to 5 structured API calls to replicate: one to search, one to filter by specs, and additional calls for sorting and comparison. At 1 credit each, the structured approach costs 3 to 5 credits and requires significantly more development time. The AI query achieves the same result in a single 3-credit call with zero parameter logic on your side.
What happens if I exceed the 10-request-per-hour rate limit?
You will receive a 429 (Rate Limit Exceeded) response. The X-RateLimit-Reset header tells you when the limit resets. For applications that need higher throughput on AI queries, contact the Enterprise support team about custom rate limit configurations.
Key Takeaways
- The
/devices/ai-query/endpoint accepts plain English questions and returns ranked, filtered device data from 27,805+ devices. - Each request costs 3 credits and is rate-limited to 10 requests per hour per IP.
- The endpoint is exclusive to the Enterprise plan.
- Use AI queries for exploratory searches, chatbots, and non-technical users. Use structured search for automated pipelines and high-volume integrations.
- The response includes
interpretationandfilters_appliedfields so you can verify how the API understood your query. - Enterprise customers also get unlimited requests, daily data updates, custom rate limits, 99.9% SLA, and dedicated 24/7 support.
Ready to add natural language device search to your product? Create a free account to explore the API, or review the full API documentation to see every endpoint available. For Enterprise access to the AI Query endpoint, contact the team to discuss your requirements.