sourcely/developers
SOURCELY API PREVIEW

Response & request models

Every field, its meaning, type, nullability, and default — taken from the API contract.

A required field must be present. An optional field may be omitted. A type containing null also accepts a null value. The server currently serializes optional response fields as null rather than removing them.

Resolve entries in document.source_ids and claims[].source_ids through the top-level sources map. Scores are relative ranks, not confidence percentages.

See all enum values for the exact tokens referenced below. balance_after stays null. A webhook_url receives a POST when the search finishes; see Webhooks.

SearchRequest

FieldTypePresence / defaultMeaning
textstringRequiredThe text to find academic sources for. At least one character; there is no maximum length. Whitespace-only input is currently accepted by validation. Minimum length: 1.
modeSearchModeOptional; default: "quick"Search depth. quick fetches one Google Scholar page per generated keyword, falling back to Semantic Scholar, and keeps the provider order. deep fetches Semantic Scholar plus three Scholar pages per keyword, has a language model shortlist the 15 most promising sources, reads each one, and ranks them again with the analysis in hand. deep takes minutes rather than seconds.
enrichmentEnrichmentLevel | nullOptionalAnalysis level, independent of search depth. Omitted or null means medium for quick and high for deep.
granularityarray<Granularity>OptionalResult tracks to produce. Defaults to ["document"]. Use ["claim"] or ["document", "claim"] for claim-level results. An empty list currently falls back to document.
max_claimsintegerOptional; default: 4Maximum identified claims to search, from 1 to 12. Defaults to 4. Only applies when the claim track is requested. Minimum: 1. Maximum: 12.
citation_formatsarray<CitationFormat> | nullOptionalCitation formats to populate. Omitted or null selects all five supported formats. An empty array disables citations.
filtersFilters | nullOptionalOptional constraints on source selection. Omit or use null for no additional filtering.
webhook_urlstring | nullOptionalOptional http(s) URL. When set, the API POSTs the finished search here. The host must be public unless the deployment allows private URLs. Polling still works.

Filters

FieldTypePresence / defaultMeaning
year_frominteger | nullOptionalInclusive lower publication-year bound. For example, 2020 keeps papers from 2020 onward. Papers without a known year are excluded when this is set. Omit or use null for no lower bound; use year_from <= year_to when both are set.
year_tointeger | nullOptionalInclusive upper publication-year bound. For example, 2024 keeps papers published in 2024 or earlier. Papers without a known year are excluded when this is set. Omit or use null for no upper bound. The current API does not validate year-range ordering.
min_citationsinteger | nullOptionalMinimum citation count, inclusive, as an integer >= 0. For example, 10 keeps sources with at least 10 citations. An unknown citation count is treated as zero for filtering, so it passes a threshold of 0 but not a positive threshold. Omit or use null to disable this filter.
open_accessboolean | nullOptionalWhen true, require a non-empty pdf_url in the available source metadata. This is a PDF-availability check, not verification of licensing or download access. false, null or omission disables the filter; false does not mean closed-access only.
paper_typesarray<PaperTypeFilter> | nullOptionalOptional array of exact enum values: research and review. ["review"] keeps sources identified as reviews by a metadata-text heuristic; ["research"] excludes those sources. Both values disable this local distinction, but upstream providers can still favor reviews when review is included. Omit, use null or [] to avoid a paper-type restriction. This filter is not a peer-review guarantee.
venuestring | nullOptionalOptional journal or publication-venue name, such as Nature. Forwarded to Semantic Scholar and Scholar URL-based providers; the current Serper adapter does not forward it. No exact venue check is applied after retrieval, so matching depends on the provider and unrelated venues can appear. Omit, use null or an empty string to disable the venue hint.
include_keywordsarray<string> | nullOptionalOptional array of strings that must all occur in the combined title, abstract and venue metadata. Local matching uses case-insensitive substrings, not whole words or full-paper text. For example, ["sleep", "memory"] requires both. Scholar providers also receive each entry as a required quoted phrase added to the query, which can narrow retrieval further. Omit, use null or [] to disable. Entries are trimmed and empty ones ignored.
exclude_keywordsarray<string> | nullOptionalOptional array of strings: exclude a source if any occurs in its title, abstract or venue metadata. Local matching uses case-insensitive substrings. For example, ["mouse", "rat"] excludes either match, including rat inside another word. Omit, use null or [] to disable. Do not include an empty string, because it matches every source. This does not inspect full-paper text.
include_domainsarray<string> | nullOptionalOptional array of host names. Only sources whose url or pdf_url is on one of these domains, or a subdomain, are returned. For example, ["ncbi.nlm.nih.gov"] also matches pubmed.ncbi.nlm.nih.gov. Entries may be given as bare hosts or full URLs; scheme, www. and paths are ignored. Scholar providers receive matching site: operators as well. Sources without a URL are excluded when this is set. Omit, use null or [] to disable.
exclude_domainsarray<string> | nullOptionalOptional array of host names. Any source whose url or pdf_url is on one of these domains, or a subdomain, is dropped. For example, ["wikipedia.org"] removes en.wikipedia.org results. Entries are normalized like include_domains. Scholar providers receive matching -site: operators as well. Omit, use null or [] to disable.
preferred_domainsarray<string> | nullOptionalOptional array of host names, most preferred first. Sources on these domains, or their subdomains, are moved ahead of other results; earlier entries rank ahead of later ones, and provider order is kept within each group. Other domains still appear. Omit, use null or [] to keep the provider ranking only.

