Skip to content

    v2GetBrandsBrandIdEvidenceKindKey

    Look up selected keywords in a saved dataset for one country and language. Pass the dataset key before the evidence kind in this SDK method.

    See the REST reference for GET /v2/brands/{brand_id}/evidence/{kind}/{key}.

    Signature

    v2GetBrandsBrandIdEvidenceKindKey(
      brand_id: string,
      key: string,
      kind: string,
      options: {
        signal?: AbortSignal;
        country: string;
        keywords: ReadonlyArray<string>;
        language: string;
        source_revision?: number | null;
      },
    ): Promise<ApiResponse<unknown>>

    Parameters

    brand_id
    ID of the brand that owns the record.
    key
    The record key within this evidence kind. Use a dataset UUID for keyword_dataset.
    kind
    Type of saved evidence. The example uses keyword_dataset.
    options
    Pass the named options in the signature. The selected action or view determines which fields are required.
    options.signal
    Optional AbortSignal to cancel the HTTP request.
    options.country
    string, required for this request.
    options.language
    string, required for this request.
    options.keywords
    array of string, required for this request.

    Return value

    Promise<ApiResponse<unknown>>. Read matched keywords from data.keywords and unmatched terms from data.missing_keywords. The response includes the source_revision.

    Errors

    • The SDK throws AeoApiError if the API returns an error. Inspect status, code, fieldErrors and requestId.
    • AeoTransportError means the request failed to connect or the client could not finish reading a successful response. Invalid JSON in a successful response throws SyntaxError. If you abort the request, the SDK throws the reason from the AbortSignal.
    • For HTTP 422, check fieldErrors for the input field and validation message.

    TypeScript example

    import { AeoClient } from "@aeoapi/aeo-sdk";
    
    const apiKey = process.env.AEO_API_KEY;
    if (!apiKey) throw new Error("Set AEO_API_KEY on your server.");
    const client = new AeoClient(apiKey, { baseUrl: "https://api.aeoapi.dev" });
    
    // Substitute your own record IDs and values.
    const response = await client.v2GetBrandsBrandIdEvidenceKindKey("00000000-0000-4000-8000-000000000001", "00000000-0000-4000-8000-000000000003", "keyword_dataset", {
      "country": "US",
      "language": "en",
      "keywords": [
        "setup"
      ]
    });
    console.log(response.status, response.body);

    Requests by feature

    Brand evidence

    See TypeScript client setup for authentication, timeouts and retry settings.