Before you begin
You need an API Token. If you don’t have one yet, follow the Authentication guide to create and store it.1
Check available credits
Confirm that the API key’s billing account has credits available for a new request.The returned
available_credits already excludes credits reserved by requests that are still in progress.2
Create a search task
Submit the search objective. Save the returned
Idempotency-Key is optional; this example uses --include so you can see and save the value generated by Lev8.Idempotency-Key, X-Request-Id, and leads_search_id. Generate and send your own stable key when the request must be safely replayable after a lost response.For entity_type: "xiaohongshu" or entity_type: "wechat", add "enable_web_search": true; those entity types reject database-only requests. Use wechat for WeChat Official Account search, and expect these tasks to take 1 to 2 minutes before results are ready.3
Check task status
Poll
status until results are ready. ready_count is the number of entities currently available to fetch. Xiaohongshu and WeChat Official Account tasks commonly stay running for 1 to 2 minutes.4
Fetch available results
Start from Continue fetching until the task status is
pts=0. After each response, compute the next position as pts + count.done or error and your latest pts + count is greater than or equal to ready_count.Prefer an AI client over curl? See Lev8 MCP to connect Cursor, VS Code, Codex, Claude Code, or Gemini CLI in one step.
Next steps
Check your balance
Read the current available-credit response and caching behavior.
Request fields
Choose an entity type, limit, enrichments, and deduplication inputs.
Read task results
Distinguish
done from fully consumed results.Find contact details
Request an email address or phone number as a JSON response.
Connect MCP
Expose the same API as typed tools to an AI client.
Agent Skills
Install the Lev8 skill for Codex, Claude Code, or Cursor.