Extract Citations
text.extract_citations
Overview
LEVEL 1 (syntactic extraction) ONLY: finds citation-like tokens — URLs, DOIs, Markdown footnotes, Markdown links, numeric references, and author-year mentions — using bounded, ReDoS-safe pattern heuristics. It does NOT do LEVEL 2 bibliographic parsing: it never splits a reference into author/title/year/journal fields, never validates a DOI resolves, and never fetches anything. Best-effort: returns candidates with offsets and a heuristic confidence.
You often need to spot references before summarizing or auditing content. We extract candidates deterministically instead of relying on fragile per-prompt regex.
Reliability
BEST_EFFORT — deterministic pattern matching for a given input, but confidence scores are uncalibrated heuristics and candidates are not verified references. Truncated=true when the 5000-candidate cap is reached. Input validation (not retryable): invalid types entry; text exceeds inline limit.
Context footprint
Inline text only, up to the REST body transport limit. Returns a bounded candidate list with optional character offsets. A successful call costs 1 execution credit.
When to use it
When you want to surface citation-like tokens with offsets and heuristic confidence before deeper bibliographic processing.
Do not use when you need verified, grammar-based bibliography parsing or live URL/DOI resolution.
Scope
Non-goals
- Does not fetch or validate URLs
- Does not resolve DOIs or build bibliographies
- Does not parse references into structured author/title/journal fields
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
What this means
This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response may contain submitted or transformed content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| text | string | Yes | Text scanned for mechanically recognizable citation forms. |
| types | array | No | Bounded optional citation-type array; omit it to enable every supported lexical type. The item shape is defined by the nested schema and the array contains from 0 through 16 items. |
| includeOffsets | boolean | No | Whether source offsets are returned; omit it for true. |
| deduplicate | boolean | No | Whether duplicate type/value pairs collapse; omit it for true. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| ok | boolean | Yes | Always true for a successful extraction. |
| citations | array | Yes | Bounded array of citation receipts with type, value, and optional source offsets. The item shape is defined by the nested schema and the array contains from 0 through 10000 items. |
| truncated | boolean | Yes | Whether the result cap omitted citation matches. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"text.extract_citations","input":{"text":"See https://example.com"}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("text.extract_citations", {"text":"See https://example.com and doi:10.1000/xyz123"});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not fetch or validate URLs
- Does not resolve DOIs or build bibliographies
- Does not parse references into structured author/title/journal fields
- Authoritative bibliography parsing with a formal grammar
- Verified reference validation or DOI resolution
- Fetching linked content from extracted URLs
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "text.extract_citations",
"input": {
"text": "See https://example.com and doi:10.1000/xyz123"
}
}Examples
Extract a URL and DOI
{
"text": "See https://example.com and doi:10.1000/xyz123"
}{
"truncated": false,
"citations": [
{
"type": "doi",
"start": 32,
"confidence": 0.98,
"end": 46,
"value": "10.1000/xyz123",
"normalized": "10.1000/xyz123"
},
{
"type": "url",
"start": 4,
"confidence": 0.95,
"end": 23,
"value": "https://example.com",
"normalized": "https://example.com"
}
],
"ok": true
}Numeric and author-year references only
{
"types": [
"numeric_reference",
"author_year"
],
"text": "See [1] and (Smith, 2020) for details."
}{
"truncated": false,
"citations": [
{
"type": "numeric_reference",
"start": 4,
"confidence": 0.6,
"end": 7,
"value": "[1]",
"normalized": "[1]"
},
{
"type": "author_year",
"start": 12,
"confidence": 0.5,
"end": 25,
"value": "(Smith, 2020)",
"normalized": "(Smith, 2020)"
}
],
"ok": true
}Recommended use cases
- Discover references before summarization or compliance review
- Surface DOIs and URLs in research notes or drafts
- Pre-filter documents for downstream citation processing
Avoid for
- Authoritative bibliography parsing with a formal grammar
- Verified reference validation or DOI resolution
- Fetching linked content from extracted URLs
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.