ZHIMAHANG/Articles··44 min

YinJen Open API: Pull Your Brand's AI Visibility Data into Your Warehouse and BI

The YinJen Open API is a read-only export of the GEO data YinJen has already collected. With one Bearer key you can read your brand's visibility, cited sources, and competitor share of voice across 12 AI engines, then sync them into a warehouse, a BI dashboard, or an alerting job. It is included with every plan at no extra charge, with a monthly anti-abuse ceiling of 1,000,000 calls. This guide walks through creating a key and running your first GEO queries with curl.

One-line definition: The YinJen Open API is a read-only export of the GEO monitoring data YinJen has already collected: with one key, you can read your brand's visibility, cited sources, and competitor share of voice across 12 AI engines.

The Open API launched on 2026-08-25 with desktop client v0.0.86 (see the changelog). This article covers four things: what it is, which problems in GEO work it can solve, how to get your first batch of queries running from scratch, and whether it costs money. Swap in your own key and you can copy and run the commands as they are.

The endpoints, parameters, rate limits, and data definitions in this article come from the developer docs and the endpoint reference; quotas and prices come from the website's quota endpoint api.zhimahang.com/plan-quotas. All were verified online on 2026-10-27. If the docs or quotas change, the developer docs and the official pricing page take precedence.

1. What It Is

The first release of the Open API has 13 endpoints, all read-only (GET). They read monitoring data that the YinJen desktop client has already collected and uploaded. The core data falls into three categories:

  • Visibility: successful runs, mentions, citations, and mention rate by day and by engine; plus a "prompt × engine" matrix in which each cell is the latest result within the window.
  • Cited sources: which URLs AI answers cited; you can also aggregate by domain to see which domains are cited most.
  • Competitor share of voice (SoV): mentions, share, and rank for your own brand and the competitors you have configured, a per-engine breakdown, and losing battlegrounds (down to which question and which engine).

There are also four kinds of supporting endpoints: the engine catalog, brands, prompts, and usage.

Authentication uses the HTTP Authorization: Bearer request header. Each key is bound to one brand at the moment it is created, and the server identifies you from the key. The API does not accept parameters such as merchantId, so changing a parameter cannot read another brand's data.

Here is what it is not, also stated up front:

  • It does not query AI engines for you. The API only reads data that has already been collected; it cannot start a new collection. Collection is still done by the desktop client, and the API can read the data only after a run finishes and is uploaded.
  • There is no sandbox test environment. A key reads the current brand's real data directly.

2. What Problems in GEO Work It Can Solve

Viewing monitoring data only inside one client stops being enough at a certain stage. The developer docs list three typical integrations; here they are, plus one more that is common in GEO work:

  1. Sync into your own data warehouse for long-term retention. Run and citation details are kept for only 90 days; anything older is cleaned up. If you want to keep the original text of every AI answer and its citations long term, pull them into your own warehouse on a schedule within 90 days, using cursor pagination.
  2. Plug into your existing BI. Break down each engine's mention rate and SoV by engine and by date, and put them on the same dashboard as your content publishing, lead, and sales data for comparison.
  3. Set up visibility alerts. Read the daily aggregates and usage on a schedule, and push internal alerts when the mention rate drops, a competitor overtakes your brand, or call volume approaches the limit.
  4. See whom AI answers cite. Aggregate citation sources by domain to see which sites the engines you care about often cite in their answers, as a reference for where to place content. Note that this describes citations that have already happened; it must not be read the other way round as "publish on these sites and you will be cited."

The table below maps common GEO questions to endpoints:

Question you want to answerEndpointRead scope required
How many times did each engine mention me this week, and what is the mention rate?GET /v1/metrics/visibilityVisibility (可见度)
Which question, on which engine, did not mention me in its most recent run?GET /v1/metrics/visibility/matrixVisibility
For the answers that did not mention me, what does the original text say, and whom does it cite?GET /v1/runs, GET /v1/runs/{id}Visibility
Which prompts are being monitored?GET /v1/prompts, GET /v1/prompts/{id}Visibility
Which domains did AI answers cite, and how many times each?GET /v1/citations/domainsCitations (信源)
Citation details, one by oneGET /v1/citationsCitations
Share of voice and rank for me and my competitorsGET /v1/metrics/share-of-voiceCompetitor SoV (竞品 SoV)
Which competitors are configured?GET /v1/competitorsCompetitor SoV
Engine catalog and brand profileGET /v1/engines, GET /v1/brandsNot required
How many calls have I used this month?GET /v1/usageNot required

3. How to Use It: From Creating a Key to Your First GEO Queries

The commands below run as-is in a macOS or Linux terminal (bash, zsh). On Windows, you can run them in Git Bash or WSL, or adapt them from the Python and Node.js examples in the Quickstart.

