Terraform Provider
Use the TwexAPI Terraform provider with an API key for profile and tweet data sources. Public docs focus on reads.
Use the Terraform provider for API-key data sources such as profile about and tweet lookup. Search, follower exports, and other paginated reads stay on the REST API or language SDKs.
twexapi-dev/terraform-provider-x-api-scraperTerraform provider for TwexAPI public social data and approved account workflows. Independent third-party service.00| Terraform task | Resource / data source | REST route |
|---|---|---|
| Read profile | data.x-api-scraper_user_about |
GET /twitter/{screen_name}/about |
| Read tweet | data.x-api-scraper_tweet |
POST /twitter/tweets/lookup |
Install
Terraform CLI 1.0 or newer.
terraform {
required_providers {
x-api-scraper = {
source = "twexapi-dev/x-api-scraper"
version = "~> 0.1"
}
}
}
provider "x-api-scraper" {}
Local development override in ~/.terraformrc:
provider_installation {
dev_overrides {
"twexapi-dev/x-api-scraper" = "/absolute/path/to/terraform-provider-x-api-scraper"
}
direct {}
}
Then:
go build -o terraform-provider-x-api-scraper
export X_API_SCRAPER_KEY="YOUR_API_KEY"
terraform plan
Source: twexapi-dev/terraform-provider-x-api-scraper
Authenticate
Prefer environment variables:
export X_API_SCRAPER_KEY="YOUR_API_KEY"
Or set bearer_auth on the provider.
Never commit credentials or Terraform state.
Read a profile
data "x-api-scraper_user_about" "elon" {
screen_name = "elonmusk"
}
output "user_id" {
value = data.x-api-scraper_user_about.elon.user_id
}
Search and pagination
For tweet search, follower exports, and other paginated reads, use the Go SDK, TypeScript SDK, or CLI instead of Terraform.
References
- SDKs overview
- Go SDK (underlying client)
- Authentication
- Source Repository