Documentation
¶
Index ¶
- Constants
- func Bool(b bool) param.Opt[bool]
- func BoolPtr(v bool) *bool
- func DefaultClientOptions() []option.RequestOption
- func File(rdr io.Reader, filename string, contentType string) file
- func Float(f float64) param.Opt[float64]
- func FloatPtr(v float64) *float64
- func Int(i int64) param.Opt[int64]
- func IntPtr(v int64) *int64
- func Opt[T comparable](v T) param.Opt[T]
- func Ptr[T any](v T) *T
- func String(s string) param.Opt[string]
- func StringPtr(v string) *string
- func Time(t time.Time) param.Opt[time.Time]
- func TimePtr(v time.Time) *time.Time
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, ...) error
- func (r *Client) Get(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Post(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Put(ctx context.Context, path string, params any, res any, ...) error
- type CreatorAutocompleteParams
- type CreatorAutocompleteParamsPlatform
- type CreatorAutocompleteParamsScope
- type CreatorAutocompleteResponse
- type CreatorAutocompleteResponseData
- type CreatorAutocompleteResponseDataPlatform
- type CreatorBasic
- type CreatorGetParams
- type CreatorGetResponse
- type CreatorGetResponseData
- type CreatorLookalikeParams
- type CreatorLookalikeParamsFilters
- type CreatorLookalikeParamsFiltersEngagementRate
- type CreatorLookalikeParamsFiltersFollowers
- type CreatorLookalikeParamsSeed
- type CreatorLookalikeResponse
- type CreatorLookalikeResponseSimilarity
- type CreatorMatchParams
- type CreatorMatchParamsCreator
- type CreatorMatchParamsIntent
- type CreatorMatchResponse
- type CreatorMatchResponseData
- type CreatorMatchResponseDataCreator
- type CreatorMatchResponseDataInput
- type CreatorMatchResponseDataMatch
- type CreatorMatchResponseDataMatchReason
- type CreatorService
- func (r *CreatorService) Autocomplete(ctx context.Context, query CreatorAutocompleteParams, ...) (res *CreatorAutocompleteResponse, err error)
- func (r *CreatorService) Get(ctx context.Context, id string, query CreatorGetParams, ...) (res *CreatorGetResponse, err error)
- func (r *CreatorService) Lookalike(ctx context.Context, body CreatorLookalikeParams, opts ...option.RequestOption) (res *pagination.BodyCursor[CreatorLookalikeResponse], err error)
- func (r *CreatorService) LookalikeAutoPaging(ctx context.Context, body CreatorLookalikeParams, opts ...option.RequestOption) *pagination.BodyCursorAutoPager[CreatorLookalikeResponse]
- func (r *CreatorService) Match(ctx context.Context, body CreatorMatchParams, opts ...option.RequestOption) (res *CreatorMatchResponse, err error)
- type Error
- type HealthCheckResponse
- type HealthService
- type MatchInfo
- type PostListParams
- type PostListParamsPlatform
- type PostListParamsSort
- type PostListResponse
- type PostListResponseLocation
- type PostListResponseMedia
- type PostListResponseMetrics
- type PostListResponsePlatform
- type PostListResponseType
- type PostService
- func (r *PostService) List(ctx context.Context, query PostListParams, opts ...option.RequestOption) (res *pagination.QueryCursor[PostListResponse], err error)
- func (r *PostService) ListAutoPaging(ctx context.Context, query PostListParams, opts ...option.RequestOption) *pagination.QueryCursorAutoPager[PostListResponse]
- type ProfileActivity
- type ProfileGetParams
- type ProfileGetResponse
- type ProfileGrowth
- type ProfileLookupParams
- type ProfileLookupParamsProfile
- type ProfileLookupResponse
- type ProfileLookupResponseNotFound
- type ProfileMetrics
- type ProfileResponseData
- type ProfileResponseDataPlatform
- type ProfileService
- type ProfileSummary
- type ProfileSummaryPlatform
- type RawInstagramGetProfileParams
- type RawInstagramGetProfileResponse
- type RawInstagramGetProfileResponseData
- type RawInstagramGetProfileResponseDataActivity
- type RawInstagramGetProfileResponseDataGrowth
- type RawInstagramGetProfileResponseDataMetrics
- type RawInstagramGetProfileResponseDataPost
- type RawInstagramService
- type RawService
- type RawYoutubeGetChannelParams
- type RawYoutubeGetChannelResponse
- type RawYoutubeGetChannelResponseData
- type RawYoutubeGetChannelResponseDataVideo
- type RawYoutubeGetChannelTranscriptsParams
- type RawYoutubeGetChannelTranscriptsParamsSortBy
- type RawYoutubeGetChannelTranscriptsResponse
- type RawYoutubeGetChannelTranscriptsResponseData
- type RawYoutubeGetChannelTranscriptsResponseDataItem
- type RawYoutubeGetTranscriptParams
- type RawYoutubeGetTranscriptResponse
- type RawYoutubeGetTranscriptResponseData
- type RawYoutubeSearchParams
- type RawYoutubeSearchResponse
- type RawYoutubeSearchResponseData
- type RawYoutubeSearchResponseDataResultUnion
- func (u RawYoutubeSearchResponseDataResultUnion) AsRawYoutubeSearchResponseDataResultYouTubeSearchChannelResult() (v RawYoutubeSearchResponseDataResultYouTubeSearchChannelResult)
- func (u RawYoutubeSearchResponseDataResultUnion) AsRawYoutubeSearchResponseDataResultYouTubeSearchVideoResult() (v RawYoutubeSearchResponseDataResultYouTubeSearchVideoResult)
- func (u RawYoutubeSearchResponseDataResultUnion) RawJSON() string
- func (r *RawYoutubeSearchResponseDataResultUnion) UnmarshalJSON(data []byte) error
- type RawYoutubeSearchResponseDataResultYouTubeSearchChannelResult
- type RawYoutubeSearchResponseDataResultYouTubeSearchVideoResult
- type RawYoutubeService
- func (r *RawYoutubeService) GetChannel(ctx context.Context, handle string, query RawYoutubeGetChannelParams, ...) (res *RawYoutubeGetChannelResponse, err error)
- func (r *RawYoutubeService) GetChannelTranscripts(ctx context.Context, handle string, ...) (res *RawYoutubeGetChannelTranscriptsResponse, err error)
- func (r *RawYoutubeService) GetTranscript(ctx context.Context, videoID string, query RawYoutubeGetTranscriptParams, ...) (res *RawYoutubeGetTranscriptResponse, err error)
- func (r *RawYoutubeService) Search(ctx context.Context, query RawYoutubeSearchParams, ...) (res *RawYoutubeSearchResponse, err error)
- type SearchGetParams
- type SearchGetResponse
- type SearchNewParams
- type SearchNewParamsFilters
- type SearchNewParamsFiltersEngagementRate
- type SearchNewParamsFiltersFollowers
- type SearchNewResponse
- type SearchNewResponseData
- type SearchService
- func (r *SearchService) Get(ctx context.Context, id string, query SearchGetParams, ...) (res *pagination.QueryCursor[SearchGetResponse], err error)
- func (r *SearchService) GetAutoPaging(ctx context.Context, id string, query SearchGetParams, ...) *pagination.QueryCursorAutoPager[SearchGetResponse]
- func (r *SearchService) New(ctx context.Context, body SearchNewParams, opts ...option.RequestOption) (res *SearchNewResponse, err error)
- type TranscriptSegment
Constants ¶
const ProfileSummaryPlatformInstagram = shared.ProfileSummaryPlatformInstagram
Equals "instagram"
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (INFLUSHIP_API_KEY, INFLUSHIP_BASE_URL). This should be used to initialize new clients.
func Opt ¶
func Opt[T comparable](v T) param.Opt[T]
Types ¶
type Client ¶
type Client struct {
// API health and status endpoints
Health HealthService
// Retrieve creator profiles and discover new creators through search,
// autocomplete, and lookalike matching. Creators are cross-platform entities that
// may have profiles on multiple social networks.
Creators CreatorService
// AI-powered semantic search to find creators using natural language queries.
// Understands intent and context to match creators based on content themes,
// audience, and style.
Search SearchService
// Access individual social media profiles with detailed metrics, growth data, and
// activity information. Profiles are platform-specific accounts linked to
// creators.
Profiles ProfileService
// Retrieve and analyze social media posts with engagement metrics, media content,
// and performance data.
Posts PostService
Raw RawService
// contains filtered or unexported fields
}
Client creates a struct with services and top level methods that help with interacting with the Influship API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r Client)
NewClient generates a new client with the default option read from the environment (INFLUSHIP_API_KEY, INFLUSHIP_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type CreatorAutocompleteParams ¶
type CreatorAutocompleteParams struct {
// Search query (min 2 characters)
Q string `query:"q" api:"required" json:"-"`
// Maximum results to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Filter by platform
//
// Any of "instagram".
Platform CreatorAutocompleteParamsPlatform `query:"platform,omitzero" json:"-"`
// Which platforms to include in results
//
// Any of "creator_only", "matched_platforms", "all_platforms".
Scope CreatorAutocompleteParamsScope `query:"scope,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CreatorAutocompleteParams) URLQuery ¶
func (r CreatorAutocompleteParams) URLQuery() (v url.Values, err error)
URLQuery serializes CreatorAutocompleteParams's query parameters as `url.Values`.
type CreatorAutocompleteParamsPlatform ¶
type CreatorAutocompleteParamsPlatform string
Filter by platform
const (
CreatorAutocompleteParamsPlatformInstagram CreatorAutocompleteParamsPlatform = "instagram"
)
type CreatorAutocompleteParamsScope ¶
type CreatorAutocompleteParamsScope string
Which platforms to include in results
const ( CreatorAutocompleteParamsScopeCreatorOnly CreatorAutocompleteParamsScope = "creator_only" CreatorAutocompleteParamsScopeMatchedPlatforms CreatorAutocompleteParamsScope = "matched_platforms" CreatorAutocompleteParamsScopeAllPlatforms CreatorAutocompleteParamsScope = "all_platforms" )
type CreatorAutocompleteResponse ¶
type CreatorAutocompleteResponse struct {
// Autocomplete results
Data []CreatorAutocompleteResponseData `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CreatorAutocompleteResponse) RawJSON ¶
func (r CreatorAutocompleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreatorAutocompleteResponse) UnmarshalJSON ¶
func (r *CreatorAutocompleteResponse) UnmarshalJSON(data []byte) error
type CreatorAutocompleteResponseData ¶
type CreatorAutocompleteResponseData struct {
// Creator ID
ID string `json:"id" api:"required" format:"uuid"`
// Avatar URL
Avatar string `json:"avatar" api:"required" format:"uri"`
// Creator name
Name string `json:"name" api:"required"`
// Matching platforms
Platforms []CreatorAutocompleteResponseDataPlatform `json:"platforms" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Avatar respjson.Field
Name respjson.Field
Platforms respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CreatorAutocompleteResponseData) RawJSON ¶
func (r CreatorAutocompleteResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreatorAutocompleteResponseData) UnmarshalJSON ¶
func (r *CreatorAutocompleteResponseData) UnmarshalJSON(data []byte) error
type CreatorAutocompleteResponseDataPlatform ¶
type CreatorAutocompleteResponseDataPlatform struct {
DisplayName string `json:"display_name" api:"required"`
// The field value that matched
MatchField string `json:"match_field" api:"required"`
// How the query matched this profile
//
// Any of "name", "username", "display_name".
MatchType string `json:"match_type" api:"required"`
// Social media platform
//
// Any of "instagram".
Platform string `json:"platform" api:"required"`
Username string `json:"username" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DisplayName respjson.Field
MatchField respjson.Field
MatchType respjson.Field
Platform respjson.Field
Username respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CreatorAutocompleteResponseDataPlatform) RawJSON ¶
func (r CreatorAutocompleteResponseDataPlatform) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreatorAutocompleteResponseDataPlatform) UnmarshalJSON ¶
func (r *CreatorAutocompleteResponseDataPlatform) UnmarshalJSON(data []byte) error
type CreatorBasic ¶
type CreatorBasic = shared.CreatorBasic
Basic creator information
This is an alias to an internal type.
type CreatorGetParams ¶
type CreatorGetParams struct {
// Additional data to include in response
//
// Any of "profiles".
Include []string `query:"include,omitzero" api:"required" json:"-"`
// contains filtered or unexported fields
}
func (CreatorGetParams) URLQuery ¶
func (r CreatorGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes CreatorGetParams's query parameters as `url.Values`.
type CreatorGetResponse ¶
type CreatorGetResponse struct {
// Full creator details
Data CreatorGetResponseData `json:"data" api:"required"`
// Present when partial results were returned because one or more linked profiles
// were skipped for data integrity reasons.
Warning string `json:"warning"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Warning respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CreatorGetResponse) RawJSON ¶
func (r CreatorGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreatorGetResponse) UnmarshalJSON ¶
func (r *CreatorGetResponse) UnmarshalJSON(data []byte) error
type CreatorGetResponseData ¶
type CreatorGetResponseData struct {
// Creator unique identifier
ID string `json:"id" api:"required" format:"uuid"`
// AI-generated summary of the creator
AISummary string `json:"ai_summary" api:"required"`
// Avatar URL
AvatarURL string `json:"avatar_url" api:"required" format:"uri"`
// Creator bio
Bio string `json:"bio" api:"required"`
// Content themes/topics
ContentThemes []string `json:"content_themes" api:"required"`
// Creator display name
Name string `json:"name" api:"required"`
// Social profiles (only included when include=profiles)
Profiles []shared.ProfileSummary `json:"profiles"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AISummary respjson.Field
AvatarURL respjson.Field
Bio respjson.Field
ContentThemes respjson.Field
Name respjson.Field
Profiles respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Full creator details
func (CreatorGetResponseData) RawJSON ¶
func (r CreatorGetResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreatorGetResponseData) UnmarshalJSON ¶
func (r *CreatorGetResponseData) UnmarshalJSON(data []byte) error
type CreatorLookalikeParams ¶
type CreatorLookalikeParams struct {
// Seed creators to find similar creators for
Seeds []CreatorLookalikeParamsSeed `json:"seeds,omitzero" api:"required"`
// Pagination cursor for next page
Cursor param.Opt[string] `json:"cursor,omitzero"`
// Maximum results to return
Limit param.Opt[int64] `json:"limit,omitzero"`
// Additional filters
Filters CreatorLookalikeParamsFilters `json:"filters,omitzero"`
// contains filtered or unexported fields
}
func (CreatorLookalikeParams) MarshalJSON ¶
func (r CreatorLookalikeParams) MarshalJSON() (data []byte, err error)
func (*CreatorLookalikeParams) UnmarshalJSON ¶
func (r *CreatorLookalikeParams) UnmarshalJSON(data []byte) error
type CreatorLookalikeParamsFilters ¶
type CreatorLookalikeParamsFilters struct {
// Filter by verified status
Verified param.Opt[bool] `json:"verified,omitzero"`
// Filter by engagement rate
EngagementRate CreatorLookalikeParamsFiltersEngagementRate `json:"engagement_rate,omitzero"`
// Filter by follower count
Followers CreatorLookalikeParamsFiltersFollowers `json:"followers,omitzero"`
// contains filtered or unexported fields
}
Additional filters
func (CreatorLookalikeParamsFilters) MarshalJSON ¶
func (r CreatorLookalikeParamsFilters) MarshalJSON() (data []byte, err error)
func (*CreatorLookalikeParamsFilters) UnmarshalJSON ¶
func (r *CreatorLookalikeParamsFilters) UnmarshalJSON(data []byte) error
type CreatorLookalikeParamsFiltersEngagementRate ¶
type CreatorLookalikeParamsFiltersEngagementRate struct {
// Maximum engagement rate (%)
Max param.Opt[float64] `json:"max,omitzero"`
// Minimum engagement rate (%)
Min param.Opt[float64] `json:"min,omitzero"`
// contains filtered or unexported fields
}
Filter by engagement rate
func (CreatorLookalikeParamsFiltersEngagementRate) MarshalJSON ¶
func (r CreatorLookalikeParamsFiltersEngagementRate) MarshalJSON() (data []byte, err error)
func (*CreatorLookalikeParamsFiltersEngagementRate) UnmarshalJSON ¶
func (r *CreatorLookalikeParamsFiltersEngagementRate) UnmarshalJSON(data []byte) error
type CreatorLookalikeParamsFiltersFollowers ¶
type CreatorLookalikeParamsFiltersFollowers struct {
// Maximum follower count
Max param.Opt[float64] `json:"max,omitzero"`
// Minimum follower count
Min param.Opt[float64] `json:"min,omitzero"`
// contains filtered or unexported fields
}
Filter by follower count
func (CreatorLookalikeParamsFiltersFollowers) MarshalJSON ¶
func (r CreatorLookalikeParamsFiltersFollowers) MarshalJSON() (data []byte, err error)
func (*CreatorLookalikeParamsFiltersFollowers) UnmarshalJSON ¶
func (r *CreatorLookalikeParamsFiltersFollowers) UnmarshalJSON(data []byte) error
type CreatorLookalikeParamsSeed ¶
type CreatorLookalikeParamsSeed struct {
// Creator ID (use this OR platform+username)
CreatorID param.Opt[string] `json:"creator_id,omitzero" format:"uuid"`
// Username (required with platform)
Username param.Opt[string] `json:"username,omitzero"`
// Weight for this seed (0-1)
Weight param.Opt[float64] `json:"weight,omitzero"`
// Platform (required with username)
//
// Any of "instagram".
Platform string `json:"platform,omitzero"`
// contains filtered or unexported fields
}
Seed creator for lookalike search
func (CreatorLookalikeParamsSeed) MarshalJSON ¶
func (r CreatorLookalikeParamsSeed) MarshalJSON() (data []byte, err error)
func (*CreatorLookalikeParamsSeed) UnmarshalJSON ¶
func (r *CreatorLookalikeParamsSeed) UnmarshalJSON(data []byte) error
type CreatorLookalikeResponse ¶
type CreatorLookalikeResponse struct {
// Basic creator information
Creator shared.CreatorBasic `json:"creator" api:"required"`
// Abbreviated profile information
PrimaryProfile shared.ProfileSummary `json:"primary_profile" api:"required"`
// Similarity information for lookalike match
Similarity CreatorLookalikeResponseSimilarity `json:"similarity" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Creator respjson.Field
PrimaryProfile respjson.Field
Similarity respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CreatorLookalikeResponse) RawJSON ¶
func (r CreatorLookalikeResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreatorLookalikeResponse) UnmarshalJSON ¶
func (r *CreatorLookalikeResponse) UnmarshalJSON(data []byte) error
type CreatorLookalikeResponseSimilarity ¶
type CreatorLookalikeResponseSimilarity struct {
// Similarity score (0-1)
Score float64 `json:"score" api:"required"`
SharedTraits []string `json:"shared_traits" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Score respjson.Field
SharedTraits respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Similarity information for lookalike match
func (CreatorLookalikeResponseSimilarity) RawJSON ¶
func (r CreatorLookalikeResponseSimilarity) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreatorLookalikeResponseSimilarity) UnmarshalJSON ¶
func (r *CreatorLookalikeResponseSimilarity) UnmarshalJSON(data []byte) error
type CreatorMatchParams ¶
type CreatorMatchParams struct {
// Creators to evaluate
Creators []CreatorMatchParamsCreator `json:"creators,omitzero" api:"required"`
// Campaign intent for creator matching
Intent CreatorMatchParamsIntent `json:"intent,omitzero" api:"required"`
// contains filtered or unexported fields
}
func (CreatorMatchParams) MarshalJSON ¶
func (r CreatorMatchParams) MarshalJSON() (data []byte, err error)
func (*CreatorMatchParams) UnmarshalJSON ¶
func (r *CreatorMatchParams) UnmarshalJSON(data []byte) error
type CreatorMatchParamsCreator ¶
type CreatorMatchParamsCreator struct {
// Creator ID (use this OR platform+username)
CreatorID param.Opt[string] `json:"creator_id,omitzero" format:"uuid"`
// Username (required with platform)
Username param.Opt[string] `json:"username,omitzero"`
// Platform (required with username)
//
// Any of "instagram".
Platform string `json:"platform,omitzero"`
// contains filtered or unexported fields
}
Creator identifier for match endpoint
func (CreatorMatchParamsCreator) MarshalJSON ¶
func (r CreatorMatchParamsCreator) MarshalJSON() (data []byte, err error)
func (*CreatorMatchParamsCreator) UnmarshalJSON ¶
func (r *CreatorMatchParamsCreator) UnmarshalJSON(data []byte) error
type CreatorMatchParamsIntent ¶
type CreatorMatchParamsIntent struct {
// Campaign description
Query string `json:"query" api:"required"`
// Additional context about the campaign
Context param.Opt[string] `json:"context,omitzero"`
// contains filtered or unexported fields
}
Campaign intent for creator matching
The property Query is required.
func (CreatorMatchParamsIntent) MarshalJSON ¶
func (r CreatorMatchParamsIntent) MarshalJSON() (data []byte, err error)
func (*CreatorMatchParamsIntent) UnmarshalJSON ¶
func (r *CreatorMatchParamsIntent) UnmarshalJSON(data []byte) error
type CreatorMatchResponse ¶
type CreatorMatchResponse struct {
Data []CreatorMatchResponseData `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CreatorMatchResponse) RawJSON ¶
func (r CreatorMatchResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreatorMatchResponse) UnmarshalJSON ¶
func (r *CreatorMatchResponse) UnmarshalJSON(data []byte) error
type CreatorMatchResponseData ¶
type CreatorMatchResponseData struct {
Creator CreatorMatchResponseDataCreator `json:"creator" api:"required"`
Input CreatorMatchResponseDataInput `json:"input" api:"required"`
Match CreatorMatchResponseDataMatch `json:"match" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Creator respjson.Field
Input respjson.Field
Match respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CreatorMatchResponseData) RawJSON ¶
func (r CreatorMatchResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreatorMatchResponseData) UnmarshalJSON ¶
func (r *CreatorMatchResponseData) UnmarshalJSON(data []byte) error
type CreatorMatchResponseDataCreator ¶
type CreatorMatchResponseDataCreator struct {
ID string `json:"id" api:"required" format:"uuid"`
AvatarURL string `json:"avatar_url" api:"required" format:"uri"`
Name string `json:"name" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvatarURL respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CreatorMatchResponseDataCreator) RawJSON ¶
func (r CreatorMatchResponseDataCreator) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreatorMatchResponseDataCreator) UnmarshalJSON ¶
func (r *CreatorMatchResponseDataCreator) UnmarshalJSON(data []byte) error
type CreatorMatchResponseDataInput ¶
type CreatorMatchResponseDataInput struct {
CreatorID string `json:"creator_id" format:"uuid"`
// Social media platform
//
// Any of "instagram".
Platform string `json:"platform"`
Username string `json:"username"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CreatorID respjson.Field
Platform respjson.Field
Username respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CreatorMatchResponseDataInput) RawJSON ¶
func (r CreatorMatchResponseDataInput) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreatorMatchResponseDataInput) UnmarshalJSON ¶
func (r *CreatorMatchResponseDataInput) UnmarshalJSON(data []byte) error
type CreatorMatchResponseDataMatch ¶
type CreatorMatchResponseDataMatch struct {
// Match decision recommendation
//
// Any of "good", "neutral", "avoid".
Decision string `json:"decision" api:"required"`
// Structured reasons supporting the decision
Reasons []CreatorMatchResponseDataMatchReason `json:"reasons" api:"required"`
// Match score (0-1)
Score float64 `json:"score" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Decision respjson.Field
Reasons respjson.Field
Score respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CreatorMatchResponseDataMatch) RawJSON ¶
func (r CreatorMatchResponseDataMatch) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreatorMatchResponseDataMatch) UnmarshalJSON ¶
func (r *CreatorMatchResponseDataMatch) UnmarshalJSON(data []byte) error
type CreatorMatchResponseDataMatchReason ¶
type CreatorMatchResponseDataMatchReason struct {
// Human-readable reason for the match
Text string `json:"text" api:"required"`
// ID of the supporting fact, if applicable
FactID string `json:"fact_id"`
// ID of the source post, if applicable
SourcePostID string `json:"source_post_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Text respjson.Field
FactID respjson.Field
SourcePostID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CreatorMatchResponseDataMatchReason) RawJSON ¶
func (r CreatorMatchResponseDataMatchReason) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreatorMatchResponseDataMatchReason) UnmarshalJSON ¶
func (r *CreatorMatchResponseDataMatchReason) UnmarshalJSON(data []byte) error
type CreatorService ¶
type CreatorService struct {
// contains filtered or unexported fields
}
Retrieve creator profiles and discover new creators through search, autocomplete, and lookalike matching. Creators are cross-platform entities that may have profiles on multiple social networks.
CreatorService contains methods and other services that help with interacting with the Influship API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCreatorService method instead.
func NewCreatorService ¶
func NewCreatorService(opts ...option.RequestOption) (r CreatorService)
NewCreatorService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CreatorService) Autocomplete ¶
func (r *CreatorService) Autocomplete(ctx context.Context, query CreatorAutocompleteParams, opts ...option.RequestOption) (res *CreatorAutocompleteResponse, err error)
Fast typeahead search for creators by name or username. Optimized for search-as-you-type UIs with sub-100ms response times.
**Matching behavior:**
- Matches against creator name, username, and display name - Results include which field matched and the matching value - Prefix matching (e.g., "fit" matches "fitness_coach")
**Scope options:**
- `creator_only`: Return only the creator entity - `matched_platforms`: Return only profiles that matched the query - `all_platforms`: Return all linked profiles (default)
**Pricing**: 0.05 credits per request ($0.0005)
func (*CreatorService) Get ¶
func (r *CreatorService) Get(ctx context.Context, id string, query CreatorGetParams, opts ...option.RequestOption) (res *CreatorGetResponse, err error)
Retrieve a creator's profile including AI-generated summary, content themes, and optionally their linked social profiles.
**What is a Creator?** A creator is a cross-platform entity representing a person or brand. They may have profiles on multiple social networks (Instagram, YouTube, TikTok, etc.) that are linked together.
**Include options:**
- `profiles`: Include all linked social profiles with metrics
**Pricing**: 0.1 credits per request ($0.001)
func (*CreatorService) Lookalike ¶
func (r *CreatorService) Lookalike(ctx context.Context, body CreatorLookalikeParams, opts ...option.RequestOption) (res *pagination.BodyCursor[CreatorLookalikeResponse], err error)
Find creators similar to provided seed creators using AI-powered similarity matching. Analyzes content themes, audience overlap, posting style, and engagement patterns.
**Use cases:**
- Expand campaigns with creators similar to proven performers - Find alternatives when preferred creators are unavailable - Discover emerging creators in the same niche
**How it works:**
1. Provide 1-10 seed creators (by ID or platform/username) 2. Optionally weight seeds to prioritize certain creators 3. Get ranked results with similarity scores and shared traits
**Pricing**: 1.5 credits per creator returned ($0.015)
func (*CreatorService) LookalikeAutoPaging ¶
func (r *CreatorService) LookalikeAutoPaging(ctx context.Context, body CreatorLookalikeParams, opts ...option.RequestOption) *pagination.BodyCursorAutoPager[CreatorLookalikeResponse]
Find creators similar to provided seed creators using AI-powered similarity matching. Analyzes content themes, audience overlap, posting style, and engagement patterns.
**Use cases:**
- Expand campaigns with creators similar to proven performers - Find alternatives when preferred creators are unavailable - Discover emerging creators in the same niche
**How it works:**
1. Provide 1-10 seed creators (by ID or platform/username) 2. Optionally weight seeds to prioritize certain creators 3. Get ranked results with similarity scores and shared traits
**Pricing**: 1.5 credits per creator returned ($0.015)
func (*CreatorService) Match ¶
func (r *CreatorService) Match(ctx context.Context, body CreatorMatchParams, opts ...option.RequestOption) (res *CreatorMatchResponse, err error)
Evaluate how well creators match a specific campaign using AI analysis. Returns a fit score (0-1), decision recommendation (good/neutral/avoid), and evidence-based explanations.
**Use cases:**
- Vet shortlisted creators before outreach - Rank candidates for a specific campaign - Get AI-generated talking points for why a creator fits
**How it works:**
1. Describe your campaign intent and target audience 2. Provide up to 100 creators to evaluate 3. Get detailed scores with explanations and evidence
**Pricing**: 1 credit per creator scored ($0.01)
type HealthCheckResponse ¶
type HealthCheckResponse struct {
// Service health status
Ok bool `json:"ok" api:"required"`
// Current server timestamp
Timestamp time.Time `json:"timestamp" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Ok respjson.Field
Timestamp respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Health check response
func (HealthCheckResponse) RawJSON ¶
func (r HealthCheckResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*HealthCheckResponse) UnmarshalJSON ¶
func (r *HealthCheckResponse) UnmarshalJSON(data []byte) error
type HealthService ¶
type HealthService struct {
// contains filtered or unexported fields
}
API health and status endpoints
HealthService contains methods and other services that help with interacting with the Influship API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewHealthService method instead.
func NewHealthService ¶
func NewHealthService(opts ...option.RequestOption) (r HealthService)
NewHealthService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*HealthService) Check ¶
func (r *HealthService) Check(ctx context.Context, opts ...option.RequestOption) (res *HealthCheckResponse, err error)
Check API health status. No authentication required.
type MatchInfo ¶
type MatchInfo struct {
// Human-readable match reasons
Reasons []string `json:"reasons" api:"required"`
// Match relevance score (0-1)
Score float64 `json:"score" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Reasons respjson.Field
Score respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Search match information
func (*MatchInfo) UnmarshalJSON ¶
type PostListParams ¶
type PostListParams struct {
// Creator ID (use this OR platform+username)
CreatorID param.Opt[string] `query:"creator_id,omitzero" format:"uuid" json:"-"`
// Pagination cursor for next page
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum posts to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Username (required with platform)
Username param.Opt[string] `query:"username,omitzero" json:"-"`
// Platform (required with username)
//
// Any of "instagram".
Platform PostListParamsPlatform `query:"platform,omitzero" json:"-"`
// Sort order
//
// Any of "recent", "top_engagement", "most_likes", "most_views", "most_comments".
Sort PostListParamsSort `query:"sort,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (PostListParams) URLQuery ¶
func (r PostListParams) URLQuery() (v url.Values, err error)
URLQuery serializes PostListParams's query parameters as `url.Values`.
type PostListParamsPlatform ¶
type PostListParamsPlatform string
Platform (required with username)
const (
PostListParamsPlatformInstagram PostListParamsPlatform = "instagram"
)
type PostListParamsSort ¶
type PostListParamsSort string
Sort order
const ( PostListParamsSortRecent PostListParamsSort = "recent" PostListParamsSortTopEngagement PostListParamsSort = "top_engagement" PostListParamsSortMostLikes PostListParamsSort = "most_likes" PostListParamsSortMostViews PostListParamsSort = "most_views" PostListParamsSortMostComments PostListParamsSort = "most_comments" )
type PostListResponse ¶
type PostListResponse struct {
// Post unique identifier
ID string `json:"id" api:"required" format:"uuid"`
// Post caption
Caption string `json:"caption" api:"required"`
Hashtags []string `json:"hashtags" api:"required"`
// Post location information
Location PostListResponseLocation `json:"location" api:"required"`
// Post media information
Media PostListResponseMedia `json:"media" api:"required"`
// Usernames mentioned in the post
Mentions []string `json:"mentions" api:"required"`
// Post engagement metrics
Metrics PostListResponseMetrics `json:"metrics" api:"required"`
// Social media platform
//
// Any of "instagram".
Platform PostListResponsePlatform `json:"platform" api:"required"`
// Platform-specific post ID
PlatformID string `json:"platform_id" api:"required"`
// Post timestamp
PostedAt time.Time `json:"posted_at" api:"required" format:"date-time"`
// Profile unique identifier
ProfileID string `json:"profile_id" api:"required" format:"uuid"`
// Type of post
//
// Any of "image", "video", "carousel", "reel", "story".
Type PostListResponseType `json:"type" api:"required"`
// Post URL
URL string `json:"url" api:"required" format:"uri"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Caption respjson.Field
Hashtags respjson.Field
Location respjson.Field
Media respjson.Field
Mentions respjson.Field
Metrics respjson.Field
Platform respjson.Field
PlatformID respjson.Field
PostedAt respjson.Field
ProfileID respjson.Field
Type respjson.Field
URL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Full post details
func (PostListResponse) RawJSON ¶
func (r PostListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*PostListResponse) UnmarshalJSON ¶
func (r *PostListResponse) UnmarshalJSON(data []byte) error
type PostListResponseLocation ¶
type PostListResponseLocation struct {
// Location name
Name string `json:"name" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Post location information
func (PostListResponseLocation) RawJSON ¶
func (r PostListResponseLocation) RawJSON() string
Returns the unmodified JSON received from the API
func (*PostListResponseLocation) UnmarshalJSON ¶
func (r *PostListResponseLocation) UnmarshalJSON(data []byte) error
type PostListResponseMedia ¶
type PostListResponseMedia struct {
// Video duration in seconds
DurationSeconds float64 `json:"duration_seconds" api:"required"`
// Thumbnail URL
ThumbnailURL string `json:"thumbnail_url" api:"required" format:"uri"`
// Media URL
URL string `json:"url" api:"required" format:"uri"`
// Video URL (for video content)
VideoURL string `json:"video_url" api:"required" format:"uri"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DurationSeconds respjson.Field
ThumbnailURL respjson.Field
URL respjson.Field
VideoURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Post media information
func (PostListResponseMedia) RawJSON ¶
func (r PostListResponseMedia) RawJSON() string
Returns the unmodified JSON received from the API
func (*PostListResponseMedia) UnmarshalJSON ¶
func (r *PostListResponseMedia) UnmarshalJSON(data []byte) error
type PostListResponseMetrics ¶
type PostListResponseMetrics struct {
// Comment count
Comments int64 `json:"comments" api:"required"`
// Engagement rate for this post as a percentage (e.g. 3.8 means 3.8%)
EngagementRate float64 `json:"engagement_rate" api:"required"`
// Like count
Likes int64 `json:"likes" api:"required"`
Shares int64 `json:"shares" api:"required"`
// View count (for video content)
Views int64 `json:"views" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Comments respjson.Field
EngagementRate respjson.Field
Likes respjson.Field
Shares respjson.Field
Views respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Post engagement metrics
func (PostListResponseMetrics) RawJSON ¶
func (r PostListResponseMetrics) RawJSON() string
Returns the unmodified JSON received from the API
func (*PostListResponseMetrics) UnmarshalJSON ¶
func (r *PostListResponseMetrics) UnmarshalJSON(data []byte) error
type PostListResponsePlatform ¶
type PostListResponsePlatform string
Social media platform
const (
PostListResponsePlatformInstagram PostListResponsePlatform = "instagram"
)
type PostListResponseType ¶
type PostListResponseType string
Type of post
const ( PostListResponseTypeImage PostListResponseType = "image" PostListResponseTypeVideo PostListResponseType = "video" PostListResponseTypeCarousel PostListResponseType = "carousel" PostListResponseTypeReel PostListResponseType = "reel" PostListResponseTypeStory PostListResponseType = "story" )
type PostService ¶
type PostService struct {
// contains filtered or unexported fields
}
Retrieve and analyze social media posts with engagement metrics, media content, and performance data.
PostService contains methods and other services that help with interacting with the Influship API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPostService method instead.
func NewPostService ¶
func NewPostService(opts ...option.RequestOption) (r PostService)
NewPostService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PostService) List ¶
func (r *PostService) List(ctx context.Context, query PostListParams, opts ...option.RequestOption) (res *pagination.QueryCursor[PostListResponse], err error)
Retrieve posts for a creator or profile with engagement metrics and media data.
**Query options:**
- By creator: Use `creator_id` to get posts across all their profiles - By profile: Use `platform` + `username` for a specific profile's posts
**Sort options:**
- `recent`: Most recent posts first (default) - `top_engagement`: Highest engagement rate first - `most_likes`: Most likes first - `most_views`: Most views first (video content) - `most_comments`: Most comments first
**Pricing**: 0.05 credits per post returned ($0.0005)
func (*PostService) ListAutoPaging ¶
func (r *PostService) ListAutoPaging(ctx context.Context, query PostListParams, opts ...option.RequestOption) *pagination.QueryCursorAutoPager[PostListResponse]
Retrieve posts for a creator or profile with engagement metrics and media data.
**Query options:**
- By creator: Use `creator_id` to get posts across all their profiles - By profile: Use `platform` + `username` for a specific profile's posts
**Sort options:**
- `recent`: Most recent posts first (default) - `top_engagement`: Highest engagement rate first - `most_likes`: Most likes first - `most_views`: Most views first (video content) - `most_comments`: Most comments first
**Pricing**: 0.05 credits per post returned ($0.0005)
type ProfileActivity ¶
type ProfileActivity struct {
// Timestamp of last post
LastPostAt time.Time `json:"last_post_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
LastPostAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Profile activity information
func (ProfileActivity) RawJSON ¶
func (r ProfileActivity) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProfileActivity) UnmarshalJSON ¶
func (r *ProfileActivity) UnmarshalJSON(data []byte) error
type ProfileGetParams ¶
type ProfileGetParams struct {
// Platform name
Platform string `path:"platform" api:"required" json:"-"`
// contains filtered or unexported fields
}
type ProfileGetResponse ¶
type ProfileGetResponse struct {
// Full profile details
Data ProfileResponseData `json:"data" api:"required"`
// Present when partial results were returned because profile metrics/data were
// skipped due to integrity issues.
Warning string `json:"warning"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Warning respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ProfileGetResponse) RawJSON ¶
func (r ProfileGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProfileGetResponse) UnmarshalJSON ¶
func (r *ProfileGetResponse) UnmarshalJSON(data []byte) error
type ProfileGrowth ¶
type ProfileGrowth struct {
// Follower growth percentage over 30 days (e.g. 2.5 means +2.5%)
Followers30dPct float64 `json:"followers_30d_pct" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Followers30dPct respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Profile growth statistics
func (ProfileGrowth) RawJSON ¶
func (r ProfileGrowth) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProfileGrowth) UnmarshalJSON ¶
func (r *ProfileGrowth) UnmarshalJSON(data []byte) error
type ProfileLookupParams ¶
type ProfileLookupParams struct {
// Profiles to lookup
Profiles []ProfileLookupParamsProfile `json:"profiles,omitzero" api:"required"`
// contains filtered or unexported fields
}
func (ProfileLookupParams) MarshalJSON ¶
func (r ProfileLookupParams) MarshalJSON() (data []byte, err error)
func (*ProfileLookupParams) UnmarshalJSON ¶
func (r *ProfileLookupParams) UnmarshalJSON(data []byte) error
type ProfileLookupParamsProfile ¶
type ProfileLookupParamsProfile struct {
// Social media platform
//
// Any of "instagram".
Platform string `json:"platform,omitzero" api:"required"`
// Username to lookup
Username string `json:"username" api:"required"`
// contains filtered or unexported fields
}
The properties Platform, Username are required.
func (ProfileLookupParamsProfile) MarshalJSON ¶
func (r ProfileLookupParamsProfile) MarshalJSON() (data []byte, err error)
func (*ProfileLookupParamsProfile) UnmarshalJSON ¶
func (r *ProfileLookupParamsProfile) UnmarshalJSON(data []byte) error
type ProfileLookupResponse ¶
type ProfileLookupResponse struct {
// Profiles that were found
Data []ProfileResponseData `json:"data" api:"required"`
// Profiles that were not found
NotFound []ProfileLookupResponseNotFound `json:"not_found" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
NotFound respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ProfileLookupResponse) RawJSON ¶
func (r ProfileLookupResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProfileLookupResponse) UnmarshalJSON ¶
func (r *ProfileLookupResponse) UnmarshalJSON(data []byte) error
type ProfileLookupResponseNotFound ¶
type ProfileLookupResponseNotFound struct {
// Social media platform
//
// Any of "instagram".
Platform string `json:"platform" api:"required"`
Username string `json:"username" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Platform respjson.Field
Username respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ProfileLookupResponseNotFound) RawJSON ¶
func (r ProfileLookupResponseNotFound) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProfileLookupResponseNotFound) UnmarshalJSON ¶
func (r *ProfileLookupResponseNotFound) UnmarshalJSON(data []byte) error
type ProfileMetrics ¶
type ProfileMetrics struct {
// Average comments on recent posts
AvgCommentsRecent float64 `json:"avg_comments_recent" api:"required"`
// Average likes on recent posts
AvgLikesRecent float64 `json:"avg_likes_recent" api:"required"`
// Average views on recent posts (for video content)
AvgViewsRecent float64 `json:"avg_views_recent" api:"required"`
// Engagement rate as a percentage (e.g. 3.5 means 3.5%)
EngagementRate float64 `json:"engagement_rate" api:"required"`
// Follower count
Followers int64 `json:"followers" api:"required"`
// Following count
Following int64 `json:"following" api:"required"`
// Total post count
Posts int64 `json:"posts" api:"required"`
// Posts in the last 30 days
PostsLast30d int64 `json:"posts_last_30d" api:"required"`
// Average posts per week
PostsPerWeek float64 `json:"posts_per_week" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AvgCommentsRecent respjson.Field
AvgLikesRecent respjson.Field
AvgViewsRecent respjson.Field
EngagementRate respjson.Field
Followers respjson.Field
Following respjson.Field
Posts respjson.Field
PostsLast30d respjson.Field
PostsPerWeek respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Profile performance metrics
func (ProfileMetrics) RawJSON ¶
func (r ProfileMetrics) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProfileMetrics) UnmarshalJSON ¶
func (r *ProfileMetrics) UnmarshalJSON(data []byte) error
type ProfileResponseData ¶
type ProfileResponseData struct {
// Profile unique identifier
ID string `json:"id" api:"required" format:"uuid"`
// Profile activity information
Activity ProfileActivity `json:"activity" api:"required"`
// Avatar URL
AvatarURL string `json:"avatar_url" api:"required" format:"uri"`
// Profile bio
Bio string `json:"bio" api:"required"`
// Account category
Category string `json:"category" api:"required"`
// Creator unique identifier
CreatorID string `json:"creator_id" api:"required" format:"uuid"`
// Last data refresh timestamp
DataUpdatedAt time.Time `json:"data_updated_at" api:"required" format:"date-time"`
// Display name
DisplayName string `json:"display_name" api:"required"`
// External website URL from bio
ExternalURL string `json:"external_url" api:"required" format:"uri"`
// Profile growth statistics
Growth ProfileGrowth `json:"growth" api:"required"`
// Whether this is a business account
IsBusiness bool `json:"is_business" api:"required"`
// Whether the account is private
IsPrivate bool `json:"is_private" api:"required"`
// Whether the account is verified
IsVerified bool `json:"is_verified" api:"required"`
// Profile performance metrics
Metrics ProfileMetrics `json:"metrics" api:"required"`
// Social media platform
//
// Any of "instagram".
Platform ProfileResponseDataPlatform `json:"platform" api:"required"`
// Listed pronouns
Pronouns []string `json:"pronouns" api:"required"`
// Profile URL
URL string `json:"url" api:"required" format:"uri"`
// Profile username
Username string `json:"username" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Activity respjson.Field
AvatarURL respjson.Field
Bio respjson.Field
Category respjson.Field
CreatorID respjson.Field
DataUpdatedAt respjson.Field
DisplayName respjson.Field
ExternalURL respjson.Field
Growth respjson.Field
IsBusiness respjson.Field
IsPrivate respjson.Field
IsVerified respjson.Field
Metrics respjson.Field
Platform respjson.Field
Pronouns respjson.Field
URL respjson.Field
Username respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Full profile details
func (ProfileResponseData) RawJSON ¶
func (r ProfileResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProfileResponseData) UnmarshalJSON ¶
func (r *ProfileResponseData) UnmarshalJSON(data []byte) error
type ProfileResponseDataPlatform ¶
type ProfileResponseDataPlatform string
Social media platform
const (
ProfileResponseDataPlatformInstagram ProfileResponseDataPlatform = "instagram"
)
type ProfileService ¶
type ProfileService struct {
// contains filtered or unexported fields
}
Access individual social media profiles with detailed metrics, growth data, and activity information. Profiles are platform-specific accounts linked to creators.
ProfileService contains methods and other services that help with interacting with the Influship API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProfileService method instead.
func NewProfileService ¶
func NewProfileService(opts ...option.RequestOption) (r ProfileService)
NewProfileService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ProfileService) Get ¶
func (r *ProfileService) Get(ctx context.Context, username string, query ProfileGetParams, opts ...option.RequestOption) (res *ProfileGetResponse, err error)
Retrieve detailed profile data including metrics, growth statistics, and activity information from our database.
**Response includes:**
- Basic info (bio, avatar, verification status) - Performance metrics (followers, engagement rate, avg likes/comments) - Growth data (30-day follower growth, monthly rate) - Activity data (last post date, posting frequency)
**Pricing**: 0.1 credits per request ($0.001)
func (*ProfileService) Lookup ¶
func (r *ProfileService) Lookup(ctx context.Context, body ProfileLookupParams, opts ...option.RequestOption) (res *ProfileLookupResponse, err error)
Look up multiple profiles in a single request. Efficiently retrieve data for up to 100 profiles at once.
**Response includes:**
- `found`: Array of profiles that exist in our database
- `not_found`: Array of profiles that weren't found (consider live scraping these)
**Pricing**: 0.1 credits per profile ($0.001)
type ProfileSummary ¶
type ProfileSummary = shared.ProfileSummary
Abbreviated profile information
This is an alias to an internal type.
type ProfileSummaryPlatform ¶
type ProfileSummaryPlatform = shared.ProfileSummaryPlatform
Social media platform
This is an alias to an internal type.
type RawInstagramGetProfileParams ¶
type RawInstagramGetProfileParams struct {
// Include recent posts in response
IncludePosts param.Opt[bool] `query:"include_posts,omitzero" json:"-"`
// Number of posts to include
PostLimit param.Opt[int64] `query:"post_limit,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (RawInstagramGetProfileParams) URLQuery ¶
func (r RawInstagramGetProfileParams) URLQuery() (v url.Values, err error)
URLQuery serializes RawInstagramGetProfileParams's query parameters as `url.Values`.
type RawInstagramGetProfileResponse ¶
type RawInstagramGetProfileResponse struct {
// Live scraped profile data
Data RawInstagramGetProfileResponseData `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RawInstagramGetProfileResponse) RawJSON ¶
func (r RawInstagramGetProfileResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawInstagramGetProfileResponse) UnmarshalJSON ¶
func (r *RawInstagramGetProfileResponse) UnmarshalJSON(data []byte) error
type RawInstagramGetProfileResponseData ¶
type RawInstagramGetProfileResponseData struct {
// Profile unique identifier
ID string `json:"id" api:"required" format:"uuid"`
Activity RawInstagramGetProfileResponseDataActivity `json:"activity" api:"required"`
// Avatar URL
AvatarURL string `json:"avatar_url" api:"required" format:"uri"`
// Profile bio
Bio string `json:"bio" api:"required"`
// Account category
Category string `json:"category" api:"required"`
// Creator unique identifier
CreatorID string `json:"creator_id" api:"required" format:"uuid"`
// Last data refresh timestamp
DataUpdatedAt time.Time `json:"data_updated_at" api:"required" format:"date-time"`
// Display name
DisplayName string `json:"display_name" api:"required"`
// External website URL
ExternalURL string `json:"external_url" api:"required" format:"uri"`
Growth RawInstagramGetProfileResponseDataGrowth `json:"growth" api:"required"`
// Whether this is a business account
IsBusiness bool `json:"is_business" api:"required"`
// Whether the account is private
IsPrivate bool `json:"is_private" api:"required"`
// Whether the account is verified
IsVerified bool `json:"is_verified" api:"required"`
Metrics RawInstagramGetProfileResponseDataMetrics `json:"metrics" api:"required"`
// Social media platform
//
// Any of "instagram".
Platform string `json:"platform" api:"required"`
// Listed pronouns
Pronouns []string `json:"pronouns" api:"required"`
// When this data was scraped
ScrapedAt time.Time `json:"scraped_at" api:"required" format:"date-time"`
// Profile URL
URL string `json:"url" api:"required" format:"uri"`
// Profile username
Username string `json:"username" api:"required"`
// Recent posts (only included when include_posts=true)
Posts []RawInstagramGetProfileResponseDataPost `json:"posts"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Activity respjson.Field
AvatarURL respjson.Field
Bio respjson.Field
Category respjson.Field
CreatorID respjson.Field
DataUpdatedAt respjson.Field
DisplayName respjson.Field
ExternalURL respjson.Field
Growth respjson.Field
IsBusiness respjson.Field
IsPrivate respjson.Field
IsVerified respjson.Field
Metrics respjson.Field
Platform respjson.Field
Pronouns respjson.Field
ScrapedAt respjson.Field
URL respjson.Field
Username respjson.Field
Posts respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Live scraped profile data
func (RawInstagramGetProfileResponseData) RawJSON ¶
func (r RawInstagramGetProfileResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawInstagramGetProfileResponseData) UnmarshalJSON ¶
func (r *RawInstagramGetProfileResponseData) UnmarshalJSON(data []byte) error
type RawInstagramGetProfileResponseDataActivity ¶
type RawInstagramGetProfileResponseDataActivity struct {
// Timestamp of last post
LastPostAt time.Time `json:"last_post_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
LastPostAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RawInstagramGetProfileResponseDataActivity) RawJSON ¶
func (r RawInstagramGetProfileResponseDataActivity) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawInstagramGetProfileResponseDataActivity) UnmarshalJSON ¶
func (r *RawInstagramGetProfileResponseDataActivity) UnmarshalJSON(data []byte) error
type RawInstagramGetProfileResponseDataGrowth ¶
type RawInstagramGetProfileResponseDataGrowth struct {
// Follower growth percentage over 30 days (e.g. 2.5 means +2.5%)
Followers30dPct float64 `json:"followers_30d_pct" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Followers30dPct respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RawInstagramGetProfileResponseDataGrowth) RawJSON ¶
func (r RawInstagramGetProfileResponseDataGrowth) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawInstagramGetProfileResponseDataGrowth) UnmarshalJSON ¶
func (r *RawInstagramGetProfileResponseDataGrowth) UnmarshalJSON(data []byte) error
type RawInstagramGetProfileResponseDataMetrics ¶
type RawInstagramGetProfileResponseDataMetrics struct {
// Average comments on recent posts
AvgCommentsRecent float64 `json:"avg_comments_recent" api:"required"`
// Average likes on recent posts
AvgLikesRecent float64 `json:"avg_likes_recent" api:"required"`
// Average views on recent posts
AvgViewsRecent float64 `json:"avg_views_recent" api:"required"`
// Engagement rate as a percentage (e.g. 3.5 means 3.5%)
EngagementRate float64 `json:"engagement_rate" api:"required"`
// Follower count
Followers int64 `json:"followers" api:"required"`
// Following count
Following int64 `json:"following" api:"required"`
// Total post count
Posts int64 `json:"posts" api:"required"`
// Posts in the last 30 days
PostsLast30d int64 `json:"posts_last_30d" api:"required"`
// Average posts per week
PostsPerWeek float64 `json:"posts_per_week" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AvgCommentsRecent respjson.Field
AvgLikesRecent respjson.Field
AvgViewsRecent respjson.Field
EngagementRate respjson.Field
Followers respjson.Field
Following respjson.Field
Posts respjson.Field
PostsLast30d respjson.Field
PostsPerWeek respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RawInstagramGetProfileResponseDataMetrics) RawJSON ¶
func (r RawInstagramGetProfileResponseDataMetrics) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawInstagramGetProfileResponseDataMetrics) UnmarshalJSON ¶
func (r *RawInstagramGetProfileResponseDataMetrics) UnmarshalJSON(data []byte) error
type RawInstagramGetProfileResponseDataPost ¶
type RawInstagramGetProfileResponseDataPost struct {
// Post unique identifier
ID string `json:"id" api:"required" format:"uuid"`
// Post caption
Caption string `json:"caption" api:"required"`
// Comment count
CommentsCount int64 `json:"comments_count" api:"required"`
// Like count
LikesCount int64 `json:"likes_count" api:"required"`
// Primary media URL
MediaURL string `json:"media_url" api:"required" format:"uri"`
// Platform-specific post ID
PlatformID string `json:"platform_id" api:"required"`
// Post timestamp
PostedAt time.Time `json:"posted_at" api:"required" format:"date-time"`
// Type of post
//
// Any of "image", "video", "carousel", "reel", "story".
Type string `json:"type" api:"required"`
// Post URL
URL string `json:"url" api:"required" format:"uri"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Caption respjson.Field
CommentsCount respjson.Field
LikesCount respjson.Field
MediaURL respjson.Field
PlatformID respjson.Field
PostedAt respjson.Field
Type respjson.Field
URL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Simplified post from live scrape
func (RawInstagramGetProfileResponseDataPost) RawJSON ¶
func (r RawInstagramGetProfileResponseDataPost) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawInstagramGetProfileResponseDataPost) UnmarshalJSON ¶
func (r *RawInstagramGetProfileResponseDataPost) UnmarshalJSON(data []byte) error
type RawInstagramService ¶
type RawInstagramService struct {
// contains filtered or unexported fields
}
Fetch fresh data directly from social platforms in real-time. Use when you need the most current information or data for profiles not yet in our database.
RawInstagramService contains methods and other services that help with interacting with the Influship API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRawInstagramService method instead.
func NewRawInstagramService ¶
func NewRawInstagramService(opts ...option.RequestOption) (r RawInstagramService)
NewRawInstagramService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RawInstagramService) GetProfile ¶
func (r *RawInstagramService) GetProfile(ctx context.Context, username string, query RawInstagramGetProfileParams, opts ...option.RequestOption) (res *RawInstagramGetProfileResponse, err error)
Fetch fresh Instagram profile data directly from Instagram in real-time. Use this when you need the most current follower counts, bio, or recent activity.
**When to use live scraping:**
- Profile not found in our database - Need real-time follower/engagement data - Verifying current profile status before campaign
**Note:** Live scraping is slower than cached data (2-5 seconds) and costs more. Use cached endpoints when freshness isn't critical.
**Pricing**: 0.5 credits per profile scraped ($0.005)
type RawService ¶
type RawService struct {
// Fetch fresh data directly from social platforms in real-time. Use when you need
// the most current information or data for profiles not yet in our database.
Instagram RawInstagramService
// Fetch fresh data directly from social platforms in real-time. Use when you need
// the most current information or data for profiles not yet in our database.
Youtube RawYoutubeService
// contains filtered or unexported fields
}
RawService contains methods and other services that help with interacting with the Influship API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRawService method instead.
func NewRawService ¶
func NewRawService(opts ...option.RequestOption) (r RawService)
NewRawService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type RawYoutubeGetChannelParams ¶
type RawYoutubeGetChannelParams struct {
// Include recent videos in response
IncludeVideos param.Opt[bool] `query:"include_videos,omitzero" json:"-"`
// Number of videos to include
VideoLimit param.Opt[int64] `query:"video_limit,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (RawYoutubeGetChannelParams) URLQuery ¶
func (r RawYoutubeGetChannelParams) URLQuery() (v url.Values, err error)
URLQuery serializes RawYoutubeGetChannelParams's query parameters as `url.Values`.
type RawYoutubeGetChannelResponse ¶
type RawYoutubeGetChannelResponse struct {
Data RawYoutubeGetChannelResponseData `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RawYoutubeGetChannelResponse) RawJSON ¶
func (r RawYoutubeGetChannelResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawYoutubeGetChannelResponse) UnmarshalJSON ¶
func (r *RawYoutubeGetChannelResponse) UnmarshalJSON(data []byte) error
type RawYoutubeGetChannelResponseData ¶
type RawYoutubeGetChannelResponseData struct {
// Channel avatar URL
AvatarURL string `json:"avatar_url" api:"required" format:"uri"`
// Channel description
Description string `json:"description" api:"required"`
// Channel handle
Handle string `json:"handle" api:"required"`
// Channel name
Name string `json:"name" api:"required"`
// When this data was scraped
ScrapedAt time.Time `json:"scraped_at" api:"required" format:"date-time"`
// Subscriber count
Subscribers int64 `json:"subscribers" api:"required"`
// Total video count
VideosCount int64 `json:"videos_count" api:"required"`
// Total view count
ViewsTotal int64 `json:"views_total" api:"required"`
// Recent videos (only included when include_videos=true)
Videos []RawYoutubeGetChannelResponseDataVideo `json:"videos"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AvatarURL respjson.Field
Description respjson.Field
Handle respjson.Field
Name respjson.Field
ScrapedAt respjson.Field
Subscribers respjson.Field
VideosCount respjson.Field
ViewsTotal respjson.Field
Videos respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RawYoutubeGetChannelResponseData) RawJSON ¶
func (r RawYoutubeGetChannelResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawYoutubeGetChannelResponseData) UnmarshalJSON ¶
func (r *RawYoutubeGetChannelResponseData) UnmarshalJSON(data []byte) error
type RawYoutubeGetChannelResponseDataVideo ¶
type RawYoutubeGetChannelResponseDataVideo struct {
// Video ID
ID string `json:"id" api:"required"`
// Comment count
Comments int64 `json:"comments" api:"required"`
// Video duration in seconds
DurationSeconds int64 `json:"duration_seconds" api:"required"`
// Like count
Likes int64 `json:"likes" api:"required"`
// Publish timestamp
PublishedAt time.Time `json:"published_at" api:"required" format:"date-time"`
// Thumbnail URL
ThumbnailURL string `json:"thumbnail_url" api:"required" format:"uri"`
// Video title
Title string `json:"title" api:"required"`
// Video URL
URL string `json:"url" api:"required" format:"uri"`
// View count
Views int64 `json:"views" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Comments respjson.Field
DurationSeconds respjson.Field
Likes respjson.Field
PublishedAt respjson.Field
ThumbnailURL respjson.Field
Title respjson.Field
URL respjson.Field
Views respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RawYoutubeGetChannelResponseDataVideo) RawJSON ¶
func (r RawYoutubeGetChannelResponseDataVideo) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawYoutubeGetChannelResponseDataVideo) UnmarshalJSON ¶
func (r *RawYoutubeGetChannelResponseDataVideo) UnmarshalJSON(data []byte) error
type RawYoutubeGetChannelTranscriptsParams ¶
type RawYoutubeGetChannelTranscriptsParams struct {
// Include timestamped transcript segments in response
IncludeSegments param.Opt[bool] `query:"include_segments,omitzero" json:"-"`
// Language code for transcripts
Language param.Opt[string] `query:"language,omitzero" json:"-"`
// Number of videos to fetch transcripts for (max 20)
VideoLimit param.Opt[int64] `query:"video_limit,omitzero" json:"-"`
// How to sort channel videos before selecting
//
// Any of "popular", "newest", "oldest".
SortBy RawYoutubeGetChannelTranscriptsParamsSortBy `query:"sort_by,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (RawYoutubeGetChannelTranscriptsParams) URLQuery ¶
func (r RawYoutubeGetChannelTranscriptsParams) URLQuery() (v url.Values, err error)
URLQuery serializes RawYoutubeGetChannelTranscriptsParams's query parameters as `url.Values`.
type RawYoutubeGetChannelTranscriptsParamsSortBy ¶
type RawYoutubeGetChannelTranscriptsParamsSortBy string
How to sort channel videos before selecting
const ( RawYoutubeGetChannelTranscriptsParamsSortByPopular RawYoutubeGetChannelTranscriptsParamsSortBy = "popular" RawYoutubeGetChannelTranscriptsParamsSortByNewest RawYoutubeGetChannelTranscriptsParamsSortBy = "newest" RawYoutubeGetChannelTranscriptsParamsSortByOldest RawYoutubeGetChannelTranscriptsParamsSortBy = "oldest" )
type RawYoutubeGetChannelTranscriptsResponse ¶
type RawYoutubeGetChannelTranscriptsResponse struct {
Data RawYoutubeGetChannelTranscriptsResponseData `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RawYoutubeGetChannelTranscriptsResponse) RawJSON ¶
func (r RawYoutubeGetChannelTranscriptsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawYoutubeGetChannelTranscriptsResponse) UnmarshalJSON ¶
func (r *RawYoutubeGetChannelTranscriptsResponse) UnmarshalJSON(data []byte) error
type RawYoutubeGetChannelTranscriptsResponseData ¶
type RawYoutubeGetChannelTranscriptsResponseData struct {
// YouTube channel ID
ChannelID string `json:"channel_id" api:"required"`
// Channel name
ChannelName string `json:"channel_name" api:"required"`
// Channel handle
Handle string `json:"handle" api:"required"`
// Per-video transcript results
Items []RawYoutubeGetChannelTranscriptsResponseDataItem `json:"items" api:"required"`
// When this data was scraped
ScrapedAt string `json:"scraped_at" api:"required"`
// Number of transcripts that failed to fetch
TranscriptsFailed int64 `json:"transcripts_failed" api:"required"`
// Number of transcripts successfully fetched
TranscriptsFetched int64 `json:"transcripts_fetched" api:"required"`
// Total videos found on channel
VideosFound int64 `json:"videos_found" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChannelID respjson.Field
ChannelName respjson.Field
Handle respjson.Field
Items respjson.Field
ScrapedAt respjson.Field
TranscriptsFailed respjson.Field
TranscriptsFetched respjson.Field
VideosFound respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RawYoutubeGetChannelTranscriptsResponseData) RawJSON ¶
func (r RawYoutubeGetChannelTranscriptsResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawYoutubeGetChannelTranscriptsResponseData) UnmarshalJSON ¶
func (r *RawYoutubeGetChannelTranscriptsResponseData) UnmarshalJSON(data []byte) error
type RawYoutubeGetChannelTranscriptsResponseDataItem ¶
type RawYoutubeGetChannelTranscriptsResponseDataItem struct {
// Error message if transcript fetch failed for this video
Error string `json:"error" api:"required"`
// Full transcript as plain text
FullText string `json:"full_text" api:"required"`
// Transcript language code
Language string `json:"language" api:"required"`
// Relative publish time
PublishedText string `json:"published_text" api:"required"`
// Caption source type
//
// Any of "manual", "auto_generated".
Source string `json:"source" api:"required"`
// Video title
Title string `json:"title" api:"required"`
// Timestamped segments (only if include_segments=true)
Transcript []TranscriptSegment `json:"transcript" api:"required"`
// Video URL
URL string `json:"url" api:"required"`
// YouTube video ID
VideoID string `json:"video_id" api:"required"`
// View count
ViewCount float64 `json:"view_count" api:"required"`
// Word count of transcript
WordCount float64 `json:"word_count" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Error respjson.Field
FullText respjson.Field
Language respjson.Field
PublishedText respjson.Field
Source respjson.Field
Title respjson.Field
Transcript respjson.Field
URL respjson.Field
VideoID respjson.Field
ViewCount respjson.Field
WordCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RawYoutubeGetChannelTranscriptsResponseDataItem) RawJSON ¶
func (r RawYoutubeGetChannelTranscriptsResponseDataItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawYoutubeGetChannelTranscriptsResponseDataItem) UnmarshalJSON ¶
func (r *RawYoutubeGetChannelTranscriptsResponseDataItem) UnmarshalJSON(data []byte) error
type RawYoutubeGetTranscriptParams ¶
type RawYoutubeGetTranscriptParams struct {
// Language code or "auto" for automatic detection
Language param.Opt[string] `query:"language,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (RawYoutubeGetTranscriptParams) URLQuery ¶
func (r RawYoutubeGetTranscriptParams) URLQuery() (v url.Values, err error)
URLQuery serializes RawYoutubeGetTranscriptParams's query parameters as `url.Values`.
type RawYoutubeGetTranscriptResponse ¶
type RawYoutubeGetTranscriptResponse struct {
Data RawYoutubeGetTranscriptResponseData `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RawYoutubeGetTranscriptResponse) RawJSON ¶
func (r RawYoutubeGetTranscriptResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawYoutubeGetTranscriptResponse) UnmarshalJSON ¶
func (r *RawYoutubeGetTranscriptResponse) UnmarshalJSON(data []byte) error
type RawYoutubeGetTranscriptResponseData ¶
type RawYoutubeGetTranscriptResponseData struct {
// Available transcript languages
AvailableLanguages []string `json:"available_languages" api:"required"`
// Full transcript as plain text
FullText string `json:"full_text" api:"required"`
// Transcript language code
Language string `json:"language" api:"required"`
// Video title
Title string `json:"title" api:"required"`
// Transcript segments
Transcript []TranscriptSegment `json:"transcript" api:"required"`
// Video URL
URL string `json:"url" api:"required" format:"uri"`
// Video ID
VideoID string `json:"video_id" api:"required"`
// Total word count
WordCount int64 `json:"word_count" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AvailableLanguages respjson.Field
FullText respjson.Field
Language respjson.Field
Title respjson.Field
Transcript respjson.Field
URL respjson.Field
VideoID respjson.Field
WordCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RawYoutubeGetTranscriptResponseData) RawJSON ¶
func (r RawYoutubeGetTranscriptResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawYoutubeGetTranscriptResponseData) UnmarshalJSON ¶
func (r *RawYoutubeGetTranscriptResponseData) UnmarshalJSON(data []byte) error
type RawYoutubeSearchParams ¶
type RawYoutubeSearchParams struct {
// Search query
Q string `query:"q" api:"required" json:"-"`
// Country code for localized results (ISO 3166-1 alpha-2)
CountryCode param.Opt[string] `query:"country_code,omitzero" json:"-"`
// Language code for results
LanguageCode param.Opt[string] `query:"language_code,omitzero" json:"-"`
// Maximum number of results to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (RawYoutubeSearchParams) URLQuery ¶
func (r RawYoutubeSearchParams) URLQuery() (v url.Values, err error)
URLQuery serializes RawYoutubeSearchParams's query parameters as `url.Values`.
type RawYoutubeSearchResponse ¶
type RawYoutubeSearchResponse struct {
Data RawYoutubeSearchResponseData `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RawYoutubeSearchResponse) RawJSON ¶
func (r RawYoutubeSearchResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawYoutubeSearchResponse) UnmarshalJSON ¶
func (r *RawYoutubeSearchResponse) UnmarshalJSON(data []byte) error
type RawYoutubeSearchResponseData ¶
type RawYoutubeSearchResponseData struct {
// Estimated total results count
EstimatedResults float64 `json:"estimated_results" api:"required"`
// The search query
Query string `json:"query" api:"required"`
// Search results (videos and channels)
Results []RawYoutubeSearchResponseDataResultUnion `json:"results" api:"required"`
// When this search was performed
ScrapedAt string `json:"scraped_at" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
EstimatedResults respjson.Field
Query respjson.Field
Results respjson.Field
ScrapedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RawYoutubeSearchResponseData) RawJSON ¶
func (r RawYoutubeSearchResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawYoutubeSearchResponseData) UnmarshalJSON ¶
func (r *RawYoutubeSearchResponseData) UnmarshalJSON(data []byte) error
type RawYoutubeSearchResponseDataResultUnion ¶
type RawYoutubeSearchResponseDataResultUnion struct {
ChannelHandle string `json:"channel_handle"`
ChannelID string `json:"channel_id"`
ChannelName string `json:"channel_name"`
ChannelVerified bool `json:"channel_verified"`
Description string `json:"description"`
// This field is from variant
// [RawYoutubeSearchResponseDataResultYouTubeSearchVideoResult].
DurationSeconds float64 `json:"duration_seconds"`
// This field is from variant
// [RawYoutubeSearchResponseDataResultYouTubeSearchVideoResult].
DurationText string `json:"duration_text"`
// This field is from variant
// [RawYoutubeSearchResponseDataResultYouTubeSearchVideoResult].
PublishedAt string `json:"published_at"`
// This field is from variant
// [RawYoutubeSearchResponseDataResultYouTubeSearchVideoResult].
PublishedText string `json:"published_text"`
ThumbnailURL string `json:"thumbnail_url"`
// This field is from variant
// [RawYoutubeSearchResponseDataResultYouTubeSearchVideoResult].
Title string `json:"title"`
Type string `json:"type"`
URL string `json:"url"`
// This field is from variant
// [RawYoutubeSearchResponseDataResultYouTubeSearchVideoResult].
VideoID string `json:"video_id"`
// This field is from variant
// [RawYoutubeSearchResponseDataResultYouTubeSearchVideoResult].
ViewCount float64 `json:"view_count"`
// This field is from variant
// [RawYoutubeSearchResponseDataResultYouTubeSearchVideoResult].
ViewCountText string `json:"view_count_text"`
// This field is from variant
// [RawYoutubeSearchResponseDataResultYouTubeSearchChannelResult].
SubscriberCount float64 `json:"subscriber_count"`
// This field is from variant
// [RawYoutubeSearchResponseDataResultYouTubeSearchChannelResult].
VideoCount int64 `json:"video_count"`
JSON struct {
ChannelHandle respjson.Field
ChannelID respjson.Field
ChannelName respjson.Field
ChannelVerified respjson.Field
Description respjson.Field
DurationSeconds respjson.Field
DurationText respjson.Field
PublishedAt respjson.Field
PublishedText respjson.Field
ThumbnailURL respjson.Field
Title respjson.Field
Type respjson.Field
URL respjson.Field
VideoID respjson.Field
ViewCount respjson.Field
ViewCountText respjson.Field
SubscriberCount respjson.Field
VideoCount respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
RawYoutubeSearchResponseDataResultUnion contains all possible properties and values from RawYoutubeSearchResponseDataResultYouTubeSearchVideoResult, RawYoutubeSearchResponseDataResultYouTubeSearchChannelResult.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (RawYoutubeSearchResponseDataResultUnion) AsRawYoutubeSearchResponseDataResultYouTubeSearchChannelResult ¶
func (u RawYoutubeSearchResponseDataResultUnion) AsRawYoutubeSearchResponseDataResultYouTubeSearchChannelResult() (v RawYoutubeSearchResponseDataResultYouTubeSearchChannelResult)
func (RawYoutubeSearchResponseDataResultUnion) AsRawYoutubeSearchResponseDataResultYouTubeSearchVideoResult ¶
func (u RawYoutubeSearchResponseDataResultUnion) AsRawYoutubeSearchResponseDataResultYouTubeSearchVideoResult() (v RawYoutubeSearchResponseDataResultYouTubeSearchVideoResult)
func (RawYoutubeSearchResponseDataResultUnion) RawJSON ¶
func (u RawYoutubeSearchResponseDataResultUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawYoutubeSearchResponseDataResultUnion) UnmarshalJSON ¶
func (r *RawYoutubeSearchResponseDataResultUnion) UnmarshalJSON(data []byte) error
type RawYoutubeSearchResponseDataResultYouTubeSearchChannelResult ¶
type RawYoutubeSearchResponseDataResultYouTubeSearchChannelResult struct {
// Channel handle (e.g., @username)
ChannelHandle string `json:"channel_handle" api:"required"`
// Channel ID
ChannelID string `json:"channel_id" api:"required"`
// Channel name
ChannelName string `json:"channel_name" api:"required"`
// Whether channel is verified
ChannelVerified bool `json:"channel_verified" api:"required"`
// Channel description snippet
Description string `json:"description" api:"required"`
// Subscriber count
SubscriberCount float64 `json:"subscriber_count" api:"required"`
// Channel avatar URL
ThumbnailURL string `json:"thumbnail_url" api:"required"`
Type constant.Channel `json:"type" api:"required"`
// Full YouTube channel URL
URL string `json:"url" api:"required"`
// Number of videos on the channel
VideoCount int64 `json:"video_count" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChannelHandle respjson.Field
ChannelID respjson.Field
ChannelName respjson.Field
ChannelVerified respjson.Field
Description respjson.Field
SubscriberCount respjson.Field
ThumbnailURL respjson.Field
Type respjson.Field
URL respjson.Field
VideoCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RawYoutubeSearchResponseDataResultYouTubeSearchChannelResult) RawJSON ¶
func (r RawYoutubeSearchResponseDataResultYouTubeSearchChannelResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawYoutubeSearchResponseDataResultYouTubeSearchChannelResult) UnmarshalJSON ¶
func (r *RawYoutubeSearchResponseDataResultYouTubeSearchChannelResult) UnmarshalJSON(data []byte) error
type RawYoutubeSearchResponseDataResultYouTubeSearchVideoResult ¶
type RawYoutubeSearchResponseDataResultYouTubeSearchVideoResult struct {
// Channel handle (e.g., @username)
ChannelHandle string `json:"channel_handle" api:"required"`
// Channel ID
ChannelID string `json:"channel_id" api:"required"`
// Channel name
ChannelName string `json:"channel_name" api:"required"`
// Whether channel is verified
ChannelVerified bool `json:"channel_verified" api:"required"`
// Video description snippet
Description string `json:"description" api:"required"`
// Video duration in seconds
DurationSeconds float64 `json:"duration_seconds" api:"required"`
// Video duration text (e.g., "12:34")
DurationText string `json:"duration_text" api:"required"`
// Approximate publish timestamp
PublishedAt string `json:"published_at" api:"required"`
// Relative publish time (e.g., "2 days ago")
PublishedText string `json:"published_text" api:"required"`
// Video thumbnail URL
ThumbnailURL string `json:"thumbnail_url" api:"required"`
// Video title
Title string `json:"title" api:"required"`
Type constant.Video `json:"type" api:"required"`
// Full YouTube video URL
URL string `json:"url" api:"required"`
// YouTube video ID
VideoID string `json:"video_id" api:"required"`
// Number of views
ViewCount float64 `json:"view_count" api:"required"`
// View count text (e.g., "1.2M views")
ViewCountText string `json:"view_count_text" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChannelHandle respjson.Field
ChannelID respjson.Field
ChannelName respjson.Field
ChannelVerified respjson.Field
Description respjson.Field
DurationSeconds respjson.Field
DurationText respjson.Field
PublishedAt respjson.Field
PublishedText respjson.Field
ThumbnailURL respjson.Field
Title respjson.Field
Type respjson.Field
URL respjson.Field
VideoID respjson.Field
ViewCount respjson.Field
ViewCountText respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RawYoutubeSearchResponseDataResultYouTubeSearchVideoResult) RawJSON ¶
func (r RawYoutubeSearchResponseDataResultYouTubeSearchVideoResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawYoutubeSearchResponseDataResultYouTubeSearchVideoResult) UnmarshalJSON ¶
func (r *RawYoutubeSearchResponseDataResultYouTubeSearchVideoResult) UnmarshalJSON(data []byte) error
type RawYoutubeService ¶
type RawYoutubeService struct {
// contains filtered or unexported fields
}
Fetch fresh data directly from social platforms in real-time. Use when you need the most current information or data for profiles not yet in our database.
RawYoutubeService contains methods and other services that help with interacting with the Influship API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRawYoutubeService method instead.
func NewRawYoutubeService ¶
func NewRawYoutubeService(opts ...option.RequestOption) (r RawYoutubeService)
NewRawYoutubeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RawYoutubeService) GetChannel ¶
func (r *RawYoutubeService) GetChannel(ctx context.Context, handle string, query RawYoutubeGetChannelParams, opts ...option.RequestOption) (res *RawYoutubeGetChannelResponse, err error)
Fetch fresh YouTube channel data including subscriber count, video count, and total views.
**Pricing**: 0.5 credits per channel scraped ($0.005)
func (*RawYoutubeService) GetChannelTranscripts ¶
func (r *RawYoutubeService) GetChannelTranscripts(ctx context.Context, handle string, query RawYoutubeGetChannelTranscriptsParams, opts ...option.RequestOption) (res *RawYoutubeGetChannelTranscriptsResponse, err error)
Fetch transcripts for multiple videos from a YouTube channel. Videos can be sorted by popularity, newest, or oldest before selection.
**Features:**
- Fetches up to 20 video transcripts per request - Sort by popular (most views), newest, or oldest - Partial success — individual video failures don't block the response - Optional timestamped segments for each transcript
**Pricing**: 0.5 credits per transcript fetched ($0.005)
func (*RawYoutubeService) GetTranscript ¶
func (r *RawYoutubeService) GetTranscript(ctx context.Context, videoID string, query RawYoutubeGetTranscriptParams, opts ...option.RequestOption) (res *RawYoutubeGetTranscriptResponse, err error)
Fetch YouTube video transcript/captions. Returns timestamped segments and full text. Useful for content analysis.
**Supported sources:**
- Manual captions (highest quality) - Auto-generated captions - Multiple language tracks
**Pricing**: 0.5 credits per transcript ($0.005)
func (*RawYoutubeService) Search ¶
func (r *RawYoutubeService) Search(ctx context.Context, query RawYoutubeSearchParams, opts ...option.RequestOption) (res *RawYoutubeSearchResponse, err error)
Search YouTube videos and channels.
**Pricing**: 0.5 credits per result returned ($0.005)
type SearchGetParams ¶
type SearchGetParams struct {
// Pagination cursor for next page
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum results to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SearchGetParams) URLQuery ¶
func (r SearchGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes SearchGetParams's query parameters as `url.Values`.
type SearchGetResponse ¶
type SearchGetResponse struct {
// Basic creator information
Creator shared.CreatorBasic `json:"creator" api:"required"`
// Search match information
Match MatchInfo `json:"match" api:"required"`
// Abbreviated profile information
PrimaryProfile shared.ProfileSummary `json:"primary_profile" api:"required"`
// Abbreviated profile information
RelevantProfile shared.ProfileSummary `json:"relevant_profile" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Creator respjson.Field
Match respjson.Field
PrimaryProfile respjson.Field
RelevantProfile respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SearchGetResponse) RawJSON ¶
func (r SearchGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SearchGetResponse) UnmarshalJSON ¶
func (r *SearchGetResponse) UnmarshalJSON(data []byte) error
type SearchNewParams ¶
type SearchNewParams struct {
// Natural language search query
Query string `json:"query" api:"required"`
// Maximum results to return
Limit param.Opt[int64] `json:"limit,omitzero"`
// Additional filters
Filters SearchNewParamsFilters `json:"filters,omitzero"`
// Filter results to specific platforms
//
// Any of "instagram".
Platforms []string `json:"platforms,omitzero"`
// contains filtered or unexported fields
}
func (SearchNewParams) MarshalJSON ¶
func (r SearchNewParams) MarshalJSON() (data []byte, err error)
func (*SearchNewParams) UnmarshalJSON ¶
func (r *SearchNewParams) UnmarshalJSON(data []byte) error
type SearchNewParamsFilters ¶
type SearchNewParamsFilters struct {
// Filter by verified status
Verified param.Opt[bool] `json:"verified,omitzero"`
// Filter by engagement rate
EngagementRate SearchNewParamsFiltersEngagementRate `json:"engagement_rate,omitzero"`
// Filter by follower count
Followers SearchNewParamsFiltersFollowers `json:"followers,omitzero"`
// contains filtered or unexported fields
}
Additional filters
func (SearchNewParamsFilters) MarshalJSON ¶
func (r SearchNewParamsFilters) MarshalJSON() (data []byte, err error)
func (*SearchNewParamsFilters) UnmarshalJSON ¶
func (r *SearchNewParamsFilters) UnmarshalJSON(data []byte) error
type SearchNewParamsFiltersEngagementRate ¶
type SearchNewParamsFiltersEngagementRate struct {
// Maximum engagement rate (%)
Max param.Opt[float64] `json:"max,omitzero"`
// Minimum engagement rate (%)
Min param.Opt[float64] `json:"min,omitzero"`
// contains filtered or unexported fields
}
Filter by engagement rate
func (SearchNewParamsFiltersEngagementRate) MarshalJSON ¶
func (r SearchNewParamsFiltersEngagementRate) MarshalJSON() (data []byte, err error)
func (*SearchNewParamsFiltersEngagementRate) UnmarshalJSON ¶
func (r *SearchNewParamsFiltersEngagementRate) UnmarshalJSON(data []byte) error
type SearchNewParamsFiltersFollowers ¶
type SearchNewParamsFiltersFollowers struct {
// Maximum follower count
Max param.Opt[float64] `json:"max,omitzero"`
// Minimum follower count
Min param.Opt[float64] `json:"min,omitzero"`
// contains filtered or unexported fields
}
Filter by follower count
func (SearchNewParamsFiltersFollowers) MarshalJSON ¶
func (r SearchNewParamsFiltersFollowers) MarshalJSON() (data []byte, err error)
func (*SearchNewParamsFiltersFollowers) UnmarshalJSON ¶
func (r *SearchNewParamsFiltersFollowers) UnmarshalJSON(data []byte) error
type SearchNewResponse ¶
type SearchNewResponse struct {
Data []SearchNewResponseData `json:"data" api:"required"`
// Whether more results are available
HasMore bool `json:"has_more" api:"required"`
// Cursor for the next page
NextCursor string `json:"next_cursor" api:"required"`
// Search ID. Use with GET /v1/search/{id} for free pagination.
SearchID string `json:"search_id" api:"required" format:"uuid"`
// Total number of results across all pages
Total int64 `json:"total" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
HasMore respjson.Field
NextCursor respjson.Field
SearchID respjson.Field
Total respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SearchNewResponse) RawJSON ¶
func (r SearchNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SearchNewResponse) UnmarshalJSON ¶
func (r *SearchNewResponse) UnmarshalJSON(data []byte) error
type SearchNewResponseData ¶
type SearchNewResponseData struct {
// Basic creator information
Creator shared.CreatorBasic `json:"creator" api:"required"`
// Search match information
Match MatchInfo `json:"match" api:"required"`
// Abbreviated profile information
PrimaryProfile shared.ProfileSummary `json:"primary_profile" api:"required"`
// Abbreviated profile information
RelevantProfile shared.ProfileSummary `json:"relevant_profile" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Creator respjson.Field
Match respjson.Field
PrimaryProfile respjson.Field
RelevantProfile respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SearchNewResponseData) RawJSON ¶
func (r SearchNewResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*SearchNewResponseData) UnmarshalJSON ¶
func (r *SearchNewResponseData) UnmarshalJSON(data []byte) error
type SearchService ¶
type SearchService struct {
// contains filtered or unexported fields
}
AI-powered semantic search to find creators using natural language queries. Understands intent and context to match creators based on content themes, audience, and style.
SearchService contains methods and other services that help with interacting with the Influship API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSearchService method instead.
func NewSearchService ¶
func NewSearchService(opts ...option.RequestOption) (r SearchService)
NewSearchService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SearchService) Get ¶
func (r *SearchService) Get(ctx context.Context, id string, query SearchGetParams, opts ...option.RequestOption) (res *pagination.QueryCursor[SearchGetResponse], err error)
Paginate through results from a previous search. Use the `search_id` returned by `POST /v1/search` to fetch additional pages.
Search sessions expire after 1 hour. After expiry, a new search must be run.
**Pricing**: 0 credits (included with initial search)
func (*SearchService) GetAutoPaging ¶
func (r *SearchService) GetAutoPaging(ctx context.Context, id string, query SearchGetParams, opts ...option.RequestOption) *pagination.QueryCursorAutoPager[SearchGetResponse]
Paginate through results from a previous search. Use the `search_id` returned by `POST /v1/search` to fetch additional pages.
Search sessions expire after 1 hour. After expiry, a new search must be run.
**Pricing**: 0 credits (included with initial search)
func (*SearchService) New ¶
func (r *SearchService) New(ctx context.Context, body SearchNewParams, opts ...option.RequestOption) (res *SearchNewResponse, err error)
Search for creators using natural language queries. The AI understands intent and context to match creators based on content themes, audience demographics, and style.
The response includes a `search_id` that can be used with `GET /v1/search/{id}` to paginate through results for free.
**Use cases:**
- Find creators in a specific niche ("vegan food bloggers in LA")
- Discover creators with specific audience characteristics ("fitness influencers with millennial audience")
- Search by content style ("creators who post cinematic travel videos")
**Pricing**: 25 credits base + 2 credits per creator returned
type TranscriptSegment ¶
type TranscriptSegment struct {
// Duration in seconds
Duration float64 `json:"duration" api:"required"`
// Start time in seconds
Start float64 `json:"start" api:"required"`
// Segment text
Text string `json:"text" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Duration respjson.Field
Start respjson.Field
Text respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TranscriptSegment) RawJSON ¶
func (r TranscriptSegment) RawJSON() string
Returns the unmodified JSON received from the API
func (*TranscriptSegment) UnmarshalJSON ¶
func (r *TranscriptSegment) UnmarshalJSON(data []byte) error
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
encoding/json
Package json implements encoding and decoding of JSON as defined in RFC 7159.
|
Package json implements encoding and decoding of JSON as defined in RFC 7159. |
|
encoding/json/shims
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
|
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package. |
|
packages
|
|