Step 1: Create a Key in the Desktop Client

  1. Open the YinJen desktop client and go to the "API keys" (API 密钥) page in the sidebar. This page requires the "Billing & receipts" (账单与收据) permission: by default, only Admin (管理员) members, including the account owner, have it; Editor (编辑) and Viewer (只读) members cannot see this page by default.
  2. Click "Create key" (签发密钥), fill in the "Purpose" (用途备注) note (for example, "Daily warehouse sync"), and choose an "Expiry" (有效期): "No expiry" (永不过期), 90 days, 180 days, or 1 year.
  3. Keys created in the desktop client carry all three read scopes by default: Visibility, Citations, and Competitor SoV.
  4. After the key is created, the full key is shown only this once; once you close the dialog, you can never see it again. Copy it on the spot into a password manager or secrets manager, and never put it in a code repository, logs, or front-end code. The server stores only a hash of the key, so a lost key cannot be recovered; you can only create a new one and then revoke the old one.

Keys start with yj_live_. All the examples below read the key from an environment variable:

export YINJEN_API_KEY="yj_live_replace_with_your_key"

Step 2: Verify Connectivity

curl https://api.zhimahang.com/v1/engines \
  -H "Authorization: Bearer $YINJEN_API_KEY"

On success, it returns the catalog of 12 AI engines. Each entry has a stable id, such as doubao (Doubao), deepseek, chatgpt, and kimi; this is what you use later to filter by engine. Do not use display names as join keys.

Every response carries an X-Request-Id header. If a request goes wrong, include it when you contact support, and the same server-side request can be located.

Step 3: See How Each Engine Mentioned You in the Last 7 Days

UNTIL=$(( $(date +%s) * 1000 ))
SINCE=$(( UNTIL - 7 * 24 * 60 * 60 * 1000 ))

curl --get https://api.zhimahang.com/v1/metrics/visibility \
  -H "Authorization: Bearer $YINJEN_API_KEY" \
  --data-urlencode "since=$SINCE" \
  --data-urlencode "until=$UNTIL"
  • since and until are Unix milliseconds, and the interval is half-open (closed on the left, open on the right): [since, until). If you omit them, the default is the last 30×24 hours. A single window can span at most 200 buckets of 24 hours each; split longer backfills into segments.
  • The returned data has one entry per day per engine, with the fields runs (number of successful runs), mentions (number of mentions), citations (number of citations), and mention_rate (mentions ÷ successful runs, a ratio between 0 and 1). totals is the sum over the whole window.
  • A "mention" is counted as binary per answer: whether an answer mentions the brand once or 10 times, it counts as 1. Matching uses the brand name plus the aliases you have configured.
  • Each bucket is a fixed 24 hours counted from since, in UTC. The desktop client buckets by your local calendar day, so the two will show different readings for periods that cross midnight and on daylight-saving transition days. This is intentional.
  • To look at only certain engines, pass engine repeatedly, for example by adding --data-urlencode "engine=doubao" --data-urlencode "engine=deepseek".

Step 4: See Share of Voice for You and Your Competitors

curl https://api.zhimahang.com/v1/metrics/share-of-voice \
  -H "Authorization: Bearer $YINJEN_API_KEY"

Without a window, it defaults to the last 30 days. The response includes:

  • leaderboard: mentions, share (share_of_voice), and rank for each brand;
  • by_engine: a per-engine breakdown;
  • gaps: losing battlegrounds, down to the prompt and the engine;
  • kpi: summary metrics.

SoV = a brand's mentions ÷ the sum of mentions of all tracked brands in the window (your own brand plus configured competitors) × 100. The denominator includes only brands you have configured; unconfigured third-party brands are not counted. SoV's scan base also differs from visibility's: it counts only successful runs with non-empty answer text, so it is normal for the two denominators not to line up.

Step 5: See Which Domains AI Answers Cite

curl --get https://api.zhimahang.com/v1/citations/domains \
  -H "Authorization: Bearer $YINJEN_API_KEY" \
  --data-urlencode "engine=doubao" \
  --data-urlencode "limit=20"

This aggregates the citations in Doubao's answers by domain and returns the top 20. Each item has occurrences (number of appearances), runs (number of runs involved), and last_seen_at (time of the most recent appearance). Without a window, it reads the most recent 90 days within the retention period.

Citations are counted by occurrence: if the same URL appears twice in one answer, it counts twice.

Step 6: Find the Answers That Did Not Mention You, and Read the Original Text

curl --get https://api.zhimahang.com/v1/runs \
  -H "Authorization: Bearer $YINJEN_API_KEY" \
  --data-urlencode "engine=deepseek" \
  --data-urlencode "status=ok" \
  --data-urlencode "mention=false" \
  --data-urlencode "limit=50"

The list does not include answer text, only fields such as text_len, citation_count, and prompt_title, so that bulk syncs are not bloated by answer bodies. Pick the one you want to read and fetch its details by its id; the details include the full response_text and citations:

RUN_ID=123456   # replace with an id returned by the previous step
curl "https://api.zhimahang.com/v1/runs/$RUN_ID" \
  -H "Authorization: Bearer $YINJEN_API_KEY"

Pagination: when has_more in the response is true, pass next_cursor back unchanged as the cursor parameter, and repeat until has_more is false. limit defaults to 100, with a maximum of 1000. Every page counts as one call, so use a larger limit for bulk syncs where you can.