JobAccepted

FieldTypePresence / defaultMeaning
job_idstringRequiredOpaque search identifier. Save it and pass it unchanged to GET /search/{job_id}.
statusJobStatusOptional; default: "queued"Search state at acceptance. POST /search returns queued; GET /search/{job_id} provides the latest state.
usageUsage | nullOptionalUSD quote for this search. estimated_cost is the maximum charge for the requested options. actual_cost is null until the search finishes. balance_after stays null; the dashboard holds the balance.

SearchResult

FieldTypePresence / defaultMeaning
job_idstringRequiredThe same opaque search identifier returned by creation.
statusJobStatusRequiredOverall job state. Inspect this even when the HTTP response is 200.
result_typestringOptional; default: "search"Response discriminator; currently "search".
documentDocumentTrack | nullOptionalDocument-level result track, or null when not requested or not available.
claimsarray<Claim> | nullOptionalIdentified claims and their results, or null when the claim track was not requested or is unavailable.
sourcesmap<string, Source>OptionalSource objects indexed by source ID. Resolve each document.source_ids or claim.source_ids entry in this map.
usageUsage | nullOptionalUSD quote and charge for this search. estimated_cost is set when the search is created. actual_cost is null while it is running, the calculated charge when it completes, and zero when it fails. balance_after stays null; the dashboard holds the balance.
metadataSearchMetadata | nullOptionalRequested and actual claim-search counts, when available.

DocumentTrack

FieldTypePresence / defaultMeaning
source_idsarray<string>OptionalOrdered source IDs for this document. Resolve each ID in the top-level sources map.
scoresmap<string, number>OptionalRank scores keyed by source ID for this document context. Larger values rank higher; these are not confidence percentages.
search_queriesarray<string>OptionalThe search phrases sent to the academic providers for this document, most relevant first. They are written from the submitted text by a language model, two for most texts and three past 3000 characters, and reused for later pages. Empty until the track has run.
pageintegerOptional; default: 1Latest page fetched for this track, initially 1. A page is one provider results page of up to 10 sources for every search query, in query order, so a document page holds up to 20 sources, or 30 for texts over 3000 characters. Additional-page endpoints are outside the initial public surface.
has_morebooleanOptional; default: falseTrue when at least one search query filled its latest provider page, so another page may exist. It is not a guarantee or an initial-release pagination capability.
statusTrackStatusOptional; default: "pending"State of this result track, distinct from overall job status.

Claim

FieldTypePresence / defaultMeaning
idstringRequiredIdentifier for this claim within the search.
spanstringRequiredThe identified claim text from the input.
searchedbooleanRequiredWhether a source search was attempted for this claim. Claims beyond max_claims can be returned with false.
source_idsarray<string>OptionalOrdered IDs pointing into the top-level sources map.
scoresmap<string, number>OptionalPer-claim rank scores keyed by source ID; not probabilities.
pageintegerOptional; default: 1Latest page fetched for this claim; initially 1.
has_morebooleanOptional; default: falseHeuristic indication of additional potential results. Claim refetch is deferred.
statusTrackStatusOptional; default: "pending"State of the claim track. Unsearched claims may remain pending after the job completes.
errorErrorDetail | nullOptionalSafe error details for a failed claim, when present.

Source

FieldTypePresence / defaultMeaning
idstringRequiredSource identifier matching its key in the sources map.
titlestringRequiredTitle of the academic source.
authorsarray<string>OptionalAuthor names in provider order. An empty array means unavailable.
yearinteger | nullOptionalPublication year, or null when unknown.
venuestring | nullOptionalPublication venue or journal, or null when unknown.
abstractstring | nullOptionalAvailable abstract or provider summary; may be null.
urlstring | nullOptionalSource landing-page URL as a string, or null. Current validation does not enforce a URL format.
pdf_urlstring | nullOptionalAvailable PDF URL as a string, or null.
citation_countinteger | nullOptionalKnown citation count, or null when unavailable. Zero differs from an unknown count.
scorenumber | nullOptionalRank score attached to the source. Use the track-specific scores map when a source is shared between tracks.
citationsCitations | nullOptionalFormatted citations. Null when citation_formats is empty; unrequested individual formats are null.
enrichmentEnrichment | nullOptionalAnalysis object, or null for enrichment none. Low only populates relevance; other levels may use fallback analysis.
parsed_sourcestring | nullOptionalText obtained during high enrichment, with abstract fallback when full text is unavailable. Not a guarantee of a complete paper.

