Search for images in your library. This request supports pagination using the page and limit parameters.
You can search by:
- Alt text content: Search for words or phrases in alt text (default behavior)
- Asset ID: Find a specific image by its unique identifier
- URL: Search by image URL substring
The search automatically detects the query type based on its format.
Request
- Base URL: https://alttext.ai/api/v1
- URL: https://alttext.ai/api/v1/images/search
- Auth: API key in header X-API-Key
Query parameters
The search query (URL escaped). The search type is automatically detected:
URL Search: If the query starts with http:// or https://, it searches by URL substring.
- Example: https://cdn.example.com/products finds all images with URLs containing that string.
Asset ID Search: For other queries, the system first tries to find an exact asset ID match.
- Example: shp-12345 or my-custom-id will find the image with that asset ID.
Alt Text Search (fallback): If no asset ID matches, the query searches alt text content.
- Supports standard web search operators:
- & (logical AND). Example: apple & banana matches "A bowl of apples with a banana on top".
- | or OR (logical OR). Example: apple | banana matches both "A green apple" and "A yellow banana".
- - or ! (logical exclusion). Example: apple -banana matches "A green apple" but not "A bowl of apples with a banana on top."
Controls the page of results to be returned. Page values start with 1.
Controls the number of results per page. Maximum 100.
Response
Successful image alt text results returned.
Changes
No recorded changes to this operation across all 1 revision of this API.