@spyglasshq/sdk 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -42
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +257 -6
- package/dist/cjs/Client.js +574 -9
- package/dist/cjs/api/{resources/search/client/requests/GetMediaRequest.d.ts → client/requests/SearchMediaRequest.d.ts} +13 -13
- package/dist/cjs/api/{resources/search/client/requests/GetMediaRequest.js → client/requests/SearchMediaRequest.js} +14 -14
- package/dist/cjs/api/client/requests/index.d.ts +5 -0
- package/dist/cjs/api/{resources/search/client → client}/requests/index.js +3 -3
- package/dist/cjs/api/index.d.ts +1 -0
- package/dist/cjs/api/index.js +1 -0
- package/dist/cjs/api/resources/account/client/Client.d.ts +131 -11
- package/dist/cjs/api/resources/account/client/Client.js +353 -14
- package/dist/cjs/api/resources/account/client/index.d.ts +1 -1
- package/dist/cjs/api/resources/account/client/index.js +15 -0
- package/dist/cjs/api/resources/{indexing/client/requests/IndexBrandRequest.d.ts → account/client/requests/IndexAccountRequest.d.ts} +1 -1
- package/dist/{esm/api/resources/indexing/client/requests/IndexBrandStatusRequest.d.mts → cjs/api/resources/account/client/requests/IndexStatusAccountRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/{search/client/requests/GetBrandMediaInsightsRequest.d.ts → account/client/requests/InsightsAccountRequest.d.ts} +2 -2
- package/dist/cjs/api/resources/{search/client/requests/GetBrandLandingPagesRequest.d.ts → account/client/requests/LandingPagesAccountRequest.d.ts} +2 -2
- package/dist/cjs/api/resources/account/client/requests/index.d.ts +5 -0
- package/dist/{esm/api/resources/indexing/types/IndexBrandResponse.d.mts → cjs/api/resources/account/types/IndexAccountResponse.d.ts} +3 -3
- package/dist/cjs/api/resources/account/types/IndexAccountResponse.js +11 -0
- package/dist/cjs/api/resources/{indexing/types/IndexBrandStatusResponse.d.ts → account/types/IndexStatusAccountResponse.d.ts} +3 -3
- package/dist/cjs/api/resources/account/types/IndexStatusAccountResponse.js +11 -0
- package/dist/cjs/api/resources/account/types/InsightsAccountRequestType.d.ts +7 -0
- package/dist/cjs/api/resources/{search/types/GetBrandMediaInsightsRequestType.js → account/types/InsightsAccountRequestType.js} +2 -2
- package/dist/cjs/api/resources/{search/types/GetBrandMediaInsightsResponse.d.ts → account/types/InsightsAccountResponse.d.ts} +1 -1
- package/dist/cjs/api/resources/account/types/LandingPagesAccountRequestShowInactive.d.ts +5 -0
- package/dist/cjs/api/resources/{search/types/GetBrandLandingPagesRequestShowInactive.js → account/types/LandingPagesAccountRequestShowInactive.js} +2 -2
- package/dist/cjs/api/resources/{search/types/GetBrandLandingPagesResponse.d.ts → account/types/LandingPagesAccountResponse.d.ts} +3 -3
- package/dist/cjs/api/resources/account/types/index.d.ts +7 -1
- package/dist/cjs/api/resources/account/types/index.js +7 -1
- package/dist/cjs/api/resources/index.d.ts +1 -6
- package/dist/cjs/api/resources/index.js +5 -10
- package/dist/{esm/api/resources/search/types/GetMediaResponse.d.mts → cjs/api/types/SearchMediaResponse.d.ts} +3 -3
- package/dist/cjs/api/{resources/search/types/GetMediaResponse.js → types/SearchMediaResponse.js} +5 -5
- package/dist/cjs/api/types/index.d.ts +6 -0
- package/dist/cjs/api/types/index.js +6 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +257 -6
- package/dist/esm/Client.mjs +574 -9
- package/dist/esm/api/{resources/search/client/requests/GetMediaRequest.d.mts → client/requests/SearchMediaRequest.d.mts} +13 -13
- package/dist/esm/api/{resources/search/client/requests/GetMediaRequest.mjs → client/requests/SearchMediaRequest.mjs} +13 -13
- package/dist/esm/api/client/requests/index.d.mts +5 -0
- package/dist/esm/api/{resources/search/client → client}/requests/index.mjs +1 -1
- package/dist/esm/api/index.d.mts +1 -0
- package/dist/esm/api/index.mjs +1 -0
- package/dist/esm/api/resources/account/client/Client.d.mts +131 -11
- package/dist/esm/api/resources/account/client/Client.mjs +353 -14
- package/dist/esm/api/resources/account/client/index.d.mts +1 -1
- package/dist/esm/api/resources/account/client/index.mjs +1 -1
- package/dist/esm/api/resources/{indexing/client/requests/IndexBrandRequest.d.mts → account/client/requests/IndexAccountRequest.d.mts} +1 -1
- package/dist/{cjs/api/resources/indexing/client/requests/IndexBrandStatusRequest.d.ts → esm/api/resources/account/client/requests/IndexStatusAccountRequest.d.mts} +1 -1
- package/dist/esm/api/resources/{search/client/requests/GetBrandMediaInsightsRequest.d.mts → account/client/requests/InsightsAccountRequest.d.mts} +2 -2
- package/dist/esm/api/resources/{search/client/requests/GetBrandLandingPagesRequest.d.mts → account/client/requests/LandingPagesAccountRequest.d.mts} +2 -2
- package/dist/esm/api/resources/account/client/requests/index.d.mts +5 -0
- package/dist/{cjs/api/resources/indexing/types/IndexBrandResponse.d.ts → esm/api/resources/account/types/IndexAccountResponse.d.mts} +3 -3
- package/dist/esm/api/resources/account/types/IndexAccountResponse.mjs +8 -0
- package/dist/esm/api/resources/{indexing/types/IndexBrandStatusResponse.d.mts → account/types/IndexStatusAccountResponse.d.mts} +3 -3
- package/dist/esm/api/resources/account/types/IndexStatusAccountResponse.mjs +8 -0
- package/dist/esm/api/resources/account/types/InsightsAccountRequestType.d.mts +7 -0
- package/dist/esm/api/resources/{search/types/GetBrandMediaInsightsRequestType.mjs → account/types/InsightsAccountRequestType.mjs} +1 -1
- package/dist/esm/api/resources/{search/types/GetBrandMediaInsightsResponse.d.mts → account/types/InsightsAccountResponse.d.mts} +1 -1
- package/dist/esm/api/resources/account/types/LandingPagesAccountRequestShowInactive.d.mts +5 -0
- package/dist/esm/api/resources/{search/types/GetBrandLandingPagesRequestShowInactive.mjs → account/types/LandingPagesAccountRequestShowInactive.mjs} +1 -1
- package/dist/esm/api/resources/{search/types/GetBrandLandingPagesResponse.d.mts → account/types/LandingPagesAccountResponse.d.mts} +3 -3
- package/dist/esm/api/resources/account/types/index.d.mts +7 -1
- package/dist/esm/api/resources/account/types/index.mjs +7 -1
- package/dist/esm/api/resources/index.d.mts +1 -6
- package/dist/esm/api/resources/index.mjs +1 -6
- package/dist/{cjs/api/resources/search/types/GetMediaResponse.d.ts → esm/api/types/SearchMediaResponse.d.mts} +3 -3
- package/dist/esm/api/{resources/search/types/GetMediaResponse.mjs → types/SearchMediaResponse.mjs} +4 -4
- package/dist/esm/api/types/index.d.mts +6 -0
- package/dist/esm/api/types/index.mjs +6 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -23
- package/reference.md +109 -111
- package/dist/cjs/api/resources/indexing/client/Client.d.ts +0 -74
- package/dist/cjs/api/resources/indexing/client/Client.js +0 -219
- package/dist/cjs/api/resources/indexing/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/resources/indexing/exports.d.ts +0 -2
- package/dist/cjs/api/resources/indexing/exports.js +0 -21
- package/dist/cjs/api/resources/indexing/index.d.ts +0 -2
- package/dist/cjs/api/resources/indexing/index.js +0 -18
- package/dist/cjs/api/resources/indexing/types/IndexBrandResponse.js +0 -11
- package/dist/cjs/api/resources/indexing/types/IndexBrandStatusResponse.js +0 -11
- package/dist/cjs/api/resources/indexing/types/index.d.ts +0 -2
- package/dist/cjs/api/resources/indexing/types/index.js +0 -18
- package/dist/cjs/api/resources/search/client/Client.d.ts +0 -337
- package/dist/cjs/api/resources/search/client/Client.js +0 -823
- package/dist/cjs/api/resources/search/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/search/client/index.js +0 -17
- package/dist/cjs/api/resources/search/client/requests/index.d.ts +0 -8
- package/dist/cjs/api/resources/search/exports.d.ts +0 -2
- package/dist/cjs/api/resources/search/exports.js +0 -21
- package/dist/cjs/api/resources/search/index.d.ts +0 -2
- package/dist/cjs/api/resources/search/index.js +0 -18
- package/dist/cjs/api/resources/search/types/GetBrandLandingPagesRequestShowInactive.d.ts +0 -5
- package/dist/cjs/api/resources/search/types/GetBrandMediaInsightsRequestType.d.ts +0 -7
- package/dist/cjs/api/resources/search/types/index.d.ts +0 -10
- package/dist/cjs/api/resources/search/types/index.js +0 -26
- package/dist/esm/api/resources/indexing/client/Client.d.mts +0 -74
- package/dist/esm/api/resources/indexing/client/Client.mjs +0 -182
- package/dist/esm/api/resources/indexing/client/requests/index.d.mts +0 -2
- package/dist/esm/api/resources/indexing/exports.d.mts +0 -2
- package/dist/esm/api/resources/indexing/exports.mjs +0 -3
- package/dist/esm/api/resources/indexing/index.d.mts +0 -2
- package/dist/esm/api/resources/indexing/index.mjs +0 -2
- package/dist/esm/api/resources/indexing/types/IndexBrandResponse.mjs +0 -8
- package/dist/esm/api/resources/indexing/types/IndexBrandStatusResponse.mjs +0 -8
- package/dist/esm/api/resources/indexing/types/index.d.mts +0 -2
- package/dist/esm/api/resources/indexing/types/index.mjs +0 -2
- package/dist/esm/api/resources/search/client/Client.d.mts +0 -337
- package/dist/esm/api/resources/search/client/Client.mjs +0 -786
- package/dist/esm/api/resources/search/client/index.d.mts +0 -1
- package/dist/esm/api/resources/search/client/index.mjs +0 -1
- package/dist/esm/api/resources/search/client/requests/index.d.mts +0 -8
- package/dist/esm/api/resources/search/exports.d.mts +0 -2
- package/dist/esm/api/resources/search/exports.mjs +0 -3
- package/dist/esm/api/resources/search/index.d.mts +0 -2
- package/dist/esm/api/resources/search/index.mjs +0 -2
- package/dist/esm/api/resources/search/types/GetBrandLandingPagesRequestShowInactive.d.mts +0 -5
- package/dist/esm/api/resources/search/types/GetBrandMediaInsightsRequestType.d.mts +0 -7
- package/dist/esm/api/resources/search/types/index.d.mts +0 -10
- package/dist/esm/api/resources/search/types/index.mjs +0 -10
- /package/dist/cjs/api/{resources/indexing/client → client}/index.d.ts +0 -0
- /package/dist/cjs/api/{resources/indexing/client → client}/index.js +0 -0
- /package/dist/cjs/api/{resources/search/client → client}/requests/GetCommentsRequest.d.ts +0 -0
- /package/dist/cjs/api/{resources/search/client → client}/requests/GetCommentsRequest.js +0 -0
- /package/dist/cjs/api/{resources/search/client → client}/requests/SearchBrandsRequest.d.ts +0 -0
- /package/dist/cjs/api/{resources/search/client → client}/requests/SearchBrandsRequest.js +0 -0
- /package/dist/cjs/api/{resources/search/client → client}/requests/SearchCreatorsRequest.d.ts +0 -0
- /package/dist/cjs/api/{resources/search/client → client}/requests/SearchCreatorsRequest.js +0 -0
- /package/dist/cjs/api/{resources/search/client → client}/requests/SearchTaxonomiesRequest.d.ts +0 -0
- /package/dist/cjs/api/{resources/search/client → client}/requests/SearchTaxonomiesRequest.js +0 -0
- /package/dist/cjs/api/resources/{search → account}/client/requests/GetAccountRequest.d.ts +0 -0
- /package/dist/cjs/api/resources/{search → account}/client/requests/GetAccountRequest.js +0 -0
- /package/dist/cjs/api/resources/account/{types/GetCreditUsageResponse.js → client/requests/IndexAccountRequest.js} +0 -0
- /package/dist/cjs/api/resources/{indexing/client/requests/IndexBrandRequest.js → account/client/requests/IndexStatusAccountRequest.js} +0 -0
- /package/dist/cjs/api/resources/{indexing/client/requests/IndexBrandStatusRequest.js → account/client/requests/InsightsAccountRequest.js} +0 -0
- /package/dist/cjs/api/resources/{search/client/requests/GetBrandLandingPagesRequest.js → account/client/requests/LandingPagesAccountRequest.js} +0 -0
- /package/dist/cjs/api/resources/{indexing → account}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/{search → account}/types/GetAccountResponse.d.ts +0 -0
- /package/dist/cjs/api/resources/{search → account}/types/GetAccountResponse.js +0 -0
- /package/dist/cjs/api/resources/{search/client/requests/GetBrandMediaInsightsRequest.js → account/types/InsightsAccountResponse.js} +0 -0
- /package/dist/cjs/api/resources/{search/types/GetBrandLandingPagesResponse.js → account/types/LandingPagesAccountResponse.js} +0 -0
- /package/dist/cjs/api/{resources/search/types → types}/GetCommentsResponse.d.ts +0 -0
- /package/dist/cjs/api/{resources/search/types → types}/GetCommentsResponse.js +0 -0
- /package/dist/cjs/api/{resources/account/types → types}/GetCreditUsageResponse.d.ts +0 -0
- /package/dist/cjs/api/{resources/search/types/GetBrandMediaInsightsResponse.js → types/GetCreditUsageResponse.js} +0 -0
- /package/dist/cjs/api/{resources/search/types → types}/SearchBrandsResponse.d.ts +0 -0
- /package/dist/cjs/api/{resources/search/types → types}/SearchBrandsResponse.js +0 -0
- /package/dist/cjs/api/{resources/search/types → types}/SearchCreatorsResponse.d.ts +0 -0
- /package/dist/cjs/api/{resources/search/types → types}/SearchCreatorsResponse.js +0 -0
- /package/dist/cjs/api/{resources/search/types → types}/SearchTaxonomiesResponse.d.ts +0 -0
- /package/dist/cjs/api/{resources/search/types → types}/SearchTaxonomiesResponse.js +0 -0
- /package/dist/esm/api/{resources/indexing/client → client}/index.d.mts +0 -0
- /package/dist/esm/api/{resources/indexing/client → client}/index.mjs +0 -0
- /package/dist/esm/api/{resources/search/client → client}/requests/GetCommentsRequest.d.mts +0 -0
- /package/dist/esm/api/{resources/search/client → client}/requests/GetCommentsRequest.mjs +0 -0
- /package/dist/esm/api/{resources/search/client → client}/requests/SearchBrandsRequest.d.mts +0 -0
- /package/dist/esm/api/{resources/search/client → client}/requests/SearchBrandsRequest.mjs +0 -0
- /package/dist/esm/api/{resources/search/client → client}/requests/SearchCreatorsRequest.d.mts +0 -0
- /package/dist/esm/api/{resources/search/client → client}/requests/SearchCreatorsRequest.mjs +0 -0
- /package/dist/esm/api/{resources/search/client → client}/requests/SearchTaxonomiesRequest.d.mts +0 -0
- /package/dist/esm/api/{resources/search/client → client}/requests/SearchTaxonomiesRequest.mjs +0 -0
- /package/dist/esm/api/resources/{search → account}/client/requests/GetAccountRequest.d.mts +0 -0
- /package/dist/esm/api/resources/{search → account}/client/requests/GetAccountRequest.mjs +0 -0
- /package/dist/esm/api/resources/account/{types/GetCreditUsageResponse.mjs → client/requests/IndexAccountRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{indexing/client/requests/IndexBrandRequest.mjs → account/client/requests/IndexStatusAccountRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{indexing/client/requests/IndexBrandStatusRequest.mjs → account/client/requests/InsightsAccountRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{search/client/requests/GetBrandLandingPagesRequest.mjs → account/client/requests/LandingPagesAccountRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{indexing → account}/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/{search → account}/types/GetAccountResponse.d.mts +0 -0
- /package/dist/esm/api/resources/{search → account}/types/GetAccountResponse.mjs +0 -0
- /package/dist/esm/api/resources/{search/client/requests/GetBrandMediaInsightsRequest.mjs → account/types/InsightsAccountResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{search/types/GetBrandLandingPagesResponse.mjs → account/types/LandingPagesAccountResponse.mjs} +0 -0
- /package/dist/esm/api/{resources/search/types → types}/GetCommentsResponse.d.mts +0 -0
- /package/dist/esm/api/{resources/search/types → types}/GetCommentsResponse.mjs +0 -0
- /package/dist/esm/api/{resources/account/types → types}/GetCreditUsageResponse.d.mts +0 -0
- /package/dist/esm/api/{resources/search/types/GetBrandMediaInsightsResponse.mjs → types/GetCreditUsageResponse.mjs} +0 -0
- /package/dist/esm/api/{resources/search/types → types}/SearchBrandsResponse.d.mts +0 -0
- /package/dist/esm/api/{resources/search/types → types}/SearchBrandsResponse.mjs +0 -0
- /package/dist/esm/api/{resources/search/types → types}/SearchCreatorsResponse.d.mts +0 -0
- /package/dist/esm/api/{resources/search/types → types}/SearchCreatorsResponse.mjs +0 -0
- /package/dist/esm/api/{resources/search/types → types}/SearchTaxonomiesResponse.d.mts +0 -0
- /package/dist/esm/api/{resources/search/types → types}/SearchTaxonomiesResponse.mjs +0 -0
|
@@ -1,337 +0,0 @@
|
|
|
1
|
-
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
|
|
2
|
-
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
3
|
-
import * as core from "../../../../core/index.mjs";
|
|
4
|
-
import * as spyglass from "../../../index.mjs";
|
|
5
|
-
export declare namespace SearchClient {
|
|
6
|
-
type Options = BaseClientOptions;
|
|
7
|
-
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Search accounts, ads, and related data.
|
|
12
|
-
*/
|
|
13
|
-
export declare class SearchClient {
|
|
14
|
-
protected readonly _options: NormalizedClientOptionsWithAuth<SearchClient.Options>;
|
|
15
|
-
constructor(options: SearchClient.Options);
|
|
16
|
-
/**
|
|
17
|
-
* Find brands.
|
|
18
|
-
* Search semantically with `query`, or look them up by name, id, or
|
|
19
|
-
* social handle. Either way, you can also narrow the results with
|
|
20
|
-
* filters such as product taxonomy, location, and follower count.
|
|
21
|
-
*
|
|
22
|
-
* Send one search field. Each field is its own mode:
|
|
23
|
-
*
|
|
24
|
-
* - **Query** (`query`). A natural-language brief. Runs a language model and
|
|
25
|
-
* ranks by relevance, so `sortBy` is ignored. Bills at least one row even
|
|
26
|
-
* when nothing matches.
|
|
27
|
-
* - **Name** (`names`). Fuzzy-matches account names (a case-insensitive contains
|
|
28
|
-
* match). Pass every name in one array.
|
|
29
|
-
* - **ID** (`brandIds`). Looks up known ids. Missing ids are omitted and listed
|
|
30
|
-
* in `unmatchedIds`. `limit` and `offset` are ignored.
|
|
31
|
-
* - **Instagram** (`igUsername`). Case-insensitive contains match on the
|
|
32
|
-
* handle. A leading `@` is ignored.
|
|
33
|
-
* - **TikTok** (`tiktokUsername`). Same match on the TikTok handle.
|
|
34
|
-
*
|
|
35
|
-
* If a request includes more than one of these fields, only the highest
|
|
36
|
-
* priority field is used. The rest are ignored:
|
|
37
|
-
*
|
|
38
|
-
* 1. `brandIds`
|
|
39
|
-
* 2. `igUsername` or `tiktokUsername` (if both are set, either handle can match)
|
|
40
|
-
* 3. `names`
|
|
41
|
-
* 4. `query`
|
|
42
|
-
*
|
|
43
|
-
* One exception: `query` together with `names` uses both. `names` narrows the
|
|
44
|
-
* set, and `query` ranks inside it.
|
|
45
|
-
*
|
|
46
|
-
* `limit` (default 20, max 100) caps the rows returned, and the cost, for
|
|
47
|
-
* every mode except ID.
|
|
48
|
-
*
|
|
49
|
-
* Limited to 120 requests per minute per user.
|
|
50
|
-
* Costs 2,000 microdollars ($0.0020) per brand returned, charged against your plan's monthly credits. The count field is what you were charged for.
|
|
51
|
-
* A `query` search runs a language model, so it bills a minimum of one
|
|
52
|
-
* row even when nothing matches.
|
|
53
|
-
*
|
|
54
|
-
* @param {spyglass.SearchBrandsRequest} request
|
|
55
|
-
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
|
-
*
|
|
57
|
-
* @throws {@link spyglass.BadRequestError}
|
|
58
|
-
* @throws {@link spyglass.UnauthorizedError}
|
|
59
|
-
* @throws {@link spyglass.PaymentRequiredError}
|
|
60
|
-
* @throws {@link spyglass.ForbiddenError}
|
|
61
|
-
* @throws {@link spyglass.MethodNotAllowedError}
|
|
62
|
-
* @throws {@link spyglass.ContentTooLargeError}
|
|
63
|
-
* @throws {@link spyglass.TooManyRequestsError}
|
|
64
|
-
* @throws {@link spyglass.InternalServerError}
|
|
65
|
-
* @throws {@link errors.SpyglassError}
|
|
66
|
-
* @throws {@link errors.SpyglassTimeoutError}
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* await client.search.brands({
|
|
70
|
-
* names: ["Nike"],
|
|
71
|
-
* limit: 3
|
|
72
|
-
* })
|
|
73
|
-
*/
|
|
74
|
-
brands(request?: spyglass.SearchBrandsRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.SearchBrandsResponse>;
|
|
75
|
-
private __brands;
|
|
76
|
-
/**
|
|
77
|
-
* Find creators.
|
|
78
|
-
* Search semantically with `query`, or look them up by name, id, or
|
|
79
|
-
* social handle. Either way, you can also narrow the results with
|
|
80
|
-
* filters such as audience profile, location, and follower count.
|
|
81
|
-
*
|
|
82
|
-
* Send one search field. Each field is its own mode:
|
|
83
|
-
*
|
|
84
|
-
* - **Query** (`query`). A natural-language brief. Runs a language model and
|
|
85
|
-
* ranks by relevance, so `sortBy` is ignored. Bills at least one row even
|
|
86
|
-
* when nothing matches.
|
|
87
|
-
* - **Name** (`names`). Fuzzy-matches account names (a case-insensitive contains
|
|
88
|
-
* match). Pass every name in one array.
|
|
89
|
-
* - **ID** (`brandIds`). Looks up known ids. Missing ids are omitted and listed
|
|
90
|
-
* in `unmatchedIds`. `limit` and `offset` are ignored.
|
|
91
|
-
* - **Instagram** (`igUsername`). Case-insensitive contains match on the
|
|
92
|
-
* handle. A leading `@` is ignored.
|
|
93
|
-
* - **TikTok** (`tiktokUsername`). Same match on the TikTok handle.
|
|
94
|
-
*
|
|
95
|
-
* If a request includes more than one of these fields, only the highest
|
|
96
|
-
* priority field is used. The rest are ignored:
|
|
97
|
-
*
|
|
98
|
-
* 1. `brandIds`
|
|
99
|
-
* 2. `igUsername` or `tiktokUsername` (if both are set, either handle can match)
|
|
100
|
-
* 3. `names`
|
|
101
|
-
* 4. `query`
|
|
102
|
-
*
|
|
103
|
-
* One exception: `query` together with `names` uses both. `names` narrows the
|
|
104
|
-
* set, and `query` ranks inside it.
|
|
105
|
-
*
|
|
106
|
-
* `limit` (default 20, max 100) caps the rows returned, and the cost, for
|
|
107
|
-
* every mode except ID.
|
|
108
|
-
*
|
|
109
|
-
* Limited to 120 requests per minute per user.
|
|
110
|
-
* Costs 2,000 microdollars ($0.0020) per creator returned, charged against your plan's monthly credits. The count field is what you were charged for.
|
|
111
|
-
* A `query` search runs a language model, so it bills a minimum of one
|
|
112
|
-
* row even when nothing matches.
|
|
113
|
-
*
|
|
114
|
-
* @param {spyglass.SearchCreatorsRequest} request
|
|
115
|
-
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
116
|
-
*
|
|
117
|
-
* @throws {@link spyglass.BadRequestError}
|
|
118
|
-
* @throws {@link spyglass.UnauthorizedError}
|
|
119
|
-
* @throws {@link spyglass.PaymentRequiredError}
|
|
120
|
-
* @throws {@link spyglass.ForbiddenError}
|
|
121
|
-
* @throws {@link spyglass.MethodNotAllowedError}
|
|
122
|
-
* @throws {@link spyglass.ContentTooLargeError}
|
|
123
|
-
* @throws {@link spyglass.TooManyRequestsError}
|
|
124
|
-
* @throws {@link spyglass.InternalServerError}
|
|
125
|
-
* @throws {@link errors.SpyglassError}
|
|
126
|
-
* @throws {@link errors.SpyglassTimeoutError}
|
|
127
|
-
*
|
|
128
|
-
* @example
|
|
129
|
-
* await client.search.creators({
|
|
130
|
-
* igUsername: "charlidamelio",
|
|
131
|
-
* limit: 3,
|
|
132
|
-
* gender: "female"
|
|
133
|
-
* })
|
|
134
|
-
*/
|
|
135
|
-
creators(request?: spyglass.SearchCreatorsRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.SearchCreatorsResponse>;
|
|
136
|
-
private __creators;
|
|
137
|
-
/**
|
|
138
|
-
* Fetch a single brand or creator by id. The `type` field tells you
|
|
139
|
-
* which one you got: `BRAND` or `CREATOR`, and the creator-only fields
|
|
140
|
-
* (`gender`, `ageRange`, ...) are present only on `CREATOR`.
|
|
141
|
-
*
|
|
142
|
-
* Limited to 120 requests per minute per user.
|
|
143
|
-
* Costs 2,000 microdollars ($0.0020) per account returned, charged against your plan's monthly credits.
|
|
144
|
-
* An id that matches nothing returns 404 and is free.
|
|
145
|
-
*
|
|
146
|
-
* @param {spyglass.GetAccountRequest} request
|
|
147
|
-
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
148
|
-
*
|
|
149
|
-
* @throws {@link spyglass.BadRequestError}
|
|
150
|
-
* @throws {@link spyglass.UnauthorizedError}
|
|
151
|
-
* @throws {@link spyglass.PaymentRequiredError}
|
|
152
|
-
* @throws {@link spyglass.ForbiddenError}
|
|
153
|
-
* @throws {@link spyglass.NotFoundError}
|
|
154
|
-
* @throws {@link spyglass.MethodNotAllowedError}
|
|
155
|
-
* @throws {@link spyglass.TooManyRequestsError}
|
|
156
|
-
* @throws {@link spyglass.InternalServerError}
|
|
157
|
-
* @throws {@link errors.SpyglassError}
|
|
158
|
-
* @throws {@link errors.SpyglassTimeoutError}
|
|
159
|
-
*
|
|
160
|
-
* @example
|
|
161
|
-
* await client.search.getAccount({
|
|
162
|
-
* id: "id"
|
|
163
|
-
* })
|
|
164
|
-
*/
|
|
165
|
-
getAccount(request: spyglass.GetAccountRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.GetAccountResponse>;
|
|
166
|
-
private __getAccount;
|
|
167
|
-
/**
|
|
168
|
-
* Find taxonomy paths you can pass to POST /media as `taxonomy`.
|
|
169
|
-
* `query` is a product or category phrase. Each path is a string
|
|
170
|
-
* such as `Apparel > Footwear > Sneakers`.
|
|
171
|
-
*
|
|
172
|
-
* Limited to 120 requests per minute per user.
|
|
173
|
-
* This call is free and does not use credits.
|
|
174
|
-
*
|
|
175
|
-
* @param {spyglass.SearchTaxonomiesRequest} request
|
|
176
|
-
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
177
|
-
*
|
|
178
|
-
* @throws {@link spyglass.BadRequestError}
|
|
179
|
-
* @throws {@link spyglass.UnauthorizedError}
|
|
180
|
-
* @throws {@link spyglass.PaymentRequiredError}
|
|
181
|
-
* @throws {@link spyglass.ForbiddenError}
|
|
182
|
-
* @throws {@link spyglass.MethodNotAllowedError}
|
|
183
|
-
* @throws {@link spyglass.TooManyRequestsError}
|
|
184
|
-
* @throws {@link spyglass.InternalServerError}
|
|
185
|
-
* @throws {@link errors.SpyglassError}
|
|
186
|
-
* @throws {@link errors.SpyglassTimeoutError}
|
|
187
|
-
*
|
|
188
|
-
* @example
|
|
189
|
-
* await client.search.taxonomies({
|
|
190
|
-
* query: "running shoes"
|
|
191
|
-
* })
|
|
192
|
-
*/
|
|
193
|
-
taxonomies(request: spyglass.SearchTaxonomiesRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.SearchTaxonomiesResponse>;
|
|
194
|
-
private __taxonomies;
|
|
195
|
-
/**
|
|
196
|
-
* Return creatives. Pass `brandId` to scope to one brand or creator,
|
|
197
|
-
* or omit it to search the whole corpus. Without `brandId`,
|
|
198
|
-
* `query` is required.
|
|
199
|
-
*
|
|
200
|
-
* Limited to 120 requests per minute per user.
|
|
201
|
-
* Costs 1,000 microdollars ($0.0010) per creative returned, charged against your plan's monthly credits. The count field is what you were charged for.
|
|
202
|
-
* The call bills a minimum of one row even when nothing matches. In that
|
|
203
|
-
* case `count` is 0 but you are charged for one row.
|
|
204
|
-
*
|
|
205
|
-
* @param {spyglass.GetMediaRequest} request
|
|
206
|
-
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
207
|
-
*
|
|
208
|
-
* @throws {@link spyglass.BadRequestError}
|
|
209
|
-
* @throws {@link spyglass.UnauthorizedError}
|
|
210
|
-
* @throws {@link spyglass.PaymentRequiredError}
|
|
211
|
-
* @throws {@link spyglass.ForbiddenError}
|
|
212
|
-
* @throws {@link spyglass.NotFoundError}
|
|
213
|
-
* @throws {@link spyglass.MethodNotAllowedError}
|
|
214
|
-
* @throws {@link spyglass.ContentTooLargeError}
|
|
215
|
-
* @throws {@link spyglass.TooManyRequestsError}
|
|
216
|
-
* @throws {@link spyglass.InternalServerError}
|
|
217
|
-
* @throws {@link errors.SpyglassError}
|
|
218
|
-
* @throws {@link errors.SpyglassTimeoutError}
|
|
219
|
-
*
|
|
220
|
-
* @example
|
|
221
|
-
* await client.search.getMedia({
|
|
222
|
-
* query: "comfort-focused video ads",
|
|
223
|
-
* limit: 20
|
|
224
|
-
* })
|
|
225
|
-
*/
|
|
226
|
-
getMedia(request?: spyglass.GetMediaRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.GetMediaResponse>;
|
|
227
|
-
private __getMedia;
|
|
228
|
-
/**
|
|
229
|
-
* Return clustered creative themes for an account. `MEDIA_MIX` returns a
|
|
230
|
-
* breakdown by media type; the other types return weekly buckets plus
|
|
231
|
-
* ranked totals, highest first.
|
|
232
|
-
*
|
|
233
|
-
* `maxDaysBack` filters both the weekly bucket series and ranked
|
|
234
|
-
* `totals` to creatives that started within the requested window.
|
|
235
|
-
*
|
|
236
|
-
* Limited to 120 requests per minute per user.
|
|
237
|
-
* Costs 1,000 microdollars ($0.0010) per cluster returned, charged against your plan's monthly credits. The count field is what you were charged for.
|
|
238
|
-
*
|
|
239
|
-
* @param {spyglass.GetBrandMediaInsightsRequest} request
|
|
240
|
-
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
241
|
-
*
|
|
242
|
-
* @throws {@link spyglass.BadRequestError}
|
|
243
|
-
* @throws {@link spyglass.UnauthorizedError}
|
|
244
|
-
* @throws {@link spyglass.PaymentRequiredError}
|
|
245
|
-
* @throws {@link spyglass.ForbiddenError}
|
|
246
|
-
* @throws {@link spyglass.NotFoundError}
|
|
247
|
-
* @throws {@link spyglass.MethodNotAllowedError}
|
|
248
|
-
* @throws {@link spyglass.TooManyRequestsError}
|
|
249
|
-
* @throws {@link spyglass.InternalServerError}
|
|
250
|
-
* @throws {@link errors.SpyglassError}
|
|
251
|
-
* @throws {@link errors.SpyglassTimeoutError}
|
|
252
|
-
*
|
|
253
|
-
* @example
|
|
254
|
-
* await client.search.getBrandMediaInsights({
|
|
255
|
-
* id: "id",
|
|
256
|
-
* type: "HOOK"
|
|
257
|
-
* })
|
|
258
|
-
*/
|
|
259
|
-
getBrandMediaInsights(request: spyglass.GetBrandMediaInsightsRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.GetBrandMediaInsightsResponse>;
|
|
260
|
-
private __getBrandMediaInsights;
|
|
261
|
-
/**
|
|
262
|
-
* Return the landing-page URLs a brand sends ad traffic to, ranked by
|
|
263
|
-
* how often they appear across its ads.
|
|
264
|
-
*
|
|
265
|
-
* Limited to 120 requests per minute per user.
|
|
266
|
-
* Costs 5,000 microdollars ($0.0050) per landing page returned, charged against your plan's monthly credits. The count field is what you were charged for.
|
|
267
|
-
*
|
|
268
|
-
* @param {spyglass.GetBrandLandingPagesRequest} request
|
|
269
|
-
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
270
|
-
*
|
|
271
|
-
* @throws {@link spyglass.BadRequestError}
|
|
272
|
-
* @throws {@link spyglass.UnauthorizedError}
|
|
273
|
-
* @throws {@link spyglass.PaymentRequiredError}
|
|
274
|
-
* @throws {@link spyglass.ForbiddenError}
|
|
275
|
-
* @throws {@link spyglass.NotFoundError}
|
|
276
|
-
* @throws {@link spyglass.MethodNotAllowedError}
|
|
277
|
-
* @throws {@link spyglass.TooManyRequestsError}
|
|
278
|
-
* @throws {@link spyglass.InternalServerError}
|
|
279
|
-
* @throws {@link errors.SpyglassError}
|
|
280
|
-
* @throws {@link errors.SpyglassTimeoutError}
|
|
281
|
-
*
|
|
282
|
-
* @example
|
|
283
|
-
* await client.search.getBrandLandingPages({
|
|
284
|
-
* id: "id"
|
|
285
|
-
* })
|
|
286
|
-
*/
|
|
287
|
-
getBrandLandingPages(request: spyglass.GetBrandLandingPagesRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.GetBrandLandingPagesResponse>;
|
|
288
|
-
private __getBrandLandingPages;
|
|
289
|
-
/**
|
|
290
|
-
* Return public comments for specific Instagram or TikTok posts.
|
|
291
|
-
* Pass post URLs or the platform id. At least one of `instagramIds` or
|
|
292
|
-
* `tiktokIds` is required (max 20 each). `limit` is comment pages
|
|
293
|
-
* per post (default 1, max 20).
|
|
294
|
-
*
|
|
295
|
-
* Instagram accepts a shortcode or a post URL:
|
|
296
|
-
*
|
|
297
|
-
* - `C2xY9abcD1e`
|
|
298
|
-
* - `https://www.instagram.com/p/C2xY9abcD1e/`
|
|
299
|
-
* - `https://www.instagram.com/reel/C2xY9abcD1e/`
|
|
300
|
-
*
|
|
301
|
-
* TikTok accepts a video id or a post URL:
|
|
302
|
-
*
|
|
303
|
-
* - `7234567890123456789`
|
|
304
|
-
* - `https://www.tiktok.com/@nike/video/7234567890123456789`
|
|
305
|
-
*
|
|
306
|
-
* Recent posts may be scraped live; older posts with stored comments
|
|
307
|
-
* are served from cache.
|
|
308
|
-
*
|
|
309
|
-
* Limited to 20 requests per minute per user.
|
|
310
|
-
* Costs 10,000 microdollars ($0.0100) per successful page of comments returned, charged against your plan's monthly credits.
|
|
311
|
-
* Each comment page fetched live (`limit`, default 1) is one billed
|
|
312
|
-
* unit. Cached posts do not scrape and are not billed.
|
|
313
|
-
*
|
|
314
|
-
* @param {spyglass.GetCommentsRequest} request
|
|
315
|
-
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
316
|
-
*
|
|
317
|
-
* @throws {@link spyglass.BadRequestError}
|
|
318
|
-
* @throws {@link spyglass.UnauthorizedError}
|
|
319
|
-
* @throws {@link spyglass.PaymentRequiredError}
|
|
320
|
-
* @throws {@link spyglass.ForbiddenError}
|
|
321
|
-
* @throws {@link spyglass.MethodNotAllowedError}
|
|
322
|
-
* @throws {@link spyglass.ContentTooLargeError}
|
|
323
|
-
* @throws {@link spyglass.TooManyRequestsError}
|
|
324
|
-
* @throws {@link spyglass.InternalServerError}
|
|
325
|
-
* @throws {@link errors.SpyglassError}
|
|
326
|
-
* @throws {@link errors.SpyglassTimeoutError}
|
|
327
|
-
*
|
|
328
|
-
* @example
|
|
329
|
-
* await client.search.getComments({
|
|
330
|
-
* instagramIds: ["https://www.instagram.com/p/C2xY9abcD1e/"],
|
|
331
|
-
* tiktokIds: ["https://www.tiktok.com/@nike/video/7234567890123456789"],
|
|
332
|
-
* limit: 1
|
|
333
|
-
* })
|
|
334
|
-
*/
|
|
335
|
-
getComments(request?: spyglass.GetCommentsRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.GetCommentsResponse>;
|
|
336
|
-
private __getComments;
|
|
337
|
-
}
|