{"openapi":"3.1.0","info":{"title":"Keyword Analysis API","version":"0.1.0"},"paths":{"/keyword-analysis/analyze":{"post":{"tags":["keyword-analysis"],"summary":"Analyze Keyword","operationId":"analyze_keyword_keyword_analysis_analyze_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeywordAnalysisRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeywordAnalysisJobAcceptedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/keyword-analysis/analyze-sync":{"post":{"tags":["keyword-analysis"],"summary":"Analyze Keyword Sync","operationId":"analyze_keyword_sync_keyword_analysis_analyze_sync_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeywordAnalysisRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeywordAnalysisResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/keyword-analysis/jobs/{job_id}":{"get":{"tags":["keyword-analysis"],"summary":"Get Keyword Analysis Job","operationId":"get_keyword_analysis_job_keyword_analysis_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeywordAnalysisJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/keyword-analysis/jobs":{"get":{"tags":["keyword-analysis"],"summary":"List Keyword Analysis Jobs","operationId":"list_keyword_analysis_jobs_keyword_analysis_jobs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeywordAnalysisJobListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/create-account":{"post":{"tags":["auth"],"summary":"Create Account","operationId":"create_account_auth_create_account_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/verify-account":{"post":{"tags":["auth"],"summary":"Verify Account","operationId":"verify_account_auth_verify_account_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyAccountRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/account-status":{"get":{"tags":["auth"],"summary":"Get Account Status","operationId":"get_account_status_auth_account_status_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/usage-summary":{"get":{"tags":["auth"],"summary":"Get Usage Summary","operationId":"get_usage_summary_auth_usage_summary_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/start-billing-setup":{"post":{"tags":["billing"],"summary":"Start Billing Setup","operationId":"start_billing_setup_billing_start_billing_setup_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSetupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/stripe/webhooks":{"post":{"tags":["billing"],"summary":"Stripe Webhooks","operationId":"stripe_webhooks_billing_stripe_webhooks_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/setup/success":{"get":{"tags":["billing"],"summary":"Billing Setup Success","operationId":"billing_setup_success_billing_setup_success_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/billing/setup/cancel":{"get":{"tags":["billing"],"summary":"Billing Setup Cancel","operationId":"billing_setup_cancel_billing_setup_cancel_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/events/":{"post":{"tags":["events"],"summary":"Handle Lambda Events","operationId":"handle_lambda_events_events__post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Handle Lambda Events Events  Post"}}}}}}},"/events":{"post":{"tags":["events"],"summary":"Handle Lambda Events","operationId":"handle_lambda_events_events_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Handle Lambda Events Events Post"}}}}}}},"/eventslocal-process":{"post":{"tags":["events"],"summary":"Process Local Events","operationId":"process_local_events_eventslocal_process_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Process Local Events Eventslocal Process Post"}}}}}}},"/events/local-process":{"post":{"tags":["events"],"summary":"Process Local Events","operationId":"process_local_events_events_local_process_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Process Local Events Events Local Process Post"}}}}}}},"/llms.txt":{"get":{"tags":["discovery"],"summary":"Llms Txt","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/.well-known/llms.txt":{"get":{"tags":["discovery"],"summary":"Well Known Llms Txt","operationId":"well_known_llms_txt__well_known_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"head":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}}}}}},"components":{"schemas":{"AccountStatusResponse":{"properties":{"account_id":{"type":"integer","title":"Account Id"},"email":{"type":"string","format":"email","title":"Email"},"email_verified":{"type":"boolean","title":"Email Verified"},"billing_configured":{"type":"boolean","title":"Billing Configured"},"billing_status":{"type":"string","title":"Billing Status"},"free_searches_remaining":{"type":"integer","title":"Free Searches Remaining"},"paid_usage_enabled":{"type":"boolean","title":"Paid Usage Enabled"},"usage_this_month":{"type":"integer","title":"Usage This Month"}},"type":"object","required":["account_id","email","email_verified","billing_configured","billing_status","free_searches_remaining","paid_usage_enabled","usage_this_month"],"title":"AccountStatusResponse"},"BillingSetupResponse":{"properties":{"billing_status":{"type":"string","title":"Billing Status"},"url":{"type":"string","title":"Url"},"mode":{"type":"string","title":"Mode"},"stripe_customer_id":{"type":"string","title":"Stripe Customer Id"}},"type":"object","required":["billing_status","url","mode","stripe_customer_id"],"title":"BillingSetupResponse"},"CreateAccountRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"CreateAccountRequest"},"CreateAccountResponse":{"properties":{"pending_user_id":{"type":"string","title":"Pending User Id"},"verification_required":{"type":"boolean","title":"Verification Required","default":true},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds"},"delivery_method":{"type":"string","title":"Delivery Method"},"verification_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verification Code"}},"type":"object","required":["pending_user_id","expires_in_seconds","delivery_method"],"title":"CreateAccountResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"KeywordAnalysisJobAcceptedResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","title":"Status"},"keyword":{"type":"string","title":"Keyword"},"poll_url":{"type":"string","title":"Poll Url"}},"type":"object","required":["job_id","status","keyword","poll_url"],"title":"KeywordAnalysisJobAcceptedResponse"},"KeywordAnalysisJobListResponse":{"properties":{"jobs":{"items":{"$ref":"#/components/schemas/KeywordAnalysisJobResponse"},"type":"array","title":"Jobs"}},"type":"object","required":["jobs"],"title":"KeywordAnalysisJobListResponse"},"KeywordAnalysisJobResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","title":"Status"},"keyword":{"type":"string","title":"Keyword"},"top_n_results":{"type":"integer","title":"Top N Results"},"include_page_content":{"type":"boolean","title":"Include Page Content"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"result":{"anyOf":[{"$ref":"#/components/schemas/KeywordAnalysisResponse"},{"type":"null"}]}},"type":"object","required":["job_id","status","keyword","top_n_results","include_page_content","created_at","updated_at"],"title":"KeywordAnalysisJobResponse"},"KeywordAnalysisOutput":{"properties":{"primary_keyword":{"type":"string","title":"Primary Keyword"},"primary_keyword_density":{"$ref":"#/components/schemas/KeywordDensity"},"secondary_keywords":{"items":{"$ref":"#/components/schemas/KeywordDensity"},"type":"array","title":"Secondary Keywords"}},"type":"object","required":["primary_keyword","primary_keyword_density","secondary_keywords"],"title":"KeywordAnalysisOutput"},"KeywordAnalysisRequest":{"properties":{"keyword":{"type":"string","maxLength":200,"minLength":2,"title":"Keyword"},"top_n_results":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Top N Results","default":5},"include_page_content":{"type":"boolean","title":"Include Page Content","default":false}},"type":"object","required":["keyword"],"title":"KeywordAnalysisRequest"},"KeywordAnalysisResponse":{"properties":{"keyword":{"type":"string","title":"Keyword"},"suggested_word_count":{"type":"integer","title":"Suggested Word Count"},"total_results_analyzed":{"type":"integer","title":"Total Results Analyzed"},"results":{"items":{"$ref":"#/components/schemas/ScrapedSearchResult"},"type":"array","title":"Results"},"analysis":{"$ref":"#/components/schemas/KeywordAnalysisOutput"}},"type":"object","required":["keyword","suggested_word_count","total_results_analyzed","results","analysis"],"title":"KeywordAnalysisResponse"},"KeywordDensity":{"properties":{"keyword":{"type":"string","title":"Keyword"},"occurrence_count":{"type":"integer","title":"Occurrence Count"},"occurrences_per_result":{"type":"number","title":"Occurrences Per Result"},"total_word_count":{"type":"integer","title":"Total Word Count"},"density_percentage":{"type":"number","title":"Density Percentage"}},"type":"object","required":["keyword","occurrence_count","occurrences_per_result","total_word_count","density_percentage"],"title":"KeywordDensity"},"ScrapedSearchResult":{"properties":{"title":{"type":"string","title":"Title"},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"display_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Url"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rank"},"global_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Global Rank"},"analysis_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Analysis Rank"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"content_excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Excerpt"},"word_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Word Count"},"scrape_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scrape Error"}},"type":"object","required":["title","url"],"title":"ScrapedSearchResult"},"UsageSummaryResponse":{"properties":{"free_searches_used":{"type":"integer","title":"Free Searches Used"},"free_searches_remaining":{"type":"integer","title":"Free Searches Remaining"},"paid_searches_used":{"type":"integer","title":"Paid Searches Used"},"successful_searches":{"type":"integer","title":"Successful Searches"},"failed_searches":{"type":"integer","title":"Failed Searches"}},"type":"object","required":["free_searches_used","free_searches_remaining","paid_searches_used","successful_searches","failed_searches"],"title":"UsageSummaryResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyAccountRequest":{"properties":{"pending_user_id":{"type":"string","title":"Pending User Id"},"code":{"type":"string","maxLength":12,"minLength":4,"title":"Code"}},"type":"object","required":["pending_user_id","code"],"title":"VerifyAccountRequest"},"VerifyAccountResponse":{"properties":{"account_id":{"type":"integer","title":"Account Id"},"email":{"type":"string","format":"email","title":"Email"},"api_token":{"type":"string","title":"Api Token"},"billing_status":{"type":"string","title":"Billing Status"},"free_searches_remaining":{"type":"integer","title":"Free Searches Remaining"}},"type":"object","required":["account_id","email","api_token","billing_status","free_searches_remaining"],"title":"VerifyAccountResponse"}}}}