Commit Graph
509 Commits
Author SHA1 Message Date
capy-ai[bot] d7ae564d3c chore(sdks): update package descriptions (#6080)
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-11-25 20:45:33 +00:00
Kris Oei 24002c681a chore(python-sdk): release 4.58.0 (#5835) 2026-11-18 20:35:48 +00:00
Nicolasandcapy-ai[bot] 69dd8d93c1 feat(alexandria): feedback next step on answers, one refund per call and website (#5821)
* feat(alexandria): feedback next step on answers, one refund per call and website

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(alexandria): read the hint caller case-insensitively, quote the rating placeholder

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* feat(alexandria): name the objective in the feedback next step

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test(alexandria): match the next-step fixture and wording

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* ci: run the Alexandria refund and feedback hint tests

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* feat(alexandria): word the feedback next step as an instruction and state the refund

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-11-17 13:34:06 -05:00
Erik Engervallanderikengervall 46b7e9571a fix(python-sdk): stop shipping tests and backup module in the wheel (#5210)
Co-authored-by: erikengervall <5392475+erikengervall@users.noreply.github.com>
2026-11-17 13:39:27 +00:00
Karan LokchandaniandKris Oei 58d8c4bfab feat(sdks): add protein lookup to all SDKs (#5722)
* feat(sdks): add protein lookup to the Python and JS SDKs

* fix(sdks): restore the research_docs header, split the notice sentence, reuse RESEARCH_METHODS

The research_docs module docstring keeps main's wording and line breaks except for the added lookup_protein and five to six. The README notice line becomes two sentences. The sync and async client method checks now loop over RESEARCH_METHODS, so they cover lookup_protein.

* fix(sdks): keep the API's error message and code on research request failures

* feat(sdks): add protein lookup to the PHP, Ruby and Elixir SDKs

Add lookupProtein (PHP), lookup_protein (Ruby) and lookup_protein (Elixir), which call GET /v2/search/research/proteins with protein and an optional organism. The Elixir method sits in the hand-written region beside the paper methods, and generate.exs lists its route so a regenerate from the public spec emits no second definition.

* test(sdks): cover the protein lookup query in Ruby and PHP, document notice

Each test checks the path and that protein, origin and organism (only when set) reach the query string. The PHP, Ruby and Elixir doc comments now say the response's notice is the UniProt credit and license to show with the results.

* feat(sdks): add protein lookup to the Go, Rust, Java and .NET SDKs

* fix(sdks): rename GoTerm to ProteinGoTerm and cover origin and not_found

Rename the GO term type to ProteinGoTerm in the Go, Rust, Java and .NET
SDKs to match the other protein types and the JS SDK. Document that
notice carries UniProt's credit and CC BY 4.0 license. The protein tests
now assert that origin is sent, and the Rust test decodes a not_found
body.

---------

Co-authored-by: Kris Oei <oei.kris71@gmail.com>
2026-11-16 11:47:40 -08:00
Erik Engervallanderikengervall 1fcb57c3e3 feat(sdks): pass gov search sources and type the gov result group (#5719)
* feat(sdks): pass gov search sources and type the gov result group

* python-sdk: cap gov search cites list at 32, clarify data.web docstring

---------

Co-authored-by: erikengervall <5392475+erikengervall@users.noreply.github.com>
2026-11-12 14:29:24 +00:00
Nicolasandcapy-ai[bot] 590d7f9c70 feat(sdks): surface Alexandria feedback tokens and accept them in Alexandria feedback (#5600)
* feat(sdks): surface Alexandria feedback tokens and accept them in Alexandria feedback

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(js-sdk): export collectFeedbackTokens from its own module so the DTS build passes

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(sdks): validate new_capability_request, trim feedback text, accept dict tokens, fix README examples

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* docs(js-sdk): clarify why FindToolsData.feedbackToken is optional

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-11-06 21:15:09 +00:00
7d8e92dc5d Add skills search source (#5560)
* feat(api): add alexandria-skills search source

Search can request short skill cards from Exchange GET /v1/discover/skills
and return them on data.skills. The lookup runs beside the other sources,
is free, and a timeout or error leaves data.skills empty.

Also drop unused font helpers that fail the pre-commit knip check.

Co-authored-by: Developers Digest <developersdigest@users.noreply.github.com>

* fix(api): load skill cards from /v1/discover/skill-cards

The alexandria-skills source was calling the older /v1/discover/skills
route. Skill cards come from /v1/discover/skill-cards, and the parser
requires that envelope.

Co-authored-by: Developers Digest <developersdigest@users.noreply.github.com>

* fix(api): honor US-only and credit gates for skill cards

Forward usOnly on skill-card lookup, skip the free-catalogue credit
bypass for developer category aliases, and open the Alexandria feedback
window only after a successful skill lookup. Cover the skip paths, the
three-card cap, and those failure cases in tests and the README.

Co-authored-by: Developers Digest <developersdigest@users.noreply.github.com>

* feat(api): name the skill-card search source skills

Callers request sources: ["skills"]. The response is still data.skills.
Developer category aliases now live in one set used by both schema
normalization and the catalogue credit gate.

Co-authored-by: Developers Digest <developersdigest@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Developers Digest <developersdigest@users.noreply.github.com>
2026-11-04 15:30:57 -05:00
d297ae5f9d feat(api): document the product variant gtin, mpn and condition fields (#5556)
* feat(api): document the product variant gtin field

The product extraction service now returns an optional gtin on each
variant when the page or store states one. Add it to the API's product
type, the OpenAPI schema, and the JS and Python SDK types.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* feat(api): document the product variant mpn and condition fields

The product extraction service now also returns mpn and condition on each
variant when the page states them. Add both to the API's product type, the
OpenAPI schema, and the JS and Python SDK ProductVariant types, and note the
GTIN check digit in its description.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: E37U-A <288073611+E37U-A@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-11-04 11:03:12 -07:00
Karan Lokchandani 830fb0fb06 feat(research): add paper search sort and row dates to the API proxy and SDKs (#5571)
* feat(research): add paper search sort and row dates to the API proxy and SDKs

Forward the optional sort query parameter (relevance or date_desc) through the
research proxy and the Python, JavaScript, Rust, Go, Java, .NET and Elixir
SDKs, and expose the optional authors, createdDate and updateDate fields on
shared paper search and related rows.

* chore(sdk): bump Go, Java, .NET, Elixir and Rust versions for paper sort
2026-11-04 13:03:15 +05:30
Kris Oei 9c71198802 fix(sdks): clean removal errors and align developer search docs (#5569)
* fix(python-sdk): raise removal errors with the API's message

A 410 had no branch in handle_response_error, so a removed endpoint was
reported as "Unexpected error during research: Status code 410. <message>
- No additional error details provided." It now raises FirecrawlError with
the API's message, status_code 410 and the response code.

A 400 whose code is CATEGORY_REMOVED raises BadRequestError with the API's
message in the same way. Other 400s keep their current message.

* fix(js-sdk): expose the API error code on research errors

normalizeResearchError set SdkError.code from the body's type, so a 410
from a removed research endpoint dropped its ENDPOINT_REMOVED code. It now
prefers the body's code and falls back to type.

* docs(python-sdk): correct where developer and gov results land

search() groups results under .web, .news and .images. Developer and gov
category results come back inside .web; there is no .developer group.

* chore(elixir-sdk): sync the developer search result schema

DeveloperSearchResult listed a type field the API does not send, and
lacked the optional license and the passage citation_url, truncated,
served_span and full_tokens_est fields it does send. The result kind is
the id prefix.
2026-11-03 14:39:42 -08:00
Kris Oei c066954082 docs(sdks): mark the GitHub search method removed (#5536)
* docs(sdks): mark the GitHub search method removed

The research index GitHub search endpoint was removed after 2026-11-03.
Each SDK's GitHub search method now says so in its deprecation marker and
docs, and names that SDK's developer search method. Python's FutureWarning
carries the same wording. The methods and types stay until each SDK's next
major release.

The READMEs point to developer search instead of the old method, and the
github search category is documented as removed where the JS, Python, Java
and Rust docs listed it.

Patch releases: JS 4.51.1, Python 4.54.1, Go 1.16.10, Java 1.18.8,
PHP 1.16.7, Ruby 1.17.8, Rust 2.21.9, .NET 1.15.2, Elixir 1.12.7.

* docs(python-sdk): say search_github now raises FirecrawlError

* docs(sdks): tighten the GitHub search removal wording

The Rust and Elixir deprecation notes now use the same removal sentence as
the other SDKs, and the Elixir bang variant's docs give the same reason.
Python's search_github docstrings say the call always raises FirecrawlError
with the API's 410. The Java and Rust category docs say github was removed
and name the replacement, and the JS score breakdown docs drop a stale note.

The PHP and Rust changelog entries move under Changed. The JS and Python
READMEs drop their removal callouts and carry the same Developer search note
as the other seven.
2026-11-03 12:04:24 -08:00
rowinsgandcapy-ai[bot] 675de6a58e feat(api): verify TLS certificates by default (#5539)
* feat(api): verify TLS certificates by default

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(api): pass skipTlsVerification to robots.txt fetches

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(api): report untrusted certificates from the fetch engine as SSL errors

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(api): map remaining certificate verification codes to SSL errors

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(fetch): match the cert errors skipTlsVerification suppresses

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(download): map the same cert errors to SSLError as the fetch engine

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* Stop the Python SDK defaulting skip_tls_verification to true

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-11-03 15:31:09 +01:00
Kris Oei a3e4cc32dd feat(api): add Government Index filters to /v2/search/gov and release the SDKs (#5338)
* feat(api): add Government Index filters to /v2/search/gov

Accept jurisdiction, court, courtType, cites, domain, yearFrom and yearTo
on GET and POST /v2/search/gov and document them in the OpenAPI spec.
Filters that are set are forwarded to the index as snake_case fields, so a
request without filters sends the same upstream body as before. yearFrom
and yearTo require court or courtType. A 400 from the index is returned as
a 400 carrying its message.

* feat(api): drop year filters from /v2/search/gov

Remove yearFrom and yearTo from the request schema, the upstream request
body and the OpenAPI spec. Both are now refused as unknown fields, like
any other unrecognized key.

* fix(api): refuse blank court, cites and domain gov filters

* chore(sdks): bump JS to 4.51.0, Python to 4.54.0 and Elixir to 1.12.6
2026-10-22 06:43:57 -07:00
Kris Oei a5bc4e9eef feat(sdks): add Government Index filters to gov search (#5339)
* feat(sdks): add Government Index filters to gov search in the JS, Python and Elixir SDKs

Add jurisdiction, court, courtType, cites, domain, yearFrom and yearTo to
govSearch (JS), gov_search (Python, sync and async) and gov_search /
gov_search_post (Elixir). Each filter is sent only when set, using the
API's camelCase field names. yearFrom and yearTo require court or
courtType.

The Elixir client is regenerated from openapi.json, which now lists the
new /search/gov parameters.

* feat(sdks): remove year filters from gov search

The gov search filters are jurisdiction, court, courtType (court_type),
cites and domain. Remove yearFrom/yearTo from the JS SDK and
year_from/year_to from the Python and Elixir SDKs, along with their docs,
and regenerate the Elixir client from the updated openapi.json.
2026-10-22 06:05:07 -07:00
Abimael Martell d616c3416a fix(python-sdk): require patched certifi (#5324)
* fix(python-sdk): require patched certifi

* chore(python-sdk): keep certifi floor in package metadata only

* Revert "chore(python-sdk): keep certifi floor in package metadata only"

This reverts commit fdd029fbb2.
2026-10-21 17:22:36 -07:00
Rakshith Ramprakashandcapy-ai[bot] 3301ea4bab feat(agent): accept zeroDataRetention on /v2/agent (#5185)
* feat(agent): accept zeroDataRetention on /v2/agent

Forced-ZDR teams and opted-in allowed teams can run agents with zero
data retention. Threads and exchange are rejected under ZDR, the request
is logged as ZDR, and ZDR error codes from the agent service pass through.
Adds the option to the JS and Python SDKs.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(agent): list ZDR rows with model, effort and the flag only

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* agent: skills are available for ZDR runs; forward 410 zdr_expired

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test(agent): mock the credit gate's billing service in the ZDR tests

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* ci: keep the agent location step's working directory

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* agent: reject ZDR runs up front unless the team has scrape and search ZDR

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* agent: drop the ZDR permission check the up-front gate now covers

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-10-21 22:04:21 +00:00
Rakshith Ramprakashandcapy-ai[bot] 5c198a7d93 chore(agent): run agent location tests in CI and clarify search behaviour (#5255)
* chore(agent): run agent location tests in CI and clarify search behaviour

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test(agent): add warn and debug to the agent location logger mock

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-10-19 16:43:35 -07:00
Rakshith Ramprakashandcapy-ai[bot] 8b5e3423a5 feat(agent): optional location.country for /v2/agent (#5183)
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-10-19 22:56:07 +00:00
Rakshith Ramprakashandcapy-ai[bot] f05786e664 fix(api): gate /v2/agent credits after free-request consumption and cap runs at the balance (#5192)
* fix(api): gate /v2/agent credits after free-request consumption and cap runs at the balance

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test(api): cover the default agent cap above the balance

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(api): refuse an agent run whose balance cap would be zero or below

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(api): follow Autumn overage for free plans in the agent gate

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-10-19 22:39:35 +00:00
Erik Engervallanderikengervall ca571342b3 fix(python-sdk): raise transport errors from search instead of an AttributeError (#5248)
Co-authored-by: erikengervall <5392475+erikengervall@users.noreply.github.com>
2026-10-19 18:06:53 +00:00
Erik Engervallanderikengervall 5c1fb26173 fix(python-sdk): construct without an API key, keep the sync watcher working on Python 3.8 (#5245)
* fix(python-sdk): construct without an API key, keep the sync watcher working on Python 3.8

* fix(python-sdk): resolve the origin at construction, stop watchers on repeated status failures, run sync status calls off the loop

* test(python-sdk): use a short positive poll interval in the watcher fallback tests

---------

Co-authored-by: erikengervall <5392475+erikengervall@users.noreply.github.com>
2026-10-19 17:06:06 +00:00
Erik Engervallanderikengervall 38e349d5f4 docs(sdks): describe Firecrawl as the context API for AI agents in the JS and Python package descriptions (#5224)
* docs(sdks): describe Firecrawl as the context API for AI agents in the JS and Python package descriptions

* chore(js-sdk): release 4.49.1 with the new package description

---------

Co-authored-by: erikengervall <5392475+erikengervall@users.noreply.github.com>
2026-10-19 06:14:50 +00:00
Erik Engervallanderikengervall 8710c0125d feat(sdks): keep v1-style calls working on the v2 clients, with a one-time deprecation warning (#5223)
* feat(sdks): keep v1-style calls working on the v2 clients, with a one-time deprecation warning

* fix(sdks): translate v1 crawl and map options in the aliases, accept idempotency_key on crawl aliases

---------

Co-authored-by: erikengervall <5392475+erikengervall@users.noreply.github.com>
2026-10-19 05:31:26 +00:00
Erik Engervallanderikengervall d0f33391ca docs: describe Firecrawl as the context API for AI agents in SDK READMEs and package metadata (#5222)
* docs: describe Firecrawl as the context API for AI agents in SDK READMEs and package metadata

* docs(sdks): name Agent, Monitor and browser sessions in the Java and PHP package descriptions

---------

Co-authored-by: erikengervall <5392475+erikengervall@users.noreply.github.com>
2026-10-19 01:33:03 +00:00
Erik Engervallanderikengervall 02851dfe77 chore(python-sdk): release 4.52.1 (#5221)
Co-authored-by: erikengervall <5392475+erikengervall@users.noreply.github.com>
2026-10-19 01:16:35 +00:00
Erik Engervallanderikengervall 99399112c4 fix(python-sdk): stop status auto-pagination from re-polling a running job (#5220)
* fix(python-sdk): stop status auto-pagination from re-polling a running job

* fix(python-sdk): stop only when an empty page repeats its cursor

* fix(python-sdk): honor max_results before paging async crawl status

---------

Co-authored-by: erikengervall <5392475+erikengervall@users.noreply.github.com>
2026-10-19 01:08:48 +00:00
Erik Engervallanderikengervall 03a513aea9 chore(python-sdk): release 4.52.0 (#5219)
Co-authored-by: erikengervall <5392475+erikengervall@users.noreply.github.com>
2026-10-19 00:34:45 +00:00
Erik Engervallanderikengervall 700f7d488d feat(sdks): let wrapper libraries set and default the request origin (#5217)
* feat(sdks): let wrapper libraries set and default the request origin

* test(js-sdk): give http fakes getOrigin

* fix(sdks): address review feedback on wrapper origin detection

* fix(sdks): keep playground-named wrappers on the plain origin and test the extract origin gate

---------

Co-authored-by: erikengervall <5392475+erikengervall@users.noreply.github.com>
2026-10-19 00:22:37 +00:00
Erik Engervallanderikengervall 506082d982 docs(sdks): refresh the opening copy in the SDK READMEs (#5205)
* docs(sdks): refresh the opening copy in the SDK READMEs

* docs(sdks): list crawl, map and parse in the Python intro; drop the repeated Elixir clause

---------

Co-authored-by: erikengervall <5392475+erikengervall@users.noreply.github.com>
2026-10-18 23:06:58 +00:00
Erik Engervallanderikengervall de9bbe478f chore(python-sdk): release 4.51.0 (#5202)
Co-authored-by: erikengervall <5392475+erikengervall@users.noreply.github.com>
2026-10-18 23:06:33 +00:00
Erik Engervallanderikengervall 5164ce3a51 fix(python-sdk): parse unfiltered find_tools, install as firecrawl, credit Firecrawl (#5199)
* fix(python-sdk): parse unfiltered find_tools, install as firecrawl, credit Firecrawl

* fix(js-sdk): category items from findTools carry no name

---------

Co-authored-by: erikengervall <5392475+erikengervall@users.noreply.github.com>
2026-10-18 23:06:12 +00:00
Gergő Móriczandcapy-ai[bot] 8d62750016 feat(api): run browser and interact sessions from a chosen country (#5029)
* fix(api): run interact sessions from the scrape's location country

Carry the scrape's location.country and proxy type on BrowserOptions and
map them to Hangar's proxy selection, so an interact session egresses from
the country (and pool) the scrape used.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* feat(api): accept location on browser session create

/v2/browser and /v2/interact take location.country (ISO 3166-1 alpha-2)
and pass it to Hangar's proxy selection. Add the option to the JS, Python,
Go, Java, PHP and Elixir SDKs.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(sdks): cover omitted Elixir browser location; add profile and location to the PHP facade annotation

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(php-sdk): type the facade browser() array parameters

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-10-09 02:39:22 +02:00
Gergő Móriczandcapy-ai[bot] fa7ec5f0a9 feat(api): make checkPromptInjection a top-level scrape option (#5024)
* feat(api): make checkPromptInjection a top-level scrape option

The json format's checkPromptInjection is lifted into the new top-level
flag at parse time. The guard runs once per scrape on the page markdown,
before any LLM-backed format, and bills +4 regardless of format.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(api): project the prompt injection guard fee for keyless scrapes; cover SmartScrape page scans

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* docs(sdks): say checkPromptInjection works with any format

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-10-08 22:35:13 +02:00
a73af1d5df fix(python-sdk): cancel the crawl when async crawl() is cancelled; cancel_crawl returns False on 409 (#4897)
* fix(python-sdk): cancel the crawl when async crawl() is cancelled; cancel_crawl returns False on 409

cancel_crawl now returns False when the API answers 409, which it does
when the crawl already completed. Before, it raised FirecrawlError. Other
error codes still raise. This applies to the sync and async clients.

The async crawl() starts a crawl and waits for it. If the task that
awaits it is cancelled (asyncio.timeout, asyncio.wait_for, Task.cancel),
crawl() now sends a best-effort cancel for the started job, then
re-raises the CancelledError unchanged. The cancel runs in a shielded
task with a 10 second limit, and its errors are ignored. start_crawl and
wait_crawl do not change, and the SDK timeout parameter still raises
CrawlJobTimeoutError without a cancel.

Bump python-sdk to 4.46.1.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H5YqtAzmu8fHaWAUDQLZa4

* fix(python-sdk): address review on crawl cancellation

- README and the async crawl() docstring: the best-effort cancel runs
  only after start_crawl returns the job id. Task.cancel() gives
  CancelledError, while asyncio.timeout and asyncio.wait_for give
  TimeoutError.
- cancel_crawl docstrings: also list the transport error that the HTTP
  client can raise (httpx.HTTPError async, requests.RequestException
  sync).
- _cancel_abandoned_crawl: add a done callback that reads the cancel
  task's outcome. A second cancellation of the caller no longer leaves
  a "Task exception was never retrieved" log.
- Tests: time the slow-cancel test (under 1 s), and add a test that
  cancels twice and checks that the loop reports no error.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H5YqtAzmu8fHaWAUDQLZa4

* chore(python-sdk): bump to 4.49.3

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: mogery <mogery@sideguide.dev>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-10-07 23:22:02 +02:00
claude[bot]andClaude Opus 5.5 9ae2451b39 fix(sdks): match the Alexandria client timeout to the API's 120 s cap (#4995)
* fix(sdks): match the Alexandria client timeout to the API's 120 s cap

The JS and Python SDKs capped the Alexandria execution timeout at 50 s.
With the 30 s response margin, the client gave up at 80 s. The API now
defaults and caps the timeout at 120 s, so the server continued and
billed a late success that the caller never got.

Default and cap the client timeout at 120 s with named constants, and
keep the 30 s margin (150 s transport timeout). Bump JS to 4.44.1 and
Python to 4.49.2.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PHiJVRAaJ4rUWemp1cQBqq

* fix(sdks): apply the 120 s Alexandria timeout cap to Go and Rust

The Go SDK waited for the caller's timeout plus 5 s, or its 5 min
client default. The Rust SDK waited for the caller's timeout plus 5 s,
or used no timeout. Use the same rule as the JS and Python SDKs: cap
the execution timeout at the API's 120 s default and add a 30 s
margin for response delivery (150 s when no timeout is given).

Bump Go to 1.16.4 and Rust to 2.21.4.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PHiJVRAaJ4rUWemp1cQBqq

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-07 03:20:29 -04:00
Gergő Móricz 4b00a298c7 fix(python-sdk): expose get_agent_thread on Firecrawl and AsyncFirecrawl (#4983)
* fix(python-sdk): expose get_agent_thread on Firecrawl and AsyncFirecrawl

* test(python-sdk): assert the async thread read path
2026-10-07 00:43:02 +02:00
tomsideguide 78cae3fa92 chore(sdks): bump JS to 4.44.0 and Python to 4.49.0 (#4981) 2026-10-06 19:18:07 +00:00
tomsideguide 8f288b3c3a feat(api): make ad blocking configurable for browser sessions (#4977) 2026-10-06 20:06:27 +01:00
PhantomInTheWire dc31bbf41e chore(sdks): bump JS to 4.43.0 and Python to 4.48.0 2026-10-07 00:14:30 +05:30
PhantomInTheWire 163359e968 refactor: rename to gov 2026-10-06 23:58:44 +05:30
PhantomInTheWire 929582d1f3 docs: rename the index 2026-10-06 23:58:44 +05:30
PhantomInTheWire 6a9af56620 test: drop redundant cases; fix gov docs 2026-10-06 23:58:44 +05:30
PhantomInTheWire 7ab8ef305e test: merge request shape cases and cover the gov category 2026-10-06 23:58:44 +05:30
PhantomInTheWire 8cc9068120 feat(search): accept the gov category 2026-10-06 23:58:44 +05:30
PhantomInTheWire f000f970d6 fix(sdk): raise on an unsuccessful search response 2026-10-06 23:58:44 +05:30
PhantomInTheWire 2763b03a42 refactor(index): move the endpoint to /search/gov 2026-10-06 23:58:44 +05:30
Kris Oei 564ac3f353 feat(sdk): add an index search method 2026-10-06 23:58:44 +05:30
Gaurav Chadha 8c84d8b6a1 fix(python-sdk): typed exceptions for DNS and TLS scrape failures (#4970)
* fix(python-sdk): typed exceptions for DNS and TLS scrape failures

* fix(python-sdk): keep API details on DNS/TLS errors
2026-10-06 04:27:05 -04:00
Gergő Móricz 0be5955a33 fix(python-sdk): poll /v1/batch/scrape/{id} in v1 batch_scrape_urls (#4919) 2026-10-02 17:00:19 +02:00