Iván

API / Application Programming Interface

知識管理v1.3.7
作者:Iván更新於 2026-07-25共 16 個版本 · 最新版本釋出於 2026-07-25api@clawhub_ivangdavila/api
資訊檢索檔案問答#Notion#Rest Api

據 AlphaMoat 統計,截至 2026-10,API / Application Programming Interface 累計下載 7,891 次、獲 7 個星標,按累計下載量在本次參與排名的 10,914 個 AI 技能中排名第 3,517 位,在「知識管理」分類(745 個)中排名第 239 位。

列表預設按累計下載量排序,也可按星標排序;詳情頁排名按累計下載量計算。

累計下載
7891
星標
7
全站下載量排名
#3,517
全站前 33% · 「知識管理」前 33%
平台累計下載星標評論
ClawHub ↗78417-
SkillHub ↗78917—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

按服務與問題提供鑑權、限流、分頁、Webhook、串流回應和非同步任務的文件及請求範例。用於消費第三方 API,不用於設計自有 API;不會自主發起請求,範例由使用者執行。預設使用沙箱認證資料,生產環境需明確要求,金鑰不應放進 URL 或日誌。

資料釋出於 2026-10-26

可以用來做什麼

  • 編寫 API 用戶端請求和診斷錯誤

什麼時候用

  • 第三方請求失敗或需要規劃整合邏輯時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

分析這個 API 請求失敗的原因,並給出分頁與退避處理建議

使用條件

依據技能文件中的宣告整理,未經實際安裝或執行驗證。

配置要求
  • 僅重試不會重複產生副作用的請求;POST 重試需考慮冪等鍵。分頁未完成時應說明結果不完整。

月度資料趨勢

累計下載7891
3319577582302026-03 · 累計下載 36582026-05 · 累計下載 51032026-06 · 累計下載 54512026-07 · 累計下載 63042026-08 · 累計下載 71522026-09 · 累計下載 75482026-10 · 累計下載 789126-0326-0926-10
星標7
3572026-03 · 星標 32026-05 · 星標 72026-06 · 星標 72026-07 · 星標 72026-08 · 星標 72026-09 · 星標 72026-10 · 星標 726-0326-0926-10

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-107891—7
2026-097548—7
2026-087152+13.5%7
2026-076304+15.6%7
2026-065451+6.8%7
2026-055103—7
2026-033658—3

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

16 KB · ClawHub v1.3.7
---
name: api
slug: api
version: 1.3.7
description: >-
  Integrates and debugs third-party REST and GraphQL APIs: auth, rate limits, pagination, webhooks, with reference for 147 services.
  Use when calling Stripe, OpenAI, GitHub, Slack, Twilio, or any external service, when a request that should work returns 401, 403,
  or 429, times out, hits a CORS error, or silently returns wrong data, when choosing an OAuth flow, signing requests, adding retries
  with backoff and idempotency keys, verifying webhook signatures, consuming SSE streams, uploading files, polling async jobs, caching
  with ETags, or syncing API data into a local database — with per-service gotchas and curl examples. Not for designing or building
展開全部(共 211 行)
  your own API.
homepage: https://clawic.com/skills/api
changelog: "Full coverage pass: deeper guides, situation-named files, and per-user configuration"
metadata:
  clawdbot:
    emoji: 🔌
    requires:
      anyBins:
      - curl
      - jq
    os:
    - linux
    - darwin
    - win32
    displayName: API / Application Programming Interface
    configPaths:
    - ~/Clawic/data/api/
---

REST and GraphQL API reference for 147 services: authentication, endpoints, rate limits, and per-service gotchas, plus pattern playbooks for everything that goes wrong between you and an API. User preferences live in `~/Clawic/data/api/` — the only location this skill writes (see `setup.md` on first use). If you have data at an old location (`~/api/` or `~/clawic/api/`), move it to `~/Clawic/data/api/`.

## When To Use

- User names a service to integrate ("call the Stripe API", "post to a Slack channel") → its section via API Categories below
- A request that "should work" returns 401/403/429, times out, or silently returns wrong data → `debug.md` and the pattern files
- Designing the client side of any integration: retries, pagination, webhooks, streaming, file transfer, async job polling
- Choosing between similar providers in a category (email, auth, media) → compare sections in the same category file
- Not for building your OWN API (routing, schema design, versioning your endpoints) — this skill documents consuming others' APIs

