Skip to main content
Search for GPU offers.

Signature

VastAI.search_offers(
    query: Any = None,
    type: str = 'on-demand',
    order: str = 'score-',
    limit: Optional[int] = None,
    storage: float = 5.0,
    no_default: bool = False,
    new: bool = False
) -> list

Parameters

query
Any
Query to search for. default: ‘external=false rentable=true verified=true’, pass -n to ignore default
type
str
default:"on-demand"
Alias for —type=on-demand
order
str
default:"score-"
Comma-separated list of fields to sort on. postfix field with - to sort desc. ex: -o ‘num_gpus,total_flops-’. default=‘score-’
limit
Optional[int]
storage
float
default:"5.0"
Amount of storage to use for pricing, in GiB. default=5.0GiB
no_default
bool
Disable default query
new
bool
New search exp

Returns

list

Example

from vastai import VastAI

client = VastAI(api_key="YOUR_API_KEY")
result = client.search_offers()
print(result)