Skip to main content
Glama

tiktok_ads

Search and extract ad listings from TikTok's Ad Library by keyword or advertiser ID, with filters for country, date range, and sort order.

Instructions

Searches and extracts ad listings from TikTok's Ad Library by keyword or advertiser ID, with filtering by country, date range, and sort order. [Credits: 5 API credits per successful request] Notes: query_type=1 (default) pairs with query; query_type=2 pairs with advertiser_id. Pagination is handled via next_page_token echoed in the response. Returns: { code, total, has_more, search_id, next_page_token, ads: [{ id, name, audit_status, type, first_shown_date, last_shown_date, videos: [{video_url, cover_img}], image_urls[], estimated_audience, spent, impression, show_mode, rejection_info, sor_audit_status }] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoKeyword to search for on TikTok Ads. Used for keyword search (query_type=1).
countryNoThe country to search ads from. (default: all)
sort_byNoSort order for results. Allowed values: `last_shown_date_newest_to_oldest` (default), `last_shown_date_oldest_to_newest`, `published_date_newest_to_oldest`, `published_date_oldest_to_newest`, `unique_users_seen_low_to_high`, `unique_users_seen_high_to_low`. (default: last_shown_date_newest_to_oldest)
query_typeNoType of search: `1` for keyword search (default), `2` for advertiser ID search. (default: 1)
time_periodNoCustom date range in `YYYY-MM-DD..YYYY-MM-DD` format. Defaults to the past 12 months if omitted.
advertiser_idNoUnique advertiser ID to search for ads from a specific advertiser. Used together with query_type=2.
next_page_tokenNoToken used to fetch the next page of results. Use the `next_page_token` value returned in the previous response.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fully compensates by disclosing credits cost ('[Credits: 5 API credits per successful request]'), parameter pairing rules, pagination behavior, and the complete return structure including nested fields. This is a comprehensive disclosure of what the tool does and what to expect, exceeding typical expectations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (two sentences) and front-loaded with the core purpose. The second sentence densely packs credits, query type notes, pagination, and return structure, which could be more readable with bullet points or a list. However, it remains within acceptable length and contains no unnecessary fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 7 optional parameters and no output schema, the description covers all essential aspects: search modes, pagination, return fields, and credits. Missing details like error handling or rate limits are minor omissions. Overall, it is complete enough for an agent to use effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, meaning all parameters already have descriptions. The description adds context like pairing rules and default for `time_period`, but does not significantly enhance understanding beyond the schema. Baseline 3 is appropriate as the description adds modest value (e.g., credit cost mention) but does not fundamentally elevate parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Searches and extracts ad listings from TikTok's Ad Library by keyword or advertiser ID'. The verb 'searches and extracts' paired with the specific resource 'ad listings from TikTok's Ad Library' leaves no ambiguity. It distinguishes itself from sibling tools (e.g., google_ads_transparency, tiktok_post) by focusing on TikTok's Ad Library with specific parameter modes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly explains how to use the two query modes ('query_type=1 (default) pairs with `query`; query_type=2 pairs with `advertiser_id`') and how to paginate ('Pagination is handled via next_page_token echoed in the response'). While it doesn't explicitly state when not to use the tool, the context is clear enough for an agent to decide. A slightly higher score would require explicit exclusions or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alessandrobenigni/ScrapingDog-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server