REST API client for LLM Pulse AI visibility analytics.
For more information, please visit https://llmpulse.ai.
PHP 8.1 and later.
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/LLM-Pulse/llmpulse-php.git"
}
],
"require": {
"LLM-Pulse/llmpulse-php": "*@dev"
}
}Then run composer install
Download the files and include autoload.php:
<?php
require_once('/path/to/LLMPulse/vendor/autoload.php');Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: BearerAuth
$config = LLMPulse\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new LLMPulse\Api\AIModelInsightsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$project_id = 56; // int | Project ID
$range = 56; // int | Number of days to look back (alternative to from/to)
$from = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime
$to = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime
$granularity = 'granularity_example'; // string
$collection_id = 56; // int
$country_code = 'country_code_example'; // string | ISO country code (e.g. US, GB, DE)
$language_code = 'language_code_example'; // string | ISO language code (e.g. en, es, de)
$prompt_type = 'prompt_type_example'; // string | Filter by prompt type (search intent)
$brand_kind = 'brand_kind_example'; // string | Filter by brand kind: brand (own brand/products), brand_other (competitors/other brands), non_brand (generic, no brand named). For fair 1:1 brand-vs-competitor comparisons (visibility, share of voice), use non_brand: brand-focused prompts skew results toward the brand they name. The in-app Overview page applies non_brand by default.
$competitors = 'competitors_example'; // string | Comma-separated competitor IDs (unknown IDs return ERR_INVALID_PARAM)
try {
$apiInstance->getAiModelInsightsSummary($project_id, $range, $from, $to, $granularity, $collection_id, $country_code, $language_code, $prompt_type, $brand_kind, $competitors);
} catch (Exception $e) {
echo 'Exception when calling AIModelInsightsApi->getAiModelInsightsSummary: ', $e->getMessage(), PHP_EOL;
}All URIs are relative to https://api.llmpulse.ai/api/v1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AIModelInsightsApi | getAiModelInsightsSummary | GET /reports/ai_model_insights/summary | AI Model Insights summary |
| AIModelInsightsApi | getAiModelPositionDistribution | GET /reports/ai_model_insights/position_distribution | Position distribution comparison |
| AIModelInsightsApi | getAiOverviewResults | GET /reports/ai_model_insights/ai_overview_results | Google AI Overview result availability |
| AnnotationsApi | createAnnotation | POST /annotations | Create a timeline annotation |
| AnnotationsApi | deleteAnnotation | DELETE /annotations/{id} | Delete a timeline annotation |
| AnnotationsApi | listAnnotations | GET /annotations | List timeline annotations |
| AnnotationsApi | updateAnnotation | PATCH /annotations/{id} | Update a timeline annotation |
| AnswersApi | getAnswer | GET /answers/{id} | Get one AI response |
| AnswersApi | listAnswers | GET /answers | List AI responses |
| CitationIntelligenceApi | getCitedUrlContent | GET /citation_intelligence/urls/{url_sha256}/content | Cited URL cached content |
| CitationIntelligenceApi | getCitedUrlDetail | GET /citation_intelligence/urls/{url_sha256} | Cited URL detail |
| CitationIntelligenceApi | getMentionsByCitingDomain | GET /citation_intelligence/mentions_by_domain | Mention share by citing domain |
| CitationIntelligenceApi | listCitationGroups | GET /citation_intelligence/groups | Grouped citation intelligence |
| CitationIntelligenceApi | listCitedUrlOccurrences | GET /citation_intelligence/urls/{url_sha256}/occurrences | Cited URL occurrences |
| CollectionsApi | createCollection | POST /collections | Create a tag |
| CollectionsApi | deleteCollection | DELETE /collections/{id} | Delete a tag |
| CollectionsApi | updateCollection | PATCH /collections/{id} | Update a tag |
| CompetitorsApi | createCompetitor | POST /competitors | Add a competitor |
| CompetitorsApi | deleteCompetitor | DELETE /competitors/{id} | Delete a competitor |
| CompetitorsApi | updateCompetitor | PATCH /competitors/{id} | Update a competitor |
| DimensionsApi | getCompetitorDetails | GET /dimensions/competitors/{id} | Competitor details |
| DimensionsApi | getProjectDetails | GET /dimensions/projects/{id} | Project details |
| DimensionsApi | listAgentBots | GET /dimensions/agent_bots | AI bot catalog (Scale+) |
| DimensionsApi | listAllCitations | GET /dimensions/all_citations | List all citations (brand + competitor) |
| DimensionsApi | listAllMentions | GET /dimensions/all_mentions | List all mentions (brand + competitor) |
| DimensionsApi | listCitations | GET /dimensions/citations | List brand citations |
| DimensionsApi | listCollections | GET /dimensions/collections | List tags/collections |
| DimensionsApi | listCompetitorCitations | GET /dimensions/competitor_citations | List competitor citations |
| DimensionsApi | listCompetitorMentions | GET /dimensions/competitor_mentions | List competitor mentions |
| DimensionsApi | listCompetitors | GET /dimensions/competitors | List competitors |
| DimensionsApi | listLocales | GET /dimensions/locales | List locales with data |
| DimensionsApi | listMentions | GET /dimensions/mentions | List brand mentions |
| DimensionsApi | listModels | GET /dimensions/models | List models with data |
| DimensionsApi | listProjects | GET /dimensions/projects | List projects |
| DimensionsApi | listPromptExecutions | GET /dimensions/prompt_executions | List prompt executions |
| DimensionsApi | listPrompts | GET /dimensions/prompts | List prompts |
| DimensionsApi | listSentimentCategories | GET /dimensions/sentiments | List sentiment categories |
| DimensionsApi | listSources | GET /dimensions/sources | List source URLs |
| DimensionsApi | listTags | GET /dimensions/tags | List tags (alias for /collections) |
| GEOWriterApi | createIntelligenceTask | POST /intelligence_tasks | Create a GEO Writer task |
| GEOWriterApi | getIntelligenceTask | GET /intelligence_tasks/{id} | Get a GEO Writer task |
| GEOWriterApi | listIntelligenceTasks | GET /intelligence_tasks | List GEO Writer tasks |
| HealthApi | ping | GET /ping | Health check |
| MetricsApi | getAgentTraffic | GET /metrics/agent_traffic | AI bot crawler traffic (Scale+, Beta) |
| MetricsApi | getAiTraffic | GET /metrics/ai_traffic | AI referral traffic (Scale+) |
| MetricsApi | getPromptSummary | GET /metrics/prompt_summary | Per-prompt metrics summary |
| MetricsApi | getShareOfVoice | GET /metrics/sov | Share of Voice |
| MetricsApi | getSummary | GET /metrics/summary | Aggregated metrics summary |
| MetricsApi | getTimeseries | GET /metrics/timeseries | Time-series metrics |
| MetricsApi | getTopSources | GET /metrics/top_sources | Top cited sources |
| ProjectsApi | createProject | POST /projects | Create a project (fast mode) |
| ProjectsApi | createProjectDraft | POST /project_drafts | Start a project draft (wizard step 1) |
| ProjectsApi | finalizeProjectDraft | POST /project_drafts/{id}/finalize | Finalize a draft into a real project |
| ProjectsApi | getProjectDraft | GET /project_drafts/{id} | Read a project draft |
| ProjectsApi | updateProjectDraft | PATCH /project_drafts/{id} | Submit a wizard step |
| PromptsApi | assignPromptTags | POST /prompts/assign_tags | Bulk-attach tags to prompts |
| PromptsApi | createPrompts | POST /prompts | Bulk-create prompts |
| PromptsApi | deletePrompt | DELETE /prompts/{id} | Delete a prompt |
| RecommendationsApi | getRecommendation | GET /recommendations/{id} | Get recommendation run with items |
| RecommendationsApi | launchRecommendations | POST /recommendations | Launch a recommendations generation |
| RecommendationsApi | listRecommendations | GET /recommendations | List recommendation runs |
| ReportsApi | createTechnicalGeoReports | POST /technical_geo_reports | Run technical GEO analysis |
| SearchConsoleApi | getSearchConsolePages | GET /search_console/pages | Top Search Console pages (Growth+) |
| SearchConsoleApi | getSearchConsoleQueries | GET /search_console/queries | Top Search Console queries (Growth+) |
| SearchConsoleApi | getSearchConsoleSummary | GET /search_console/summary | Search Console summary (Growth+) |
| SearchConsoleApi | getSearchConsoleTimeseries | GET /search_console/timeseries | Search Console time series (Growth+) |
| SentimentsApi | listSentimentRecords | GET /sentiments | List sentiment records |
| WebhooksApi | createWebhook | POST /webhooks | Create a webhook subscription |
| WebhooksApi | deleteWebhook | DELETE /webhooks/{id} | Delete a webhook subscription |
| WebhooksApi | listWebhooks | GET /webhooks | List webhook subscriptions |
| WebhooksApi | sampleWebhookPayloads | GET /webhooks/sample/{event_type} | Sample event payloads |
- Actor
- AgentBot
- AgentBotsResponse
- AgentTrafficResponse
- AnswerDetails
- AnswerDetailsLocale
- ApiError
- ApiErrorError
- AssignPromptTagsRequest
- Competitor
- CompetitorDetails
- CreateAnnotationRequest
- CreateCollectionRequest
- CreateCompetitorRequest
- CreateProjectDraftRequest
- CreateTechnicalGeoReportsRequest
- CreateWebhook201Response
- CreateWebhookRequest
- DeleteWebhook200Response
- FinalizeProjectDraftRequest
- IntelligenceTask
- IntelligenceTaskCreateRequest
- LaunchRecommendationsRequest
- ListCompetitors200Response
- ListProjects200Response
- ListWebhooks200Response
- ListWebhooks200ResponseDataInner
- Ping200Response
- Project
- ProjectCreateRequest
- ProjectCreateRequestCompetitorsInner
- ProjectCreateRequestOwnedMedia
- ProjectCreateResponse
- ProjectCreateResponseCompetitors
- ProjectCreateResponseEmailSubscription
- ProjectCreateResponseLimits
- ProjectCreateResponsePrompts
- ProjectDetails
- ProjectDetailsAllOfStats
- PromptSummaryResponse
- PromptSummaryRow
- PromptsCreateRequest
- PromptsCreateResponse
- PromptsCreateResponseDataInner
- SampleWebhookPayloads200Response
- SampleWebhookPayloads200ResponseDataInner
- SovResponse
- SovResponseBreakdownInner
- SovResponseCurrentInner
- SovResponseOverTimeInner
- SovResponsePeriodsInner
- SummaryResponse
- SummaryResponseAllOfPositionDistribution
- SummaryResponseAllOfSummaryValueInner
- TimeseriesPoint
- TimeseriesResponse
- TimeseriesSeries
- TopSourcesResponse
- TopSourcesResponseDataInner
- UpdateAnnotationRequest
- UpdateCollectionRequest
- UpdateCompetitorRequest
- UpdateProjectDraftRequest
Authentication schemes defined for the API:
- Type: Bearer authentication
To run the tests, use:
composer install
vendor/bin/phpunitThis PHP package is automatically generated by the OpenAPI Generator project:
- API version:
1.22.0- Generator version:
7.24.0
- Generator version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen