{"id":45804181,"url":"https://github.com/james-langridge/mars-vista-api","last_synced_at":"2026-02-26T13:09:17.497Z","repository":{"id":326061392,"uuid":"1072760543","full_name":"james-langridge/mars-vista-api","owner":"james-langridge","description":"C#/.NET REST API serving over 1.5 million Mars rover photos.  Unified access to Perseverance, Curiosity, Opportunity \u0026 Spirit with advanced filtering, caching, and AI-friendly documentation.","archived":false,"fork":false,"pushed_at":"2026-02-18T16:24:31.000Z","size":1112,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-18T16:53:00.446Z","etag":null,"topics":["api","astronomy","csharp","curiosity","dotnet","mars","nasa","nextjs","opportunity","perserverance","postgresql","redis","rest-api","rover","space","spirit"],"latest_commit_sha":null,"homepage":"https://marsvista.dev","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/james-langridge.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-09T07:12:18.000Z","updated_at":"2026-02-18T16:25:07.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/james-langridge/mars-vista-api","commit_stats":null,"previous_names":["james-langridge/mars-vista-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/james-langridge/mars-vista-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james-langridge%2Fmars-vista-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james-langridge%2Fmars-vista-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james-langridge%2Fmars-vista-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james-langridge%2Fmars-vista-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/james-langridge","download_url":"https://codeload.github.com/james-langridge/mars-vista-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james-langridge%2Fmars-vista-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29860114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T08:51:08.701Z","status":"ssl_error","status_checked_at":"2026-02-26T08:50:19.607Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","astronomy","csharp","curiosity","dotnet","mars","nasa","nextjs","opportunity","perserverance","postgresql","redis","rest-api","rover","space","spirit"],"created_at":"2026-02-26T13:09:14.593Z","updated_at":"2026-02-26T13:09:17.489Z","avatar_url":"https://github.com/james-langridge.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mars Vista API\n\nA modern REST API for Mars rover imagery, providing unified access to over 1.5 million photos from NASA's Perseverance, Curiosity, Opportunity, and Spirit missions.\n\n[![CI](https://github.com/james-langridge/mars-vista-api/actions/workflows/ci.yml/badge.svg)](https://github.com/james-langridge/mars-vista-api/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## Features\n\n- **Unified API** - One interface for all four Mars rovers\n- **Complete NASA Data** - 100% metadata preservation (vs ~5% in other APIs)\n- **Mars Time Queries** - Filter by sol, local solar time, golden hour\n- **Location Search** - Query by site, drive, or proximity\n- **Multiple Image Sizes** - Thumbnails to full resolution\n- **Production Ready** - Rate limiting, caching, comprehensive documentation\n\n## Quick Start\n\n### Using the Public API\n\nGet a free API key at [marsvista.dev/signin](https://marsvista.dev/signin), then:\n\n```bash\ncurl -H \"X-API-Key: YOUR_KEY\" \\\n  \"https://api.marsvista.dev/api/v2/photos?rovers=perseverance\u0026sol=1000\"\n```\n\n### Self-Hosting\n\n```bash\n# Clone and start\ngit clone https://github.com/james-langridge/mars-vista-api.git\ncd mars-vista-api\n\n# Start dependencies\ndocker compose up -d\n\n# Apply migrations\ndotnet ef database update --project src/MarsVista.Core\n\n# Run the API\ndotnet run --project src/MarsVista.Api\n```\n\nAPI runs at `http://localhost:5127`. See [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md) for production setup.\n\n## API Documentation\n\n| Resource | Description |\n|----------|-------------|\n| [API Reference](https://marsvista.dev/docs) | Complete documentation |\n| [Swagger UI](https://api.marsvista.dev/swagger) | Interactive explorer |\n| [OpenAPI Spec](openapi.json) | Machine-readable specification |\n\n### For AI Agents\n\nLLM-optimized documentation:\n\n| Resource | URL |\n|----------|-----|\n| Discovery | [marsvista.dev/llms.txt](https://marsvista.dev/llms.txt) |\n| TypeScript Types | [docs/llm/types.ts](https://marsvista.dev/docs/llm/types.ts) |\n| Reference | [docs/llm/reference.md](https://marsvista.dev/docs/llm/reference.md) |\n\n## API Examples\n\n### Get Rovers\n\n```bash\ncurl -H \"X-API-Key: YOUR_KEY\" \\\n  \"https://api.marsvista.dev/api/v2/rovers\"\n```\n\n### Query Photos\n\n```bash\n# By rover and sol\ncurl -H \"X-API-Key: YOUR_KEY\" \\\n  \"https://api.marsvista.dev/api/v2/photos?rovers=curiosity\u0026sol_min=1000\u0026sol_max=1100\"\n\n# By date range\ncurl -H \"X-API-Key: YOUR_KEY\" \\\n  \"https://api.marsvista.dev/api/v2/photos?earth_date_min=2024-01-01\u0026earth_date_max=2024-01-31\"\n\n# Golden hour photos\ncurl -H \"X-API-Key: YOUR_KEY\" \\\n  \"https://api.marsvista.dev/api/v2/photos?rovers=perseverance\u0026is_golden_hour=true\"\n```\n\n### Include Related Data\n\n```bash\ncurl -H \"X-API-Key: YOUR_KEY\" \\\n  \"https://api.marsvista.dev/api/v2/photos?include=rover,camera\u0026per_page=10\"\n```\n\n## Project Structure\n\n```\nmars-vista-api/\n├── src/\n│   ├── MarsVista.Api/         # REST API service\n│   ├── MarsVista.Core/        # Shared library (entities, DbContext)\n│   └── MarsVista.Scraper/     # NASA data ingestion\n├── tests/                     # Unit and integration tests\n├── docs/                      # Documentation\n│   ├── DEPLOYMENT.md          # Deployment guide\n│   ├── CONFIGURATION.md       # Environment variables\n│   ├── ARCHITECTURE.md        # System design\n│   └── CONTRIBUTING.md        # Contribution guidelines\n├── examples/                  # API collection examples\n├── scripts/                   # Utility scripts\n├── openapi.json              # OpenAPI specification\n└── docker-compose.yml        # Local development\n```\n\n## Tech Stack\n\n- **.NET 9** - ASP.NET Core, Entity Framework Core\n- **PostgreSQL 15** - JSONB for metadata preservation\n- **Redis** - Two-level caching (L1 memory + L2 distributed)\n- **Docker** - Containerized deployment\n\n## Development\n\n### Prerequisites\n\n- .NET 9.0 SDK\n- Docker and Docker Compose\n- PostgreSQL 15+ (or use Docker)\n- Redis 7+ (optional, for caching)\n\n### Setup\n\n```bash\n# Clone repository\ngit clone https://github.com/james-langridge/mars-vista-api.git\ncd mars-vista-api\n\n# Start PostgreSQL and Redis\ndocker compose up -d\n\n# Apply database migrations\ndotnet ef database update --project src/MarsVista.Core\n\n# Run the API\ndotnet run --project src/MarsVista.Api\n\n# Run tests\ndotnet test\n```\n\n### Populating Data\n\n```bash\n# Scrape photos for a sol range\ncurl -X POST \"http://localhost:5127/api/v1/admin/scraper/perseverance?startSol=1000\u0026endSol=1010\" \\\n  -H \"X-API-Key: YOUR_ADMIN_KEY\"\n```\n\nSee [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md) for bulk data ingestion.\n\n## Deployment\n\n### Docker\n\n```bash\ndocker compose -f docker-compose.production.yml up -d\n```\n\n### Railway\n\nSee [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md) for Railway deployment instructions.\n\n### Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `DATABASE_URL` | Yes | PostgreSQL connection string |\n| `REDIS_URL` | No | Redis connection (falls back to memory) |\n| `INTERNAL_API_SECRET` | No | For dashboard integration |\n| `ADMIN_API_KEY` | No | For scraper control |\n\nSee [docs/CONFIGURATION.md](docs/CONFIGURATION.md) for complete reference.\n\n## Contributing\n\nContributions are welcome! Please read [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md) for guidelines.\n\n## License\n\nMIT License - see [LICENSE](LICENSE).\n\n## Acknowledgments\n\nRaw image data provided by NASA/JPL-Caltech. This project is not affiliated with or endorsed by NASA.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjames-langridge%2Fmars-vista-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjames-langridge%2Fmars-vista-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjames-langridge%2Fmars-vista-api/lists"}