## Quick Reference

| Situation | Read |
|-----------|------|
| Endpoints/auth for a named service | Its category file — API Categories table below |
| 401/403 that "should work", OAuth flow choice, JWT rejected | `auth.md` |
| Works in curl but not in code, works locally but not in prod, TLS errors, mysterious 400s | `debug.md` |
| Duplicated/missing items across pages, loop never ends | `pagination.md` |
| Timeouts, retries, flaky upstream, circuit breakers, provider outage | `resilience.md` |
| 429s, rate-limit headers, quota budgeting, spending less of the limit | `rate-limits.md` |
| Polling for changes, ETag/304 conditional requests, what to cache client-side | `caching.md` |
| Mirroring API data locally, incremental sync, detecting deletions, sync token expired | `sync.md` |
| Blocked by CORS, calling an API from frontend code, key would ship to the browser | `browser.md` |
| SSE stream buffers, hangs, or cuts off; events half-parsed; WebSocket drops | `streaming.md` |
| Receiving events, signature verification, duplicate deliveries | `webhooks.md` |
| Upload rejected with 400/411/413, download corrupted or truncated, presigned URLs | `files.md` |
| 202 Accepted, job polling, batch partial failures, async exports | `async-jobs.md` |
| The service speaks GraphQL (GitHub v4, Shopify, Linear) | `graphql.md` |
| Version pinning, `Sunset`/`Deprecation` headers, provider changed the API | `versioning.md` |
| Sandbox vs live, mocking providers, recorded fixtures, contract drift | `testing.md` |
| Money amounts, timestamps, big numeric IDs, unicode limits in payloads | `data-formats.md` |
| Multiple accounts/keys for one service | `credentials.md` |
| Anything else | Core Rules below, then the Official Docs link at the end of each API section |

## API Categories

| Category | File | Services |
|----------|------|----------|
| AI/ML | `apis/ai-ml.md` | anthropic, openai, cohere, groq, mistral, perplexity, huggingface, replicate, stability, elevenlabs, deepgram, assemblyai, together, anyscale |
| Payments | `apis/payments.md` | stripe, paypal, square, plaid, chargebee, paddle, lemonsqueezy, recurly, wise, coinbase, binance, alpaca, polygon |
| Communication | `apis/communication.md` | twilio, sendgrid, mailgun, postmark, resend, mailchimp, slack, discord, telegram, zoom |
| Realtime | `apis/realtime.md` | sendbird, stream-chat, pusher, ably, onesignal, courier, knock, novu |
| CRM | `apis/crm.md` | salesforce, hubspot, pipedrive, attio, close, apollo, outreach, gong |
| Marketing | `apis/marketing.md` | drift, crisp, front, customer-io, braze, iterable, klaviyo |
| Developer | `apis/developer.md` | github, gitlab, bitbucket, vercel, netlify, railway, render, fly, digitalocean, heroku, cloudflare, circleci, pagerduty, launchdarkly, split, statsig |
| Database | `apis/database.md` | supabase, firebase, planetscale, neon, upstash, mongodb, fauna, xata, convex, appwrite |
| Auth | `apis/auth-providers.md` | clerk, auth0, workos, stytch |
| Media | `apis/media.md` | cloudinary, mux, bunny, imgix, uploadthing, uploadcare, transloadit, vimeo, youtube, spotify, unsplash, pexels, giphy, tenor |
| Social | `apis/social.md` | twitter, linkedin, instagram, tiktok, pinterest, reddit, twitch |
| Productivity | `apis/productivity.md` | notion, airtable, google-sheets, google-drive, google-calendar, dropbox, linear, jira, asana, trello, monday, clickup, figma, calendly, cal, loom, typeform |
| Business | `apis/business.md` | shopify, docusign, hellosign, bitly, dub |
| Geo | `apis/geo.md` | openweather, mapbox, google-maps |
| Support | `apis/support.md` | intercom, zendesk, freshdesk, helpscout |
| Analytics | `apis/analytics.md` | mixpanel, amplitude, posthog, segment, sentry, datadog, algolia |

## How to Navigate API Files

Each category file starts with an index table (API name → line number). Read the index, then only the section you need (50-100 lines each):

