Skip to main content

Discovery API search optimisation

E
Written by Eddie Garfin
Updated this week

This guide covers advanced search techniques for the Modash Discovery API. You'll learn how to use topics, bio keywords, and hashtags to find the right creators, plus UX patterns that reduce credit usage.

Use these techniques when you're building a search UI or need to fine-tune your search results for a specific niche.

Using topics for relevance

The topics and relevance filters are vector-based. They surface creators who consistently post about a subject.

For TikTok and Instagram, topics are built from hashtags and caption patterns. You can explore available topics using the /topics endpoint. Combine topics with bio and hashtag filters to tighten results.

For YouTube, topics are derived from video metadata (titles, descriptions, keywords), not surface-level hashtags.

Here are platform-specific examples based on the information in the selection:

TikTok Example:

{
"page": 0,
"sort": {"field": "followers", "direction": "desc"},
"filter": {
"influencer": {
"relevance": ["#food"],
"bio": "chef",
"textTags": [
{"type": "hashtag", "value": "recipes"},
{"type": "hashtag", "value": "cooking"}
]
}
}
}

This searches TikTok creators using topic relevance built from hashtags and caption patterns.

Instagram Example:

{
"page": 0,
"sort": {"field": "followers", "direction": "desc"},
"filter": {
"influencer": {
"relevance": ["#fitness"],
"bio": "personal trainer",
"textTags": [
{"type": "hashtag", "value": "workout"},
{"type": "hashtag", "value": "gym"}
]
}
}
}

Instagram topics work the same way as TikTok - based on hashtags and caption patterns.

YouTube Example:

{
"page": 0,
"sort": {"field": "followers", "direction": "desc"},
"filter": {
"influencer": {
"relevance": ["#tech"],
"bio": "reviewer"
}
}
}

For YouTube, topics are derived from video metadata like titles, descriptions, and keywords rather than hashtags. Note that hashtag filters may be less effective on YouTube since the platform relies more on video metadata.

Searching by bio

The bio filter matches exact words. For example, "makeup" does not match "makeupartist". The filter also checks username and full name in addition to the bio.

Best practices:

  • Include multiple variants (for example "makeup artist", "MUA", "beauty expert").

  • Combine with location, follower range, and engagement rate filters.

Searching by hashtags

Use textTags with type hashtag to find creators who use specific hashtags in captions.

Limitations to keep in mind:

  • Exact hashtag matches only.

  • Does not search comments or arbitrary metadata.

  • No automatic semantic expansion (#fitness does not match #fitlife).

Best practices:

  • Use 2-5 well-chosen tags.

  • Combine hashtags with location and follower filters.

Lookalike search

The relevance filter supports lookalikes using influencer handles. Pass one or more @handles and Modash returns creators whose content is similar to the provided accounts.

Example:

{
"page": 0,
"sort": {"field": "followers", "direction": "desc"},
"filter": {
"influencer": {
"relevance": ["@example_creator"]
}
}
}

You can combine topics and lookalikes in the same request when needed.

Building filters step by step

To avoid returning zero results, apply filters incrementally:

  1. Start broad with a topic filter (for example "#food").

  2. Add a bio keyword (for example "chef").

  3. Add a single hashtag constraint.

  4. Add location and engagement filters.

Updating the UI as filters are added helps users see how each change affects the number of results.

UI optimisation and credit savings

To keep your UI responsive and efficient:

  • Debounce input: Wait 300-500ms after the user stops typing before sending a request, and ignore queries shorter than 4 characters.

  • Use pagination: Always include limit and page parameters. Load more results on demand when the user scrolls or clicks "Load more".

  • Cache and reuse results: Cache common queries or the latest result page. Avoid calling the API repeatedly for the same filters.

When to use RAW API instead

Discovery API is ideal for search and initial discovery. Use the RAW API when:

  • You need live metrics at the moment a user opens a profile.

  • You want the latest posts, comments, or other real-time signals.

A common pattern is to use Discovery for searching and listing creators, then call the RAW API to refresh a specific creator's latest metrics when a user opens their profile.

For full API documentation, visit docs.modash.io. If you need help, email hello+api@modash.io.

FAQs

  • Can I combine topics and lookalikes in the same search?

    Yes. You can pass both topic strings (like "#food") and influencer handles (like "@example_creator") in the same relevance filter array.

  • Why does my bio search return no results?

    The bio filter uses exact word matching. Make sure you're not searching for partial words (for example, "makeup" won't match "makeupartist"). Try broader terms or multiple variants.

  • How many hashtags should I use in a search?

    Use 2-5 well-chosen hashtags. Using too many can over-filter your results and return zero matches.

  • What sort options are available?

    You can sort by followers, engagement, and other fields. If no sort is applied, results default to descending follower count.

  • How do I avoid returning zero results?

    Apply filters incrementally. Start with a broad topic filter and add constraints one at a time so you can see the effect of each filter on the result count.

  • What format should I use for audience location filters?

    Use the full object format with id and weight properties for the most reliable results: "location": [{"id": 382313, "weight": 0.2}]. Simplified formats may produce incorrect results.

Did this answer your question?