search_listings
async
¶
search_listings(
*,
config_overrides: Optional[AsyncMarketplaceDiscoveryClientConfig] = None,
locale: Optional[Locale] = None,
search_text: Optional[SearchText] = None,
filters: Optional[SearchFilterList] = None,
max_results: Optional[MaxResults] = None,
sort_by: Optional[SearchListingsSortBy] = None,
sort_order: Optional[SearchListingsSortOrder] = None,
next_token: Optional[NextToken] = None,
) -> SearchListingsOutput
Returns a list of product listings based on search criteria and filters. You can search by keyword, filter by category, pricing model, fulfillment type, and other attributes, and sort results by relevance or customer rating.
Parameters:
-
locale(Optional[Locale], default:None) –A BCP 47 language tag or comma-separated priority list specifying the preferred locale for response content. See
Localefor supported values, constraints, fallback behavior, and the default locale. If omitted, the service returns content in the default locale. -
search_text(Optional[SearchText], default:None) –The search query text to find relevant listings.
-
filters(Optional[SearchFilterList], default:None) –Filters to narrow search results. Multiple filters are combined with AND logic. Multiple values within the same filter are combined with OR logic.
-
max_results(Optional[MaxResults], default:None) –The maximum number of results that are returned per call. You can use
nextTokento get more results. -
sort_by(Optional[SearchListingsSortBy], default:None) –The field to sort results by. Valid values are
RELEVANCEandAVERAGE_CUSTOMER_RATING. -
sort_order(Optional[SearchListingsSortOrder], default:None) –The sort direction. Valid values are
DESCENDINGandASCENDING. -
next_token(Optional[NextToken], default:None) –If
nextTokenis returned, there are more results available. Make the call again using the returned token to retrieve the next page.
Raises:
-
AccessDeniedException–You don't have sufficient access to perform this action.
-
InternalServerException–Unexpected error during processing of the request.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The input fails to satisfy the constraints specified by the service.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Search for machine learning listings Search for SaaS listings in the machine learning category with sorting by relevance
>>> await client.search_listings(locale='en-US', search_text='computer vision', filters=[{'filterType': 'CATEGORY', 'filterValues': ['machine-learning']}, {'filterType': 'FULFILLMENT_OPTION_TYPE', 'filterValues': ['SAAS']}], max_results=25, sort_by='RELEVANCE', sort_order='DESCENDING')
Source code in docs_src/capo_marketplace_discovery/_services/async_marketplace_discovery.py
923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 | |