Skip to main content

Search Resources

GET/api/v1/idap/{resource_type}/search

Overview

Full-text search within a resource type, backed by PostgreSQL tsvector. Results are sorted by relevance.

Media Resources

Search is not supported on media resources. Returns 400 Bad Request.

Path Parameters

resource_typestringrequired

The resource type to search.

Options: businesses, domains, contacts, emails, phones, company_registry, linkedin_profiles

Query Parameters

qstringrequired

Search query. 1–500 characters.

Examples: "pizzeria miami", "CEO technology", "info@example.com"

limitintegerdefault: 20

Maximum number of results (1–100).

fieldsstring

Comma-separated field projection.

Example: fields=name,email,phone

formatstringdefault: json

Response format.

Options: json, yaml, md

flagsstring

Filter results by flags. Prefix with ! to exclude.

Example: flags=qualified,!rejected

Searchable Fields by Resource Type

Resource TypeSearchable Fields
businessesname, address, category
domainsdomain, title
contactsname, email, title
emailsaddress
phonesnumber
company_registryname, registration_number
linkedin_profilesname, headline, company

Response

The response uses the same structure as the List / Sync endpoint:

resource_typestring

The resource type searched.

countinteger

Number of matching results.

has_moreboolean

Always false for search results (no cursor pagination).

next_cursorstring

Always null for search results.

itemsarray

Array of matching IDAP resources, sorted by relevance (best match first).

Example Request

curl "https://spideriq.ai/api/v1/idap/businesses/search?q=pizzeria+miami&limit=10&flags=!rejected" \
-H "Authorization: Bearer <your_token>"

Response Example

{
"resource_type": "businesses",
"count": 2,
"has_more": false,
"next_cursor": null,
"items": [
{
"idap_ref": "idap://businesses/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"resource_type": "businesses",
"resource_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"tenant_id": "cli_b3q656h2cg8j9o6z",
"created_at": "2026-03-15T10:00:00Z",
"modified_at": "2026-04-11T10:32:00Z",
"flags": ["qualified"],
"data": {
"name": "Mario's Pizzeria",
"address": "123 Brickell Ave, Miami FL",
"google_rating": 4.6
}
},
{
"idap_ref": "idap://businesses/c3d4e5f6-a7b8-9012-cdef-123456789012",
"resource_type": "businesses",
"resource_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"tenant_id": "cli_b3q656h2cg8j9o6z",
"created_at": "2026-04-05T14:00:00Z",
"modified_at": "2026-04-10T09:15:00Z",
"flags": ["new"],
"data": {
"name": "Miami Pizza Co",
"address": "789 Collins Ave, Miami Beach FL",
"google_rating": 4.3
}
}
]
}
{
"resource_type": "businesses",
"count": 0,
"has_more": false,
"next_cursor": null,
"items": []
}

Notes

  • Search results are not paginated — there is no cursor. Use the limit parameter to control result count (max 100).
  • Results are sorted by PostgreSQL ts_rank relevance, not by date.
  • The rejected flag exclusion still applies by default — rejected resources won't appear in search results unless you explicitly include flags=rejected.