Step 7: Keep an Eye on Call Volume

curl https://api.zhimahang.com/v1/usage \
  -H "Authorization: Bearer $YINJEN_API_KEY"

This returns the calls used (used), the limit (limit), and the calls remaining (remaining) for the current calendar month. Every read of this endpoint also counts toward usage itself.

For the full parameters and fields, see the endpoint reference. The developer docs also offer a full-text version written for AI to read, llms-full.txt, which you can hand directly to your coding agent as a reference.

4. How Much It Costs

The Open API is not charged separately; all three plans include it. The monthly call limit is a safeguard against runaway scripts, not a billable item.

CreatorTeamEnterprise
Monthly plan price¥29.9/month¥99.9/monthContact sales
AI engines covered121212
Monthly Open API call limit1,000,000 calls1,000,000 calls1,000,000 calls
Default rate limit60 calls/minute per key, with short bursts up to 120SameSame

Definitions (read from api.zhimahang.com/plan-quotas and the developer docs on 2026-10-27):

  • The monthly limit is counted per calendar month and per brand; the "API keys" page in the desktop client labels it "This month · current brand" (本月 · 当前品牌).
  • Counted toward call volume: 2xx, and 4xx (except a 401 for an invalid key). Not counted: a 304 from an ETag hit with If-None-Match, 429, and 5xx.
  • The per-minute rate limit is applied per key. Exceeding it returns 429 rate_limit_exceeded; wait as long as the Retry-After response header says, add a little random jitter, and then retry. When the monthly limit is used up, the API returns 429 api_quota_exceeded.
  • After the merchant's subscription expires, requests return 403 merchant_expired.
  • Plan prices are subject to the official pricing page.

5. Definitions to Know Before Reconciling Numbers

When the API's numbers don't match those in the desktop client or in your own warehouse, check the definitions first before suspecting the data:

DefinitionWhat the API does
Time windowUnix milliseconds, half-open [since, until); explicitly passing since=0 means starting from the Unix epoch, not "omitted"
Date bucketsFixed 24-hour periods anchored to UTC; the desktop client uses local calendar days
Mention-rate denominatorSuccessful runs; runs that were captured successfully but have empty answer text are also in the denominator
SoV denominatorOnly your own brand and configured competitors; the scan base counts only successful runs with non-empty answer text
Detail retention90 days; meta.retention_start_ms in the response gives the boundary, so do not hard-code "today minus 90 days" in your client
Aggregates vs. detailsThe visibility time series and SoV aggregates include historical rows that have been cleaned up, while details do not; so a very early window may show "values in aggregates, but empty details"
Sentimentsentiment lies in [-1, 1]; null means not classified, which is not the same as a neutral 0

For each definition in detail, see Metric definitions and Data retention.

6. Frequently Asked Questions

Does the Open API cost extra? No. Creator, Team, and Enterprise all include it, and each has a monthly limit of 1,000,000 calls (read from the website's quota endpoint on 2026-10-27). The limit exists only to stop runaway scripts.

Can I use the API to make YinJen query AI right now? No. The API only reads data that has already been collected; it cannot start a collection. Collection is done by the desktop client. If you can't find data, first confirm that the client has finished running and uploaded the results, then check the time window.

Why are the numbers from the API different from those in the desktop client? The most common reason is bucketing: the API buckets by fixed 24-hour periods in UTC, while the desktop client buckets by local calendar day. The next most common are the retention period (details are kept for only 90 days) and the denominators (SoV and visibility use different denominators). See the previous section and Metric definitions.

What should I do if my key is lost or leaked? It cannot be recovered; the server stores only a hash. Create a new one on the "API keys" page, switch all callers over to it, confirm that requests work normally, and then revoke the old one. Revocation takes effect immediately: the very next request returns 401.

If I get data through the API, is my brand guaranteed to perform better in AI answers? No. The API reads out mentions and citations that have already happened, helping you bring monitoring data into your own systems and look at it in finer detail. What AI engines answer is decided by the engines themselves; we do not promise rankings or "dominating" results.


Further reading


Sources and definitions: Endpoints, parameters, fields, and error codes come from the YinJen developer docs and the Open API source code; quotas and prices come from the website's quota endpoint api.zhimahang.com/plan-quotas; the release version and date come from the website's changelog. All of the above were verified on 2026-10-27.

This article was written by Suzhou Zhimahang Technology Co., Ltd. (the ZHIMAHANG GEO team). YinJen is our own product. Website: zhimahang.com

This article was compiled from the YinJen Open API's public documentation and source code. The text was created with AI assistance and reviewed and published by the author.

ABOUT THE AUTHOR

ZHIMAHANG GEO Team

ZHIMAHANG's Generative Engine Optimization (GEO) research & managed-service team — we use YinJen to track how content gets cited and surfaced across ChatGPT, Grok, Gemini, Perplexity, Doubao, DeepSeek and other major AI engines. Data articles are our own first-hand measurements; the others cite their sources.

About our GEO managed service (Chinese) → About ZHIMAHANG (Chinese) →