```bash
head -20 apis/ai-ml.md          # index
sed -n '139,251p' apis/ai-ml.md # one API's section (OpenAI, per the index)
```

## Core Rules

1. **Raw request before client code.** Reproduce with curl first; if curl succeeds and the SDK fails, the bug is in SDK config (base URL, version pin, auth header name), not the API. Chains: `debug.md`.

2. **Backoff with full jitter, and `Retry-After` overrides it.** `sleep = random(0, min(cap, base × 2^attempt))`, base 1s, cap 30-60s, max `retry_max` attempts (default 4; AWS "full jitter"). Attempt 3 → sleep is a random value in [0, 8s], not exactly 8s — the randomness is what prevents synchronized retry storms. If the 429/503 carries `Retry-After`, obey it instead.

3. **Retry only what cannot double-execute.** GET/PUT/DELETE are idempotent; retry freely. POST only with an idempotency key — a 500 or timeout on POST may have committed server-side (the charge went through, the response didn't). Details and key lifetime: `resilience.md`.

4. **Status triage in this order: 401 → credential, 403 → permission, 404 → maybe permission too.** 401 = the API doesn't know who you are (missing/expired/malformed token). 403 = it knows you and says no (scope, plan tier, IP allowlist). Some APIs (GitHub among them) return 404 for resources you lack access to, to avoid confirming existence — a "not found" on a resource you know exists is an auth bug, not a URL bug.

5. **HTTP 200 is not success.** Check the body for `error`/`errors` fields (GraphQL always returns 200 — `graphql.md`), batch endpoints for per-item failures (207 Multi-Status or a 200 with a mixed `results` array — `async-jobs.md`), and streams for completion (`streaming.md`).

6. **Both timeouts, always.** Set connect and read timeouts explicitly; a request without them hangs forever on a dead upstream. Values and rationale: `resilience.md`; for streams, read timeout means inter-chunk idle (`streaming.md`).

7. **Credentials in headers, never in URLs.** Query-param keys land in access logs, proxy caches, and browser history. Env vars only; naming scheme for multi-account setups: `credentials.md`.

8. **Paginate to completion or say you didn't.** Terminate on the API's own signal (`has_more`, next cursor absent) — never on item count alone. If you stop early, state that results are partial.

## Status Triage

Beyond Core Rule 4's 401/403/404 chain:

| Code | Meaning | First move |
|------|---------|-----------|
| 400 | Request malformed or rejected | Read the body's error field, then `debug.md` Mysterious 400s |
| 405 | Method not allowed | Wrong verb — or a redirect: clients follow 301/302 on POST by re-issuing GET (trailing-slash URLs are the classic trigger) |
| 409 | State conflict | Re-fetch current state; concurrent edit or duplicate create |
| 410 | Gone permanently | Retired resource or API version (`versioning.md`); expired sync token (`sync.md` Sync Tokens) |
| 412 | Precondition failed | Your `If-Match` ETag is stale — re-read, re-apply, retry |
| 415 | Unsupported media type | `Content-Type` missing or wrong (top trap below) |
| 422 | Validation failed | Well-formed but semantically rejected — field-level errors are in the body |
| 429 | Rate limited | `rate-limits.md`; obey `Retry-After` |
| 500 | Server bug | Retry only idempotent requests (`resilience.md` Retry Logic) |
| 502/503/504 | Edge/LB failure or overload, often with an HTML body | Backoff and retry; check the status page (`resilience.md` Provider Outages) |

## Output Gates

Before emitting integration code or a diagnosis, check:

- Every POST/PUT/PATCH example includes `Content-Type: application/json` (or the API's required type)
- No secret appears in a URL, code literal, or logged output — env var references only
- Every pagination loop terminates on the API's `has_more`/cursor signal, not on `len(items)`
- Retry logic distinguishes 4xx (don't retry, fix the request) from 429/5xx (backoff and retry)
- Webhook handler verifies signature on the raw body before parsing (→ `webhooks.md`)
- Money handled in the currency's own convention (minor units, exponent), IDs as strings (→ `data-formats.md`)
- Examples reference the `default_environment` credential (sandbox unless the user asked for live)

## Configuration

User-dependent variables. Defaults apply until the user states a preference; store them in `~/Clawic/data/api/config.yaml` (loading and recording procedure: `setup.md`).

| Variable | Type | Default | Effect |
|---|---|---|---|
| example_language | curl \| python \| javascript \| go | curl | Language every request example is rendered in, across all category and pattern files |
| client_style | raw \| sdk | raw | Whether examples use raw HTTP or the provider's official SDK (tradeoff: Where Experts Disagree) |
| default_environment | sandbox \| live | sandbox | Which credential examples reference (`credentials.md` naming); live only on explicit request — enforced by the last Output Gate |
| retry_max | number (0-10) | 4 | Retry ceiling used in Core Rule 2's formula and all generated retry code |

Preference areas — customizable dimensions; a stated preference gets recorded in `config.yaml` and applied:

- **Tooling**: HTTP client library (requests/httpx, axios/fetch, net/http) and testing tool (curl, HTTPie, Postman) — shapes every snippet
- **Integrations**: the user's chosen provider per category (payments → Stripe, email → Postmark) — which service section answers a generic ask
- **Conventions**: credential env-var naming (default scheme: `credentials.md`), error-handling style (exceptions vs result values) — shapes generated code
- **Thresholds**: org-mandated timeouts and retry budgets — override the `resilience.md` defaults when stated
- **Safety posture**: whether examples may include write/mutating calls, confirm-before-live behavior — tightens or relaxes the environment gate
- **Output format**: snippet-only vs annotated walkthrough — answer verbosity

## Traps

| Trap | Why it fails | Do instead |
|------|--------------|------------|
| Missing `Content-Type` on POST | Many APIs parse the body as form-encoded or reject with an unhelpful 400/415 | Always send `Content-Type: application/json` with JSON bodies |
| Trusting the default page size | Defaults are small; you silently process a fraction of the data | Loop until the API's completion signal (→ `pagination.md`) |
| Retrying 400 Bad Request | The request itself is invalid; identical retries burn quota and can trigger abuse detection | Fix the payload; retry only 429/5xx |
| Copy-pasted token fails with 401 | Trailing newline or wrapping quotes from the clipboard corrupt the header | `echo -n`, or trim before use |
| Testing against production keys | Live-mode side effects (real charges, real emails) during development | Sandbox key first; gate and prefixes in `testing.md` and `credentials.md` |
| One giant try/catch around the whole call | 401, 429, and 500 need different responses; a generic catch retries the unretryable | Branch on status class before any retry |
| Parsing each network chunk as one SSE event | TCP splits and merges events arbitrarily; JSON parse fails mid-token | Buffer to the blank-line delimiter (→ `streaming.md`) |
| Numeric IDs parsed as numbers | 64-bit IDs overflow JS's 2^53−1 and round silently | Treat every ID as an opaque string (→ `data-formats.md`) |
| Buffering a whole download in memory | Multi-GB export = OOM that dev-sized data never showed | Stream to disk; verify against `Content-Length` (→ `files.md`) |
| Calling a third-party API straight from the browser | Most APIs send no CORS headers, and any key in the bundle is public | Proxy through your backend; only provider-designated browser-safe keys ship client-side (→ `browser.md`) |

## Where Experts Disagree

- **Official SDK vs raw HTTP.** SDKs win where auth is hard (request signing, OAuth refresh) and lose freshness — new endpoints land in the API before the SDK. Default: raw HTTP for simple bearer-token APIs; SDK when the provider signs requests or its docs treat the SDK as the primary interface. `client_style` records the user's side.
- **Webhooks vs polling.** Webhooks for volume and latency; polling is legitimately simpler when events are rare, no public endpoint can be hosted, or the poll interval is acceptable staleness. The wrong answer is webhooks without the full handler order (`webhooks.md`).
- **Idempotency keys on every POST vs only where double-execution hurts.** Every-POST buys uniform retry safety; minimalists note the bookkeeping cost. Boundary: any POST whose duplicate the user would notice (charge, email, order) gets a key — no exceptions there, optional elsewhere.

## Security & Privacy

This skill is documentation: endpoint reference, auth patterns, and example requests for the external services listed above. Example endpoints belong to the respective providers (Stripe, OpenAI, etc.).

It does NOT:
- Store or manage API keys or secrets — it references env-var names; values are never read, printed, or persisted
- Make API calls on its own — the user runs the requests
- Send data to any external service

Guardrails:
- Credential discovery lists variable NAMES, never values (`credentials.md` Selection Rules)
- Sandbox/test credentials by default; live keys only on explicit user request
- Generated webhook handlers always verify signatures before parsing the payload

## Related Skills
More Clawic skills, get them at https://clawic.com/skills/api (install if the user confirms):

- `http` — HTTP request patterns
- `webhook` — Webhook handling
- `json` — JSON processing

## Feedback

- If useful, star it: https://clawic.com/skills/api
- Latest version: https://clawic.com/skills/api

---

Part of [Clawic](https://clawic.com), the verified skill library. Get this skill: https://clawic.com/skills/api.

「知識管理」分類下的熱門技能

搜尋引擎知識管理

透過公開搜尋URL在16個搜尋引擎(7個國內直連+9個國際)中做跨引擎檢索、結果去重與多源交叉驗證,無需API Key,內建零依賴Python指令碼。Use when 使用者要求“搜一下/查資料/多找幾個來源/核實訊息/找公眾號文章/排查報錯/找論文或開源專案”時。輸入自然語言查詢詞,輸出帶來源連結與可信度標註的結構化結果。不適用於私有資料檢索、批次抓取、需要登入後可見的內容。

↓ 1075.9萬★ 147u_8ee34d77
ima-skills知識管理

透過 IMA OpenAPI 管理筆記與知識庫內容。

↓ 108.4萬★ 566u_1742680f
Summarize知識管理

把長文字、文件與網頁內容壓縮成要點和關鍵詞的摘要工具。

↓ 87.6萬★ 1048paudyyin
全網搜尋知識管理

透過“查一下、搜一下、搜尋、找一下”等自然語言檢索公開網頁,整理來源並交付橫版 PDF、Markdown 與標題連結表。支援使用者主動開啟、檢視和取消技能收藏,保留原報告取回。

↓ 50.9萬★ 2u_32d99f8a
web-tools-guide知識管理

規定如何為網頁請求選擇合適工具的必讀指引。

↓ 40萬★ 220user_ec205dbb
Aihot Skill Lite知識管理

AI HOT(aihot.virxact.com)中文 AI 資訊查詢 Skill,幫助使用者獲取今日 AI 圈動態、AI 日報、AI 熱點、最新 AI 資訊以及 OpenAI、Anthropic、Google 等公司的最新發布資訊。

↓ 32.1萬★ 92Khazix
全球12億文獻知識庫(8千萬中文期刊可下載)知識管理

全球12億文獻知識庫(8千萬中文期刊可下載)——透過 SmartLib 開放平台 API 提供中外文學術文獻檢索與下載能力,覆蓋 8000 萬篇授權中文期刊全文 + 12.28 億條全球文獻後設資料(期刊 7.19 億 / 專利 2.15 億 / 會議 7155 萬 / 學位論文 2473 萬 / 標準 268 萬)。 能力:中英文關鍵詞檢索、文獻詳情、中文期刊 PDF 全文下載、外文 OA 文獻十級渠道免費下載(不消耗配額)、智慧關鍵詞擴充套件、核心期刊優先排序、相關性重排、引文追溯、分類號檢索。 配額:首次使用自動註冊,免費 100 次檢索 + 10 次下載 / 月;耗盡自動彈出方案(體驗卡 / 個人版月 / 專業版月 / 單篇下載 / 下載包),可說「升級 / 充值」喚起;企業 / 機構定製聯絡 [email protected]。 觸發:使用者表達"查論文""找文獻""檢索學術""搜期刊""查專利""找標準""下論文""寫文獻綜述""找參考文獻""查 SCI/EI"等意圖時啟用;也適用"幫我找關於 XX 的論文""寫文獻綜述""找幾篇引用支撐論點"。英文:"find papers" "search literature" "write literature review" "find supporting citations"。 呼叫前必須先用 /consume 獲取 consume_token,再憑 token 調 /search(每次計費介面呼叫都需一次 /consume)。

↓ 30.3萬★ 189user_164f4c1f
Markdown Converter知識管理

用 uvx 直接呼叫 markitdown,把各類檔案轉成 Markdown。

↓ 20.4萬★ 256Peter Steinberger

Iván 的其他技能

資料月份:2026-10 · 下載/星標數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。