Citations

FieldTypePresence / defaultMeaning
apa7string | nullOptionalAPA 7 formatted citation, or null if not requested.
mla9string | nullOptionalMLA 9 formatted citation, or null if not requested.
ieeestring | nullOptionalIEEE formatted citation, or null if not requested.
harvardstring | nullOptionalHarvard formatted citation, or null if not requested.
bibtexstring | nullOptionalBibTeX entry, or null if not requested.

Enrichment

FieldTypePresence / defaultMeaning
levelEnrichmentLevelRequiredEffective enrichment level used for this source.
relevance_ratingRelevanceRating | nullOptionalQualitative relevance label. These current wire values are case-sensitive, human-readable strings; see the enum reference.
analysisstring | nullOptionalMarkdown explanation of the source’s relevance. Null at low enrichment.
evidencearray<SupportingEvidence> | nullOptionalSupporting excerpts or findings and their explanations. Null at low; current fallbacks may produce fewer items than the intended 3–5.
paper_typePaperTypeClassification | nullOptionalEight classification flags, or null at low enrichment. Heuristic/model output is not independent verification.

SupportingEvidence

FieldTypePresence / defaultMeaning
quotestringRequiredAn excerpt or finding attributed to the source. Check against the original source before quoting it as verbatim.
explanationstringRequiredMarkdown explanation connecting the evidence to the research text.
tagstringRequiredShort descriptive label for the evidence.

PaperTypeClassification

FieldTypePresence / defaultMeaning
peer_reviewedbooleanRequiredWhether analysis classifies the source as peer reviewed.
renowned_authorbooleanRequiredWhether analysis classifies the author as established in the field.
top_tier_venuebooleanRequiredWhether analysis classifies the venue as top tier.
meta_analysisbooleanRequiredWhether the source is classified as a meta-analysis.
research_articlebooleanRequiredWhether the source is classified as original research.
review_articlebooleanRequiredWhether the source is classified as a literature review.
preprintbooleanRequiredWhether the source is classified as a preprint.
randomized_control_trialbooleanRequiredWhether the source is classified as a randomized controlled trial.

SearchMetadata

FieldTypePresence / defaultMeaning
requested_max_claimsinteger | nullOptionalRequested cap for claim searches.
actual_max_claimsinteger | nullOptionalReported number of claims eligible under the request cap and extracted claim count.

Usage

FieldTypePresence / defaultMeaning
currencystringOptional; default: "USD"Currency for the amounts in this object. Currently USD.
estimated_costnumber | nullOptionalMaximum USD charge for the requested mode, enrichment, source count, and claim count. Computed before the search runs. Null only on older records.
actual_costnumber | nullOptionalUSD reported for this search. Null while the search is still running. Zero when the search fails. On success, retrieval plus per-source enrichment for the sources actually returned, which can be below the estimate. A finished track with no sources still includes its retrieval fee.
discount_percentinteger | nullOptionalSubscription discount already applied to estimated_cost and actual_cost, as a whole percentage: 15 for Pro, 35 for Ultra, 50 for Max, 0 without a subscription. Null only on older records.
balance_afternumber | nullOptionalPrepaid balance after this search. Null on this response. Create reads the dashboard balance and rejects with 402 when it cannot cover the estimate. The later usage report is what decreases it.

ErrorResponse

FieldTypePresence / defaultMeaning
errorErrorDetailRequiredStructured API error details.

ErrorDetail

FieldTypePresence / defaultMeaning
codestringRequiredStable machine-readable error identifier.
messagestringRequiredHuman-readable description. Clients should branch on code, not this text.
detailsobject | nullOptionalOptional additional error details; structure depends on the error.

HTTPValidationError

FieldTypePresence / defaultMeaning
detailarray<ValidationError>OptionalField-level validation issues returned by FastAPI; differs from the custom error envelope.

ValidationError

FieldTypePresence / defaultMeaning
locarray<string | integer>RequiredLocation of the invalid value, such as ["body", "max_claims"].
msgstringRequiredHuman-readable validation explanation.
typestringRequiredMachine-readable validation issue type.
inputanyOptionalInvalid input value when included by FastAPI. Avoid logging validation payloads containing sensitive text.
ctxobjectOptionalAdditional validation context, when present.

On this page